[DebianGIS-dev] [SCM] josm branch, master, updated. debian/0.0.svn2561-2-11-g5f23e30
David Paleino
dapal at debian.org
Fri Mar 12 22:34:49 UTC 2010
The following commit has been merged in the master branch:
commit 5f23e30d59cf9ccd0b15501b89a8f9199aa1a6ab
Author: David Paleino <dapal at debian.org>
Date: Fri Mar 12 23:34:01 2010 +0100
60-disable_oauth.patch added, it's still missing lots of dependencies
diff --git a/debian/changelog b/debian/changelog
index 3596220..ae2c31d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,9 +6,11 @@ josm (0.0.svn3094-1) UNRELEASED; urgency=low
- updated to apply to the new code
- 10-build.patch: don't build translations for plugins
and fix references to gettext-ant-tasks
+ - 60-disable_oauth.patch added, it's still missing lots of
+ dependencies
* debian/rules, debian/control: use quilt for patch management.
- -- David Paleino <dapal at debian.org> Fri, 12 Mar 2010 23:31:13 +0100
+ -- David Paleino <dapal at debian.org> Fri, 12 Mar 2010 23:33:32 +0100
josm (0.0.svn2561-2) unstable; urgency=low
diff --git a/debian/patches/60-disable_oauth.patch b/debian/patches/60-disable_oauth.patch
new file mode 100644
index 0000000..317eebb
--- /dev/null
+++ b/debian/patches/60-disable_oauth.patch
@@ -0,0 +1,607 @@
+From: David Paleino <dapal at debian.org>
+Subject: disable everything OAuth-related, since we're missing packaged
+ dependencies.
+Forwarded: not-needed, Debian-specific
+
+---
+ build.xml | 5 +
+ src/org/openstreetmap/josm/actions/ShowStatusReportAction.java | 5 +
+ src/org/openstreetmap/josm/gui/ExceptionDialogUtil.java | 12 +++-
+ src/org/openstreetmap/josm/gui/MainApplication.java | 4 -
+ src/org/openstreetmap/josm/gui/preferences/server/AuthenticationPreferencesPanel.java | 15 ++++-
+ src/org/openstreetmap/josm/gui/preferences/server/OAuthAccessTokenHolder.java | 10 +++
+ src/org/openstreetmap/josm/gui/preferences/server/OAuthAuthenticationPreferencesPanel.java | 27 ++++++++--
+ src/org/openstreetmap/josm/io/OsmConnection.java | 13 +++-
+ src/org/openstreetmap/josm/io/auth/CredentialsManager.java | 6 +-
+ src/org/openstreetmap/josm/io/auth/JosmPreferencesCredentialManager.java | 6 +-
+ src/org/openstreetmap/josm/tools/ExceptionUtil.java | 9 ++-
+ 11 files changed, 84 insertions(+), 28 deletions(-)
+
+--- josm.orig/src/org/openstreetmap/josm/actions/ShowStatusReportAction.java
++++ josm/src/org/openstreetmap/josm/actions/ShowStatusReportAction.java
+@@ -95,8 +95,9 @@ public final class ShowStatusReportActio
+ if (toCheck.startsWith("osm-server.username")
+ || toCheck.startsWith("osm-server.password")
+ || toCheck.startsWith("marker.show")
+- || toCheck.startsWith("oauth.access-token.key")
+- || toCheck.startsWith("oauth.access-token.secret")) {
++ ) {
++// || toCheck.startsWith("oauth.access-token.key")
++ // || toCheck.startsWith("oauth.access-token.secret")) {
+ continue;
+ }
+ text.append(line);
+--- josm.orig/src/org/openstreetmap/josm/gui/ExceptionDialogUtil.java
++++ josm/src/org/openstreetmap/josm/gui/ExceptionDialogUtil.java
+@@ -15,7 +15,7 @@ import javax.swing.JOptionPane;
+ import org.openstreetmap.josm.Main;
+ import org.openstreetmap.josm.io.ChangesetClosedException;
+ import org.openstreetmap.josm.io.IllegalDataException;
+-import org.openstreetmap.josm.io.MissingOAuthAccessTokenException;
++//import org.openstreetmap.josm.io.MissingOAuthAccessTokenException;
+ import org.openstreetmap.josm.io.OsmApiException;
+ import org.openstreetmap.josm.io.OsmApiInitializationException;
+ import org.openstreetmap.josm.io.OsmTransferException;
+@@ -249,11 +249,13 @@ public class ExceptionDialogUtil {
+ public static void explainAuthenticationFailed(OsmApiException e) {
+ String authMethod = Main.pref.get("osm-server.auth-method", "basic");
+ String msg;
++/*
+ if (authMethod.equals("oauth")) {
+ msg = ExceptionUtil.explainFailedOAuthAuthentication(e);
+ } else {
++*/
+ msg = ExceptionUtil.explainFailedBasicAuthentication(e);
+- }
++// }
+
+ HelpAwareOptionPane.showOptionDialog(
+ Main.parent,
+@@ -273,7 +275,7 @@ public class ExceptionDialogUtil {
+ public static void explainAuthorizationFailed(OsmApiException e) {
+ HelpAwareOptionPane.showOptionDialog(
+ Main.parent,
+- ExceptionUtil.explainFailedOAuthAuthorisation(e),
++ tr("OAuth authorization disabled by Debian."),
+ tr("Authorisation Failed"),
+ JOptionPane.ERROR_MESSAGE,
+ ht("/ErrorMessages#AuthenticationFailed")
+@@ -286,6 +288,7 @@ public class ExceptionDialogUtil {
+ *
+ * @param e the exception
+ */
++/*
+ public static void explainMissingOAuthAccessTokenException(MissingOAuthAccessTokenException e) {
+ HelpAwareOptionPane.showOptionDialog(
+ Main.parent,
+@@ -295,6 +298,7 @@ public class ExceptionDialogUtil {
+ ht("/ErrorMessages#MissingOAuthAccessToken")
+ );
+ }
++*/
+
+ /**
+ * Explains a {@see UnknownHostException} which has caused an {@see OsmTransferException}.
+@@ -372,10 +376,12 @@ public class ExceptionDialogUtil {
+ return;
+ }
+
++/*
+ if (e instanceof MissingOAuthAccessTokenException) {
+ explainMissingOAuthAccessTokenException((MissingOAuthAccessTokenException)e);
+ return;
+ }
++*/
+
+ if (e instanceof OsmApiException) {
+ OsmApiException oae = (OsmApiException) e;
+--- josm.orig/src/org/openstreetmap/josm/gui/MainApplication.java
++++ josm/src/org/openstreetmap/josm/gui/MainApplication.java
+@@ -19,7 +19,7 @@ import java.util.Map;
+ import javax.swing.JFrame;
+
+ import org.openstreetmap.josm.Main;
+-import org.openstreetmap.josm.gui.preferences.server.OAuthAccessTokenHolder;
++//import org.openstreetmap.josm.gui.preferences.server.OAuthAccessTokenHolder;
+ import org.openstreetmap.josm.gui.progress.ProgressMonitor;
+ import org.openstreetmap.josm.io.DefaultProxySelector;
+ import org.openstreetmap.josm.io.auth.CredentialsManagerFactory;
+@@ -152,7 +152,7 @@ public class MainApplication extends Mai
+ DefaultAuthenticator.createInstance(CredentialsManagerFactory.getCredentialManager());
+ Authenticator.setDefault(DefaultAuthenticator.getInstance());
+ ProxySelector.setDefault(new DefaultProxySelector(ProxySelector.getDefault()));
+- OAuthAccessTokenHolder.getInstance().init(Main.pref, CredentialsManagerFactory.getCredentialManager());
++ //OAuthAccessTokenHolder.getInstance().init(Main.pref, CredentialsManagerFactory.getCredentialManager());
+
+ // asking for help? show help and exit
+ if (args.containsKey("help")) {
+--- josm.orig/src/org/openstreetmap/josm/gui/preferences/server/AuthenticationPreferencesPanel.java
++++ josm/src/org/openstreetmap/josm/gui/preferences/server/AuthenticationPreferencesPanel.java
+@@ -39,7 +39,7 @@ public class AuthenticationPreferencesPa
+ /** the panel for the basic authentication parameters */
+ private BasicAuthenticationPreferencesPanel pnlBasicAuthPreferences;
+ /** the panel for the OAuth authentication parameters */
+- private OAuthAuthenticationPreferencesPanel pnlOAuthPreferences;
++// private OAuthAuthenticationPreferencesPanel pnlOAuthPreferences;
+
+ /**
+ * builds the UI
+@@ -66,6 +66,7 @@ public class AuthenticationPreferencesPa
+ add(rbOAuth = new JRadioButton(), gc);
+ rbOAuth.setText(tr("Use OAuth"));
+ rbOAuth.setToolTipText(tr("Select to use OAuth as authentication mechanism"));
++ rbOAuth.setEnabled(false);
+ rbOAuth.addItemListener(authChangeListener);
+
+ //-- radio button for OAuth
+@@ -85,7 +86,7 @@ public class AuthenticationPreferencesPa
+
+ //-- the two panel for authentication parameters
+ pnlBasicAuthPreferences = new BasicAuthenticationPreferencesPanel();
+- pnlOAuthPreferences = new OAuthAuthenticationPreferencesPanel();
++// pnlOAuthPreferences = new OAuthAuthenticationPreferencesPanel();
+
+ rbBasicAuthentication.setSelected(true);
+ pnlAuthenticationParameteters.add(pnlBasicAuthPreferences, BorderLayout.CENTER);
+@@ -107,7 +108,7 @@ public class AuthenticationPreferencesPa
+ rbBasicAuthentication.setSelected(true);
+ }
+ pnlBasicAuthPreferences.initFromPreferences();
+- pnlOAuthPreferences.initFromPreferences();
++// pnlOAuthPreferences.initFromPreferences();
+ }
+
+ public void saveToPreferences() {
+@@ -122,6 +123,7 @@ public class AuthenticationPreferencesPa
+ if (authMethod.equals("basic")) {
+ // save username and password and clear the OAuth token
+ pnlBasicAuthPreferences.saveToPreferences();
++/*
+ OAuthAccessTokenHolder.getInstance().clear();
+ OAuthAccessTokenHolder.getInstance().save(Main.pref, CredentialsManagerFactory.getCredentialManager());
+ } else if (authMethod.equals("oauth")) {
+@@ -129,6 +131,7 @@ public class AuthenticationPreferencesPa
+ pnlBasicAuthPreferences.clearPassword();
+ pnlBasicAuthPreferences.saveToPreferences();
+ pnlOAuthPreferences.saveToPreferences();
++*/
+ }
+ }
+
+@@ -141,18 +144,22 @@ public class AuthenticationPreferencesPa
+ pnlAuthenticationParameteters.removeAll();
+ pnlAuthenticationParameteters.add(pnlBasicAuthPreferences, BorderLayout.CENTER);
+ pnlBasicAuthPreferences.revalidate();
+- } else {
++/* } else {
+ pnlAuthenticationParameteters.removeAll();
+ pnlAuthenticationParameteters.add(pnlOAuthPreferences, BorderLayout.CENTER);
+ pnlOAuthPreferences.revalidate();
++*/
+ }
++
+ repaint();
+ }
+ }
+
+ public void propertyChange(PropertyChangeEvent evt) {
++/*
+ if (pnlOAuthPreferences != null) {
+ pnlOAuthPreferences.propertyChange(evt);
+ }
++*/
+ }
+ }
+--- josm.orig/src/org/openstreetmap/josm/gui/preferences/server/OAuthAccessTokenHolder.java
++++ josm/src/org/openstreetmap/josm/gui/preferences/server/OAuthAccessTokenHolder.java
+@@ -6,7 +6,7 @@ import static org.openstreetmap.josm.too
+ import java.util.logging.Logger;
+
+ import org.openstreetmap.josm.data.Preferences;
+-import org.openstreetmap.josm.data.oauth.OAuthToken;
++//import org.openstreetmap.josm.data.oauth.OAuthToken;
+ import org.openstreetmap.josm.io.auth.CredentialsManager;
+ import org.openstreetmap.josm.io.auth.CredentialsManagerException;
+ import org.openstreetmap.josm.tools.CheckParameterUtil;
+@@ -90,11 +90,13 @@ public class OAuthAccessTokenHolder {
+ this.accessTokenSecret = accessTokenSecret;
+ }
+
++/*
+ public OAuthToken getAccessToken() {
+ if (!containsAccessToken())
+ return null;
+ return new OAuthToken(accessTokenKey, accessTokenSecret);
+ }
++*/
+
+ /**
+ * Sets the access token hold by this holder.
+@@ -112,6 +114,7 @@ public class OAuthAccessTokenHolder {
+ *
+ * @param token the access token. Can be null to clear the content in this holder.
+ */
++/*
+ public void setAccessToken(OAuthToken token) {
+ if (token == null) {
+ this.accessTokenKey = null;
+@@ -121,6 +124,7 @@ public class OAuthAccessTokenHolder {
+ this.accessTokenSecret = token.getSecret();
+ }
+ }
++*/
+
+ /**
+ * Replies true if this holder contains an complete access token, consisting of an
+@@ -143,6 +147,7 @@ public class OAuthAccessTokenHolder {
+ public void init(Preferences pref, CredentialsManager cm) throws IllegalArgumentException {
+ CheckParameterUtil.ensureParameterNotNull(pref, "pref");
+ CheckParameterUtil.ensureParameterNotNull(cm, "cm");
++/*
+ OAuthToken token = null;
+ try {
+ token = cm.lookupOAuthAccessToken();
+@@ -156,6 +161,7 @@ public class OAuthAccessTokenHolder {
+ accessTokenKey = token.getKey();
+ accessTokenSecret = token.getSecret();
+ }
++*/
+ }
+
+ /**
+@@ -171,6 +177,7 @@ public class OAuthAccessTokenHolder {
+ CheckParameterUtil.ensureParameterNotNull(preferences, "preferences");
+ CheckParameterUtil.ensureParameterNotNull(cm, "cm");
+ preferences.put("oauth.access-token.save-to-preferences", saveToPreferences);
++/*
+ try {
+ if (!saveToPreferences) {
+ cm.storeOAuthAccessToken(null);
+@@ -182,6 +189,7 @@ public class OAuthAccessTokenHolder {
+ System.err.println(tr("Warning: Failed to store OAuth Access Token to credentials manager"));
+ System.err.println(tr("Current credential manager is of type ''{0}''", cm.getClass().getName()));
+ }
++*/
+ }
+
+ /**
+--- josm.orig/src/org/openstreetmap/josm/io/OsmConnection.java
++++ josm/src/org/openstreetmap/josm/io/OsmConnection.java
+@@ -12,12 +12,14 @@ import java.nio.charset.Charset;
+ import java.nio.charset.CharsetEncoder;
+ import java.util.logging.Logger;
+
++/*
+ import oauth.signpost.OAuthConsumer;
+ import oauth.signpost.exception.OAuthException;
++*/
+
+ import org.openstreetmap.josm.Main;
+-import org.openstreetmap.josm.data.oauth.OAuthParameters;
+-import org.openstreetmap.josm.gui.preferences.server.OAuthAccessTokenHolder;
++//import org.openstreetmap.josm.data.oauth.OAuthParameters;
++//import org.openstreetmap.josm.gui.preferences.server.OAuthAccessTokenHolder;
+ import org.openstreetmap.josm.io.auth.CredentialsManagerException;
+ import org.openstreetmap.josm.io.auth.CredentialsManagerFactory;
+ import org.openstreetmap.josm.io.auth.CredentialsManagerResponse;
+@@ -35,7 +37,7 @@ public class OsmConnection {
+
+ protected boolean cancel = false;
+ protected HttpURLConnection activeConnection;
+- protected OAuthParameters oauthParameters;
++// protected OAuthParameters oauthParameters;
+
+ /**
+ * Initialize the http defaults and the authenticator.
+@@ -111,6 +113,7 @@ public class OsmConnection {
+ * @throws OsmTransferException thrown if there is currently no OAuth Access Token configured
+ * @throws OsmTransferException thrown if signing fails
+ */
++/*
+ protected void addOAuthAuthorizationHeader(HttpURLConnection connection) throws OsmTransferException {
+ if (oauthParameters == null) {
+ oauthParameters = OAuthParameters.createFromPreferences(Main.pref);
+@@ -126,13 +129,15 @@ public class OsmConnection {
+ throw new OsmTransferException(tr("Failed to sign a HTTP connection with an OAuth Authentication header"), e);
+ }
+ }
+-
++*/
+ protected void addAuth(HttpURLConnection connection) throws OsmTransferException {
+ String authMethod = Main.pref.get("osm-server.auth-method", "basic");
+ if (authMethod.equals("basic")) {
+ addBasicAuthorizationHeader(connection);
++/*
+ } else if (authMethod.equals("oauth")) {
+ addOAuthAuthorizationHeader(connection);
++*/
+ } else {
+ String msg = tr("Warning: unexpected value for preference ''{0}''. Got ''{1}''.", "osm-server.auth-method", authMethod);
+ System.err.println(msg);
+--- josm.orig/src/org/openstreetmap/josm/io/auth/CredentialsManager.java
++++ josm/src/org/openstreetmap/josm/io/auth/CredentialsManager.java
+@@ -4,7 +4,7 @@ package org.openstreetmap.josm.io.auth;
+ import java.net.PasswordAuthentication;
+ import java.net.Authenticator.RequestorType;
+
+-import org.openstreetmap.josm.data.oauth.OAuthToken;
++//import org.openstreetmap.josm.data.oauth.OAuthToken;
+
+ /**
+ * A CredentialManager manages two credentials:
+@@ -57,7 +57,7 @@ public interface CredentialsManager {
+ * @return the current OAuth Access Token to access the OSM server.
+ * @throws CredentialsManagerException thrown if something goes wrong
+ */
+- public OAuthToken lookupOAuthAccessToken() throws CredentialsManagerException;
++// public OAuthToken lookupOAuthAccessToken() throws CredentialsManagerException;
+
+ /**
+ * Stores the OAuth Access Token <code>accessToken</code>.
+@@ -65,5 +65,5 @@ public interface CredentialsManager {
+ * @param accessToken the access Token. null, to remove the Access Token.
+ * @throws CredentialsManagerException thrown if something goes wrong
+ */
+- public void storeOAuthAccessToken(OAuthToken accessToken) throws CredentialsManagerException;
++// public void storeOAuthAccessToken(OAuthToken accessToken) throws CredentialsManagerException;
+ }
+--- josm.orig/src/org/openstreetmap/josm/io/auth/JosmPreferencesCredentialManager.java
++++ josm/src/org/openstreetmap/josm/io/auth/JosmPreferencesCredentialManager.java
+@@ -5,7 +5,7 @@ import java.net.PasswordAuthentication;
+ import java.net.Authenticator.RequestorType;
+
+ import org.openstreetmap.josm.Main;
+-import org.openstreetmap.josm.data.oauth.OAuthToken;
++//import org.openstreetmap.josm.data.oauth.OAuthToken;
+ import org.openstreetmap.josm.gui.io.CredentialDialog;
+ import org.openstreetmap.josm.gui.preferences.server.ProxyPreferencesPanel;
+
+@@ -112,6 +112,7 @@ public class JosmPreferencesCredentialMa
+ * @return the current OAuth Access Token to access the OSM server.
+ * @throws CredentialsManagerException thrown if something goes wrong
+ */
++/*
+ public OAuthToken lookupOAuthAccessToken() throws CredentialsManagerException {
+ String accessTokenKey = Main.pref.get("oauth.access-token.key", null);
+ String accessTokenSecret = Main.pref.get("oauth.access-token.secret", null);
+@@ -119,6 +120,7 @@ public class JosmPreferencesCredentialMa
+ return null;
+ return new OAuthToken(accessTokenKey, accessTokenSecret);
+ }
++*/
+
+ /**
+ * Stores the OAuth Access Token <code>accessToken</code>.
+@@ -126,6 +128,7 @@ public class JosmPreferencesCredentialMa
+ * @param accessToken the access Token. null, to remove the Access Token.
+ * @throws CredentialsManagerException thrown if something goes wrong
+ */
++/*
+ public void storeOAuthAccessToken(OAuthToken accessToken) throws CredentialsManagerException {
+ if (accessToken == null) {
+ Main.pref.put("oauth.access-token.key", null);
+@@ -135,4 +138,5 @@ public class JosmPreferencesCredentialMa
+ Main.pref.put("oauth.access-token.secret", accessToken.getSecret());
+ }
+ }
++*/
+ }
+--- josm.orig/src/org/openstreetmap/josm/tools/ExceptionUtil.java
++++ josm/src/org/openstreetmap/josm/tools/ExceptionUtil.java
+@@ -18,10 +18,10 @@ import java.util.regex.Matcher;
+ import java.util.regex.Pattern;
+
+ import org.openstreetmap.josm.Main;
+-import org.openstreetmap.josm.gui.preferences.server.OAuthAccessTokenHolder;
++//import org.openstreetmap.josm.gui.preferences.server.OAuthAccessTokenHolder;
+ import org.openstreetmap.josm.io.ChangesetClosedException;
+ import org.openstreetmap.josm.io.IllegalDataException;
+-import org.openstreetmap.josm.io.MissingOAuthAccessTokenException;
++//import org.openstreetmap.josm.io.MissingOAuthAccessTokenException;
+ import org.openstreetmap.josm.io.OsmApi;
+ import org.openstreetmap.josm.io.OsmApiException;
+ import org.openstreetmap.josm.io.OsmApiInitializationException;
+@@ -51,6 +51,7 @@ public class ExceptionUtil {
+ *
+ * @param e the exception
+ */
++/*
+ public static String explainMissingOAuthAccessTokenException(MissingOAuthAccessTokenException e) {
+ e.printStackTrace();
+ String msg = tr(
+@@ -63,6 +64,7 @@ public class ExceptionUtil {
+ );
+ return msg;
+ }
++*/
+
+ /**
+ * Explains a precondition exception when a child relation could not be deleted because
+@@ -118,6 +120,7 @@ public class ExceptionUtil {
+ );
+ }
+
++/*
+ public static String explainFailedOAuthAuthentication(OsmApiException e) {
+ e.printStackTrace();
+ return tr("<html>"
+@@ -140,6 +143,8 @@ public class ExceptionUtil {
+ e.getAccessedUrl() == null ? tr("unknown") : e.getAccessedUrl()
+ );
+ }
++*/
++
+ /**
+ * Explains an error due to a 409 conflict
+ *
+--- josm.orig/build.xml
++++ josm/build.xml
+@@ -107,9 +107,12 @@ Debian-Release: ${debian.version}
+
+ <target name="compile" depends="init">
+ <javac srcdir="src" classpathref="classpath" destdir="build"
+- target="1.5" source="1.5" debug="on" encoding="UTF-8">
++ target="1.5" source="1.5" debug="on" encoding="UTF-8"
++ excludes="org/openstreetmap/josm/gui/oauth/,org/openstreetmap/josm/data/oauth/">
++<!--
+ <compilerarg value="-Xlint:deprecation"/>
+ <compilerarg value="-Xlint:unchecked"/>
++-->
+ </javac>
+ <ant target="build" dir="i18n"/>
+ </target>
+--- josm.orig/src/org/openstreetmap/josm/gui/preferences/server/OAuthAuthenticationPreferencesPanel.java
++++ josm/src/org/openstreetmap/josm/gui/preferences/server/OAuthAuthenticationPreferencesPanel.java
+@@ -25,13 +25,17 @@ import javax.swing.JPanel;
+ import javax.swing.JTextField;
+
+ import org.openstreetmap.josm.Main;
++/*
+ import org.openstreetmap.josm.data.oauth.OAuthParameters;
+ import org.openstreetmap.josm.data.oauth.OAuthToken;
++*/
+ import org.openstreetmap.josm.gui.JMultilineLabel;
+ import org.openstreetmap.josm.gui.SideButton;
++/*
+ import org.openstreetmap.josm.gui.oauth.AdvancedOAuthPropertiesPanel;
+ import org.openstreetmap.josm.gui.oauth.OAuthAuthorizationWizard;
+ import org.openstreetmap.josm.gui.oauth.TestAccessTokenTask;
++*/
+ import org.openstreetmap.josm.io.auth.CredentialsManagerFactory;
+ import org.openstreetmap.josm.tools.ImageProvider;
+
+@@ -50,7 +54,7 @@ public class OAuthAuthenticationPreferen
+ private JPanel pnlAuthorisationMessage;
+ private NotYetAuthorisedPanel pnlNotYetAuthorised;
+ private AlreadyAuthorisedPanel pnlAlreadyAuthorised;
+- private AdvancedOAuthPropertiesPanel pnlAdvancedProperties;
++// private AdvancedOAuthPropertiesPanel pnlAdvancedProperties;
+ private String apiUrl;
+ private JCheckBox cbShowAdvancedParameters;
+ private JCheckBox cbSaveToPreferences;
+@@ -73,7 +77,7 @@ public class OAuthAuthenticationPreferen
+ cbShowAdvancedParameters.addItemListener(
+ new ItemListener() {
+ public void itemStateChanged(ItemEvent evt) {
+- pnlAdvancedProperties.setVisible(evt.getStateChange() == ItemEvent.SELECTED);
++// pnlAdvancedProperties.setVisible(evt.getStateChange() == ItemEvent.SELECTED);
+ }
+ }
+ );
+@@ -90,6 +94,7 @@ public class OAuthAuthenticationPreferen
+ gc.fill = GridBagConstraints.BOTH;
+ gc.weightx = 1.0;
+ gc.weighty = 1.0;
++/*
+ pnl.add(pnlAdvancedProperties = new AdvancedOAuthPropertiesPanel(), gc);
+ pnlAdvancedProperties.initFromPreferences(Main.pref);
+ pnlAdvancedProperties.setBorder(
+@@ -99,6 +104,7 @@ public class OAuthAuthenticationPreferen
+ )
+ );
+ pnlAdvancedProperties.setVisible(false);
++*/
+ return pnl;
+ }
+
+@@ -129,14 +135,15 @@ public class OAuthAuthenticationPreferen
+
+ protected void refreshView() {
+ pnlAuthorisationMessage.removeAll();
+- if (OAuthAccessTokenHolder.getInstance().containsAccessToken()) {
++/* if (OAuthAccessTokenHolder.getInstance().containsAccessToken()) {
+ pnlAuthorisationMessage.add(pnlAlreadyAuthorised, BorderLayout.CENTER);
+ pnlAlreadyAuthorised.refreshView();
+ pnlAlreadyAuthorised.revalidate();
+ } else {
++*/
+ pnlAuthorisationMessage.add(pnlNotYetAuthorised, BorderLayout.CENTER);
+ pnlNotYetAuthorised.revalidate();
+- }
++// }
+ repaint();
+ }
+
+@@ -163,9 +170,11 @@ public class OAuthAuthenticationPreferen
+ * Saves the current values to preferences
+ */
+ public void saveToPreferences() {
++/*
+ OAuthAccessTokenHolder.getInstance().setSaveToPreferences(cbSaveToPreferences.isSelected());
+ OAuthAccessTokenHolder.getInstance().save(Main.pref, CredentialsManagerFactory.getCredentialManager());
+ pnlAdvancedProperties.getAdvancedParameters().saveToPreferences(Main.pref);
++*/
+ }
+
+ /**
+@@ -256,7 +265,7 @@ public class OAuthAuthenticationPreferen
+ gc.gridwidth = 2;
+ gc.weightx = 1.0;
+ add(cbSaveToPreferences = new JCheckBox(tr("Save to preferences")), gc);
+- cbSaveToPreferences.setSelected(OAuthAccessTokenHolder.getInstance().isSaveToPreferences());
++// cbSaveToPreferences.setSelected(OAuthAccessTokenHolder.getInstance().isSaveToPreferences());
+
+ // -- action buttons
+ JPanel btns = new JPanel(new FlowLayout(FlowLayout.LEFT));
+@@ -285,11 +294,13 @@ public class OAuthAuthenticationPreferen
+ }
+
+ public void refreshView() {
++/*
+ String v = OAuthAccessTokenHolder.getInstance().getAccessTokenKey();
+ tfAccessTokenKey.setText(v == null? "" : v);
+ v = OAuthAccessTokenHolder.getInstance().getAccessTokenSecret();
+ tfAccessTokenSecret.setText(v == null? "" : v);
+ cbSaveToPreferences.setSelected(OAuthAccessTokenHolder.getInstance().isSaveToPreferences());
++*/
+ }
+
+ public AlreadyAuthorisedPanel() {
+@@ -309,6 +320,7 @@ public class OAuthAuthenticationPreferen
+
+ }
+ public void actionPerformed(ActionEvent arg0) {
++/*
+ OAuthAuthorizationWizard wizard = new OAuthAuthorizationWizard(
+ OAuthAuthenticationPreferencesPanel.this,
+ apiUrl
+@@ -320,6 +332,7 @@ public class OAuthAuthenticationPreferen
+ holder.setSaveToPreferences(wizard.isSaveAccessTokenToPreferences());
+ pnlAdvancedProperties.setAdvancedParameters(wizard.getOAuthParameters());
+ refreshView();
++*/
+ }
+ }
+
+@@ -334,6 +347,7 @@ public class OAuthAuthenticationPreferen
+
+ }
+ public void actionPerformed(ActionEvent arg0) {
++/*
+ OAuthAuthorizationWizard wizard = new OAuthAuthorizationWizard(
+ OAuthAuthenticationPreferencesPanel.this,
+ apiUrl
+@@ -345,6 +359,7 @@ public class OAuthAuthenticationPreferen
+ holder.setSaveToPreferences(wizard.isSaveAccessTokenToPreferences());
+ pnlAdvancedProperties.setAdvancedParameters(wizard.getOAuthParameters());
+ refreshView();
++*/
+ }
+ }
+
+@@ -360,6 +375,7 @@ public class OAuthAuthenticationPreferen
+ }
+
+ public void actionPerformed(ActionEvent evt) {
++/*
+ OAuthToken token = OAuthAccessTokenHolder.getInstance().getAccessToken();
+ OAuthParameters parameters = OAuthParameters.createFromPreferences(Main.pref);
+ TestAccessTokenTask task = new TestAccessTokenTask(
+@@ -369,6 +385,7 @@ public class OAuthAuthenticationPreferen
+ token
+ );
+ Main.worker.submit(task);
++*/
+ }
+ }
+
diff --git a/debian/patches/series b/debian/patches/series
index 2e85da3..0406ae5 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@
20-bts.patch
40-elemstyles.patch
50-preferences_world_readable.patch
+60-disable_oauth.patch
--
Java OpenStreetMap editor
More information about the Pkg-grass-devel
mailing list