Changed the logic of the Mercurials extension menu creation.

Sat, 28 May 2011 16:20:36 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 28 May 2011 16:20:36 +0200
changeset 1074
ed2585464f12
parent 1073
9f0c4b4eccb1
child 1075
75bfe8bd4243

Changed the logic of the Mercurials extension menu creation.

APIs/Python3/eric5.api file | annotate | diff | comparison | revisions
Documentation/Help/source.qch file | annotate | diff | comparison | revisions
Documentation/Help/source.qhp file | annotate | diff | comparison | revisions
Documentation/Source/eric5.Plugins.VcsPlugins.vcsMercurial.BookmarksExtension.ProjectHelper.html file | annotate | diff | comparison | revisions
Documentation/Source/eric5.Plugins.VcsPlugins.vcsMercurial.FetchExtension.ProjectHelper.html file | annotate | diff | comparison | revisions
Documentation/Source/eric5.Plugins.VcsPlugins.vcsMercurial.PurgeExtension.ProjectHelper.html file | annotate | diff | comparison | revisions
Documentation/Source/eric5.Plugins.VcsPlugins.vcsMercurial.QueuesExtension.ProjectHelper.html file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsMercurial/BookmarksExtension/ProjectHelper.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsMercurial/FetchExtension/ProjectHelper.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsMercurial/ProjectHelper.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsMercurial/PurgeExtension/ProjectHelper.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsMercurial/QueuesExtension/ProjectHelper.py file | annotate | diff | comparison | revisions
--- a/APIs/Python3/eric5.api	Sat May 28 16:00:45 2011 +0200
+++ b/APIs/Python3/eric5.api	Sat May 28 16:20:36 2011 +0200
@@ -3218,6 +3218,7 @@
 eric5.Plugins.VcsPlugins.vcsMercurial.BookmarksExtension.ProjectHelper.BookmarksProjectHelper.getActions?4()
 eric5.Plugins.VcsPlugins.vcsMercurial.BookmarksExtension.ProjectHelper.BookmarksProjectHelper.initActions?4()
 eric5.Plugins.VcsPlugins.vcsMercurial.BookmarksExtension.ProjectHelper.BookmarksProjectHelper.initMenu?4(mainMenu)
+eric5.Plugins.VcsPlugins.vcsMercurial.BookmarksExtension.ProjectHelper.BookmarksProjectHelper.menuTitle?4()
 eric5.Plugins.VcsPlugins.vcsMercurial.BookmarksExtension.ProjectHelper.BookmarksProjectHelper.setObjects?4(vcsObject, projectObject)
 eric5.Plugins.VcsPlugins.vcsMercurial.BookmarksExtension.ProjectHelper.BookmarksProjectHelper?1()
 eric5.Plugins.VcsPlugins.vcsMercurial.BookmarksExtension.bookmarks.Bookmarks.hgBookmarkDefine?4(name)
@@ -3242,6 +3243,7 @@
 eric5.Plugins.VcsPlugins.vcsMercurial.FetchExtension.ProjectHelper.FetchProjectHelper.getActions?4()
 eric5.Plugins.VcsPlugins.vcsMercurial.FetchExtension.ProjectHelper.FetchProjectHelper.initActions?4()
 eric5.Plugins.VcsPlugins.vcsMercurial.FetchExtension.ProjectHelper.FetchProjectHelper.initMenu?4(mainMenu)
+eric5.Plugins.VcsPlugins.vcsMercurial.FetchExtension.ProjectHelper.FetchProjectHelper.menuTitle?4()
 eric5.Plugins.VcsPlugins.vcsMercurial.FetchExtension.ProjectHelper.FetchProjectHelper.setObjects?4(vcsObject, projectObject)
 eric5.Plugins.VcsPlugins.vcsMercurial.FetchExtension.ProjectHelper.FetchProjectHelper?1()
 eric5.Plugins.VcsPlugins.vcsMercurial.FetchExtension.fetch.Fetch.hgFetch?4(name)
@@ -3450,6 +3452,7 @@
 eric5.Plugins.VcsPlugins.vcsMercurial.PurgeExtension.ProjectHelper.PurgeProjectHelper.getActions?4()
 eric5.Plugins.VcsPlugins.vcsMercurial.PurgeExtension.ProjectHelper.PurgeProjectHelper.initActions?4()
 eric5.Plugins.VcsPlugins.vcsMercurial.PurgeExtension.ProjectHelper.PurgeProjectHelper.initMenu?4(mainMenu)
