Changeset 1181 in josm for trunk/src


Ignore:
Timestamp:
2008-12-26T00:34:48+01:00 (11 years ago)
Author:
stoecker
Message:

minor cleanup

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/audio/AudioBackAction.java

    r1169 r1181  
    2020        super(tr("Back"), "audio-back", tr("Jump back."),
    2121        Shortcut.registerShortcut("audio:back", tr("Audio: {0}", tr("Back")), KeyEvent.VK_F6, Shortcut.GROUP_DIRECT), true);
    22         try {
    23             amount = - Double.parseDouble(Main.pref.get("audio.forwardbackamount","10.0"));
    24         } catch (NumberFormatException e) {
    25             amount = 10.0;
    26         }
     22        amount = -Main.pref.getDouble("audio.forwardbackamount",10.0);
    2723        this.putValue("help", "Action/Back");
    2824    }
  • trunk/src/org/openstreetmap/josm/actions/audio/AudioFwdAction.java

    r1169 r1181  
    2020        super(tr("Forward"), "audio-fwd", tr("Jump forward"),
    2121        Shortcut.registerShortcut("audio:forward", tr("Audio: {0}", tr("Forward")), KeyEvent.VK_F7, Shortcut.GROUP_DIRECT), true);
    22         try {
    23             amount = Double.parseDouble(Main.pref.get("audio.forwardbackamount","10.0"));
    24         } catch (NumberFormatException e) {
    25             amount = 10.0;
    26         }
     22        amount = Main.pref.getDouble("audio.forwardbackamount",10.0);
    2723    }
    2824
  • trunk/src/org/openstreetmap/josm/gui/MapFrame.java

    r1180 r1181  
    199199        jb.addSeparator();
    200200        jb.add(toolBarToggle);
    201         panel.add(new ScrollViewport(jb, ScrollViewport.VERTICAL_DIRECTION),
    202         BorderLayout.WEST);
    203         if (statusLine != null)
     201        if(Main.pref.getBoolean("sidetoolbar.visible", true))
     202        {
     203            if(Main.pref.getBoolean("sidetoolbar.scrollable", true))
     204                panel.add(new ScrollViewport(jb, ScrollViewport.VERTICAL_DIRECTION),
     205                BorderLayout.WEST);
     206            else
     207                panel.add(jb, BorderLayout.WEST);
     208        }
     209        if (statusLine != null && Main.pref.getBoolean("statusline.visible", true))
    204210            panel.add(statusLine, BorderLayout.SOUTH);
    205211    }
Note: See TracChangeset for help on using the changeset viewer.