Detachable tabs: reposition the code

This commit is contained in:
Vulcalien 2023-02-15 11:44:42 +01:00
parent 808d2efaa9
commit d52fa5a5d4
1 changed files with 7 additions and 8 deletions

View File

@ -337,6 +337,9 @@ class PrefsEditor:
# DBus Server # DBus Server
widget = guiget('dbuscheck') widget = guiget('dbuscheck')
widget.set_active(self.config['dbus']) widget.set_active(self.config['dbus'])
# Detachable tabs
widget = guiget('detachable_tabs')
widget.set_active(self.config['detachable_tabs'])
#Hide from taskbar #Hide from taskbar
widget = guiget('hidefromtaskbcheck') widget = guiget('hidefromtaskbcheck')
widget.set_active(self.config['hide_from_taskbar']) widget.set_active(self.config['hide_from_taskbar'])
@ -770,10 +773,6 @@ class PrefsEditor:
else: else:
widget.set_font_name(self.config['title_font']) widget.set_font_name(self.config['title_font'])
# Whether tabs can be detached into their own window by dragging from titlebar
widget = guiget('detachable_tabs')
widget.set_active(self.config['detachable_tabs'])
def set_layout(self, layout_name): def set_layout(self, layout_name):
"""Set a layout""" """Set a layout"""
self.layouteditor.set_layout(layout_name) self.layouteditor.set_layout(layout_name)
@ -805,6 +804,10 @@ class PrefsEditor:
self.config['dbus'] = widget.get_active() self.config['dbus'] = widget.get_active()
self.config.save() self.config.save()
def on_detachable_tabs_toggled(self, widget):
self.config['detachable_tabs'] = widget.get_active()
self.config.save()
def on_disable_mousewheel_zoom_toggled(self, widget): def on_disable_mousewheel_zoom_toggled(self, widget):
"""Ctrl+mousewheel zoom setting changed""" """Ctrl+mousewheel zoom setting changed"""
self.config['disable_mousewheel_zoom'] = widget.get_active() self.config['disable_mousewheel_zoom'] = widget.get_active()
@ -1877,10 +1880,6 @@ class PrefsEditor:
"""Open the fine manual""" """Open the fine manual"""
self.term.key_help() self.term.key_help()
def on_detachable_tabs_toggled(self, widget):
self.config['detachable_tabs'] = widget.get_active()
self.config.save()
class LayoutEditor: class LayoutEditor:
profile_ids_to_profile = None profile_ids_to_profile = None
profile_profile_to_ids = None profile_profile_to_ids = None