diff --git a/src/calibre/gui2/__init__.py b/src/calibre/gui2/__init__.py index 19382219d0..d75db1bae1 100644 --- a/src/calibre/gui2/__init__.py +++ b/src/calibre/gui2/__init__.py @@ -93,8 +93,6 @@ def _config(): c.add_opt('default_send_to_device_action', default=None, help=_('Default action to perform when send to device button is ' 'clicked')) - c.add_opt('show_donate_button', default=True, - help='Show donation button') c.add_opt('asked_library_thing_password', default=False, help='Asked library thing password at least once.') c.add_opt('search_as_you_type', default=True, diff --git a/src/calibre/gui2/dialogs/config/__init__.py b/src/calibre/gui2/dialogs/config/__init__.py index fdaafd4762..0976055218 100644 --- a/src/calibre/gui2/dialogs/config/__init__.py +++ b/src/calibre/gui2/dialogs/config/__init__.py @@ -504,7 +504,6 @@ class ConfigDialog(ResizableDialog, Ui_Dialog): idx = w.findText(self.db.prefs.get(x+'_restriction', '')) w.setCurrentIndex(0 if idx < 0 else idx) self.opt_disable_animations.setChecked(config['disable_animations']) - self.opt_show_donate_button.setChecked(config['show_donate_button']) idx = 0 for i, x in enumerate([(_('Small'), 'small'), (_('Medium'), 'medium'), (_('Large'), 'large')]): @@ -928,7 +927,6 @@ class ConfigDialog(ResizableDialog, Ui_Dialog): config['overwrite_author_title_metadata'] = self.opt_overwrite_author_title_metadata.isChecked() config['enforce_cpu_limit'] = bool(self.opt_enforce_cpu_limit.isChecked()) config['disable_animations'] = bool(self.opt_disable_animations.isChecked()) - config['show_donate_button'] = bool(self.opt_show_donate_button.isChecked()) gprefs['show_splash_screen'] = bool(self.show_splash_screen.isChecked()) for x in ('toolbar_icon_size', 'toolbar_text'): w = getattr(self, 'opt_'+x) diff --git a/src/calibre/gui2/dialogs/config/config.ui b/src/calibre/gui2/dialogs/config/config.ui index 640d93a564..988960615d 100644 --- a/src/calibre/gui2/dialogs/config/config.ui +++ b/src/calibre/gui2/dialogs/config/config.ui @@ -109,7 +109,7 @@ 0 - 1 + 0 @@ -367,16 +367,6 @@ - - - - Use &Roman numerals for series number - - - true - - - @@ -387,27 +377,6 @@ - - - - Enable system &tray icon (needs restart) - - - - - - - Show &notifications in system tray - - - - - - - Show &donate button (restart) - - - @@ -616,20 +585,6 @@ - - - - Show &splash screen at startup - - - - - - - Automatically send downloaded &news to ebook reader - - - @@ -640,7 +595,24 @@ - + + + + Use &Roman numerals for series + + + true + + + + + + + Enable system &tray icon (needs restart) + + + + Show &average ratings in the tags browser @@ -651,12 +623,33 @@ + + + Automatically send downloaded &news to ebook reader + + + + + + + Show &splash screen at startup + + + + Show cover &browser in a separate window (needs restart) + + + + Show &notifications in system tray + + + diff --git a/src/calibre/gui2/layout.py b/src/calibre/gui2/layout.py index e20ba61c99..3f273f63fc 100644 --- a/src/calibre/gui2/layout.py +++ b/src/calibre/gui2/layout.py @@ -15,7 +15,7 @@ from PyQt4.Qt import QIcon, Qt, QWidget, QToolBar, QSize, \ from calibre.constants import __appname__ from calibre.gui2.search_box import SearchBox2, SavedSearchBox from calibre.gui2.throbber import ThrobbingButton -from calibre.gui2 import config, gprefs +from calibre.gui2 import gprefs from calibre.gui2.widgets import ComboBoxWithHelp from calibre import human_readable @@ -207,14 +207,11 @@ class ToolBar(QToolBar): # {{{ self.setOrientation(Qt.Horizontal) self.setAllowedAreas(Qt.TopToolBarArea|Qt.BottomToolBarArea) self.setStyleSheet('QToolButton:checked { font-weight: bold }') - self.donate = donate + self.donate_button = donate self.apply_settings() self.location_manager = location_manager self.location_manager.locations_changed.connect(self.build_bar) - self.d_widget = QWidget() - self.d_widget.setLayout(QVBoxLayout()) - self.d_widget.layout().addWidget(donate) donate.setAutoRaise(True) donate.setCursor(Qt.PointingHandCursor) self.build_bar() @@ -228,7 +225,7 @@ class ToolBar(QToolBar): # {{{ if gprefs.get('toolbar_text', 'auto') == 'never': style = Qt.ToolButtonIconOnly self.setToolButtonStyle(style) - self.donate.set_normal_icon_size(sz, sz) + self.donate_button.set_normal_icon_size(sz, sz) def contextMenuEvent(self, *args): pass @@ -247,7 +244,10 @@ class ToolBar(QToolBar): # {{{ for ac in self.location_manager.available_actions: self.addAction(ac) self.setup_tool_button(ac, QToolButton.MenuButtonPopup) - elif what == 'Donate' and config['show_donate_button']: + elif what == 'Donate': + self.d_widget = QWidget() + self.d_widget.setLayout(QVBoxLayout()) + self.d_widget.layout().addWidget(self.donate_button) self.addWidget(self.d_widget) elif what in self.gui.iactions: action = self.gui.iactions[what] @@ -278,7 +278,7 @@ class ToolBar(QToolBar): # {{{ # }}} -class MainWindowMixin(object): +class MainWindowMixin(object): # {{{ def __init__(self, db): self.setObjectName('MainWindow') @@ -304,7 +304,7 @@ class MainWindowMixin(object): l = self.centralwidget.layout() l.addWidget(self.search_bar) - +# }}}