* Apply patch from Morten Omholt Alver (upstream author) to enable 'enter' in
authorgregor herrmann <gregoa@debian.org>
Sun, 24 Sep 2006 22:33:53 +0000 (22:33 -0000)
committergregor herrmann <gregoa@debian.org>
Sun, 24 Sep 2006 22:33:53 +0000 (22:33 -0000)
  dialogs - thanks! (Closes: #387235)

debian/changelog
debian/patches/00list
debian/patches/02_button.dpatch [new file with mode: 0755]

index a10fd6a6308171d1e97315459c003b0b9afaf6e9..1b3583e8640076bc90010708591c0fbea6867c34 100644 (file)
@@ -3,8 +3,10 @@ jabref (2.1-4) unstable; urgency=low
   * Apply patch from Matthias Klose to enable building with a free java compiler -
     thanks! (Cf. #383006)
   * Change build dependencies accordingly.
+  * Apply patch from Morten Omholt Alver (upstream author) to enable 'enter' in
+    dialogs - thanks! (Closes: #387235)
 
- -- gregor herrmann <gregor+debian@comodo.priv.at>  Sun, 24 Sep 2006 19:29:05 +0200
+ -- gregor herrmann <gregor+debian@comodo.priv.at>  Mon, 25 Sep 2006 00:32:40 +0200
 
 jabref (2.1-3) unstable; urgency=low
 
index 2a20555a733acfcd9507970f2944784fe4617f94..00fb37424d0e27b18c589f2d84c5b1279dd0511d 100644 (file)
@@ -1 +1,2 @@
 01_free_javac
+02_button
diff --git a/debian/patches/02_button.dpatch b/debian/patches/02_button.dpatch
new file mode 100755 (executable)
index 0000000..32088b0
--- /dev/null
@@ -0,0 +1,27 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 02_button.dpatch by  <gregor+debian@comodo.priv.at>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Make buttons react to 'enter'.
+##     Patch by Morten Omholt Alver (upstream author)
+
+@DPATCH@
+diff -urNad jabref~/src/java/net/sf/jabref/JabRef.java jabref/src/java/net/sf/jabref/JabRef.java
+--- jabref~/src/java/net/sf/jabref/JabRef.java 2006-08-10 21:38:43.000000000 +0200
++++ jabref/src/java/net/sf/jabref/JabRef.java  2006-09-25 00:30:22.000000000 +0200
+@@ -654,6 +654,15 @@
+                             UIManager.put("SimpleInternalFrame.activeTitleBackground", GUIGlobals.gradientBlue);
+                             //UIManager.put("TabbedPane.selected", Color.red);
+                         }
++
++                      if (!Globals.ON_WIN && !Globals.ON_MAC) {
++                            // For Linux, add Enter as button click key:
++                            UIDefaults def = UIManager.getDefaults();
++                            InputMap im = (InputMap)def.get("Button.focusInputMap");
++                            im.put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0, false), "pressed");
++                            im.put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0, true), "released");
++                        }
++
+                     } catch (Throwable ex) {
+                         ex.printStackTrace();
+                         System.err.println("Trying to set system default Look&Feel...");