From 91b77e664811f2f4e5a8325db240445ffa1a8226 Mon Sep 17 00:00:00 2001 From: Hydrus Date: Wed, 2 Sep 2015 18:16:09 -0500 Subject: [PATCH] Version 172 --- client.pyw | 11 +- help/changelog.html | 33 ++ include/ClientController.py | 484 +++++++++++++----------- include/ClientDB.py | 115 ++++-- include/ClientData.py | 2 + include/ClientDefaults.py | 2 + include/ClientDownloading.py | 4 +- include/ClientFiles.py | 18 +- include/ClientGUI.py | 608 ++++++++++++++++++------------ include/ClientGUICanvas.py | 33 +- include/ClientGUICommon.py | 6 +- include/ClientGUIDialogsManage.py | 193 +++++++--- include/ClientGUIHoverFrames.py | 9 +- include/ClientGUIManagement.py | 22 +- include/ClientGUIPages.py | 5 +- include/ClientImporting.py | 4 +- include/HydrusConstants.py | 6 +- include/HydrusController.py | 91 +++-- include/HydrusDB.py | 2 +- include/HydrusData.py | 94 ++--- include/HydrusGlobals.py | 2 + include/HydrusNetworking.py | 3 +- include/HydrusServer.py | 1 + include/HydrusServerResources.py | 16 + include/HydrusThreading.py | 6 - include/ServerController.py | 283 ++++++++------ include/ServerDB.py | 48 +++ include/ServerDaemons.py | 61 ++- server.py | 126 +++++++ server.pyw | 73 ---- test.py | 76 ++-- 31 files changed, 1531 insertions(+), 906 deletions(-) create mode 100644 server.py delete mode 100755 server.pyw diff --git a/client.pyw b/client.pyw index 373b30c6..a43e0166 100755 --- a/client.pyw +++ b/client.pyw @@ -21,6 +21,9 @@ try: import threading from twisted.internet import reactor from include import HydrusGlobals + import traceback + + HydrusGlobals.instance = HC.HYDRUS_CLIENT initial_sys_stdout = sys.stdout initial_sys_stderr = sys.stderr @@ -36,15 +39,14 @@ try: threading.Thread( target = reactor.run, kwargs = { 'installSignalHandlers' : 0 } ).start() - app = ClientController.Controller() + controller = ClientController.Controller() - app.MainLoop() + controller.Run() except: print( 'hydrus client failed at ' + time.ctime() ) - import traceback print( traceback.format_exc() ) finally: @@ -52,7 +54,8 @@ try: HydrusGlobals.view_shutdown = True HydrusGlobals.model_shutdown = True - app.pubimmediate( 'shutdown' ) + try: controller.pubimmediate( 'wake_daemons' ) + except: pass reactor.callFromThread( reactor.stop ) diff --git a/help/changelog.html b/help/changelog.html index 9a9c038f..a1f089a5 100755 --- a/help/changelog.html +++ b/help/changelog.html @@ -8,6 +8,39 @@

changelog