Add startpage/default-page to tabs -> last-close.
This commit is contained in:
parent
4e2ef45cd8
commit
1345a13a71
@ -862,6 +862,8 @@ Valid values:
|
|||||||
|
|
||||||
* +ignore+: Don't do anything.
|
* +ignore+: Don't do anything.
|
||||||
* +blank+: Load a blank page.
|
* +blank+: Load a blank page.
|
||||||
|
* +startpage+: Load the start page.
|
||||||
|
* +default-page+: Load the default page.
|
||||||
* +close+: Close the window.
|
* +close+: Close the window.
|
||||||
|
|
||||||
Default: +pass:[ignore]+
|
Default: +pass:[ignore]+
|
||||||
|
@ -1337,6 +1337,8 @@ class LastClose(BaseType):
|
|||||||
|
|
||||||
valid_values = ValidValues(('ignore', "Don't do anything."),
|
valid_values = ValidValues(('ignore', "Don't do anything."),
|
||||||
('blank', "Load a blank page."),
|
('blank', "Load a blank page."),
|
||||||
|
('startpage', "Load the start page."),
|
||||||
|
('default-page', "Load the default page."),
|
||||||
('close', "Close the window."))
|
('close', "Close the window."))
|
||||||
|
|
||||||
|
|
||||||
|
@ -249,6 +249,10 @@ class TabbedBrowser(tabwidget.TabWidget):
|
|||||||
self.close_window.emit()
|
self.close_window.emit()
|
||||||
elif last_close == 'blank':
|
elif last_close == 'blank':
|
||||||
tab.openurl(QUrl('about: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):
|
def _remove_tab(self, tab):
|
||||||
"""Remove a tab from the tab list and delete it properly.
|
"""Remove a tab from the tab list and delete it properly.
|
||||||
|
Loading…
Reference in New Issue
Block a user