Plugins/VcsPlugins/vcsMercurial/HgBookmarksListDialog.py

changeset 5322
c2cabdca0734
parent 4631
5c1a96925da4
child 5325
d0b6adb1721f
--- a/Plugins/VcsPlugins/vcsMercurial/HgBookmarksListDialog.py	Mon Nov 14 19:24:11 2016 +0100
+++ b/Plugins/VcsPlugins/vcsMercurial/HgBookmarksListDialog.py	Mon Nov 14 19:58:22 2016 +0100
@@ -24,6 +24,10 @@
 from .Ui_HgBookmarksListDialog import Ui_HgBookmarksListDialog
 
 
+# TODO: Add context menu with these actions
+#       - Delete Bookmark
+#       - Rename Bookmark
+#       - Push Bookmark
 class HgBookmarksListDialog(QDialog, Ui_HgBookmarksListDialog):
     """
     Class implementing a dialog to show a list of bookmarks.
@@ -52,6 +56,7 @@
         self.__bookmarksList = None
         self.__path = None
         self.__hgClient = vcs.getClient()
+        self.__bookmarksDefined = False
         
         self.bookmarksList.headerItem().setText(
             self.bookmarksList.columnCount(), "")
@@ -91,6 +96,7 @@
             (list of strings)
         """
         self.bookmarksList.clear()
+        self.__bookmarksDefined = False
         
         self.errorGroup.hide()
         
@@ -176,6 +182,10 @@
             # no bookmarks defined
             self.__generateItem(
                 self.tr("no bookmarks defined"), "", "", "")
+            self.__bookmarksDefined = False
+        else:
+            self.__bookmarksDefined = True
+        
         self.__resizeColumns()
         self.__resort()
     

eric ide

mercurial