File: 20-bts.patch

package info (click to toggle)
josm 0.0.svn3376-1%2Bsqueeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 53,192 kB
  • ctags: 15,964
  • sloc: java: 109,690; xml: 7,599; perl: 821; makefile: 51; sh: 21
file content (110 lines) | stat: -rw-r--r-- 6,065 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
From: Andreas Putzo <andreas@putzo.net>
Subject: point to the debian BTS for bug reports.
 Pattern match debian version in about dialog.
Forwarded: no

---
 src/org/openstreetmap/josm/actions/AboutAction.java             |    7 +++
 src/org/openstreetmap/josm/data/Version.java                    |    7 +++
 src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java |   20 +++-------
 3 files changed, 19 insertions(+), 15 deletions(-)

--- josm.orig/src/org/openstreetmap/josm/actions/AboutAction.java
+++ josm/src/org/openstreetmap/josm/actions/AboutAction.java
@@ -9,6 +9,9 @@ import java.awt.GridBagLayout;
 import java.awt.event.ActionEvent;
 import java.awt.event.KeyEvent;
 
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
 import javax.swing.BorderFactory;
 import javax.swing.JLabel;
 import javax.swing.JOptionPane;
@@ -63,6 +66,8 @@ public class AboutAction extends JosmAct
         info.add(GBC.glue(0,10), GBC.eol());
         info.add(new JLabel(tr("Version {0}", version.getVersionString())), GBC.eol().fill(GBC.HORIZONTAL).insets(10,0,0,0));
         info.add(GBC.glue(0,5), GBC.eol());
+        info.add(new JLabel(tr("Debian release: {0}", version.getDebianVersionString())), GBC.eol().fill(GBC.HORIZONTAL).insets(10,0,0,0));
+        info.add(GBC.glue(0,5), GBC.eol());
         info.add(new JLabel(tr("Last change at {0}",version.getTime())), GBC.eol().fill(GBC.HORIZONTAL).insets(10,0,0,0));
         info.add(GBC.glue(0,5), GBC.eol());
         info.add(new JLabel(tr("Java Version {0}",System.getProperty("java.version"))), GBC.eol().fill(GBC.HORIZONTAL).insets(10,0,0,0));
@@ -70,7 +75,7 @@ public class AboutAction extends JosmAct
         info.add(new JLabel(tr("Homepage")), GBC.std().insets(10,0,10,0));
         info.add(new UrlLabel("http://josm.openstreetmap.de"), GBC.eol().fill(GBC.HORIZONTAL));
         info.add(new JLabel(tr("Bug Reports")), GBC.std().insets(10,0,10,0));
-        info.add(new UrlLabel("http://josm.openstreetmap.de/newticket"), GBC.eol().fill(GBC.HORIZONTAL));
+        info.add(new UrlLabel("http://bugs.debian.org"), GBC.eol().fill(GBC.HORIZONTAL));
 
         JTextArea revision = new JTextArea();
         revision.setEditable(false);
--- josm.orig/src/org/openstreetmap/josm/data/Version.java
+++ josm/src/org/openstreetmap/josm/data/Version.java
@@ -66,6 +66,7 @@ public class Version {
 
     private int version;
     private String revision;
+    private String debianVersion;
     private String time;
     private boolean isLocalBuild;
 
@@ -115,6 +116,8 @@ public class Version {
             version = JOSM_UNKNOWN_VERSION;
         }
 
+        debianVersion = properties.get("Debian-Release");
+
         // the last changed data
         //
         time = properties.get("Last Changed Date");
@@ -161,6 +164,10 @@ public class Version {
         return  version == 0 ? tr("UNKNOWN") : Integer.toString(version);
     }
 
+    public String getDebianVersionString() {
+        return  debianVersion;
+    }
+
     /**
      * Replies a text with the release attributes
      *
--- josm.orig/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java
+++ josm/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java
@@ -68,8 +68,8 @@ public final class BugReportExceptionHan
                     Main.parent,
                     "<html>"
                     + tr("An unexpected exception occurred.<br>" +
-                            "This is always a coding error. If you are running the latest<br>" +
-                            "version of JOSM, please consider being kind and file a bug report."
+                            "Please consider being kind and file a bug report.\n" +
+                            "See http://bugs.debian.org for a guide how to do this."
                     )
                     + "</html>",
                     tr("Unexpected Exception"),
@@ -120,21 +120,13 @@ public final class BugReportExceptionHan
 
                 JPanel p = new JPanel(new GridBagLayout());
                 p.add(new JMultilineLabel(
-                        tr("You have encountered an error in JOSM. Before you file a bug report " +
-                        "make sure you have updated to the latest version of JOSM here:")), GBC.eol());
-                p.add(new UrlLabel("http://josm.openstreetmap.de/#Download"), GBC.eop().insets(8,0,0,0));
+                        tr("Please report a bug against josm.")), GBC.eol());
                 p.add(new JMultilineLabel(
-                        tr("You should also update your plugins. If neither of those help please " +
-                        "file a bug report in our bugtracker using this link:")), GBC.eol());
-                p.add(new UrlLabel(url.toString(), "http://josm.openstreetmap.de/josmticket?..."), GBC.eop().insets(8,0,0,0));
+                        tr("Include your steps to get to the error (as detailed as possible)!")), GBC.eol());
                 p.add(new JMultilineLabel(
-                        tr("There the error information provided below should already be " +
-                                "filled in for you. Please include information on how to reproduce " +
-                        "the error and try to supply as much detail as possible.")), GBC.eop());
+                        tr("Try updating to the newest version of JOSM and all plugins before reporting a bug.")), GBC.eol());
                 p.add(new JMultilineLabel(
-                        tr("Alternatively, if that does not work you can manually fill in the information " +
-                        "below at this URL:")), GBC.eol());
-                p.add(new UrlLabel("http://josm.openstreetmap.de/newticket"), GBC.eop().insets(8,0,0,0));
+                        tr("Be sure to include the following information:")), GBC.eop());
                 try {
                     Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new StringSelection(text), new ClipboardOwner(){
                         public void lostOwnership(Clipboard clipboard, Transferable contents) {}