From 931b008f892e4d6541bca3a0982635973be8680b Mon Sep 17 00:00:00 2001 From: thuck Date: Tue, 8 Nov 2016 08:12:40 +0100 Subject: [PATCH] Update title when title-format-pinned is modified --- qutebrowser/mainwindow/tabbedbrowser.py | 1 + qutebrowser/mainwindow/tabwidget.py | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/qutebrowser/mainwindow/tabbedbrowser.py b/qutebrowser/mainwindow/tabbedbrowser.py index 6efec0851..a7083b36a 100644 --- a/qutebrowser/mainwindow/tabbedbrowser.py +++ b/qutebrowser/mainwindow/tabbedbrowser.py @@ -120,6 +120,7 @@ class TabbedBrowser(tabwidget.TabWidget): objreg.get('config').changed.connect(self.update_favicons) 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_pinned) def __repr__(self): return utils.get_repr(self, count=self.count()) diff --git a/qutebrowser/mainwindow/tabwidget.py b/qutebrowser/mainwindow/tabwidget.py index e22c7a75f..3d4151fbd 100644 --- a/qutebrowser/mainwindow/tabwidget.py +++ b/qutebrowser/mainwindow/tabwidget.py @@ -157,6 +157,12 @@ class TabWidget(QTabWidget): for idx in range(self.count()): 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): """Update titles when a tab was inserted.""" super().tabInserted(idx)