Merge branch 'feature-#1349' of https://github.com/haitaka/qutebrowser into haitaka-feature-#1349
This commit is contained in:
commit
2ea76c282e
@ -350,6 +350,8 @@ class CommandDispatcher:
|
|||||||
new_tabbed_browser.set_page_title(idx, cur_title)
|
new_tabbed_browser.set_page_title(idx, cur_title)
|
||||||
if config.get('tabs', 'show-favicons'):
|
if config.get('tabs', 'show-favicons'):
|
||||||
new_tabbed_browser.setTabIcon(idx, curtab.icon())
|
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.keep_icon = True
|
||||||
newtab.setZoomFactor(curtab.zoomFactor())
|
newtab.setZoomFactor(curtab.zoomFactor())
|
||||||
history = qtutils.serialize(curtab.history())
|
history = qtutils.serialize(curtab.history())
|
||||||
|
@ -119,6 +119,7 @@ class TabbedBrowser(tabwidget.TabWidget):
|
|||||||
self.search_flags = 0
|
self.search_flags = 0
|
||||||
self._local_marks = {}
|
self._local_marks = {}
|
||||||
self._global_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_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)
|
||||||
@ -453,11 +454,16 @@ class TabbedBrowser(tabwidget.TabWidget):
|
|||||||
def update_favicons(self):
|
def update_favicons(self):
|
||||||
"""Update favicons when config was changed."""
|
"""Update favicons when config was changed."""
|
||||||
show = config.get('tabs', 'show-favicons')
|
show = config.get('tabs', 'show-favicons')
|
||||||
|
tabs_are_wins = config.get('tabs', 'tabs-are-windows')
|
||||||
for i, tab in enumerate(self.widgets()):
|
for i, tab in enumerate(self.widgets()):
|
||||||
if show:
|
if show:
|
||||||
self.setTabIcon(i, tab.icon())
|
self.setTabIcon(i, tab.icon())
|
||||||
|
if tabs_are_wins:
|
||||||
|
self.window().setWindowIcon(tab.icon())
|
||||||
else:
|
else:
|
||||||
self.setTabIcon(i, QIcon())
|
self.setTabIcon(i, QIcon())
|
||||||
|
if tabs_are_wins:
|
||||||
|
self.window().setWindowIcon(self.default_window_icon)
|
||||||
|
|
||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
def on_load_started(self, tab):
|
def on_load_started(self, tab):
|
||||||
@ -476,6 +482,9 @@ class TabbedBrowser(tabwidget.TabWidget):
|
|||||||
tab.keep_icon = False
|
tab.keep_icon = False
|
||||||
else:
|
else:
|
||||||
self.setTabIcon(idx, QIcon())
|
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():
|
if idx == self.currentIndex():
|
||||||
self.update_window_title()
|
self.update_window_title()
|
||||||
|
|
||||||
@ -544,6 +553,8 @@ class TabbedBrowser(tabwidget.TabWidget):
|
|||||||
# We can get signals for tabs we already deleted...
|
# We can get signals for tabs we already deleted...
|
||||||
return
|
return
|
||||||
self.setTabIcon(idx, tab.icon())
|
self.setTabIcon(idx, tab.icon())
|
||||||
|
if config.get('tabs', 'tabs-are-windows'):
|
||||||
|
self.window().setWindowIcon(tab.icon())
|
||||||
|
|
||||||
@pyqtSlot(usertypes.KeyMode)
|
@pyqtSlot(usertypes.KeyMode)
|
||||||
def on_mode_left(self, mode):
|
def on_mode_left(self, mode):
|
||||||
|
Loading…
Reference in New Issue
Block a user