35 @param parent parent widget (QWidget) |
35 @param parent parent widget (QWidget) |
36 """ |
36 """ |
37 super(SvnChangeListsDialog, self).__init__(parent) |
37 super(SvnChangeListsDialog, self).__init__(parent) |
38 self.setupUi(self) |
38 self.setupUi(self) |
39 SvnDialogMixin.__init__(self) |
39 SvnDialogMixin.__init__(self) |
40 self.setWindowFlags(Qt.Window) |
40 self.setWindowFlags(Qt.WindowType.Window) |
41 |
41 |
42 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False) |
42 self.buttonBox.button( |
43 self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True) |
43 QDialogButtonBox.StandardButton.Close).setEnabled(False) |
|
44 self.buttonBox.button( |
|
45 QDialogButtonBox.StandardButton.Cancel).setDefault(True) |
44 |
46 |
45 self.vcs = vcs |
47 self.vcs = vcs |
46 |
48 |
47 self.client = self.vcs.getClient() |
49 self.client = self.vcs.getClient() |
48 self.client.callback_cancel = self._clientCancelCallback |
50 self.client.callback_cancel = self._clientCancelCallback |
99 """ |
101 """ |
100 Private slot called when the user pressed the button. |
102 Private slot called when the user pressed the button. |
101 """ |
103 """ |
102 self.changeLists.addItems(sorted(self.changeListsDict.keys())) |
104 self.changeLists.addItems(sorted(self.changeListsDict.keys())) |
103 |
105 |
104 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True) |
106 self.buttonBox.button( |
105 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False) |
107 QDialogButtonBox.StandardButton.Close).setEnabled(True) |
106 self.buttonBox.button(QDialogButtonBox.Close).setDefault(True) |
108 self.buttonBox.button( |
|
109 QDialogButtonBox.StandardButton.Cancel).setEnabled(False) |
|
110 self.buttonBox.button( |
|
111 QDialogButtonBox.StandardButton.Close).setDefault(True) |
107 |
112 |
108 if len(self.changeListsDict) == 0: |
113 if len(self.changeListsDict) == 0: |
109 self.changeLists.addItem(self.tr("No changelists found")) |
114 self.changeLists.addItem(self.tr("No changelists found")) |
110 self.buttonBox.button(QDialogButtonBox.Close).setFocus( |
115 self.buttonBox.button( |
111 Qt.OtherFocusReason) |
116 QDialogButtonBox.StandardButton.Close).setFocus( |
|
117 Qt.FocusReason.OtherFocusReason) |
112 else: |
118 else: |
113 self.changeLists.setCurrentRow(0) |
119 self.changeLists.setCurrentRow(0) |
114 self.changeLists.setFocus(Qt.OtherFocusReason) |
120 self.changeLists.setFocus(Qt.FocusReason.OtherFocusReason) |
115 |
121 |
116 def on_buttonBox_clicked(self, button): |
122 def on_buttonBox_clicked(self, button): |
117 """ |
123 """ |
118 Private slot called by a button of the button box clicked. |
124 Private slot called by a button of the button box clicked. |
119 |
125 |
120 @param button button that was clicked (QAbstractButton) |
126 @param button button that was clicked (QAbstractButton) |
121 """ |
127 """ |
122 if button == self.buttonBox.button(QDialogButtonBox.Close): |
128 if button == self.buttonBox.button( |
|
129 QDialogButtonBox.StandardButton.Close |
|
130 ): |
123 self.close() |
131 self.close() |
124 elif button == self.buttonBox.button(QDialogButtonBox.Cancel): |
132 elif button == self.buttonBox.button( |
|
133 QDialogButtonBox.StandardButton.Cancel |
|
134 ): |
125 self.cancelled = True |
135 self.cancelled = True |
126 self.__finish() |
136 self.__finish() |