Ignore:
Timestamp:
2008-08-04T16:51:56+02:00 (16 years ago)
Author:
stoecker
Message:

added security check for layer deletion. Fixes #262

File:
1 edited

Legend:

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

    r627 r745  
    1717
    1818        public static boolean show(String prefKey, String msg) {
    19                 return show(prefKey, new JLabel(msg));
     19                return show(prefKey, new JLabel(msg), true);
     20        }
     21
     22        public static boolean show(String prefKey, String msg, Boolean state) {
     23                return show(prefKey, new JLabel(msg), state);
    2024        }
    2125
    2226        public static boolean show(String prefKey, Container msg) {
     27                return show(prefKey, msg, true);
     28        }
     29
     30        public static boolean show(String prefKey, Container msg, Boolean state) {
    2331                if (!Main.pref.getBoolean("message."+prefKey)) {
    2432                        JCheckBox dontshowagain = new JCheckBox(tr("Do not show again"));
    25                         dontshowagain.setSelected(Main.pref.getBoolean("message."+prefKey, true));
     33                        dontshowagain.setSelected(Main.pref.getBoolean("message."+prefKey, state));
    2634                        JPanel all = new JPanel(new GridBagLayout());
    2735                        all.add(msg, GBC.eop());
Note: See TracChangeset for help on using the changeset viewer.