diff --git a/terminatorlib/config.py b/terminatorlib/config.py index 415533f7..dcd982ab 100644 --- a/terminatorlib/config.py +++ b/terminatorlib/config.py @@ -117,7 +117,8 @@ DEFAULTS = { 'case_sensitive' : True, 'invert_search' : False, 'link_single_click' : False, - 'title_at_bottom' : False + 'title_at_bottom' : False, + 'detachable_tabs' : True, }, 'keybindings': { 'zoom_in' : 'plus', diff --git a/terminatorlib/notebook.py b/terminatorlib/notebook.py index dc0ff555..a6e30298 100644 --- a/terminatorlib/notebook.py +++ b/terminatorlib/notebook.py @@ -191,7 +191,7 @@ class Notebook(Container, Gtk.Notebook): sibling.force_set_profile(None, widget.get_profile()) self.insert_page(container, None, page_num) - self.set_tab_detachable(container, True) + self.set_tab_detachable(container, self.config['detachable_tabs']) self.child_set_property(container, 'tab-expand', True) self.child_set_property(container, 'tab-fill', True) self.set_tab_reorderable(container, True) @@ -320,7 +320,7 @@ class Notebook(Container, Gtk.Notebook): dbg('inserting page at position: %s' % tabpos) self.insert_page(widget, None, tabpos) - self.set_tab_detachable(widget, True) + self.set_tab_detachable(widget, self.config['detachable_tabs']) if maker.isinstance(widget, 'Terminal'): containers, objects = ([], [widget]) diff --git a/terminatorlib/preferences.glade b/terminatorlib/preferences.glade index 04a8adce..85755383 100644 --- a/terminatorlib/preferences.glade +++ b/terminatorlib/preferences.glade @@ -472,7 +472,7 @@ 36 True - + True False @@ -612,6 +612,23 @@ 2 + + + Detach tab into new window on drag (Require restart) + False + True + True + False + 0.5 + True + + + + 0 + 7 + 2 + + True diff --git a/terminatorlib/prefseditor.py b/terminatorlib/prefseditor.py index ddf49694..15ffef88 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']) @@ -836,6 +839,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()