Corrected the button handling of some Mercurial dialogs.

Sun, 02 May 2010 16:01:15 +0000

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 02 May 2010 16:01:15 +0000
changeset 221
38689444e922
parent 220
92b796009140
child 222
1af5ad75ec5d

Corrected the button handling of some Mercurial dialogs.

Plugins/VcsPlugins/vcsMercurial/HgAnnotateDialog.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsMercurial/HgDialog.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsMercurial/HgStatusDialog.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsMercurial/HgTagBranchListDialog.py file | annotate | diff | comparison | revisions
--- a/Plugins/VcsPlugins/vcsMercurial/HgAnnotateDialog.py	Sun May 02 15:44:42 2010 +0000
+++ b/Plugins/VcsPlugins/vcsMercurial/HgAnnotateDialog.py	Sun May 02 16:01:15 2010 +0000
@@ -127,12 +127,13 @@
             QTimer.singleShot(2000, self.process.kill)
             self.process.waitForFinished(3000)
         
+        self.inputGroup.setEnabled(False)
+        self.inputGroup.hide()
+        
         self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True)
         self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False)
         self.buttonBox.button(QDialogButtonBox.Close).setDefault(True)
-        
-        self.inputGroup.setEnabled(False)
-        self.inputGroup.hide()
+        self.buttonBox.button(QDialogButtonBox.Close).setFocus(Qt.OtherFocusReason)
         
         self.process = None
         
--- a/Plugins/VcsPlugins/vcsMercurial/HgDialog.py	Sun May 02 15:44:42 2010 +0000
+++ b/Plugins/VcsPlugins/vcsMercurial/HgDialog.py	Sun May 02 16:01:15 2010 +0000
@@ -9,7 +9,7 @@
 
 import os
 
-from PyQt4.QtCore import QProcess, QTimer, SIGNAL, pyqtSlot
+from PyQt4.QtCore import QProcess, QTimer, SIGNAL, pyqtSlot, Qt
 from PyQt4.QtGui import QDialog, QDialogButtonBox, QMessageBox, QLineEdit
 
 from .Ui_HgDialog import Ui_HgDialog
@@ -53,15 +53,16 @@
             QTimer.singleShot(2000, self.proc.kill)
             self.proc.waitForFinished(3000)
         
-        self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True)
-        self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False)
-        self.buttonBox.button(QDialogButtonBox.Close).setDefault(True)
-        
         self.inputGroup.setEnabled(False)
         self.inputGroup.hide()
         
         self.proc = None
         
+        self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True)
+        self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False)
+        self.buttonBox.button(QDialogButtonBox.Close).setDefault(True)
+        self.buttonBox.button(QDialogButtonBox.Close).setFocus(Qt.OtherFocusReason)
+        
         if Preferences.getVCS("AutoClose") and \
            self.normal and \
            self.errors.toPlainText() == "":
--- a/Plugins/VcsPlugins/vcsMercurial/HgStatusDialog.py	Sun May 02 15:44:42 2010 +0000
+++ b/Plugins/VcsPlugins/vcsMercurial/HgStatusDialog.py	Sun May 02 16:01:15 2010 +0000
@@ -210,13 +210,14 @@
             QTimer.singleShot(2000, self.process.kill)
             self.process.waitForFinished(3000)
         
+        self.inputGroup.setEnabled(False)
+        self.inputGroup.hide()
+        self.refreshButton.setEnabled(True)
+        
         self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True)
         self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False)
         self.buttonBox.button(QDialogButtonBox.Close).setDefault(True)
-        
-        self.inputGroup.setEnabled(False)
-        self.inputGroup.hide()
-        self.refreshButton.setEnabled(True)
+        self.buttonBox.button(QDialogButtonBox.Close).setFocus(Qt.OtherFocusReason)
         
         for act in self.menuactions:
             act.setEnabled(True)
--- a/Plugins/VcsPlugins/vcsMercurial/HgTagBranchListDialog.py	Sun May 02 15:44:42 2010 +0000
+++ b/Plugins/VcsPlugins/vcsMercurial/HgTagBranchListDialog.py	Sun May 02 16:01:15 2010 +0000
@@ -129,12 +129,13 @@
             QTimer.singleShot(2000, self.process.kill)
             self.process.waitForFinished(3000)
         
+        self.inputGroup.setEnabled(False)
+        self.inputGroup.hide()
+        
         self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True)
         self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False)
         self.buttonBox.button(QDialogButtonBox.Close).setDefault(True)
-        
-        self.inputGroup.setEnabled(False)
-        self.inputGroup.hide()
+        self.buttonBox.button(QDialogButtonBox.Close).setFocus(Qt.OtherFocusReason)
         
         self.process = None
         

eric ide

mercurial