mirror of
https://github.com/onionshare/onionshare.git
synced 2025-05-07 17:05:16 -04:00
Now when you cancel connecting to Tor, it prompts you if you want to quit or open settings
This commit is contained in:
parent
ad2c5e94b4
commit
58f70b1d9b
4 changed files with 23 additions and 9 deletions
|
@ -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_()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue