diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index a75a543ce..5a477b2da 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -44,6 +44,7 @@ Changed - Various SSL ciphers are now disabled by default. With recent Qt/OpenSSL versions those already all are disabled, but with older versions they might not be. +- Show favicons as window icon with `tabs-are-windows` set. Fixed ----- diff --git a/README.asciidoc b/README.asciidoc index 1090ac4f0..796675674 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -179,6 +179,7 @@ Contributors, sorted by the number of commits in descending order: * Halfwit * rikn00 * kanikaa1234 +* haitaka * Michael Ilsaas * Martin Zimmermann * Brian Jackson diff --git a/qutebrowser/browser/commands.py b/qutebrowser/browser/commands.py index 2faa63e6f..6d82d9939 100644 --- a/qutebrowser/browser/commands.py +++ b/qutebrowser/browser/commands.py @@ -350,6 +350,8 @@ class CommandDispatcher: new_tabbed_browser.set_page_title(idx, cur_title) if config.get('tabs', 'show-favicons'): new_tabbed_browser.setTabIcon(idx, curtab.icon()) + if config.get('tabs', 'tabs-are-windows'): + new_tabbed_browser.window().setWindowIcon(curtab.icon()) newtab.keep_icon = True newtab.setZoomFactor(curtab.zoomFactor()) history = qtutils.serialize(curtab.history()) diff --git a/qutebrowser/mainwindow/tabbedbrowser.py b/qutebrowser/mainwindow/tabbedbrowser.py index ccf945738..b754ce9cb 100644 --- a/qutebrowser/mainwindow/tabbedbrowser.py +++ b/qutebrowser/mainwindow/tabbedbrowser.py @@ -67,6 +67,7 @@ class TabbedBrowser(tabwidget.TabWidget): shutting_down: Whether we're currently shutting down. _local_marks: Jump markers local to each page _global_marks: Jump markers used across all pages + default_window_icon: The qutebrowser window icon Signals: cur_progress: Progress of the current tab changed (loadProgress). @@ -119,6 +120,7 @@ class TabbedBrowser(tabwidget.TabWidget): self.search_flags = 0 self._local_marks = {} self._global_marks = {} + self.default_window_icon = self.window().windowIcon() 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) @@ -453,11 +455,16 @@ class TabbedBrowser(tabwidget.TabWidget): def update_favicons(self): """Update favicons when config was changed.""" show = config.get('tabs', 'show-favicons') + tabs_are_wins = config.get('tabs', 'tabs-are-windows') for i, tab in enumerate(self.widgets()): if show: self.setTabIcon(i, tab.icon()) + if tabs_are_wins: + self.window().setWindowIcon(tab.icon()) else: self.setTabIcon(i, QIcon()) + if tabs_are_wins: + self.window().setWindowIcon(self.default_window_icon) @pyqtSlot() def on_load_started(self, tab): @@ -476,6 +483,9 @@ class TabbedBrowser(tabwidget.TabWidget): tab.keep_icon = False else: self.setTabIcon(idx, QIcon()) + if (config.get('tabs', 'tabs-are-windows') and + config.get('tabs', 'show-favicons')): + self.window().setWindowIcon(self.default_window_icon) if idx == self.currentIndex(): self.update_window_title() @@ -544,6 +554,8 @@ class TabbedBrowser(tabwidget.TabWidget): # We can get signals for tabs we already deleted... return self.setTabIcon(idx, tab.icon()) + if config.get('tabs', 'tabs-are-windows'): + self.window().setWindowIcon(tab.icon()) @pyqtSlot(usertypes.KeyMode) def on_mode_left(self, mode): diff --git a/scripts/dev/src2asciidoc.py b/scripts/dev/src2asciidoc.py index a38cc44c8..1630634a4 100755 --- a/scripts/dev/src2asciidoc.py +++ b/scripts/dev/src2asciidoc.py @@ -399,6 +399,7 @@ def _get_authors(): 'Error 800': 'error800', 'larryhynes': 'Larry Hynes', 'Daniel': 'Daniel Schadt', + 'Alexey Glushko': 'haitaka', } commits = subprocess.check_output(['git', 'log', '--format=%aN']) authors = [corrections.get(author, author)