Fix tab title not changing to reflect the window title when switching between different windows in a tab
This commit is contained in:
parent
eadfeeec9b
commit
2a52acdef4
@ -45,6 +45,8 @@ version 0.9.1 [future]
|
||||
- Fix window focus gained/lost events not being reported to child programs when
|
||||
switching windows/tabs using the various keyboard shortcuts.
|
||||
|
||||
- Fix tab title not changing to reflect the window title when switching between different windows in a tab
|
||||
|
||||
|
||||
version 0.9.0 [2018-04-15]
|
||||
------------------------------
|
||||
|
||||
@ -86,6 +86,9 @@ class Tab: # {{{
|
||||
old_active_window.focus_changed(False)
|
||||
if new_active_window is not None:
|
||||
new_active_window.focus_changed(True)
|
||||
tm = self.tab_manager_ref()
|
||||
if tm is not None:
|
||||
tm.update_tab_bar()
|
||||
|
||||
@property
|
||||
def active_window(self):
|
||||
@ -99,13 +102,13 @@ class Tab: # {{{
|
||||
self.name = title or ''
|
||||
tm = self.tab_manager_ref()
|
||||
if tm is not None:
|
||||
tm.title_changed(self.name)
|
||||
tm.update_tab_bar()
|
||||
|
||||
def title_changed(self, window):
|
||||
if window is self.active_window:
|
||||
tm = self.tab_manager_ref()
|
||||
if tm is not None:
|
||||
tm.title_changed(window.title)
|
||||
tm.update_tab_bar()
|
||||
|
||||
def visible_windows(self):
|
||||
for w in self.windows:
|
||||
@ -514,9 +517,6 @@ class TabManager: # {{{
|
||||
self._set_active_tab(nidx)
|
||||
self.update_tab_bar()
|
||||
|
||||
def title_changed(self, new_title):
|
||||
self.update_tab_bar()
|
||||
|
||||
def new_tab(self, special_window=None, cwd_from=None):
|
||||
idx = len(self.tabs)
|
||||
self._add_tab(Tab(self, special_window=special_window, cwd_from=cwd_from))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user