Don't run the full title change handler every time if the title hasn't changed
This commit is contained in:
parent
91b8527e2e
commit
8ff0dfa72a
|
@ -51,6 +51,7 @@ class TerminatorTerm (gtk.VBox):
|
||||||
self.terminator = terminator
|
self.terminator = terminator
|
||||||
self.conf = terminator.conf
|
self.conf = terminator.conf
|
||||||
self.command = command
|
self.command = command
|
||||||
|
self._oldtitle = ""
|
||||||
|
|
||||||
self.cwd = cwd or os.getcwd();
|
self.cwd = cwd or os.getcwd();
|
||||||
if not os.path.exists(self.cwd) or not os.path.isdir(self.cwd):
|
if not os.path.exists(self.cwd) or not os.path.isdir(self.cwd):
|
||||||
|
@ -1053,6 +1054,11 @@ text/plain
|
||||||
|
|
||||||
def on_vte_title_change(self, vte):
|
def on_vte_title_change(self, vte):
|
||||||
title = self.get_window_title(vte)
|
title = self.get_window_title(vte)
|
||||||
|
if title == self._oldtitle:
|
||||||
|
# Title hasn't changed, don't bother doing anything
|
||||||
|
return
|
||||||
|
self._oldtitle = title
|
||||||
|
|
||||||
if self.conf.titletips:
|
if self.conf.titletips:
|
||||||
vte.set_property ("has-tooltip", True)
|
vte.set_property ("has-tooltip", True)
|
||||||
vte.set_property ("tooltip-text", title)
|
vte.set_property ("tooltip-text", title)
|
||||||
|
|
Loading…
Reference in New Issue