From 87a2e433182af65db54fc53b3bd1b48e57a10840 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 26 Jan 2015 08:07:57 +0530 Subject: [PATCH] Make the run welcome wizrd not be the default button in the preferences dialog --- src/calibre/gui2/preferences/main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/calibre/gui2/preferences/main.py b/src/calibre/gui2/preferences/main.py index 9c59acbd40..2114d014b2 100644 --- a/src/calibre/gui2/preferences/main.py +++ b/src/calibre/gui2/preferences/main.py @@ -208,6 +208,7 @@ class Preferences(QDialog): self.wizard_button.setIcon(QIcon(I('wizard.png'))) self.wizard_button.clicked.connect(self.run_wizard, type=Qt.QueuedConnection) + self.wizard_button.setAutoDefault(False) self.bb.button(self.bb.Close).setDefault(True) self.bb.rejected.connect(self.reject, type=Qt.QueuedConnection) self.browser = Browser(self) @@ -252,6 +253,7 @@ class Preferences(QDialog): if plugin is not None: self.show_plugin(plugin) + self.bb.button(self.bb.Close).setFocus(Qt.OtherFocusReason) l.addWidget(self.bar), l.addWidget(self.stack), l.addWidget(self.bb), l.addWidget(self.status_bar) def event(self, ev): @@ -390,7 +392,9 @@ class Preferences(QDialog): QDialog.reject(self) if __name__ == '__main__': + from calibre.gui_launch import init_dbus from calibre.gui2 import Application + init_dbus() app = Application([]) app gui = init_gui()