Update title when title-format-pinned is modified
This commit is contained in:
parent
4f0034911a
commit
931b008f89
@ -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())
|
||||||
|
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user