+eric5.Plugins.VcsPlugins.vcsMercurial.PurgeExtension.ProjectHelper.PurgeProjectHelper.menuTitle?4()
 eric5.Plugins.VcsPlugins.vcsMercurial.PurgeExtension.ProjectHelper.PurgeProjectHelper.setObjects?4(vcsObject, projectObject)
 eric5.Plugins.VcsPlugins.vcsMercurial.PurgeExtension.ProjectHelper.PurgeProjectHelper?1()
 eric5.Plugins.VcsPlugins.vcsMercurial.PurgeExtension.purge.Purge.hgPurge?4(name, all=False)
@@ -3520,6 +3523,7 @@
 eric5.Plugins.VcsPlugins.vcsMercurial.QueuesExtension.ProjectHelper.QueuesProjectHelper.getActions?4()
 eric5.Plugins.VcsPlugins.vcsMercurial.QueuesExtension.ProjectHelper.QueuesProjectHelper.initActions?4()
 eric5.Plugins.VcsPlugins.vcsMercurial.QueuesExtension.ProjectHelper.QueuesProjectHelper.initMenu?4(mainMenu)
+eric5.Plugins.VcsPlugins.vcsMercurial.QueuesExtension.ProjectHelper.QueuesProjectHelper.menuTitle?4()
 eric5.Plugins.VcsPlugins.vcsMercurial.QueuesExtension.ProjectHelper.QueuesProjectHelper.setObjects?4(vcsObject, projectObject)
 eric5.Plugins.VcsPlugins.vcsMercurial.QueuesExtension.ProjectHelper.QueuesProjectHelper?1()
 eric5.Plugins.VcsPlugins.vcsMercurial.QueuesExtension.queues.Queues.APPLIED_LIST?7
Binary file Documentation/Help/source.qch has changed
--- a/Documentation/Help/source.qhp	Sat May 28 16:00:45 2011 +0200
+++ b/Documentation/Help/source.qhp	Sat May 28 16:20:36 2011 +0200
@@ -9528,6 +9528,7 @@
       <keyword name="FetchProjectHelper.getActions" id="FetchProjectHelper.getActions" ref="eric5.Plugins.VcsPlugins.vcsMercurial.FetchExtension.ProjectHelper.html#FetchProjectHelper.getActions" />
       <keyword name="FetchProjectHelper.initActions" id="FetchProjectHelper.initActions" ref="eric5.Plugins.VcsPlugins.vcsMercurial.FetchExtension.ProjectHelper.html#FetchProjectHelper.initActions" />
       <keyword name="FetchProjectHelper.initMenu" id="FetchProjectHelper.initMenu" ref="eric5.Plugins.VcsPlugins.vcsMercurial.FetchExtension.ProjectHelper.html#FetchProjectHelper.initMenu" />
+      <keyword name="FetchProjectHelper.menuTitle" id="FetchProjectHelper.menuTitle" ref="eric5.Plugins.VcsPlugins.vcsMercurial.FetchExtension.ProjectHelper.html#FetchProjectHelper.menuTitle" />
       <keyword name="FetchProjectHelper.setObjects" id="FetchProjectHelper.setObjects" ref="eric5.Plugins.VcsPlugins.vcsMercurial.FetchExtension.ProjectHelper.html#FetchProjectHelper.setObjects" />
       <keyword name="fetch (Module)" id="fetch (Module)" ref="eric5.Plugins.VcsPlugins.vcsMercurial.FetchExtension.fetch.html" />
       <keyword name="Fetch" id="Fetch" ref="eric5.Plugins.VcsPlugins.vcsMercurial.FetchExtension.fetch.html#Fetch" />
@@ -9622,6 +9623,7 @@
       <keyword name="QueuesProjectHelper.getActions" id="QueuesProjectHelper.getActions" ref="eric5.Plugins.VcsPlugins.vcsMercurial.QueuesExtension.ProjectHelper.html#QueuesProjectHelper.getActions" />
       <keyword name="QueuesProjectHelper.initActions" id="QueuesProjectHelper.initActions" ref="eric5.Plugins.VcsPlugins.vcsMercurial.QueuesExtension.ProjectHelper.html#QueuesProjectHelper.initActions" />
       <keyword name="QueuesProjectHelper.initMenu" id="QueuesProjectHelper.initMenu" ref="eric5.Plugins.VcsPlugins.vcsMercurial.QueuesExtension.ProjectHelper.html#QueuesProjectHelper.initMenu" />
