Author: jm
Date: 2013-01-24 13:54:43 -0800 (Thu, 24 Jan 2013)
New Revision: 31086

Modified:
   
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/CyActivator.java
   
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/MacCyActivator.java
Log:
References #1651: Fixed issue with multiple "About" menus on Mac.  Needs to be 
applied to 3.0.1.

Modified: 
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/CyActivator.java
===================================================================
--- 
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/CyActivator.java
       2013-01-24 21:28:39 UTC (rev 31085)
+++ 
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/CyActivator.java
       2013-01-24 21:54:43 UTC (rev 31086)
@@ -316,12 +316,6 @@
                registerService(bc, cytoPanelEastAction, CyAction.class, new 
Properties());
                registerService(bc, cytoPanelSouthWestAction, CyAction.class, 
new Properties());
 
-               if (isMac()) {
-                       new MacCyActivator().start(bc);
-               } else {
-                       registerService(bc, exitAction, CyAction.class, new 
Properties());
-               }
-
                Properties helpContentsTaskFactoryProps = new Properties();
                helpContentsTaskFactoryProps.setProperty(PREFERRED_MENU, 
"Help");
                helpContentsTaskFactoryProps.setProperty(LARGE_ICON_URL, 
getClass().getResource("/images/ximian/stock_help.png").toString());
@@ -347,12 +341,6 @@
                                helpReportABugTaskFactoryProps);
 
                
-               Properties helpAboutTaskFactoryProps = new Properties();
-               helpAboutTaskFactoryProps.setProperty(PREFERRED_MENU, "Help");
-               helpAboutTaskFactoryProps.setProperty(TITLE, "About...");
-               helpAboutTaskFactoryProps.setProperty(MENU_GRAVITY,"10.0");
-               registerService(bc, helpAboutTaskFactory, TaskFactory.class, 
helpAboutTaskFactoryProps);
-
                Properties arrangeGridTaskFactoryProps = new Properties();
                
arrangeGridTaskFactoryProps.setProperty(ServiceProperties.ENABLE_FOR, 
"networkAndView");
                arrangeGridTaskFactoryProps.setProperty(ACCELERATOR,"cmd g");
@@ -443,6 +431,19 @@
                registerServiceListener(bc, layoutMenuPopulator, "addLayout", 
"removeLayout",
                                        CyLayoutAlgorithm.class);
 
+               if (isMac()) {
+                       new MacCyActivator().start(bc);
+               } else {
+                       Properties helpAboutTaskFactoryProps = new Properties();
+                       helpAboutTaskFactoryProps.setProperty(PREFERRED_MENU, 
"Help");
+                       helpAboutTaskFactoryProps.setProperty(TITLE, 
"About...");
+                       
helpAboutTaskFactoryProps.setProperty(MENU_GRAVITY,"10.0");
+
+                       registerService(bc, helpAboutTaskFactory, 
TaskFactory.class, helpAboutTaskFactoryProps);
+                       
+                       registerService(bc, exitAction, CyAction.class, new 
Properties());
+               }
+
                // Full screen actions.  This is platform dependent
                FullScreenAction fullScreenAction = null;
                if(isMac()) {

Modified: 
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/MacCyActivator.java
===================================================================
--- 
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/MacCyActivator.java
    2013-01-24 21:28:39 UTC (rev 31085)
+++ 
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/MacCyActivator.java
    2013-01-24 21:54:43 UTC (rev 31086)
@@ -26,8 +26,9 @@
 
 import org.cytoscape.application.CyShutdown;
 import org.cytoscape.application.CyVersion;
-import org.cytoscape.internal.dialogs.AboutDialogFactoryImpl;
+import org.cytoscape.internal.view.help.HelpAboutTaskFactory;
 import org.cytoscape.service.util.AbstractCyActivator;
+import org.cytoscape.work.TaskFactory;
 import org.cytoscape.work.swing.DialogTaskManager;
 import org.osgi.framework.BundleContext;
 
@@ -43,7 +44,7 @@
        public void start(BundleContext context) throws Exception {
                final CyShutdown shutdown = getService(context, 
CyShutdown.class);
                final CyVersion version = getService(context, CyVersion.class);
-               final AboutDialogFactoryImpl aboutDialogFactory = new 
AboutDialogFactoryImpl(version);
+               final TaskFactory aboutTaskFactory = new 
HelpAboutTaskFactory(version);
                final DialogTaskManager taskManager = 
getService(context,DialogTaskManager.class);
                
                Application application = Application.getApplication();
@@ -56,7 +57,7 @@
                application.setAboutHandler(new AboutHandler() {
                        @Override
                        public void handleAbout(AboutEvent event) {
-                               
taskManager.execute(aboutDialogFactory.createTaskIterator());
+                               
taskManager.execute(aboutTaskFactory.createTaskIterator());
                        }
                });
        }

-- 
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
Visit this group at http://groups.google.com/group/cytoscape-cvs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to