Set title directly instead of using signals.
See #198, but this didn't fix it.
This commit is contained in:
parent
b4c7669e64
commit
999474c751
@ -87,7 +87,6 @@ class MainWindow(QWidget):
|
|||||||
self._downloadview.show()
|
self._downloadview.show()
|
||||||
|
|
||||||
self._tabbed_browser = tabbedbrowser.TabbedBrowser(win_id)
|
self._tabbed_browser = tabbedbrowser.TabbedBrowser(win_id)
|
||||||
self._tabbed_browser.title_changed.connect(self.setWindowTitle)
|
|
||||||
objreg.register('tabbed-browser', self._tabbed_browser, scope='window',
|
objreg.register('tabbed-browser', self._tabbed_browser, scope='window',
|
||||||
window=win_id)
|
window=win_id)
|
||||||
self._vbox.addWidget(self._tabbed_browser)
|
self._vbox.addWidget(self._tabbed_browser)
|
||||||
|
@ -79,8 +79,6 @@ class TabbedBrowser(tabwidget.TabWidget):
|
|||||||
start_download: Emitted when any tab wants to start downloading
|
start_download: Emitted when any tab wants to start downloading
|
||||||
something.
|
something.
|
||||||
current_tab_changed: The current tab changed to the emitted WebView.
|
current_tab_changed: The current tab changed to the emitted WebView.
|
||||||
title_changed: Emitted when the application title should be changed.
|
|
||||||
arg: The new title as string.
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
cur_progress = pyqtSignal(int)
|
cur_progress = pyqtSignal(int)
|
||||||
@ -96,7 +94,6 @@ class TabbedBrowser(tabwidget.TabWidget):
|
|||||||
resized = pyqtSignal('QRect')
|
resized = pyqtSignal('QRect')
|
||||||
got_cmd = pyqtSignal(str)
|
got_cmd = pyqtSignal(str)
|
||||||
current_tab_changed = pyqtSignal(webview.WebView)
|
current_tab_changed = pyqtSignal(webview.WebView)
|
||||||
title_changed = pyqtSignal(str)
|
|
||||||
|
|
||||||
def __init__(self, win_id, parent=None):
|
def __init__(self, win_id, parent=None):
|
||||||
super().__init__(win_id, parent)
|
super().__init__(win_id, parent)
|
||||||
@ -138,9 +135,10 @@ class TabbedBrowser(tabwidget.TabWidget):
|
|||||||
def _change_app_title(self, text):
|
def _change_app_title(self, text):
|
||||||
"""Change the window title based on the tab text."""
|
"""Change the window title based on the tab text."""
|
||||||
if not text:
|
if not text:
|
||||||
self.title_changed.emit('qutebrowser')
|
title = 'qutebrowser'
|
||||||
else:
|
else:
|
||||||
self.title_changed.emit('{} - qutebrowser'.format(text))
|
title = '{} - qutebrowser'.format(text)
|
||||||
|
self.window().setWindowTitle(title)
|
||||||
|
|
||||||
def _connect_tab_signals(self, tab):
|
def _connect_tab_signals(self, tab):
|
||||||
"""Set up the needed signals for tab."""
|
"""Set up the needed signals for tab."""
|
||||||
|
Loading…
Reference in New Issue
Block a user