mirror of
https://github.com/onionshare/onionshare.git
synced 2025-07-30 01:48:50 -04:00
Began making a TorConnectionDialog, which handles connecting to the Tor network
This commit is contained in:
parent
24540c1eef
commit
915d548399
4 changed files with 85 additions and 5 deletions
|
@ -22,9 +22,12 @@ import os, sys, platform, argparse
|
|||
from PyQt5 import QtCore, QtWidgets
|
||||
|
||||
from onionshare import strings, helpers, web
|
||||
from onionshare.onion import *
|
||||
from onionshare.onionshare import OnionShare
|
||||
from onionshare.settings import Settings
|
||||
|
||||
from .onionshare_gui import OnionShareGui
|
||||
from .tor_connection_dialog import TorConnectionDialog
|
||||
|
||||
class Application(QtWidgets.QApplication):
|
||||
"""
|
||||
|
@ -84,12 +87,21 @@ def main():
|
|||
if not valid:
|
||||
sys.exit()
|
||||
|
||||
# Load settings
|
||||
settings = Settings()
|
||||
settings.load()
|
||||
|
||||
# Start the Onion
|
||||
onion = Onion()
|
||||
tor_con = TorConnectionDialog(settings, onion)
|
||||
|
||||
# Start the OnionShare app
|
||||
web.set_stay_open(stay_open)
|
||||
app = OnionShare(debug, local_only, stay_open)
|
||||
|
||||
# Clean up when app quits
|
||||
def shutdown():
|
||||
onion.cleanup()
|
||||
app.cleanup()
|
||||
qtapp.aboutToQuit.connect(shutdown)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue