Another try at fixing settings on Maemo 5
[gc-dialer] / src / dialogs.py
index 3258931..97a0996 100644 (file)
@@ -248,12 +248,12 @@ class AccountDialog(QtCore.QObject, qwrappers.WindowWrapper):
                self._applyButton.clicked.connect(self._on_settings_apply)
                self._cancelButton = QtGui.QPushButton("&Cancel")
                self._cancelButton.clicked.connect(self._on_settings_cancel)
-               self._buttonLayout = QtGui.QDialogButtonBox()
-               self._buttonLayout.addButton(self._applyButton, QtGui.QDialogButtonBox.AcceptRole)
-               self._buttonLayout.addButton(self._cancelButton, QtGui.QDialogButtonBox.RejectRole)
+               self._buttonLayout = QtGui.QHBoxLayout()
+               self._buttonLayout.addWidget(self._cancelButton)
+               self._buttonLayout.addWidget(self._applyButton)
 
                self._layout.addWidget(self._scrollSettings)
-               self._layout.addWidget(self._buttonLayout)
+               self._layout.addLayout(self._buttonLayout)
                self._layout.setDirection(QtGui.QBoxLayout.TopToBottom)
 
                self._window.setWindowTitle("Account")
@@ -419,8 +419,11 @@ class AccountDialog(QtCore.QObject, qwrappers.WindowWrapper):
 
        @qt_compat.Slot()
        @qt_compat.Slot(bool)
-       @misc_utils.log_exception(_moduleLogger)
        def _on_settings_apply(self, checked = False):
+               self._on_settings_apply(checked)
+
+       @misc_utils.log_exception(_moduleLogger)
+       def __on_settings_apply(self, checked = False):
                with qui_utils.notify_error(self._app.errorLog):
                        self.settingsApproved.emit()
                        self.hide()