Now when you cancel connecting to Tor, it prompts you if you want to quit or open settings

This commit is contained in:
Micah Lee 2017-05-14 19:21:33 -07:00
parent 54607cb037
commit 224f2bb0ad
4 changed files with 23 additions and 9 deletions

View file

@ -25,10 +25,13 @@ class Alert(QtWidgets.QMessageBox):
"""
An alert box dialog.
"""
def __init__(self, message, icon=QtWidgets.QMessageBox.NoIcon):
def __init__(self, message, icon=QtWidgets.QMessageBox.NoIcon, buttons=QtWidgets.QMessageBox.Ok, autostart=True):
super(Alert, self).__init__(None)
self.setWindowTitle("OnionShare")
self.setWindowIcon(QtGui.QIcon(helpers.get_resource_path('images/logo.png')))
self.setText(message)
self.setIcon(icon)
self.exec_()
self.setStandardButtons(buttons)
if autostart:
self.exec_()