Fix curses mode
This commit is contained in:
parent
f3849eeb48
commit
4f70eaa01f
|
@ -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:
|
|||
upnpThread.start()
|
||||
|
||||
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 http://www.riverbankcomputing.com/software/pyqt/download or by searching Google for \'PyQt Download\'. If you want to run in daemon mode, see https://bitmessage.org/wiki/Daemon')
|
||||
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
|
||||
|
||||
try:
|
||||
|
@ -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
|
||||
bitmessageqt.init()
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user