mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Do not require a restart to change the show layout buttons setting
This commit is contained in:
parent
11feacf4f5
commit
8c45539904
@ -391,7 +391,6 @@ class CentralContainer(QWidget):
|
|||||||
return False
|
return False
|
||||||
gui.book_details.vertical = is_wide
|
gui.book_details.vertical = is_wide
|
||||||
self.layout = layout
|
self.layout = layout
|
||||||
gui.place_layout_buttons()
|
|
||||||
self.write_settings()
|
self.write_settings()
|
||||||
self.relayout()
|
self.relayout()
|
||||||
return True
|
return True
|
||||||
|
@ -498,6 +498,7 @@ class LayoutMixin: # {{{
|
|||||||
for button in reversed(self.layout_buttons):
|
for button in reversed(self.layout_buttons):
|
||||||
self.status_bar.insertPermanentWidget(1, button)
|
self.status_bar.insertPermanentWidget(1, button)
|
||||||
self.layout_button.setMenu(LayoutMenu(self))
|
self.layout_button.setMenu(LayoutMenu(self))
|
||||||
|
self.layout_button.setVisible(not gprefs['show_layout_buttons'])
|
||||||
|
|
||||||
def init_layout_mixin(self):
|
def init_layout_mixin(self):
|
||||||
self.vl_tabs = VLTabs(self)
|
self.vl_tabs = VLTabs(self)
|
||||||
@ -549,7 +550,6 @@ class LayoutMixin: # {{{
|
|||||||
b.setToolTip(_(
|
b.setToolTip(_(
|
||||||
'Show and hide various parts of the calibre main window'))
|
'Show and hide various parts of the calibre main window'))
|
||||||
self.status_bar.addPermanentWidget(b)
|
self.status_bar.addPermanentWidget(b)
|
||||||
b.setVisible(not gprefs['show_layout_buttons'])
|
|
||||||
self.status_bar.addPermanentWidget(self.jobs_button)
|
self.status_bar.addPermanentWidget(self.jobs_button)
|
||||||
self.setStatusBar(self.status_bar)
|
self.setStatusBar(self.status_bar)
|
||||||
self.status_bar.update_label.linkActivated.connect(self.update_link_clicked)
|
self.status_bar.update_label.linkActivated.connect(self.update_link_clicked)
|
||||||
|
@ -582,7 +582,7 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
|
|||||||
r('book_list_tooltips', gprefs)
|
r('book_list_tooltips', gprefs)
|
||||||
r('dnd_merge', gprefs)
|
r('dnd_merge', gprefs)
|
||||||
r('wrap_toolbar_text', gprefs, restart_required=True)
|
r('wrap_toolbar_text', gprefs, restart_required=True)
|
||||||
r('show_layout_buttons', gprefs, restart_required=True)
|
r('show_layout_buttons', gprefs)
|
||||||
r('row_numbers_in_book_list', gprefs)
|
r('row_numbers_in_book_list', gprefs)
|
||||||
r('tag_browser_old_look', gprefs)
|
r('tag_browser_old_look', gprefs)
|
||||||
r('tag_browser_hide_empty_categories', gprefs)
|
r('tag_browser_hide_empty_categories', gprefs)
|
||||||
@ -1182,6 +1182,7 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
|
|||||||
|
|
||||||
def refresh_gui(self, gui):
|
def refresh_gui(self, gui):
|
||||||
gui.book_details.book_info.refresh_css()
|
gui.book_details.book_info.refresh_css()
|
||||||
|
gui.place_layout_buttons()
|
||||||
m = gui.library_view.model()
|
m = gui.library_view.model()
|
||||||
m.update_db_prefs_cache()
|
m.update_db_prefs_cache()
|
||||||
m.beginResetModel(), m.endResetModel()
|
m.beginResetModel(), m.endResetModel()
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
<item row="7" column="1">
|
<item row="7" column="1">
|
||||||
<widget class="QCheckBox" name="opt_show_layout_buttons">
|
<widget class="QCheckBox" name="opt_show_layout_buttons">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Show &layout buttons in the status bar (needs restart)</string>
|
<string>Show &layout buttons in the status bar</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user