+      <keyword name="QueuesProjectHelper.menuTitle" id="QueuesProjectHelper.menuTitle" ref="eric5.Plugins.VcsPlugins.vcsMercurial.QueuesExtension.ProjectHelper.html#QueuesProjectHelper.menuTitle" />
       <keyword name="QueuesProjectHelper.setObjects" id="QueuesProjectHelper.setObjects" ref="eric5.Plugins.VcsPlugins.vcsMercurial.QueuesExtension.ProjectHelper.html#QueuesProjectHelper.setObjects" />
       <keyword name="HgQueuesQueueManagementDialog (Module)" id="HgQueuesQueueManagementDialog (Module)" ref="eric5.Plugins.VcsPlugins.vcsMercurial.QueuesExtension.HgQueuesQueueManagementDialog.html" />
       <keyword name="HgQueuesQueueManagementDialog" id="HgQueuesQueueManagementDialog" ref="eric5.Plugins.VcsPlugins.vcsMercurial.QueuesExtension.HgQueuesQueueManagementDialog.html#HgQueuesQueueManagementDialog" />
@@ -9789,6 +9791,7 @@
       <keyword name="BookmarksProjectHelper.getActions" id="BookmarksProjectHelper.getActions" ref="eric5.Plugins.VcsPlugins.vcsMercurial.BookmarksExtension.ProjectHelper.html#BookmarksProjectHelper.getActions" />
       <keyword name="BookmarksProjectHelper.initActions" id="BookmarksProjectHelper.initActions" ref="eric5.Plugins.VcsPlugins.vcsMercurial.BookmarksExtension.ProjectHelper.html#BookmarksProjectHelper.initActions" />
       <keyword name="BookmarksProjectHelper.initMenu" id="BookmarksProjectHelper.initMenu" ref="eric5.Plugins.VcsPlugins.vcsMercurial.BookmarksExtension.ProjectHelper.html#BookmarksProjectHelper.initMenu" />
+      <keyword name="BookmarksProjectHelper.menuTitle" id="BookmarksProjectHelper.menuTitle" ref="eric5.Plugins.VcsPlugins.vcsMercurial.BookmarksExtension.ProjectHelper.html#BookmarksProjectHelper.menuTitle" />
       <keyword name="BookmarksProjectHelper.setObjects" id="BookmarksProjectHelper.setObjects" ref="eric5.Plugins.VcsPlugins.vcsMercurial.BookmarksExtension.ProjectHelper.html#BookmarksProjectHelper.setObjects" />
       <keyword name="HgBookmarkRenameDialog (Module)" id="HgBookmarkRenameDialog (Module)" ref="eric5.Plugins.VcsPlugins.vcsMercurial.BookmarksExtension.HgBookmarkRenameDialog.html" />
       <keyword name="HgBookmarkRenameDialog" id="HgBookmarkRenameDialog" ref="eric5.Plugins.VcsPlugins.vcsMercurial.BookmarksExtension.HgBookmarkRenameDialog.html#HgBookmarkRenameDialog" />
@@ -9811,6 +9814,7 @@
       <keyword name="PurgeProjectHelper.getActions" id="PurgeProjectHelper.getActions" ref="eric5.Plugins.VcsPlugins.vcsMercurial.PurgeExtension.ProjectHelper.html#PurgeProjectHelper.getActions" />
       <keyword name="PurgeProjectHelper.initActions" id="PurgeProjectHelper.initActions" ref="eric5.Plugins.VcsPlugins.vcsMercurial.PurgeExtension.ProjectHelper.html#PurgeProjectHelper.initActions" />
       <keyword name="PurgeProjectHelper.initMenu" id="PurgeProjectHelper.initMenu" ref="eric5.Plugins.VcsPlugins.vcsMercurial.PurgeExtension.ProjectHelper.html#PurgeProjectHelper.initMenu" />
