Update title when title-format-pinned is modified

This commit is contained in:
thuck 2016-11-08 08:12:40 +01:00
parent 4f0034911a
commit 931b008f89
2 changed files with 7 additions and 0 deletions

View File

@ -120,6 +120,7 @@ class TabbedBrowser(tabwidget.TabWidget):
objreg.get('config').changed.connect(self.update_favicons) objreg.get('config').changed.connect(self.update_favicons)
objreg.get('config').changed.connect(self.update_window_title) objreg.get('config').changed.connect(self.update_window_title)
objreg.get('config').changed.connect(self.update_tab_titles) objreg.get('config').changed.connect(self.update_tab_titles)
objreg.get('config').changed.connect(self.update_tab_titles_pinned)
def __repr__(self): def __repr__(self):
return utils.get_repr(self, count=self.count()) return utils.get_repr(self, count=self.count())

View File

@ -157,6 +157,12 @@ class TabWidget(QTabWidget):
for idx in range(self.count()): for idx in range(self.count()):
self.update_tab_title(idx) self.update_tab_title(idx)
@config.change_filter('tabs', 'title-format-pinned')
def update_tab_titles_pinned(self):
"""Update all texts."""
for idx in range(self.count()):
self.update_tab_title(idx)
def tabInserted(self, idx): def tabInserted(self, idx):
"""Update titles when a tab was inserted.""" """Update titles when a tab was inserted."""
super().tabInserted(idx) super().tabInserted(idx)