From a017af0748cd008ce7da0cdd0e11003a0cbaf45d Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Tue, 24 Apr 2018 17:26:54 -0700 Subject: [PATCH] Make ShareMode and ReceiveMode directories, and move ShareMode modules into its dir --- onionshare_gui/{receive_mode.py => receive_mode/__init__.py} | 0 onionshare_gui/{share_mode.py => share_mode/__init__.py} | 4 ++-- onionshare_gui/{ => share_mode}/downloads.py | 1 - onionshare_gui/{ => share_mode}/file_selection.py | 3 ++- onionshare_gui/{ => share_mode}/server_status.py | 3 ++- 5 files changed, 6 insertions(+), 5 deletions(-) rename onionshare_gui/{receive_mode.py => receive_mode/__init__.py} (100%) rename onionshare_gui/{share_mode.py => share_mode/__init__.py} (99%) rename onionshare_gui/{ => share_mode}/downloads.py (99%) rename onionshare_gui/{ => share_mode}/file_selection.py (99%) rename onionshare_gui/{ => share_mode}/server_status.py (99%) diff --git a/onionshare_gui/receive_mode.py b/onionshare_gui/receive_mode/__init__.py similarity index 100% rename from onionshare_gui/receive_mode.py rename to onionshare_gui/receive_mode/__init__.py diff --git a/onionshare_gui/share_mode.py b/onionshare_gui/share_mode/__init__.py similarity index 99% rename from onionshare_gui/share_mode.py rename to onionshare_gui/share_mode/__init__.py index 008fb910..69af6eba 100644 --- a/onionshare_gui/share_mode.py +++ b/onionshare_gui/share_mode/__init__.py @@ -29,8 +29,8 @@ from onionshare.onion import * from .file_selection import FileSelection from .server_status import ServerStatus from .downloads import Downloads -from .onion_thread import OnionThread -from .alert import Alert +from ..onion_thread import OnionThread +from ..alert import Alert class ShareMode(QtWidgets.QWidget): diff --git a/onionshare_gui/downloads.py b/onionshare_gui/share_mode/downloads.py similarity index 99% rename from onionshare_gui/downloads.py rename to onionshare_gui/share_mode/downloads.py index 36d58790..31298370 100644 --- a/onionshare_gui/downloads.py +++ b/onionshare_gui/share_mode/downloads.py @@ -18,7 +18,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . """ import time - from PyQt5 import QtCore, QtWidgets, QtGui from onionshare import strings diff --git a/onionshare_gui/file_selection.py b/onionshare_gui/share_mode/file_selection.py similarity index 99% rename from onionshare_gui/file_selection.py rename to onionshare_gui/share_mode/file_selection.py index e6123669..13efba24 100644 --- a/onionshare_gui/file_selection.py +++ b/onionshare_gui/share_mode/file_selection.py @@ -19,10 +19,11 @@ along with this program. If not, see . """ import os from PyQt5 import QtCore, QtWidgets, QtGui -from .alert import Alert from onionshare import strings +from ..alert import Alert + class DropHereLabel(QtWidgets.QLabel): """ When there are no files or folders in the FileList yet, display the diff --git a/onionshare_gui/server_status.py b/onionshare_gui/share_mode/server_status.py similarity index 99% rename from onionshare_gui/server_status.py rename to onionshare_gui/share_mode/server_status.py index 2e7310f8..e74c41a2 100644 --- a/onionshare_gui/server_status.py +++ b/onionshare_gui/share_mode/server_status.py @@ -18,11 +18,12 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . """ import platform -from .alert import Alert from PyQt5 import QtCore, QtWidgets, QtGui from onionshare import strings +from ..alert import Alert + class ServerStatus(QtWidgets.QWidget): """ The server status chunk of the GUI.