+      <keyword name="PurgeProjectHelper.menuTitle" id="PurgeProjectHelper.menuTitle" ref="eric5.Plugins.VcsPlugins.vcsMercurial.PurgeExtension.ProjectHelper.html#PurgeProjectHelper.menuTitle" />
       <keyword name="PurgeProjectHelper.setObjects" id="PurgeProjectHelper.setObjects" ref="eric5.Plugins.VcsPlugins.vcsMercurial.PurgeExtension.ProjectHelper.html#PurgeProjectHelper.setObjects" />
       <keyword name="purge (Module)" id="purge (Module)" ref="eric5.Plugins.VcsPlugins.vcsMercurial.PurgeExtension.purge.html" />
       <keyword name="Purge" id="Purge" ref="eric5.Plugins.VcsPlugins.vcsMercurial.PurgeExtension.purge.html#Purge" />
--- a/Documentation/Source/eric5.Plugins.VcsPlugins.vcsMercurial.BookmarksExtension.ProjectHelper.html	Sat May 28 16:00:45 2011 +0200
+++ b/Documentation/Source/eric5.Plugins.VcsPlugins.vcsMercurial.BookmarksExtension.ProjectHelper.html	Sat May 28 16:20:36 2011 +0200
@@ -93,6 +93,9 @@
 <td><a href="#BookmarksProjectHelper.initMenu">initMenu</a></td>
 <td>Public method to generate the extension menu.</td>
 </tr><tr>
+<td><a href="#BookmarksProjectHelper.menuTitle">menuTitle</a></td>
+<td>Public method to get the menu title.</td>
+</tr><tr>
 <td><a href="#BookmarksProjectHelper.setObjects">setObjects</a></td>
 <td>Public method to set references to the vcs and project objects.</td>
 </tr>
@@ -177,7 +180,12 @@
 <dd>
 populated menu (QMenu)
 </dd>
-</dl><a NAME="BookmarksProjectHelper.setObjects" ID="BookmarksProjectHelper.setObjects"></a>
+</dl><a NAME="BookmarksProjectHelper.menuTitle" ID="BookmarksProjectHelper.menuTitle"></a>
+<h4>BookmarksProjectHelper.menuTitle</h4>
+<b>menuTitle</b>(<i></i>)
+<p>
+        Public method to get the menu title.
+</p><a NAME="BookmarksProjectHelper.setObjects" ID="BookmarksProjectHelper.setObjects"></a>
 <h4>BookmarksProjectHelper.setObjects</h4>
 <b>setObjects</b>(<i>vcsObject, projectObject</i>)
 <p>
--- a/Documentation/Source/eric5.Plugins.VcsPlugins.vcsMercurial.FetchExtension.ProjectHelper.html	Sat May 28 16:00:45 2011 +0200
+++ b/Documentation/Source/eric5.Plugins.VcsPlugins.vcsMercurial.FetchExtension.ProjectHelper.html	Sat May 28 16:20:36 2011 +0200
@@ -69,6 +69,9 @@
 <td><a href="#FetchProjectHelper.initMenu">initMenu</a></td>
 <td>Public method to generate the extension menu.</td>
 </tr><tr>
+<td><a href="#FetchProjectHelper.menuTitle">menuTitle</a></td>
+<td>Public method to get the menu title.</td>
+</tr><tr>
 <td><a href="#FetchProjectHelper.setObjects">setObjects</a></td>
 <td>Public method to set references to the vcs and project objects.</td>
 </tr>
@@ -113,7 +116,12 @@
 <dd>
 populated menu (QMenu)
 </dd>
-</dl><a NAME="FetchProjectHelper.setObjects" ID="FetchProjectHelper.setObjects"></a>
+</dl><a NAME="FetchProjectHelper.menuTitle" ID="FetchProjectHelper.menuTitle"></a>
+<h4>FetchProjectHelper.menuTitle</h4>
+<b>menuTitle</b>(<i></i>)
+<p>
+        Public method to get the menu title.
+</p><a NAME="FetchProjectHelper.setObjects" ID="FetchProjectHelper.setObjects"></a>
 <h4>FetchProjectHelper.setObjects</h4>
 <b>setObjects</b>(<i>vcsObject, projectObject</i>)
 <p>
