Commits

David Golub committed ac2b44a

sync: disable save button when alias name is blank

  • Participants
  • Parent commits 06572d2
  • Branches stable

Comments (0)

Files changed (1)

File tortoisehg/hgqt/sync.py

 
         self.aliasentry = QLineEdit(hglib.tounicode(alias))
         self.aliasentry.selectAll()
+        self.aliasentry.textChanged.connect(self.aliasChanged)
         self.layout().addRow(_('Alias'), self.aliasentry)
 
         self.urllabel = QLabel(hglib.tounicode(safeurl))
     def reject(self):
         super(SaveDialog, self).reject()
 
+    def aliasChanged(self, text):
+        self.bb.button(QDialogButtonBox.Save).setEnabled(len(text) > 0)
+
 class SecureDialog(QDialog):
     def __init__(self, repo, origurl, parent):
         super(SecureDialog, self).__init__(parent)