Index: applications/editors/josm/plugins/cadastre-fr/build.xml
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/build.xml	(revision 14015)
+++ applications/editors/josm/plugins/cadastre-fr/build.xml	(revision 14120)
@@ -26,5 +26,5 @@
                 <attribute name="Plugin-Description" value="A special handler for the french land registry WMS server."/>
                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/FR:JOSM/Fr:Plugin/Cadastre"/>
-                <attribute name="Plugin-Mainversion" value="1465"/>
+                <attribute name="Plugin-Mainversion" value="1498"/>
                 <attribute name="Plugin-Stage" value="60"/>
                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastrePlugin.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastrePlugin.java	(revision 14015)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastrePlugin.java	(revision 14120)
@@ -1,4 +1,5 @@
 package cadastre_fr;
 
+import static org.openstreetmap.josm.tools.I18n.marktr;
 import static org.openstreetmap.josm.tools.I18n.tr;
 
@@ -10,5 +11,4 @@
 import javax.swing.JCheckBoxMenuItem;
 import javax.swing.JMenu;
-import javax.swing.JMenuBar;
 import javax.swing.JMenuItem;
 import javax.swing.JOptionPane;
@@ -20,4 +20,5 @@
 import org.openstreetmap.josm.actions.UploadAction.UploadHook;
 import org.openstreetmap.josm.gui.IconToggleButton;
+import org.openstreetmap.josm.gui.MainMenu;
 import org.openstreetmap.josm.gui.MapFrame;
 import org.openstreetmap.josm.gui.preferences.PreferenceSetting;
@@ -26,15 +27,15 @@
 
 /**
- * 
+ *
  * Plugin to access the french Cadastre WMS server at www.cadastre.gouv.fr This
  * WMS server requires some specific handling like retrieving a cookie for a
  * limitation in case of no activity, or the request to the server shall provide
  * a city/town/village code.
- * 
- * @author Pieren <pieren3@gmail.com>, 
+ *
+ * @author Pieren <pieren3@gmail.com>,
  * @author <matthieu.lochegnies@gmail.com> for the extension to codeCommune
  * @version 0.8
- * History: 
- * 0.1 17-Jun-2008 first prototype using a first Lambert projection impl. in core 
+ * History:
+ * 0.1 17-Jun-2008 first prototype using a first Lambert projection impl. in core
  * 0.2 22-Jun-2008 first stable version
  * 0.3 24-Jun-2008 add code departement
@@ -43,5 +44,5 @@
  *                 - add option to force a Lambert zone (for median locations)
  *                 - add auto-sourcing
- * 0.5 16-Aug-2008 - add transparency in layer (allowing multiple wms layers displayed together) 
+ * 0.5 16-Aug-2008 - add transparency in layer (allowing multiple wms layers displayed together)
  *                 - no overlapping of grabbed images if transparency is enabled
  *                 - set one layer per location
@@ -61,12 +62,12 @@
  *                 - validate projection name by Lambert.toString() method
  * 0.8 25-Jan-2009 - display returned list of communes if direct name is not recognized by server
- *                 - new possible grab factor of 100 square meters fixed size                     
+ *                 - new possible grab factor of 100 square meters fixed size
  *                 - minor fixes due to changes in JOSM core classes
- *                 - first draft of raster image support 
+ *                 - first draft of raster image support
  * 0.9 05-Feb-2009 - grab vectorized full commune bbox, save in file, convert to OSM way
  *                   and simplify
- * 1.0 18-Feb-2009 - fix various bugs in color management and preference dialog 
+ * 1.0 18-Feb-2009 - fix various bugs in color management and preference dialog
  *                 - increase PNG picture size requested to WMS (800x1000)
- *                 - set 4th grab scale fixed size configurable (from 25 to 1000 meters) 
+ *                 - set 4th grab scale fixed size configurable (from 25 to 1000 meters)
  */
 public class CadastrePlugin extends Plugin {
@@ -78,26 +79,26 @@
 
     public static String source = "";
-    
+
     // true if the checkbox "auto-sourcing" is set in the plugin menu
     public static boolean autoSourcing = false;
-    
+
     // true when the plugin is first used, e.g. grab from WMS or download cache file
     public static boolean pluginUsed = false;
-    
+
     public static String cacheDir = null;
-    
+
     public static boolean alterColors = false;
-    
+
     public static boolean backgroundTransparent = false;
-    
+
     public static float transparency = 1.0f;
-    
+
     public static boolean drawBoundaries = false;
-    
+
     static private boolean menuEnabled = false;
 
     /**
      * Creates the plugin and setup the default settings if necessary
-     * 
+     *
      * @throws Exception
      */
@@ -123,10 +124,8 @@
     public void refreshMenu() throws Exception {
         boolean isLambertProjection = Main.proj.toString().equals(new Lambert().toString());
-        JMenuBar menu = Main.main.menu;
+        MainMenu menu = Main.main.menu;
 
         if (cadastreJMenu == null) {
-            cadastreJMenu = new JMenu(tr("Cadastre"));
-            cadastreJMenu.setMnemonic(KeyEvent.VK_C);
-            menu.add(cadastreJMenu, menu.getMenuCount()-2);
+            cadastreJMenu = menu.addMenu(marktr("Cadastre"), KeyEvent.VK_C, menu.defaultMenuPos);
             if (isLambertProjection) {
                 JosmAction grab = new MenuActionGrab();
@@ -138,5 +137,5 @@
                 JMenuItem menuSettings = new JMenuItem(new MenuActionNewLocation());
                 final JCheckBoxMenuItem menuSource = new JCheckBoxMenuItem(tr("Auto sourcing"));
-                menuSource.setSelected(autoSourcing);     
+                menuSource.setSelected(autoSourcing);
                 menuSource.addActionListener(new ActionListener() {
                     public void actionPerformed(ActionEvent ev) {
@@ -145,5 +144,5 @@
                     }
                 });
-    
+
                 JMenuItem menuResetCookie = new JMenuItem(new MenuActionResetCookie());
                 JMenuItem menuLambertZone = new JMenuItem(new MenuActionLambertZone());
@@ -151,5 +150,5 @@
                 //JMenuItem menuActionBoundaries = new JMenuItem(new MenuActionBoundaries());
                 //JMenuItem menuActionBuildings = new JMenuItem(new MenuActionBuildings());
-                
+
                 cadastreJMenu.add(menuGrab);
                 cadastreJMenu.add(menuSettings);
@@ -159,5 +158,5 @@
                 cadastreJMenu.add(menuLoadFromCache);
                 // all SVG features disabled until official WMS is released
-                //cadastreJMenu.add(menuActionBoundaries); 
+                //cadastreJMenu.add(menuActionBoundaries);
                 //cadastreJMenu.add(menuActionBuildings);
             } else {
