self._session.get_callback_numbers(), self._session.get_callback_number()
)
self._accountDialog.accountNumber = self._session.get_account_number()
- response = self._accountDialog.run()
+ response = self._accountDialog.run(self.window)
if response == QtGui.QDialog.Accepted:
if self._accountDialog.doClear:
self._session.logout_and_clear()
if self._aboutDialog is None:
import dialogs
self._aboutDialog = dialogs.AboutDialog(self._app)
- response = self._aboutDialog.run()
+ response = self._aboutDialog.run(self.window)
@QtCore.pyqtSlot()
@QtCore.pyqtSlot(bool)
self._link.setAlignment(QtCore.Qt.AlignCenter)
self._link.setOpenExternalLinks(True)
+ self._buttonLayout = QtGui.QDialogButtonBox(QtGui.QDialogButtonBox.Cancel)
+
self._layout = QtGui.QVBoxLayout()
self._layout.addWidget(self._title)
self._layout.addWidget(self._copyright)
self._layout.addWidget(self._link)
+ self._layout.addWidget(self._buttonLayout)
self._dialog = QtGui.QDialog()
self._dialog.setWindowTitle("About")
self._dialog.setLayout(self._layout)
qui_utils.set_autorient(self._dialog, True)
+ self._buttonLayout.rejected.connect(self._dialog.reject)
self._closeWindowAction = QtGui.QAction(None)
self._closeWindowAction.setText("Close")
self._dialog.addAction(app.fullscreenAction)
def run(self, parent=None):
- self._dialog.setParent(parent)
+ self._dialog.setParent(parent, QtCore.Qt.Dialog)
response = self._dialog.exec_()
return response
# @bug Can't enter custom callback numbers
-
_RECURRENCE_CHOICES = [
(1, "1 minute"),
(2, "2 minutes"),
def run(self, parent=None):
self._doClear = False
- self._dialog.setParent(parent)
+ self._dialog.setParent(parent, QtCore.Qt.Dialog)
response = self._dialog.exec_()
return response