From d52fa5a5d425257297a171cb0ae84a755831a8f7 Mon Sep 17 00:00:00 2001 From: Vulcalien Date: Wed, 15 Feb 2023 11:44:42 +0100 Subject: [PATCH] Detachable tabs: reposition the code --- terminatorlib/prefseditor.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/terminatorlib/prefseditor.py b/terminatorlib/prefseditor.py index 2b1c009d..8217a1e7 100755 --- a/terminatorlib/prefseditor.py +++ b/terminatorlib/prefseditor.py @@ -337,6 +337,9 @@ class PrefsEditor: # DBus Server widget = guiget('dbuscheck') widget.set_active(self.config['dbus']) + # Detachable tabs + widget = guiget('detachable_tabs') + widget.set_active(self.config['detachable_tabs']) #Hide from taskbar widget = guiget('hidefromtaskbcheck') widget.set_active(self.config['hide_from_taskbar']) @@ -770,10 +773,6 @@ class PrefsEditor: else: 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): """Set a layout""" self.layouteditor.set_layout(layout_name) @@ -805,6 +804,10 @@ class PrefsEditor: self.config['dbus'] = widget.get_active() 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): """Ctrl+mousewheel zoom setting changed""" self.config['disable_mousewheel_zoom'] = widget.get_active() @@ -1877,10 +1880,6 @@ class PrefsEditor: """Open the fine manual""" self.term.key_help() - def on_detachable_tabs_toggled(self, widget): - self.config['detachable_tabs'] = widget.get_active() - self.config.save() - class LayoutEditor: profile_ids_to_profile = None profile_profile_to_ids = None