Changeset 5138 in josm


Ignore:
Timestamp:
2012-03-31T00:03:59+02:00 (12 years ago)
Author:
simon04
Message:

see #6964 - initialize main menu first in order to avoid problems (fix problem introduced in r5134)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/Main.java

    r5134 r5138  
    247247        platform.startupHook();
    248248
     249        if (initListener != null) {
     250            initListener.updateStatus(tr("Building main menu"));
     251        }
     252        contentPanePrivate.add(panel, BorderLayout.CENTER);
     253        panel.add(gettingStarted, BorderLayout.CENTER);
     254        menu = new MainMenu();
     255
     256        undoRedo.addCommandQueueListener(redoUndoListener);
     257
     258        // creating toolbar
     259        contentPanePrivate.add(toolbar.control, BorderLayout.NORTH);
     260
     261        registerActionShortcut(menu.help, Shortcut.registerShortcut("system:help", tr("Help"),
     262                KeyEvent.VK_F1, Shortcut.DIRECT));
     263
    249264        // contains several initialization tasks to be executed (in parallel) by a ExecutorService
    250265        List<Callable<Void>> tasks = new ArrayList<Callable<Void>>();
     
    265280                    // ignore any exception here.
    266281                }
    267                 return null;
    268             }
    269         });
    270 
    271         tasks.add(new Callable<Void>() {
    272 
    273             @Override
    274             public Void call() throws Exception {
    275                 if (initListener != null) {
    276                     initListener.updateStatus(tr("Building main menu"));
    277                 }
    278                 contentPanePrivate.add(panel, BorderLayout.CENTER);
    279                 panel.add(gettingStarted, BorderLayout.CENTER);
    280                 menu = new MainMenu();
    281 
    282                 undoRedo.addCommandQueueListener(redoUndoListener);
    283 
    284                 // creating toolbar
    285                 contentPanePrivate.add(toolbar.control, BorderLayout.NORTH);
    286 
    287                 registerActionShortcut(menu.help, Shortcut.registerShortcut("system:help", tr("Help"),
    288                         KeyEvent.VK_F1, Shortcut.DIRECT));
    289 
    290282                return null;
    291283            }
Note: See TracChangeset for help on using the changeset viewer.