1. Tom Burdick
  2. cutehg

Commits

Tom Burdick  committed 89145be

trying to figure out the keyboard shortcuts for the synchronize dialog, this is it though, going to tag as 0.03

  • Participants
  • Parent commits 62cd157
  • Branches default
  • Tags 0.03

Comments (0)

Files changed (4)

File cutehg/pull.py

View file
                 self._lastPathCount = int(results.group(1))
 
     def doSynchronize(self):
+        self.disable()
         self._runner = PullRunner(self.onPullDone, self, self._ui, self._repository, str(self.getUrl()))
 
     def onPullDone(self):
+        self.enable()
         if self._runner.success:
             pathsRegExp = re.compile('^\s+[paths].*')
 

File cutehg/push.py

View file
                 self._lastPathCount = int(results.group(1))
 
     def doSynchronize(self):
+        self.disable()
         self._runner = PushRunner(self.onPushDone, self, self._ui, self._repository, str(self.getUrl()))
 
     def onPushDone(self):
+        self.enable()
         if self._runner.success:
             pathsRegExp = re.compile('^\s+[paths].*')
 

File cutehg/synchronize.py

View file
         assert self.connect(self.userLineEdit, QtCore.SIGNAL("textChanged(const QString&)"), self.updateUrl)
         assert self.connect(self.passwordLineEdit, QtCore.SIGNAL("textChanged(const QString&)"), self.updateUrl)
 
+
+    def enable(self):
+        self.syncButton.setEnabled(True)
+        self.cancelButton.setEnabled(True)
+
+    def disable(self):
+        self.syncButton.setEnabled(False)
+        self.cancelButton.setEnabled(False)
+
     def getUrl(self):
-        print "url is: %s" % self._url
         return self._url
 
     def doSynchronize(self):
         if self._doNotUpdate:
             return
 
-        print "doing update url"
         self._doNotUpdate = True
         if self.protocolComboBox.currentIndex() == 0:
             url = self.browseLineEdit.text()

File cutehg/ui/synchronize.ui

View file
         <property name="text" >
          <string>Close</string>
         </property>
+        <property name="shortcut" >
+         <string>Esc</string>
+        </property>
        </widget>
       </item>
       <item>
         <property name="text" >
          <string>Synchronize</string>
         </property>
+        <property name="shortcut" >
+         <string>Ctrl+Return</string>
+        </property>
        </widget>
       </item>
      </layout>