Remove window-open-behaviour setting.

This commit is contained in:
Florian Bruhin 2014-08-02 21:30:20 +02:00
parent 44df5754d9
commit e5c86a5337
3 changed files with 1 additions and 20 deletions

View File

@ -196,11 +196,6 @@ DATA = OrderedDict([
SettingValue(types.Bool(), 'false'),
"Whether to open new tabs (middleclick/ctrl+click) in background."),
('window-open-behaviour',
SettingValue(types.WindowOpenBehaviour(), 'new-tab'),
"What to do when the WebView requests a new window to be opened "
"(e.g. via javascript)."),
('editor',
SettingValue(types.ShellCommand(placeholder=True), 'gvim -f "{}"'),
"The editor (and arguments) to use for the open-editor binding. "

View File

@ -911,15 +911,6 @@ class AcceptCookies(BaseType):
('never', "Don't accept cookies at all."))
class WindowOpenBehaviour(BaseType):
"""What to do when a webview requests a new window."""
valid_values = ValidValues(('same-tab', "Open new window in same tab."),
('new-tab', "Open new window in new tab (note: "
"history will be cleared)."))
class ConfirmQuit(BaseType):
"""Whether to display a confirmation when the window is closed."""

View File

@ -437,12 +437,7 @@ class WebView(QWebView):
if wintype == QWebPage.WebModalDialog:
log.webview.warning("WebModalDialog requested, but we don't "
"support that!")
if config.get('general', 'window-open-behaviour') == 'new-tab':
return self.tabbedbrowser.tabopen()
else:
# FIXME for some odd reason, the history of the tab gets killed
# here...
return self
return self.tabbedbrowser.tabopen()
def paintEvent(self, e):
"""Extend paintEvent to emit a signal if the scroll position changed.