[josm-plugins] 148/369: debian/patches/160-wmsplugin_max-connections.patch removed, merged upstream

Bas Couwenberg sebastic at xs4all.nl
Sat Oct 18 12:03:36 UTC 2014


This is an automated email from the git hooks/post-receive script.

sebastic-guest pushed a commit to branch master
in repository josm-plugins.

commit f2aef57c189dbbd7d0572260d7d83aadb3601b7b
Author: David Paleino <dapal at debian.org>
Date:   Sun Jul 18 17:28:32 2010 +0200

    debian/patches/160-wmsplugin_max-connections.patch removed, merged upstream
---
 debian/changelog                                   |   4 +-
 debian/patches/160-wmsplugin_max-connections.patch | 121 ---------------------
 debian/patches/series                              |   1 -
 3 files changed, 3 insertions(+), 123 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 7224209..3a96f39 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,10 @@
 josm-plugins (0.0.svn22363-1) UNRELEASED; urgency=low
 
   * New upstream snapshot
+  * debian/patches/160-wmsplugin_max-connections.patch removed, merged
+    upstream
 
- -- David Paleino <dapal at debian.org>  Sun, 18 Jul 2010 17:26:28 +0200
+ -- David Paleino <dapal at debian.org>  Sun, 18 Jul 2010 17:28:07 +0200
 
 josm-plugins (0.0.svn21666-2) unstable; urgency=low
 
diff --git a/debian/patches/160-wmsplugin_max-connections.patch b/debian/patches/160-wmsplugin_max-connections.patch
deleted file mode 100644
index 6f36d16..0000000
--- a/debian/patches/160-wmsplugin_max-connections.patch
+++ /dev/null
@@ -1,121 +0,0 @@
-From: Matteo Gottardi <matgott at tin.it>
-Date: Wed, 16 Jun 2010 12:05:59 +0200
-Subject: [PATCH] max number of concurrent connections
-
----
- wmsplugin/src/wmsplugin/WMSLayer.java            |   15 +++++++++++++--
- wmsplugin/src/wmsplugin/WMSPlugin.java           |    6 ++++++
- wmsplugin/src/wmsplugin/WMSPreferenceEditor.java |   13 ++++++++++++-
- 3 files changed, 31 insertions(+), 3 deletions(-)
-
---- josm-plugins.orig/wmsplugin/src/wmsplugin/WMSLayer.java
-+++ josm-plugins/wmsplugin/src/wmsplugin/WMSLayer.java
-@@ -37,12 +37,14 @@ import org.openstreetmap.josm.gui.dialog
- import org.openstreetmap.josm.gui.layer.Layer;
- import org.openstreetmap.josm.io.CacheFiles;
- import org.openstreetmap.josm.tools.ImageProvider;
-+import org.openstreetmap.josm.data.Preferences.PreferenceChangeEvent;
-+import org.openstreetmap.josm.data.Preferences.PreferenceChangedListener;
- 
- /**
-  * This is a layer that grabs the current screen from an WMS server. The data
-  * fetched this way is tiled and managed to the disc to reduce server load.
-  */
--public class WMSLayer extends Layer {
-+public class WMSLayer extends Layer implements PreferenceChangedListener {
- 	protected static final Icon icon =
- 		new ImageIcon(Toolkit.getDefaultToolkit().createImage(WMSPlugin.class.getResource("/images/wms_small.png")));
- 
-@@ -96,7 +98,7 @@ public class WMSLayer extends Layer {
- 		}
- 		resolution = mv.getDist100PixelText();
- 
--		executor = Executors.newFixedThreadPool(3);
-+		executor = Executors.newFixedThreadPool( Main.pref.getInteger("wmsplugin.numThreads", WMSPlugin.simultaneousConnections) );
- 		if (baseURL != null && !baseURL.startsWith("html:") && !WMSGrabber.isUrlWithPatterns(baseURL)) {
- 			if (!(baseURL.endsWith("&") || baseURL.endsWith("?"))) {
- 				if (!confirmMalformedUrl(baseURL)) {
-@@ -109,6 +111,8 @@ public class WMSLayer extends Layer {
- 				}
- 			}
- 		}
-+
-+		Main.pref.addPreferenceChangeListener(this);
- 	}
- 
- 	public boolean hasAutoDownload(){
-@@ -475,4 +479,11 @@ public class WMSLayer extends Layer {
- 			WMSPlugin.refreshMenu();
- 		}
- 	}
-+
-+	public void preferenceChanged(PreferenceChangeEvent event) {
-+		if (event.getKey().equals("wmsplugin.simultaneousConnections")) {
-+			executor.shutdownNow();
-+			executor = Executors.newFixedThreadPool( Main.pref.getInteger("wmsplugin.numThreads", WMSPlugin.simultaneousConnections) );
-+		}
-+	}
- }
---- josm-plugins.orig/wmsplugin/src/wmsplugin/WMSPlugin.java
-+++ josm-plugins/wmsplugin/src/wmsplugin/WMSPlugin.java
-@@ -52,6 +52,7 @@ public class WMSPlugin extends Plugin {
-     static boolean doOverlap = false;
-     static int overlapEast = 14;
-     static int overlapNorth = 4;
-+    static int simultaneousConnections = 3;
- 
-     // remember state of menu item to restore on changed preferences
-     static private boolean menuEnabled = false;
-@@ -110,6 +111,11 @@ public class WMSPlugin extends Plugin {
-             overlapNorth = Integer.valueOf(prefs.get("wmsplugin.url.overlapNorth"));
-         } catch (Exception e) {} // If sth fails, we drop to default settings.
- 
-+        // Load the settings for number of simultaneous connections
-+        try {
-+            simultaneousConnections = Integer.valueOf(prefs.get("wmsplugin.simultanousConnections"));
-+        } catch (Exception e) {} // If sth fails, we drop to default settings.
-+
-         // And then the names+urls of WMS servers
-         int prefid = 0;
-         String name = null;
---- josm-plugins.orig/wmsplugin/src/wmsplugin/WMSPreferenceEditor.java
-+++ josm-plugins/wmsplugin/src/wmsplugin/WMSPreferenceEditor.java
-@@ -38,6 +38,7 @@ public class WMSPreferenceEditor impleme
-     JCheckBox overlapCheckBox;
-     JSpinner spinEast;
-     JSpinner spinNorth;
-+    JSpinner spinSimConn;
- 
-     public void addGui(final PreferenceTabbedPane gui) {
-         JPanel p = gui.createPreferenceTab("wms", tr("WMS Plugin Preferences"), tr("Modify list of WMS servers displayed in the WMS plugin menu"));
-@@ -180,6 +181,15 @@ public class WMSPreferenceEditor impleme
-         overlapPanel.add(spinNorth);
- 
-         p.add(overlapPanel);
-+
-+        // Simultaneous connections
-+        p.add(Box.createHorizontalGlue(), GBC.eol().fill(GridBagConstraints.HORIZONTAL));
-+        JLabel labelSimConn = new JLabel(tr("Simultaneous connections"));
-+        spinSimConn = new JSpinner(new SpinnerNumberModel(WMSPlugin.simultaneousConnections, 1, 30, 1));
-+        JPanel overlapPanelSimConn = new JPanel(new FlowLayout());
-+        overlapPanelSimConn.add(labelSimConn);
-+        overlapPanelSimConn.add(spinSimConn);
-+        p.add(overlapPanelSimConn);
-     }
- 
-     public boolean ok() {
-@@ -222,12 +232,13 @@ public class WMSPreferenceEditor impleme
-         WMSPlugin.doOverlap = overlapCheckBox.getModel().isSelected();
-         WMSPlugin.overlapEast = (Integer) spinEast.getModel().getValue();
-         WMSPlugin.overlapNorth = (Integer) spinNorth.getModel().getValue();
-+        WMSPlugin.simultaneousConnections = (Integer) spinSimConn.getModel().getValue();
- 
-         Main.pref.put("wmsplugin.url.overlap",    String.valueOf(WMSPlugin.doOverlap));
-         Main.pref.put("wmsplugin.url.overlapEast", String.valueOf(WMSPlugin.overlapEast));
-         Main.pref.put("wmsplugin.url.overlapNorth", String.valueOf(WMSPlugin.overlapNorth));
- 
--        Main.pref.put("wmsplugin.browser", browser.getEditor().getItem().toString());
-+        Main.pref.put("wmsplugin.simultaneousConnections", String.valueOf(WMSPlugin.simultaneousConnections));
-         return false;
-     }
- 
diff --git a/debian/patches/series b/debian/patches/series
index b7b6e34..18bf2fc 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -10,4 +10,3 @@
 30_slippymap.diff
 20_livegps.diff
 10_colorscheme.diff
-160-wmsplugin_max-connections.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/josm-plugins.git



More information about the Pkg-grass-devel mailing list