--- a/Documentation/Source/eric5.Plugins.VcsPlugins.vcsMercurial.PurgeExtension.ProjectHelper.html	Sat May 28 16:00:45 2011 +0200
+++ b/Documentation/Source/eric5.Plugins.VcsPlugins.vcsMercurial.PurgeExtension.ProjectHelper.html	Sat May 28 16:20:36 2011 +0200
@@ -78,6 +78,9 @@
 <td><a href="#PurgeProjectHelper.initMenu">initMenu</a></td>
 <td>Public method to generate the extension menu.</td>
 </tr><tr>
+<td><a href="#PurgeProjectHelper.menuTitle">menuTitle</a></td>
+<td>Public method to get the menu title.</td>
+</tr><tr>
 <td><a href="#PurgeProjectHelper.setObjects">setObjects</a></td>
 <td>Public method to set references to the vcs and project objects.</td>
 </tr>
@@ -137,7 +140,12 @@
 <dd>
 populated menu (QMenu)
 </dd>
-</dl><a NAME="PurgeProjectHelper.setObjects" ID="PurgeProjectHelper.setObjects"></a>
+</dl><a NAME="PurgeProjectHelper.menuTitle" ID="PurgeProjectHelper.menuTitle"></a>
+<h4>PurgeProjectHelper.menuTitle</h4>
+<b>menuTitle</b>(<i></i>)
+<p>
+        Public method to get the menu title.
+</p><a NAME="PurgeProjectHelper.setObjects" ID="PurgeProjectHelper.setObjects"></a>
 <h4>PurgeProjectHelper.setObjects</h4>
 <b>setObjects</b>(<i>vcsObject, projectObject</i>)
 <p>
--- a/Documentation/Source/eric5.Plugins.VcsPlugins.vcsMercurial.QueuesExtension.ProjectHelper.html	Sat May 28 16:00:45 2011 +0200
+++ b/Documentation/Source/eric5.Plugins.VcsPlugins.vcsMercurial.QueuesExtension.ProjectHelper.html	Sat May 28 16:20:36 2011 +0200
@@ -192,6 +192,9 @@
 <td><a href="#QueuesProjectHelper.initMenu">initMenu</a></td>
 <td>Public method to generate the extension menu.</td>
 </tr><tr>
+<td><a href="#QueuesProjectHelper.menuTitle">menuTitle</a></td>
+<td>Public method to get the menu title.</td>
+</tr><tr>
 <td><a href="#QueuesProjectHelper.setObjects">setObjects</a></td>
 <td>Public method to set references to the vcs and project objects.</td>
 </tr>
@@ -476,7 +479,12 @@
 <dd>
 populated menu (QMenu)
 </dd>
-</dl><a NAME="QueuesProjectHelper.setObjects" ID="QueuesProjectHelper.setObjects"></a>
+</dl><a NAME="QueuesProjectHelper.menuTitle" ID="QueuesProjectHelper.menuTitle"></a>
+<h4>QueuesProjectHelper.menuTitle</h4>
+<b>menuTitle</b>(<i></i>)
+<p>
+        Public method to get the menu title.
+</p><a NAME="QueuesProjectHelper.setObjects" ID="QueuesProjectHelper.setObjects"></a>
 <h4>QueuesProjectHelper.setObjects</h4>
 <b>setObjects</b>(<i>vcsObject, projectObject</i>)
 <p>
--- a/Plugins/VcsPlugins/vcsMercurial/BookmarksExtension/ProjectHelper.py	Sat May 28 16:00:45 2011 +0200
+++ b/Plugins/VcsPlugins/vcsMercurial/BookmarksExtension/ProjectHelper.py	Sat May 28 16:20:36 2011 +0200
@@ -188,7 +188,7 @@
         @param mainMenu reference to the main menu (QMenu)
         @return populated menu (QMenu)
         """
-        menu = QMenu(self.trUtf8("Bookmarks"), mainMenu)
+        menu = QMenu(self.menuTitle(), mainMenu)
         menu.setTearOffEnabled(True)
         
         menu.addAction(self.hgBookmarkDefineAct)
@@ -206,6 +206,12 @@
         
         return menu
     
+    def menuTitle(self):
+        """
+        Public method to get the menu title.
+        """
+        return self.trUtf8("Bookmarks")
+    
     def __hgBookmarksList(self):
         """
         Private slot used to list the bookmarks.
