Ignore:
Timestamp:
2012-02-15T23:29:59+01:00 (13 years ago)
Author:
stoecker
Message:

fix shortcut conflict

Location:
applications/editors/josm/plugins/cadastre-fr
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/cadastre-fr/build.xml

    r27019 r27788  
    3232    <property name="ant.build.javac.target" value="1.5"/>
    3333    <property name="commit.message" value="Changed constructor for Plugin"/>
    34     <property name="plugin.main.version" value="4549"/>
     34    <property name="plugin.main.version" value="4928"/>
    3535    <target name="init">
    3636        <mkdir dir="${plugin.build.dir}"/>
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastrePlugin.java

    r26510 r27788  
    262262        refreshLayersURL();
    263263
    264         // overwrite F11 shortcut used from the beginning by this plugin and recently used
    265         // for full-screen switch in JOSM core
    266         int i = 0;
    267         String p = Main.pref.get("shortcut.shortcut."+i, null);
    268         boolean alreadyRedefined = false;
    269         while (p != null) {
    270             String[] s = p.split(";");
    271             alreadyRedefined = alreadyRedefined || s[0].equals("menu:view:fullscreen");
    272             i++;
    273             p = Main.pref.get("shortcut.shortcut."+i, null);
    274         }
    275         if (!alreadyRedefined) {
    276             int reply = JOptionPane.showConfirmDialog(null,
    277                     tr("Plugin cadastre-fr used traditionally the key shortcut F11 for grabbing,\n"+
    278                     "which is currently allocated for full-screen switch by default.\n"+
    279                     "Would you like to restore F11 for grab action?"),
    280                     tr("Restore grab shortcut F11"),
    281                     JOptionPane.YES_NO_OPTION);
    282             if (reply == JOptionPane.OK_OPTION) {
    283                 System.out.println("redefine fullscreen shortcut F11 to shift+F11");
    284                 Main.pref.put("shortcut.shortcut."+i, "menu:view:fullscreen;Toggle Full Screen view;122;5;122;64;false;true");
    285                 JOptionPane.showMessageDialog(Main.parent,tr("JOSM is stopped for the change to take effect."));
    286                 System.exit(0);
    287             }
    288         } else
    289             System.out.println("Shortcut F11 already redefined; do not change.");
    290 
     264        /* TODO: remove in july 2012 */
     265        if(!Main.pref.getBoolean("cadastregrab.shortcut.warn", false))
     266        {
     267            Main.pref.put("cadastregrab.shortcut.warn", true);
     268            JOptionPane.showMessageDialog(Main.parent,
     269                tr("Plugin cadastre-fr used the key shortcut F11 for grabbing,\n"+
     270                "which is now allocated for full-screen switch.\n"+
     271                "The new grabbing key is F10, but you can change the key\nin" +
     272                "the shortcut settings if you want."));
     273        }
    291274        refreshMenu();
    292275    }
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionGrab.java

    r26330 r27788  
    2626        super(tr(name), "cadastre_small", tr("Download Image from French Cadastre WMS"),
    2727                Shortcut.registerShortcut("cadastre:grab", tr("Cadastre: {0}", tr("Download Image from French Cadastre WMS")),
    28                 KeyEvent.VK_F11, Shortcut.GROUP_DIRECT), false);
     28                KeyEvent.VK_F10, Shortcut.GROUP_DIRECT), false);
    2929    }
    3030
Note: See TracChangeset for help on using the changeset viewer.