[89339] trunk/dports/java/jabref

nicos at macports.org nicos at macports.org
Wed Jan 25 17:03:42 PST 2012


Revision: 89339
          http://trac.macports.org/changeset/89339
Author:   nicos at macports.org
Date:     2012-01-25 17:03:41 -0800 (Wed, 25 Jan 2012)
Log Message:
-----------
jabref: improving OSX integration

Modified Paths:
--------------
    trunk/dports/java/jabref/Portfile

Added Paths:
-----------
    trunk/dports/java/jabref/files/
    trunk/dports/java/jabref/files/JabRefPreferences.java.diff
    trunk/dports/java/jabref/files/OSXAdapter.java.diff

Modified: trunk/dports/java/jabref/Portfile
===================================================================
--- trunk/dports/java/jabref/Portfile	2012-01-25 23:57:37 UTC (rev 89338)
+++ trunk/dports/java/jabref/Portfile	2012-01-26 01:03:41 UTC (rev 89339)
@@ -5,6 +5,7 @@
 
 name                jabref
 version             2.7.2
+revision            1
 categories          java
 platforms           darwin
 license             GPL-2
@@ -29,13 +30,16 @@
 depends_build       port:apache-ant \
                     port:jarbundler
 
+patchfiles          JabRefPreferences.java.diff \
+                    OSXAdapter.java.diff
+
 use_configure       no
 
 build.cmd           ant
-build.target        jars
+build.target        build osx
 
 destroot.cmd        ant
-destroot.target     osxjar
+destroot.target     jars osxjar
 destroot.destdir    
 
 pre-configure {

Added: trunk/dports/java/jabref/files/JabRefPreferences.java.diff
===================================================================
--- trunk/dports/java/jabref/files/JabRefPreferences.java.diff	                        (rev 0)
+++ trunk/dports/java/jabref/files/JabRefPreferences.java.diff	2012-01-26 01:03:41 UTC (rev 89339)
@@ -0,0 +1,20 @@
+--- src/java/net/sf/jabref/JabRefPreferences.java.orig	2011-11-01 19:40:14.000000000 +0900
++++ src/java/net/sf/jabref/JabRefPreferences.java	2012-01-25 22:31:40.000000000 +0900
+@@ -708,10 +708,15 @@
+         return ks;
+       }
+       else {
++    	int modifiers = 0;
+         if ((ks.getModifiers() & KeyEvent.SHIFT_MASK) != 0) {
+-          return KeyStroke.getKeyStroke(keyCode, Globals.getShortcutMask()+KeyEvent.SHIFT_MASK);
++          modifiers = modifiers | KeyEvent.SHIFT_MASK;
+         }
+-        return KeyStroke.getKeyStroke(keyCode, Globals.getShortcutMask());
++        if ((ks.getModifiers() & KeyEvent.ALT_MASK) != 0) {
++            modifiers = modifiers | KeyEvent.ALT_MASK;
++        }
++        
++        return KeyStroke.getKeyStroke(keyCode, Globals.getShortcutMask()+modifiers);
+       }
+     }
+ 

Added: trunk/dports/java/jabref/files/OSXAdapter.java.diff
===================================================================
--- trunk/dports/java/jabref/files/OSXAdapter.java.diff	                        (rev 0)
+++ trunk/dports/java/jabref/files/OSXAdapter.java.diff	2012-01-26 01:03:41 UTC (rev 89339)
@@ -0,0 +1,35 @@
+--- src/osx/osxadapter/OSXAdapter.java.orig	2011-11-01 19:40:14.000000000 +0900
++++ src/osx/osxadapter/OSXAdapter.java	2012-01-25 23:57:25.000000000 +0900
+@@ -11,7 +11,7 @@
+ 
+   Author:    mdrance
+ 
+-  Copyright:   \xA9 Copyright 2003 Apple Computer, Inc. All rights reserved.
++  Copyright:   � Copyright 2003 Apple Computer, Inc. All rights reserved.
+ 
+   Disclaimer:  IMPORTANT:  This Apple software is supplied to you by Apple Computer, Inc.
+         ("Apple") in consideration of your agreement to the following terms, and your
+@@ -52,7 +52,7 @@
+     04092003  mdrance    added comments
+ 
+ */
+-/*package osxadapter;
++package osxadapter;
+ 
+ import net.sf.jabref.JabRefFrame;
+ import com.apple.eawt.*;
+@@ -99,7 +99,7 @@
+       /  routine that chooses whether or not to quit, so the functionality is identical
+       /  on all platforms.  This example simply cancels the AppleEvent-based quit and
+       /  defers to that universal method.
+-      *//*
++      */
+       ae.setHandled(false);
+       mainApp.quit();
+     } else {
+@@ -130,4 +130,4 @@
+     }
+     theApplication.setEnabledPreferencesMenu(enabled);
+   }
+-}   */
++}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120125/285126ad/attachment.html>


More information about the macports-changes mailing list