1. Martin Rieser
  2. hgcr-gui

Commits

Martin Rieser  committed e8ca8d4

some magic numbers and debug print removed

  • Participants
  • Parent commits 1c3fce3
  • Branches default

Comments (0)

Files changed (1)

File hgcr-gui-qt.py

View file
     VIEW_UNKNOWN = 3
     VIEW = VIEW_ALL
     
+    VIEW_ChangedState = 1
+    VIEW_CompletedState = 2
+    
     STATEFILER = ''
     
     def __init__(self, ui, repo, tag='', rev='tip', parent=None, opts={}):
         
         #status filter setup
         self._qui.fileStatus.insertItem(0,_('All'))
-        self._qui.fileStatus.insertItem(1,_('changed '))
-        self._qui.fileStatus.insertItem(2,_('completed'))
+        self._qui.fileStatus.insertItem(self.VIEW_ChangedState,_('changed '))
+        self._qui.fileStatus.insertItem(self.VIEW_CompletedState,_('completed'))
         QtCore.QObject.connect(self._qui.fileStatus, QtCore.SIGNAL(_fromUtf8("currentIndexChanged(int)")), self.onStatusFilerChange)
         
         self.adjustSize()
     def onStatusFilerChange(self, index):
         """change a view of files to match radio choice"""
         print index
-        if index == 1:
+        if index == self.VIEW_ChangedState:
             self.STATEFILER ='changed '
-        elif index == 2:
+        elif index == self.VIEW_CompletedState:
             self.STATEFILER ='completed'
         else:
             self.STATEFILER =''
     @pyqtSlot()
     def onPersonFilerChange(self, index):
         """change a view of files to match combo box"""
-        print index
         if index >= 0 and index <= self.VIEW_UNKNOWN:
             self.VIEW = index
             # refresh the display