remove gui_mode from web app, because it is no longer useful

This commit is contained in:
Micah Lee 2014-08-29 16:06:13 -07:00
parent 89bad45825
commit 0858366e31
2 changed files with 6 additions and 17 deletions

View file

@ -64,15 +64,6 @@ def set_stay_open(new_stay_open):
def get_stay_open(): def get_stay_open():
return stay_open return stay_open
gui_mode = False
def set_gui_mode(new_gui_mode):
global gui_mode
gui_mode = new_gui_mode
def get_gui_mode():
return gui_mode
def debug_mode(): def debug_mode():
import logging import logging
@ -146,7 +137,6 @@ def download(slug_candidate):
# download is finished, close the server # download is finished, close the server
if not stay_open: if not stay_open:
if not gui_mode:
print strings._("closing_automatically") print strings._("closing_automatically")
if shutdown_func is None: if shutdown_func is None:
raise RuntimeError('Not running with the Werkzeug Server') raise RuntimeError('Not running with the Werkzeug Server')
@ -182,9 +172,8 @@ def shutdown(shutdown_slug_candidate):
return "" return ""
def start(port, stay_open=False, gui_mode=False): def start(port, stay_open=False):
set_stay_open(stay_open) set_stay_open(stay_open)
set_gui_mode(gui_mode)
app.run(port=port) app.run(port=port)
def stop(): def stop():

View file

@ -96,7 +96,7 @@ class OnionShareGui(QtGui.QWidget):
return return
# start onionshare service in new thread # start onionshare service in new thread
t = threading.Thread(target=web.start, args=(self.app.port, self.app.stay_open, True)) t = threading.Thread(target=web.start, args=(self.app.port, self.app.stay_open))
t.daemon = True t.daemon = True
t.start() t.start()