diff --git a/terminatorlib/terminal.py b/terminatorlib/terminal.py index 914d69d7..8680d20b 100644 --- a/terminatorlib/terminal.py +++ b/terminatorlib/terminal.py @@ -156,6 +156,13 @@ class Terminal(Gtk.VBox): dbg('composite_support: %s' % self.composite_support) self.vte.show() + + #force to load for new window/terminal use case loading plugin + #and connecting signals, note the line update_url_matches also + #calls load_plugins, but it won't reload since already loaded + + self.load_plugins(force = True) + self.update_url_matches() self.terminalbox = self.create_terminalbox() @@ -285,6 +292,10 @@ class Terminal(Gtk.VBox): return(terminalbox) + def load_plugins(self, force = False): + registry = plugin.PluginRegistry() + registry.load_plugins(force) + def _add_regex(self, name, re): match = -1 if regex.FLAGS_PCRE2: diff --git a/terminatorlib/terminator.py b/terminatorlib/terminator.py index db3f465f..a7270466 100644 --- a/terminatorlib/terminator.py +++ b/terminatorlib/terminator.py @@ -186,6 +186,13 @@ class Terminator(Borg): for terminal in self.terminals: dbg('checking: %s (%s)' % (terminal.uuid.urn, terminal)) if terminal.uuid.urn == uuid: + if terminal.get_toplevel().is_child_notebook(): + topchild = terminal.get_toplevel().get_child() + current_page = topchild.get_current_page() + #we need to emit signal for plugin and retain same page + dbg("current_page for tab-change-signal:%s" % current_page) + terminal.emit('tab-change', current_page) + return terminal return None @@ -210,6 +217,7 @@ class Terminator(Borg): window.add(terminal) window.show(True) terminal.spawn_child() + terminal.emit('tab-change', 0) return(window, terminal)