Changeset 1048 in josm for trunk/src


Ignore:
Timestamp:
2008-10-21T20:44:31+02:00 (16 years ago)
Author:
cbrill
Message:

fix bug #1655 (disable splash screen)

Patch by mcdmx@…

Location:
trunk/src/org/openstreetmap/josm/gui
Files:
3 edited

Legend:

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

    r1034 r1048  
    122122                }
    123123
    124                 SplashScreen splash = new SplashScreen();
    125                 splash.setStatus(tr("Reading preferences"));
    126124                // get the preferences.
    127125                final File prefDir = new File(Main.pref.getPreferencesDir());
     
    161159                        Main.pref.save();
    162160                }
     161                SplashScreen splash = new SplashScreen(Main.pref.getBoolean("draw.splashscreen", true));
     162
    163163                String language = null;
    164164                if(args.containsKey("language"))
  • trunk/src/org/openstreetmap/josm/gui/SplashScreen.java

    r993 r1048  
    3434
    3535        private JLabel status;
     36        private boolean visible;
    3637
    3738        private Runnable closerRunner;
    3839
    39         public SplashScreen() {
     40        public SplashScreen(boolean visible) {
    4041                super();
     42                this.visible=visible;
     43
     44                if (!visible)
     45                        return;
    4146
    4247                // Add a nice border to the main splash screen
     
    126131         */
    127132        public void setStatus(String message) {
     133                if (!visible)
     134                        return;
    128135                status.setText(message + " ...");
    129136        }
     
    133140         */
    134141        public void closeSplash() {
     142                if (!visible)
     143                        return;
    135144                try {
    136145                        SwingUtilities.invokeAndWait(closerRunner);
  • trunk/src/org/openstreetmap/josm/gui/preferences/DrawingPreference.java

    r955 r1048  
    3030        private JCheckBox inactive = new JCheckBox(tr("Draw inactive layers in other color"));
    3131        private JCheckBox useAntialiasing = new JCheckBox(tr("Smooth map graphics (antialiasing)"));
     32        private JCheckBox showSplashScreen = new JCheckBox(tr("Show splash screen at startup"));
    3233
    3334        public void addGui(PreferenceDialog gui) {
     
    132133                inactive.setSelected(Main.pref.getBoolean("draw.data.inactive_color", true));
    133134                gui.display.add(inactive, GBC.eop().insets(20,0,0,0));
     135
     136                // Show splash screen on startup
     137                showSplashScreen.setToolTipText(tr("Show splash screen at startup"));
     138                showSplashScreen.setSelected(Main.pref.getBoolean("draw.splashscreen", true));
     139                gui.display.add(showSplashScreen, GBC.eop().insets(20, 0, 0, 0));
    134140        }
    135141
     
    148154                Main.pref.put("draw.data.inactive_color", inactive.isSelected());
    149155                Main.pref.put("mappaint.use-antialiasing", useAntialiasing.isSelected());
     156                Main.pref.put("draw.splashscreen", showSplashScreen.isSelected());
    150157                int vn = Main.pref.getInteger("mappaint.node.virtual-size", 8);
    151158                if(virtualNodes.isSelected()) { if (vn < 1) vn = 8; }
Note: See TracChangeset for help on using the changeset viewer.