--- a/Plugins/VcsPlugins/vcsMercurial/FetchExtension/ProjectHelper.py	Sat May 28 16:00:45 2011 +0200
+++ b/Plugins/VcsPlugins/vcsMercurial/FetchExtension/ProjectHelper.py	Sat May 28 16:20:36 2011 +0200
@@ -77,13 +77,19 @@
         @param mainMenu reference to the main menu (QMenu)
         @return populated menu (QMenu)
         """
-        menu = QMenu(self.trUtf8("Fetch"), mainMenu)
+        menu = QMenu(self.menuTitle(), mainMenu)
         menu.setTearOffEnabled(True)
         
         menu.addAction(self.hgFetchAct)
         
         return menu
     
+    def menuTitle(self):
+        """
+        Public method to get the menu title.
+        """
+        return self.trUtf8("Fetch")
+    
     def __hgFetch(self):
         """
         Private slot used to fetch changes from a remote repository.
--- a/Plugins/VcsPlugins/vcsMercurial/ProjectHelper.py	Sat May 28 16:00:45 2011 +0200
+++ b/Plugins/VcsPlugins/vcsMercurial/ProjectHelper.py	Sat May 28 16:20:36 2011 +0200
@@ -50,7 +50,10 @@
             "purge": PurgeProjectHelper(),
         }
         
-        # TODO: create a dictionary of menu titles to extension key to be used below
+        self.__extensionMenuTitles = {}
+        for extension in self.__extensions:
+            self.__extensionMenuTitles[self.__extensions[extension].menuTitle()] = \
+                extension
     
     def setObjects(self, vcsObject, projectObject):
         """
@@ -837,7 +840,6 @@
         """
         menu.clear()
         
-        # TODO: make submenus tearable
         adminMenu = QMenu(self.trUtf8("Repository Administration"), menu)
         adminMenu.setTearOffEnabled(True)
         adminMenu.addAction(self.hgHeadsAct)
@@ -883,8 +885,8 @@
         extensionsMenu = QMenu(self.trUtf8("Extensions"), menu)
         extensionsMenu.aboutToShow.connect(self.__showExtensionMenu)
         self.extensionMenus = {}
-        # TODO: use extension menu titles for sorting
-        for extensionName in sorted(self.__extensions):
+        for extensionMenuTitle in sorted(self.__extensionMenuTitles):
+            extensionName = self.__extensionMenuTitles[extensionMenuTitle]
             self.extensionMenus[extensionName] = extensionsMenu.addMenu(
                 self.__extensions[extensionName].initMenu(extensionsMenu))
         
--- a/Plugins/VcsPlugins/vcsMercurial/PurgeExtension/ProjectHelper.py	Sat May 28 16:00:45 2011 +0200
+++ b/Plugins/VcsPlugins/vcsMercurial/PurgeExtension/ProjectHelper.py	Sat May 28 16:20:36 2011 +0200
@@ -124,7 +124,7 @@
         @param mainMenu reference to the main menu (QMenu)
         @return populated menu (QMenu)
         """
-        menu = QMenu(self.trUtf8("Purge"), mainMenu)
+        menu = QMenu(self.menuTitle(), mainMenu)
         menu.setTearOffEnabled(True)
         
         menu.addAction(self.hgPurgeAct)
@@ -135,6 +135,12 @@
         
         return menu
     
+    def menuTitle(self):
+        """
+        Public method to get the menu title.
+        """
+        return self.trUtf8("Purge")
+    
     def __hgPurge(self):
         """
         Private slot used to remove files not tracked by Mercurial.
--- a/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/ProjectHelper.py	Sat May 28 16:00:45 2011 +0200
+++ b/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/ProjectHelper.py	Sat May 28 16:20:36 2011 +0200
@@ -593,7 +593,7 @@
         @param mainMenu reference to the main menu (QMenu)
         @return populated menu (QMenu)
         """
-        menu = QMenu(self.trUtf8("Queues"), mainMenu)
+        menu = QMenu(self.menuTitle(), mainMenu)
         menu.setTearOffEnabled(True)
         
         pushPopMenu = QMenu(self.trUtf8("Push/Pop"), menu)
@@ -668,6 +668,12 @@
         
         return menu
     
+    def menuTitle(self):
+        """
+        Public method to get the menu title.
+        """
+        return self.trUtf8("Queues")
+    
     def __hgQueueNewPatch(self):
         """
         Private slot used to create a new named patch.

eric ide

mercurial