Added kivy for making it run on Desktop and Mobile Clients

This commit is contained in:
surbhi 2018-07-05 19:07:16 +05:30
parent 6b2f82a7cd
commit 4770790597
No known key found for this signature in database
GPG Key ID: 88928762974D3618
3 changed files with 12 additions and 4 deletions

View File

@ -69,7 +69,6 @@ import helper_bootstrap
import helper_generic import helper_generic
import helper_threading import helper_threading
def connectToStream(streamNumber): def connectToStream(streamNumber):
state.streamsInWhichIAmParticipating.append(streamNumber) state.streamsInWhichIAmParticipating.append(streamNumber)
selfInitiatedConnections[streamNumber] = {} selfInitiatedConnections[streamNumber] = {}
@ -390,18 +389,22 @@ class Main:
# Populate with hardcoded value (same as connectToStream above) # Populate with hardcoded value (same as connectToStream above)
state.streamsInWhichIAmParticipating.append(1) state.streamsInWhichIAmParticipating.append(1)
if not state.enableGUI: if daemon is False and state.enableGUI:
BMConfigParser().remove_option('bitmessagesettings', 'dontconnect')
elif daemon is False:
if state.curses: if state.curses:
if not depends.check_curses(): if not depends.check_curses():
sys.exit() sys.exit()
print('Running with curses') print('Running with curses')
import bitmessagecurses import bitmessagecurses
bitmessagecurses.runwrapper() bitmessagecurses.runwrapper()
elif state.kivy:
BMConfigParser().remove_option('bitmessagesettings', 'dontconnect')
from mpybit import MainApp
MainApp().run()
else: else:
import bitmessageqt import bitmessageqt
bitmessageqt.run() bitmessageqt.run()
else:
BMConfigParser().remove_option('bitmessagesettings', 'dontconnect')
if daemon: if daemon:
if state.testmode: if state.testmode:

View File

@ -1,5 +1,8 @@
"""This module is for thread start.""" """This module is for thread start."""
from bitmessagemain import main from bitmessagemain import main
import state
if __name__ == '__main__': if __name__ == '__main__':
state.kivy = True
print("Kivy Loading......")
main() main()

View File

@ -68,3 +68,5 @@ resetNetworkProtocolAvailability()
dandelion = 0 dandelion = 0
testmode = False testmode = False
kivy = False