Plugins/VcsPlugins/vcsMercurial/ProjectBrowserHelper.py

changeset 198
7ab8e126f404
parent 189
17bb2db7a347
child 216
6f9713e8d570
diff -r 0e12ee787967 -r 7ab8e126f404 Plugins/VcsPlugins/vcsMercurial/ProjectBrowserHelper.py
--- a/Plugins/VcsPlugins/vcsMercurial/ProjectBrowserHelper.py	Sat Apr 24 13:46:33 2010 +0000
+++ b/Plugins/VcsPlugins/vcsMercurial/ProjectBrowserHelper.py	Sat Apr 24 13:56:43 2010 +0000
@@ -54,20 +54,13 @@
                 act.setEnabled(False)
             for act in standardItems:
                 act.setEnabled(False)
-##            if not hasattr(self.browser.currentItem(), 'fileName'):
-##                self.blameAct.setEnabled(False)
+            if not hasattr(self.browser.currentItem(), 'fileName'):
+                self.annotateAct.setEnabled(False)
         else:
             for act in self.vcsMenuActions:
                 act.setEnabled(False)
             for act in self.vcsAddMenuActions:
                 act.setEnabled(True)
-##            if 1 in self.browser.specialMenuEntries:
-##                try:
-##                    name = self.browser.currentItem().fileName()
-##                except AttributeError:
-##                    name = self.browser.currentItem().dirName()
-##                if not os.path.isdir(name):
-##                    self.vcsMenuAddTree.setEnabled(False)
             for act in standardItems:
                 act.setEnabled(True)
     
@@ -106,9 +99,6 @@
                 act.setEnabled(False)
             for act in self.vcsAddMultiMenuActions:
                 act.setEnabled(True)
-##            if 1 in self.browser.specialMenuEntries and \
-##               self.__itemsHaveFiles(items):
-##                self.vcsMultiMenuAddTree.setEnabled(False)
             for act in standardItems:
                 act.setEnabled(True)
     
@@ -209,11 +199,6 @@
             self.trUtf8('Add to repository'), 
             self._VCSAdd)
         self.vcsAddMenuActions.append(act)
-##        if 1 in self.browser.specialMenuEntries:
-##            self.vcsMenuAddTree = menu.addAction(UI.PixmapCache.getIcon("vcsAdd.png"),
-##                self.trUtf8('Add tree to repository'), 
-##                self._VCSAddTree)
-##            self.vcsAddMenuActions.append(self.vcsMenuAddTree)
         act = menu.addAction(UI.PixmapCache.getIcon("vcsRemove.png"),
             self.trUtf8('Remove from repository (and disk)'), 
             self._VCSRemove)
@@ -298,11 +283,6 @@
         act = menu.addAction(UI.PixmapCache.getIcon("vcsAdd.png"),
             self.trUtf8('Add to repository'), self._VCSAdd)
         self.vcsAddMultiMenuActions.append(act)
-##        if 1 in self.browser.specialMenuEntries:
-##            self.vcsMultiMenuAddTree = \
-##                menu.addAction(UI.PixmapCache.getIcon("vcsAdd.png"),
-##                self.trUtf8('Add tree to repository'), self._VCSAddTree)
-##            self.vcsAddMultiMenuActions.append(self.vcsMultiMenuAddTree)
         act = menu.addAction(UI.PixmapCache.getIcon("vcsRemove.png"),
             self.trUtf8('Remove from repository (and disk)'), 
             self._VCSRemove)

eric ide

mercurial