Ignore:
Timestamp:
2008-09-16T18:29:35+02:00 (16 years ago)
Author:
stoecker
Message:

fix bug #1561 and #5160

File:
1 edited

Legend:

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

    r966 r976  
    3535         */
    3636        public MainApplication(JFrame mainFrame) {
     37                super();
    3738                mainFrame.setContentPane(contentPane);
    3839                mainFrame.setJMenuBar(menu);
     
    8283                }
    8384
     85                // Only show the splash screen if we don't print the help and exit
     86                SplashScreen splash;
     87                if (!argList.contains("--help") && !argList.contains("-?") && !argList.contains("-h")) {
     88                        splash = new SplashScreen();
     89                } else {
     90                        splash = null;
     91                }
     92
     93                splash.setStatus(tr("Reading preferences"));
    8494                // get the preferences.
    8595                final File prefDir = new File(Main.pref.getPreferencesDir());
     
    123133                        language = (String)(args.get("language").toArray()[0]);
    124134
     135                splash.setStatus(tr("Activating updated plugins"));
    125136                if (!PluginDownloader.moveUpdatedPlugins()) {
    126137                        JOptionPane.showMessageDialog(null,
    127                                 tr("Activating the updated plugins failed."),
     138                                tr("Activating the updated plugins failed. Check if JOSM has the permission to overwrite the existing ones."),
    128139                                tr("Plugins"), JOptionPane.ERROR_MESSAGE);
    129140                }
    130141               
    131142                // load the early plugins
     143                splash.setStatus(tr("Loading early plugins"));
    132144                Main.loadPlugins(true, language);
    133145
     
    159171                }
    160172
     173                splash.setStatus(tr("Setting defaults"));
    161174                preConstructorInit(args);
     175                splash.setStatus(tr("Creating main GUI"));
    162176                JFrame mainFrame = new JFrame(tr("Java OpenStreetMap - Editor"));
    163177                Main.parent = mainFrame;
    164178                final Main main = new MainApplication(mainFrame);
     179                splash.setStatus(tr("Loading plugins"));
    165180                Main.loadPlugins(false, null);
    166181                toolbar.refreshToolbarControl();
    167182
    168183                mainFrame.setVisible(true);
     184                splash.closeSplash();
    169185
    170186                if (!args.containsKey("no-fullscreen") && !args.containsKey("geometry") && Toolkit.getDefaultToolkit().isFrameStateSupported(JFrame.MAXIMIZED_BOTH))
Note: See TracChangeset for help on using the changeset viewer.