Add startpage/default-page to tabs -> last-close.

This commit is contained in:
Florian Bruhin 2015-04-07 17:35:53 +02:00
parent 4e2ef45cd8
commit 1345a13a71
3 changed files with 8 additions and 0 deletions

View File

@ -862,6 +862,8 @@ Valid values:
* +ignore+: Don't do anything.
* +blank+: Load a blank page.
* +startpage+: Load the start page.
* +default-page+: Load the default page.
* +close+: Close the window.
Default: +pass:[ignore]+

View File

@ -1337,6 +1337,8 @@ class LastClose(BaseType):
valid_values = ValidValues(('ignore', "Don't do anything."),
('blank', "Load a blank page."),
('startpage', "Load the start page."),
('default-page', "Load the default page."),
('close', "Close the window."))

View File

@ -249,6 +249,10 @@ class TabbedBrowser(tabwidget.TabWidget):
self.close_window.emit()
elif last_close == 'blank':
tab.openurl(QUrl('about:blank'))
elif last_close == 'startpage':
tab.openurl(QUrl(config.get('general', 'startpage')[0]))
elif last_close == 'default-page':
tab.openurl(config.get('general', 'default-page'))
def _remove_tab(self, tab):
"""Remove a tab from the tab list and delete it properly.