From 9f0eb0a24e6281d9816da96603d60b4e2a7ffbe4 Mon Sep 17 00:00:00 2001 From: shekhar-cis Date: Wed, 7 Sep 2022 20:38:29 +0530 Subject: [PATCH] Add absolute path to mpybit --- kivy-requirements.txt | 1 - src/bitmessagekivy/kivy_state.py | 2 +- src/bitmessagekivy/mpybit.py | 8 +++++--- src/bitmessagekivy/uikivysignaler.py | 5 +++-- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/kivy-requirements.txt b/kivy-requirements.txt index 8d506a5d..d57dde33 100644 --- a/kivy-requirements.txt +++ b/kivy-requirements.txt @@ -1,5 +1,4 @@ kivy-garden.qrcode --e git+https://github.com/kivymd/KivyMD#egg=kivymd opencv-python pyzbar telenium \ No newline at end of file diff --git a/src/bitmessagekivy/kivy_state.py b/src/bitmessagekivy/kivy_state.py index 0c58a96e..68b2f560 100644 --- a/src/bitmessagekivy/kivy_state.py +++ b/src/bitmessagekivy/kivy_state.py @@ -36,7 +36,7 @@ class KivyStateVariables(object): self.availabe_credit = 0 self.in_sent_method = False self.in_search_mode = False - self.imageDir = None + self.imageDir = os.path.abspath(os.path.join('images', 'kivy')) self.image_dir = os.path.abspath(os.path.join('images', 'kivy')) # self.sqlReady = False # set to true by sqlTread when ready for processing diff --git a/src/bitmessagekivy/mpybit.py b/src/bitmessagekivy/mpybit.py index 00828476..a7dde8b2 100644 --- a/src/bitmessagekivy/mpybit.py +++ b/src/bitmessagekivy/mpybit.py @@ -11,8 +11,9 @@ Bitmessage android(mobile) interface import importlib import json -from bitmessagekivy.get_platform import platform import os +import sys +from bitmessagekivy.get_platform import platform from bitmessagekivy import identiconGeneration from bitmessagekivy import kivy_helper_search from bitmessagekivy.uikivysignaler import UIkivySignaler @@ -274,12 +275,13 @@ class NavigateApp(MDApp): self.data_screens, self.all_data, response = load_screen_json() self.kivy_state_obj = KivyStateVariables() + kivy_state = KivyStateVariables() previous_date = ObjectProperty() obj_1 = ObjectProperty() identity_list = get_identity_list() nav_drawer = ObjectProperty() - state.screen_density = Window.size - window_size = state.screen_density + kivy_state.screen_density = Window.size + window_size = kivy_state.screen_density app_platform = platform title = "PyBitmessage" imgstatus = False diff --git a/src/bitmessagekivy/uikivysignaler.py b/src/bitmessagekivy/uikivysignaler.py index 102a8810..67757e87 100644 --- a/src/bitmessagekivy/uikivysignaler.py +++ b/src/bitmessagekivy/uikivysignaler.py @@ -2,13 +2,14 @@ Ui Singnaler for kivy interface """ from threading import Thread - +import logging import queues import state from kivy.app import App -from debug import logger from bitmessagekivy.baseclass.common import kivy_state_variables +logger = logging.getLogger('default') + class UIkivySignaler(Thread): """Kivy ui signaler"""