Plugins/VcsPlugins/vcsMercurial/FetchExtension/ProjectHelper.py

changeset 3277
b7d9c75223e3
parent 3190
a9a94491c4fd
child 3345
071afe8be2a1
--- a/Plugins/VcsPlugins/vcsMercurial/FetchExtension/ProjectHelper.py	Sat Feb 15 19:29:20 2014 +0100
+++ b/Plugins/VcsPlugins/vcsMercurial/FetchExtension/ProjectHelper.py	Sun Feb 16 19:36:52 2014 +0100
@@ -63,8 +63,16 @@
         
         menu.addAction(self.hgFetchAct)
         
+        menu.aboutToShow.connect(self.__aboutToShowMenu)
+        
         return menu
     
+    def __aboutToShowMenu(self):
+        """
+        Private slot to handle the aboutToShow signal of the background menu.
+        """
+        self.hgFetchAct.setEnabled(self.vcs.canPull())
+    
     def menuTitle(self):
         """
         Public method to get the menu title.

eric ide

mercurial