Merge remote-tracking branch 'origin/pr/3228'

This commit is contained in:
Florian Bruhin 2017-11-02 09:14:49 +01:00
commit f620ffd9d4

View File

@ -259,13 +259,14 @@ class TabbedBrowser(tabwidget.TabWidget):
def tab_close_prompt_if_pinned(self, tab, force, yes_action):
"""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:
message.confirm_async(
title='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:
yes_action()