Fix curses mode

Peter Šurda 6 years ago
parent f3849eeb48
commit 4f70eaa01f
Signed by untrusted user: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

@ -160,9 +160,8 @@ class Main:
shared.daemon = daemon
# get curses flag
shared.curses = False
if '-c' in sys.argv:
shared.curses = True
state.curses = True
# is the application already running? If yes then exit.
shared.thisapp = singleinstance("", daemon)
@ -241,7 +240,7 @@ class Main:
if daemon == False and BMConfigParser().safeGetBoolean('bitmessagesettings', 'daemon') == False:
if shared.curses == False:
if state.curses == False:
if not depends.check_pyqt():
print('PyBitmessage requires PyQt unless you want to run it as a daemon and interact with it using the API. You can download PyQt from or by searching Google for \'PyQt Download\'. If you want to run in daemon mode, see')
print('You can also run PyBitmessage with the new curses interface by providing \'-c\' as a commandline argument.')

@ -5,7 +5,6 @@ import errno
from multiprocessing import Process
import os
import sys
import shared
import state
@ -27,7 +26,7 @@ class singleinstance:
self.lockPid = None
self.lockfile = os.path.normpath(os.path.join(state.appdata, 'singleton%s.lock' % flavor_id))
if not self.daemon and not shared.curses:
if not self.daemon and not state.curses:
# Tells the already running (if any) application to get focus.
import bitmessageqt

@ -17,6 +17,8 @@ appdata = '' #holds the location of the application data storage directory
shutdown = 0 #Set to 1 by the doCleanShutdown function. Used to tell the proof of work worker threads to exit.
curses = False
# If the trustedpeer option is specified in keys.dat then this will
# contain a Peer which will be connected to instead of using the
# addresses advertised by other peers. The client will only connect to