parent
dc26808a94
commit
cb7e6ab02d
@ -259,13 +259,14 @@ class TabbedBrowser(tabwidget.TabWidget):
|
|||||||
def tab_close_prompt_if_pinned(self, tab, force, yes_action):
|
def tab_close_prompt_if_pinned(self, tab, force, yes_action):
|
||||||
"""Helper method for tab_close.
|
"""Helper method for tab_close.
|
||||||
|
|
||||||
If tab is pinned, prompt. If everything is good, run yes_action.
|
If tab is pinned, prompt. If not, run yes_action.
|
||||||
|
If tab is destroyed, abort question.
|
||||||
"""
|
"""
|
||||||
if tab.data.pinned and not force:
|
if tab.data.pinned and not force:
|
||||||
message.confirm_async(
|
message.confirm_async(
|
||||||
title='Pinned Tab',
|
title='Pinned Tab',
|
||||||
text="Are you sure you want to close a pinned tab?",
|
text="Are you sure you want to close a pinned tab?",
|
||||||
yes_action=yes_action, default=False)
|
yes_action=yes_action, default=False, abort_on=[tab.destroyed])
|
||||||
else:
|
else:
|
||||||
yes_action()
|
yes_action()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user