- more changes from 681-Plugin-Submission-Plugin-Utility-KeyBinding-Mouseless-Keyboard-URL-Open that were to be decoupled

This commit is contained in:
Vishweshwar Saran Singh Deo 2023-08-09 14:47:42 +05:30
parent 11639159b4
commit 64a6e391ac
2 changed files with 19 additions and 0 deletions

View File

@ -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:

View File

@ -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)