diff --git a/onionshare_gui/onionshare_gui.py b/onionshare_gui/onionshare_gui.py index 945813e6..f6ecc90a 100644 --- a/onionshare_gui/onionshare_gui.py +++ b/onionshare_gui/onionshare_gui.py @@ -3,9 +3,18 @@ from PyQt4.QtCore import * from PyQt4.QtGui import * from PyQt4.QtWebKit import * -from os import path -sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) -import onionshare, webapp +<<<<<<< HEAD +======= +onionshare_gui_dir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) + +try: + import onionshare +except ImportError: + sys.path.append(os.path.abspath(onionshare_gui_dir+"/..")) + import onionshare + +import webapp +>>>>>>> 272092f877ade0ada63fc1b7b43f7837e73adede window_icon = None @@ -81,8 +90,7 @@ def main(): return # create the onionshare icon - global window_icon - onionshare_gui_dir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) + global window_icon, onionshare_gui_dir window_icon = QIcon("{0}/onionshare-icon.png".format(onionshare_gui_dir)) # try starting hidden service diff --git a/onionshare_gui/static/onionshare.js b/onionshare_gui/static/onionshare.js index c470268d..6c7b7fa0 100644 --- a/onionshare_gui/static/onionshare.js +++ b/onionshare_gui/static/onionshare.js @@ -3,7 +3,7 @@ $(function(){ function update($msg) { var $line = $('