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 ad2c5e94b4
commit 58f70b1d9b
No known key found for this signature in database
GPG key ID: 403C2657CD994F73
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_()