/[debian]/jabref/trunk/debian/patches/02_button.dpatch
ViewVC logotype

Contents of /jabref/trunk/debian/patches/02_button.dpatch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 358 - (show annotations)
Sun Sep 24 22:33:53 2006 UTC (14 years, 11 months ago) by gregoa
File size: 1466 byte(s)
* Apply patch from Morten Omholt Alver (upstream author) to enable 'enter' in
  dialogs - thanks! (Closes: #387235)
1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## 02_button.dpatch by <gregor+debian@comodo.priv.at>
3 ##
4 ## All lines beginning with `## DP:' are a description of the patch.
5 ## DP: Make buttons react to 'enter'.
6 ## Patch by Morten Omholt Alver (upstream author)
7
8 @DPATCH@
9 diff -urNad jabref~/src/java/net/sf/jabref/JabRef.java jabref/src/java/net/sf/jabref/JabRef.java
10 --- jabref~/src/java/net/sf/jabref/JabRef.java 2006-08-10 21:38:43.000000000 +0200
11 +++ jabref/src/java/net/sf/jabref/JabRef.java 2006-09-25 00:30:22.000000000 +0200
12 @@ -654,6 +654,15 @@
13 UIManager.put("SimpleInternalFrame.activeTitleBackground", GUIGlobals.gradientBlue);
14 //UIManager.put("TabbedPane.selected", Color.red);
15 }
16 +
17 + if (!Globals.ON_WIN && !Globals.ON_MAC) {
18 + // For Linux, add Enter as button click key:
19 + UIDefaults def = UIManager.getDefaults();
20 + InputMap im = (InputMap)def.get("Button.focusInputMap");
21 + im.put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0, false), "pressed");
22 + im.put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0, true), "released");
23 + }
24 +
25 } catch (Throwable ex) {
26 ex.printStackTrace();
27 System.err.println("Trying to set system default Look&Feel...");

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26