worked on new kivymd version(0.104.1) updation and filemanager custom implementation
2
.gitignore
vendored
|
@ -21,4 +21,4 @@ build
|
||||||
pyan/
|
pyan/
|
||||||
.buildozer/
|
.buildozer/
|
||||||
bin/
|
bin/
|
||||||
src/images/default_identicon/
|
src/images/kivy/default_identicon/*png
|
|
@ -9,7 +9,8 @@ isort==4.3.21
|
||||||
Kivy==1.11.1
|
Kivy==1.11.1
|
||||||
Kivy-Garden==0.1.4
|
Kivy-Garden==0.1.4
|
||||||
kivy-garden.qrcode==2019.914
|
kivy-garden.qrcode==2019.914
|
||||||
kivymd==0.104.0
|
#-e git+https://github.com/surbhicis/KivyMD-1#egg=kivymd
|
||||||
|
-e git+https://github.com/navjotcis/KivyMD#egg=kivymd
|
||||||
lazy-object-proxy==1.4.3
|
lazy-object-proxy==1.4.3
|
||||||
mccabe==0.6.1
|
mccabe==0.6.1
|
||||||
numpy==1.18.4
|
numpy==1.18.4
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 5aa322da9179dae305fde5af1db516c1ad9baea4
|
|
|
@ -1,41 +0,0 @@
|
||||||
"""
|
|
||||||
src/bitmessagekivy/android/python-for-android/recipes/kivymd/__init__.py
|
|
||||||
=================================
|
|
||||||
"""
|
|
||||||
# pylint: disable=import-error
|
|
||||||
from os.path import join
|
|
||||||
|
|
||||||
from pythonforandroid.recipe import PythonRecipe
|
|
||||||
# from pythonforandroid.util import ensure_dir
|
|
||||||
|
|
||||||
|
|
||||||
class KivyMDRecipe(PythonRecipe):
|
|
||||||
"""This recipe installs KivyMD into the android dist from source"""
|
|
||||||
version = 'master'
|
|
||||||
url = 'https://github.com/surbhicis/kivymd/archive/master.zip'
|
|
||||||
depends = ['kivy']
|
|
||||||
site_packages_name = 'kivymd'
|
|
||||||
call_hostpython_via_targetpython = False
|
|
||||||
|
|
||||||
def should_build(self, arch): # pylint: disable=no-self-use, unused-argument
|
|
||||||
"""Method helps to build the application"""
|
|
||||||
return True
|
|
||||||
|
|
||||||
def get_recipe_env(self, arch):
|
|
||||||
"""Method is used for getting all the env paths"""
|
|
||||||
env = super(KivyMDRecipe, self).get_recipe_env(arch)
|
|
||||||
env['PYTHON_ROOT'] = self.ctx.get_python_install_dir()
|
|
||||||
env['CFLAGS'] += ' -I' + env['PYTHON_ROOT'] + '/include/python2.7'
|
|
||||||
env['LDFLAGS'] += ' -L' + env['PYTHON_ROOT'] + '/lib' + \
|
|
||||||
' -lpython2.7'
|
|
||||||
if 'sdl2' in self.ctx.recipe_build_order:
|
|
||||||
env['USE_SDL2'] = '1'
|
|
||||||
env['KIVY_SDL2_PATH'] = ':'.join([
|
|
||||||
join(self.ctx.bootstrap.build_dir, 'jni', 'SDL', 'include'),
|
|
||||||
join(self.ctx.bootstrap.build_dir, 'jni', 'SDL2_image'),
|
|
||||||
join(self.ctx.bootstrap.build_dir, 'jni', 'SDL2_mixer'),
|
|
||||||
join(self.ctx.bootstrap.build_dir, 'jni', 'SDL2_ttf'), ])
|
|
||||||
return env
|
|
||||||
|
|
||||||
|
|
||||||
recipe = KivyMDRecipe()
|
|
|
@ -1,36 +0,0 @@
|
||||||
diff -Naurp KivyMD.orig/kivymd/button.py KivyMD/kivymd/button.py
|
|
||||||
--- KivyMD.orig/kivymd/button.py 2017-08-25 13:12:34.000000000 +0200
|
|
||||||
+++ KivyMD/kivymd/button.py 2018-07-10 10:37:55.719440354 +0200
|
|
||||||
@@ -175,7 +175,8 @@ class BaseButton(ThemableBehavior, Butto
|
|
||||||
self._current_button_color = self.md_bg_color_disabled
|
|
||||||
else:
|
|
||||||
self._current_button_color = self.md_bg_color
|
|
||||||
- super(BaseButton, self).on_disabled(instance, value)
|
|
||||||
+ # To add compatibility to last kivy (disabled is now an Alias property)
|
|
||||||
+ # super(BaseButton, self).on_disabled(instance, value)
|
|
||||||
|
|
||||||
|
|
||||||
class BasePressedButton(BaseButton):
|
|
||||||
diff -Naurp KivyMD.orig/kivymd/selectioncontrols.py KivyMD/kivymd/selectioncontrols.py
|
|
||||||
--- KivyMD.orig/kivymd/selectioncontrols.py 2017-08-25 13:12:34.000000000 +0200
|
|
||||||
+++ KivyMD/kivymd/selectioncontrols.py 2018-07-10 10:40:06.971439102 +0200
|
|
||||||
@@ -45,6 +45,7 @@ Builder.load_string('''
|
|
||||||
pos: self.pos
|
|
||||||
|
|
||||||
<MDSwitch>:
|
|
||||||
+ _thumb_pos: (self.right - dp(12), self.center_y - dp(12)) if self.active else (self.x - dp(12), self.center_y - dp(12))
|
|
||||||
canvas.before:
|
|
||||||
Color:
|
|
||||||
rgba: self._track_color_disabled if self.disabled else \
|
|
||||||
diff -Naurp KivyMD.orig/kivymd/tabs.py KivyMD/kivymd/tabs.py
|
|
||||||
--- KivyMD.orig/kivymd/tabs.py 2017-08-25 13:12:34.000000000 +0200
|
|
||||||
+++ KivyMD/kivymd/tabs.py 2018-07-10 10:39:20.603439544 +0200
|
|
||||||
@@ -185,7 +185,7 @@ class MDBottomNavigationBar(ThemableBeha
|
|
||||||
|
|
||||||
class MDTabHeader(MDFlatButton):
|
|
||||||
""" Internal widget for headers based on MDFlatButton"""
|
|
||||||
-
|
|
||||||
+
|
|
||||||
width = BoundedNumericProperty(dp(0), min=dp(72), max=dp(264), errorhandler=lambda x: dp(72))
|
|
||||||
tab = ObjectProperty(None)
|
|
||||||
panel = ObjectProperty(None)
|
|
|
@ -1,5 +1,5 @@
|
||||||
<ArrowImg@Image>:
|
<ArrowImg@Image>:
|
||||||
source: './images/down-arrow.png' if self.parent.is_open == True else './images/right-arrow.png'
|
source: app.image_path +('/down-arrow.png' if self.parent.is_open == True else '/right-arrow.png')
|
||||||
size: 15, 15
|
size: 15, 15
|
||||||
x: self.parent.x + self.parent.width - self.width - 5
|
x: self.parent.x + self.parent.width - self.width - 5
|
||||||
y: self.parent.y + self.parent.height/2 - self.height + 5
|
y: self.parent.y + self.parent.height/2 - self.height + 5
|
||||||
|
|
|
@ -18,6 +18,9 @@
|
||||||
multiline: False
|
multiline: False
|
||||||
required: True
|
required: True
|
||||||
helper_text_mode: "on_error"
|
helper_text_mode: "on_error"
|
||||||
|
canvas.before:
|
||||||
|
Color:
|
||||||
|
rgba: (0,0,0,1)
|
||||||
|
|
||||||
BoxLayout:
|
BoxLayout:
|
||||||
size_hint_y: None
|
size_hint_y: None
|
||||||
|
@ -66,6 +69,9 @@
|
||||||
size_hint_y: None
|
size_hint_y: None
|
||||||
multiline: False
|
multiline: False
|
||||||
helper_text_mode: "on_error"
|
helper_text_mode: "on_error"
|
||||||
|
canvas.before:
|
||||||
|
Color:
|
||||||
|
rgba: (0,0,0,1)
|
||||||
|
|
||||||
MyMDTextField:
|
MyMDTextField:
|
||||||
id: body
|
id: body
|
||||||
|
@ -75,6 +81,9 @@
|
||||||
font_size: '15sp'
|
font_size: '15sp'
|
||||||
required: True
|
required: True
|
||||||
helper_text_mode: "on_error"
|
helper_text_mode: "on_error"
|
||||||
|
canvas.before:
|
||||||
|
Color:
|
||||||
|
rgba: (0,0,0,1)
|
||||||
BoxLayout:
|
BoxLayout:
|
||||||
spacing:50
|
spacing:50
|
||||||
|
|
||||||
|
|
|
@ -74,4 +74,7 @@
|
||||||
line_color_focus: [0,0,0,0]
|
line_color_focus: [0,0,0,0]
|
||||||
markup: True
|
markup: True
|
||||||
font_size: '15sp'
|
font_size: '15sp'
|
||||||
|
canvas.before:
|
||||||
|
Color:
|
||||||
|
rgba: (0,0,0,1)
|
||||||
Loader:
|
Loader:
|
|
@ -21,21 +21,21 @@
|
||||||
ProductLayout:
|
ProductLayout:
|
||||||
heading_text: "Gas (Play Billing Codelab)"
|
heading_text: "Gas (Play Billing Codelab)"
|
||||||
price_text: "$0.99"
|
price_text: "$0.99"
|
||||||
source: "/home/surbhi/Downloads/peter3/PyBitmessage/src/images/buynew1.png"
|
source: app.image_path + "/payment/buynew1.png"
|
||||||
description_text: "Buy gasoline to ride!"
|
description_text: "Buy gasoline to ride!"
|
||||||
product_id: "SKUGASBILLING"
|
product_id: "SKUGASBILLING"
|
||||||
|
|
||||||
ProductLayout:
|
ProductLayout:
|
||||||
heading_text: "Upgrade your car (Play Billing Codelab)"
|
heading_text: "Upgrade your car (Play Billing Codelab)"
|
||||||
price_text: "$1.49"
|
price_text: "$1.49"
|
||||||
source: "/home/surbhi/Downloads/peter3/PyBitmessage/src/images/buynew1.png"
|
source: app.image_path + "/payment/buynew1.png"
|
||||||
description_text: "Buy a premium outfit for your car!"
|
description_text: "Buy a premium outfit for your car!"
|
||||||
product_id: "SKUUPGRADECAR"
|
product_id: "SKUUPGRADECAR"
|
||||||
|
|
||||||
ProductLayout:
|
ProductLayout:
|
||||||
heading_text: "Month in gold status (Play Billing Codelab)"
|
heading_text: "Month in gold status (Play Billing Codelab)"
|
||||||
price_text: "$0.99"
|
price_text: "$0.99"
|
||||||
source: "/home/surbhi/Downloads/peter3/PyBitmessage/src/images/buynew1.png"
|
source: app.image_path + "/payment/buynew1.png"
|
||||||
description_text: "Enjoy a gold status for a month!"
|
description_text: "Enjoy a gold status for a month!"
|
||||||
product_id: "SKUMONTHLYGOLD"
|
product_id: "SKUMONTHLYGOLD"
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
ProductLayout:
|
ProductLayout:
|
||||||
heading_text: "Gas (Play Billing Codelab)"
|
heading_text: "Gas (Play Billing Codelab)"
|
||||||
price_text: "$0.99"
|
price_text: "$0.99"
|
||||||
source: "/home/surbhi/Downloads/peter3/PyBitmessage/src/images/buynew1.png"
|
source: app.image_path + "/payment/buynew1.png"
|
||||||
description_text: "Buy gasoline to ride!"
|
description_text: "Buy gasoline to ride!"
|
||||||
product_id: "SKUONETIMEGAS"
|
product_id: "SKUONETIMEGAS"
|
||||||
|
|
||||||
|
@ -55,14 +55,14 @@
|
||||||
ProductLayout:
|
ProductLayout:
|
||||||
heading_text: "Gas (Play Billing Codelab)"
|
heading_text: "Gas (Play Billing Codelab)"
|
||||||
price_text: "$0.99"
|
price_text: "$0.99"
|
||||||
source: "/home/surbhi/Downloads/peter3/PyBitmessage/src/images/buynew1.png"
|
source: app.image_path + "/payment/buynew1.png"
|
||||||
description_text: "Buy gasoline to ride!"
|
description_text: "Buy gasoline to ride!"
|
||||||
product_id: "SKUANNUALGAS"
|
product_id: "SKUANNUALGAS"
|
||||||
|
|
||||||
ProductLayout:
|
ProductLayout:
|
||||||
heading_text: "Year in gold status (Play Billing Codelab)"
|
heading_text: "Year in gold status (Play Billing Codelab)"
|
||||||
price_text: "$10.99"
|
price_text: "$10.99"
|
||||||
source: "/home/surbhi/Downloads/peter3/PyBitmessage/src/images/buynew1.png"
|
source: app.image_path + "/payment/buynew1.png"
|
||||||
description_text: "Enjoy a gold status for a year!"
|
description_text: "Enjoy a gold status for a year!"
|
||||||
product_id: "SKUANNUALGOLD"
|
product_id: "SKUANNUALGOLD"
|
||||||
|
|
||||||
|
@ -232,22 +232,22 @@
|
||||||
height:self.minimum_height
|
height:self.minimum_height
|
||||||
|
|
||||||
ListItemWithLabel:
|
ListItemWithLabel:
|
||||||
source: "/home/surbhi/Downloads/peter3/PyBitmessage/src/images/gplay.png"
|
source: app.image_path + "/payment/gplay.png"
|
||||||
text: "Google Play"
|
text: "Google Play"
|
||||||
method_name: "gplay"
|
method_name: "gplay"
|
||||||
recent: True
|
recent: True
|
||||||
|
|
||||||
ListItemWithLabel:
|
ListItemWithLabel:
|
||||||
source: "/home/surbhi/Downloads/peter3/PyBitmessage/src/images/btc.png"
|
source: app.image_path + "/payment/btc.png"
|
||||||
text: "BTC"
|
text: "BTC"
|
||||||
method_name: "btc"
|
method_name: "btc"
|
||||||
|
|
||||||
ListItemWithLabel:
|
ListItemWithLabel:
|
||||||
source: "/home/surbhi/Downloads/peter3/PyBitmessage/src/images/paypal.png"
|
source: app.image_path + "/payment/paypal.png"
|
||||||
text: "Paypal"
|
text: "Paypal"
|
||||||
method_name: "som"
|
method_name: "som"
|
||||||
|
|
||||||
ListItemWithLabel:
|
ListItemWithLabel:
|
||||||
source: "/home/surbhi/Downloads/peter3/PyBitmessage/src/images/buy.png"
|
source: app.image_path + "/payment/buy.png"
|
||||||
text: "One more method"
|
text: "One more method"
|
||||||
method_name: "omm"
|
method_name: "omm"
|
|
@ -6,7 +6,7 @@
|
||||||
disabled: True
|
disabled: True
|
||||||
background_disabled_normal: "White.png"
|
background_disabled_normal: "White.png"
|
||||||
Image:
|
Image:
|
||||||
source: './images/loader.zip'
|
source: app.image_path + '/loader.zip'
|
||||||
anim_delay: 0
|
anim_delay: 0
|
||||||
#mipmap: True
|
#mipmap: True
|
||||||
size: root.size
|
size: root.size
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
height: 2*(label.height + address.height) + 10
|
height: 2*(label.height + address.height) + 10
|
||||||
width :app.window_size[0] - (app.window_size[0]/10 if app.app_platform == 'android' else app.window_size[0]/4)
|
width :app.window_size[0] - (app.window_size[0]/10 if app.app_platform == 'android' else app.window_size[0]/4)
|
||||||
title: 'add contact\'s'
|
title: 'add contact\'s'
|
||||||
background: './images/popup.jpeg'
|
background: app.image_path + '/popup.jpeg'
|
||||||
title_size: sp(20)
|
title_size: sp(20)
|
||||||
title_color: 0.4, 0.3765, 0.3451, 1
|
title_color: 0.4, 0.3765, 0.3451, 1
|
||||||
auto_dismiss: False
|
auto_dismiss: False
|
||||||
|
@ -94,7 +94,7 @@
|
||||||
size_hint : (None,None)
|
size_hint : (None,None)
|
||||||
height: 4*(add_label.height)
|
height: 4*(add_label.height)
|
||||||
width :app.window_size[0] - (app.window_size[0]/10 if app.app_platform == 'android' else app.window_size[0]/4)
|
width :app.window_size[0] - (app.window_size[0]/10 if app.app_platform == 'android' else app.window_size[0]/4)
|
||||||
background: './images/popup.jpeg'
|
background: app.image_path + '/popup.jpeg'
|
||||||
separator_height: 0
|
separator_height: 0
|
||||||
auto_dismiss: False
|
auto_dismiss: False
|
||||||
BoxLayout:
|
BoxLayout:
|
||||||
|
@ -190,7 +190,7 @@
|
||||||
size_hint : (None,None)
|
size_hint : (None,None)
|
||||||
height: 4.5*(myaddr_label.height+ my_add_btn.children[0].height)
|
height: 4.5*(myaddr_label.height+ my_add_btn.children[0].height)
|
||||||
width :app.window_size[0] - (app.window_size[0]/10 if app.app_platform == 'android' else app.window_size[0]/4)
|
width :app.window_size[0] - (app.window_size[0]/10 if app.app_platform == 'android' else app.window_size[0]/4)
|
||||||
background: './images/popup.jpeg'
|
background: app.image_path + '/popup.jpeg'
|
||||||
auto_dismiss: False
|
auto_dismiss: False
|
||||||
separator_height: 0
|
separator_height: 0
|
||||||
BoxLayout:
|
BoxLayout:
|
||||||
|
@ -276,7 +276,7 @@
|
||||||
size_hint : (None,None)
|
size_hint : (None,None)
|
||||||
height: 1.3*(popup_label.height+ my_add_btn.children[0].height)
|
height: 1.3*(popup_label.height+ my_add_btn.children[0].height)
|
||||||
width :app.window_size[0] - (app.window_size[0]/10 if app.app_platform == 'android' else app.window_size[0]/4)
|
width :app.window_size[0] - (app.window_size[0]/10 if app.app_platform == 'android' else app.window_size[0]/4)
|
||||||
background: './images/popup.jpeg'
|
background: app.image_path + '/popup.jpeg'
|
||||||
auto_dismiss: False
|
auto_dismiss: False
|
||||||
separator_height: 0
|
separator_height: 0
|
||||||
BoxLayout:
|
BoxLayout:
|
||||||
|
@ -337,7 +337,7 @@
|
||||||
size_hint : (None,None)
|
size_hint : (None,None)
|
||||||
# height: 2*(sd_label.height+ sd_btn.children[0].height)
|
# height: 2*(sd_label.height+ sd_btn.children[0].height)
|
||||||
width :app.window_size[0] - (app.window_size[0]/10 if app.app_platform == 'android' else app.window_size[0]/4)
|
width :app.window_size[0] - (app.window_size[0]/10 if app.app_platform == 'android' else app.window_size[0]/4)
|
||||||
background: './images/popup.jpeg'
|
background: app.image_path + '/popup.jpeg'
|
||||||
auto_dismiss: False
|
auto_dismiss: False
|
||||||
separator_height: 0
|
separator_height: 0
|
||||||
BoxLayout:
|
BoxLayout:
|
||||||
|
|
|
@ -65,6 +65,7 @@
|
||||||
height: "200dp"
|
height: "200dp"
|
||||||
|
|
||||||
MDIconButton:
|
MDIconButton:
|
||||||
|
id: file_manager
|
||||||
icon: "file-image"
|
icon: "file-image"
|
||||||
x: root.parent.x + dp(10)
|
x: root.parent.x + dp(10)
|
||||||
pos_hint: {"top": 1, 'right': 1}
|
pos_hint: {"top": 1, 'right': 1}
|
||||||
|
@ -73,6 +74,8 @@
|
||||||
# md_bg_color: app.theme_cls.primary_color
|
# md_bg_color: app.theme_cls.primary_color
|
||||||
theme_text_color: "Custom"
|
theme_text_color: "Custom"
|
||||||
text_color: app.theme_cls.primary_color
|
text_color: app.theme_cls.primary_color
|
||||||
|
opacity: 1 if app.current_address_label() else 0
|
||||||
|
disabled: False if app.current_address_label() else True
|
||||||
|
|
||||||
BoxLayout:
|
BoxLayout:
|
||||||
id: top_box
|
id: top_box
|
||||||
|
@ -322,6 +325,9 @@ NavigationLayout:
|
||||||
halign: 'center'
|
halign: 'center'
|
||||||
font_size: dp(15)
|
font_size: dp(15)
|
||||||
bold: True
|
bold: True
|
||||||
|
canvas.before:
|
||||||
|
Color:
|
||||||
|
rgba: (0,0,0,1)
|
||||||
# MDLabel:
|
# MDLabel:
|
||||||
# size_hint_y: None
|
# size_hint_y: None
|
||||||
# font_style: 'Body1'
|
# font_style: 'Body1'
|
||||||
|
|
|
@ -108,6 +108,7 @@ from kivy.utils import platform
|
||||||
from kivymd.uix.button import MDIconButton
|
from kivymd.uix.button import MDIconButton
|
||||||
from kivymd.uix.dialog import MDDialog
|
from kivymd.uix.dialog import MDDialog
|
||||||
from kivymd.uix.label import MDLabel
|
from kivymd.uix.label import MDLabel
|
||||||
|
from kivymd.uix.button import MDFlatButton
|
||||||
from kivymd.uix.list import (
|
from kivymd.uix.list import (
|
||||||
ILeftBody,
|
ILeftBody,
|
||||||
ILeftBodyTouch,
|
ILeftBodyTouch,
|
||||||
|
@ -134,7 +135,6 @@ from semaphores import kivyuisignaler
|
||||||
|
|
||||||
import state
|
import state
|
||||||
from addresses import decodeAddress
|
from addresses import decodeAddress
|
||||||
from kivy.uix.modalview import ModalView
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from kivymd.uix.behaviors.elevation import RectangularElevationBehavior
|
from kivymd.uix.behaviors.elevation import RectangularElevationBehavior
|
||||||
from kivymd.uix.bottomsheet import MDCustomBottomSheet
|
from kivymd.uix.bottomsheet import MDCustomBottomSheet
|
||||||
|
@ -155,6 +155,8 @@ KVFILES = [
|
||||||
'chat_room', 'chat_list'
|
'chat_room', 'chat_list'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
ThemeClsColor = [0.12, 0.58, 0.95, 1]
|
||||||
|
|
||||||
|
|
||||||
def toast(text):
|
def toast(text):
|
||||||
"""Method will display the toast message"""
|
"""Method will display the toast message"""
|
||||||
|
@ -291,10 +293,10 @@ class Inbox(Screen):
|
||||||
meny = TwoLineAvatarIconListItem(
|
meny = TwoLineAvatarIconListItem(
|
||||||
text=item['text'], secondary_text=item['secondary_text'],
|
text=item['text'], secondary_text=item['secondary_text'],
|
||||||
theme_text_color='Custom',
|
theme_text_color='Custom',
|
||||||
text_color=NavigateApp().theme_cls.primary_color)
|
text_color=ThemeClsColor)
|
||||||
meny._txt_right_pad = dp(70)
|
meny._txt_right_pad = dp(70)
|
||||||
meny.add_widget(AvatarSampleWidget(
|
meny.add_widget(AvatarSampleWidget(
|
||||||
source='./images/text_images/{}.png'.format(
|
source= state.imageDir +'/text_images/{}.png'.format(
|
||||||
avatarImageFirstLetter(item['secondary_text'].strip()))))
|
avatarImageFirstLetter(item['secondary_text'].strip()))))
|
||||||
meny.bind(on_press=partial(self.inbox_detail, item['msgid']))
|
meny.bind(on_press=partial(self.inbox_detail, item['msgid']))
|
||||||
meny.add_widget(AddTimeWidget(item['received']))
|
meny.add_widget(AddTimeWidget(item['received']))
|
||||||
|
@ -477,14 +479,14 @@ class MyAddress(Screen):
|
||||||
meny = CustomTwoLineAvatarIconListItem(
|
meny = CustomTwoLineAvatarIconListItem(
|
||||||
text=item['text'], secondary_text=item['secondary_text'],
|
text=item['text'], secondary_text=item['secondary_text'],
|
||||||
theme_text_color='Custom' if is_enable == 'true' else 'Primary',
|
theme_text_color='Custom' if is_enable == 'true' else 'Primary',
|
||||||
text_color=NavigateApp().theme_cls.primary_color,)
|
text_color=ThemeClsColor,)
|
||||||
meny._txt_right_pad = dp(70)
|
meny._txt_right_pad = dp(70)
|
||||||
try:
|
try:
|
||||||
meny.canvas.children[6].rgba = [0, 0, 0, 0] if is_enable == 'true' else [0.5, 0.5, 0.5, 0.5]
|
meny.canvas.children[6].rgba = [0, 0, 0, 0] if is_enable == 'true' else [0.5, 0.5, 0.5, 0.5]
|
||||||
except Exception:
|
except Exception:
|
||||||
meny.canvas.children[9].rgba = [0, 0, 0, 0] if is_enable == 'true' else [0.5, 0.5, 0.5, 0.5]
|
meny.canvas.children[9].rgba = [0, 0, 0, 0] if is_enable == 'true' else [0.5, 0.5, 0.5, 0.5]
|
||||||
meny.add_widget(AvatarSampleWidget(
|
meny.add_widget(AvatarSampleWidget(
|
||||||
source='./images/text_images/{}.png'.format(
|
source= state.imageDir + '/text_images/{}.png'.format(
|
||||||
avatarImageFirstLetter(item['text'].strip()))))
|
avatarImageFirstLetter(item['text'].strip()))))
|
||||||
meny.bind(on_press=partial(
|
meny.bind(on_press=partial(
|
||||||
self.myadd_detail, item['secondary_text'], item['text']))
|
self.myadd_detail, item['secondary_text'], item['text']))
|
||||||
|
@ -494,7 +496,7 @@ class MyAddress(Screen):
|
||||||
size=[85 if platform == 'android' else 50, 60],
|
size=[85 if platform == 'android' else 50, 60],
|
||||||
text='Active', halign='center',
|
text='Active', halign='center',
|
||||||
font_style='Body1', theme_text_color='Custom',
|
font_style='Body1', theme_text_color='Custom',
|
||||||
text_color=NavigateApp().theme_cls.primary_color
|
text_color=ThemeClsColor
|
||||||
)
|
)
|
||||||
badge_obj.font_size = '13sp'
|
badge_obj.font_size = '13sp'
|
||||||
meny.add_widget(badge_obj)
|
meny.add_widget(badge_obj)
|
||||||
|
@ -527,17 +529,26 @@ class MyAddress(Screen):
|
||||||
p.set_address(fromaddress, label)
|
p.set_address(fromaddress, label)
|
||||||
else:
|
else:
|
||||||
width = .8 if platform == 'android' else .55
|
width = .8 if platform == 'android' else .55
|
||||||
msg_dialog = MDDialog(
|
dialog_box=MDDialog(
|
||||||
text='Address is not currently active. Please click on Toggle button to active it.',
|
text='Address is not currently active. Please click on Toggle button to active it.',
|
||||||
title='', size_hint=(width, .25), text_button_ok='Ok',
|
size_hint=(width, .25),
|
||||||
events_callback=self.callback_for_menu_items)
|
buttons=[
|
||||||
msg_dialog.open()
|
MDFlatButton(
|
||||||
|
text="Ok", on_release=lambda x: callback_for_menu_items("Ok")
|
||||||
|
),
|
||||||
|
],)
|
||||||
|
dialog_box.open()
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def callback_for_menu_items(text_item, *arg):
|
def callback_for_menu_items(text_item, *arg):
|
||||||
"""Callback of alert box"""
|
"""Callback of alert box"""
|
||||||
|
dialog_box.dismiss()
|
||||||
toast(text_item)
|
toast(text_item)
|
||||||
|
|
||||||
|
# @staticmethod
|
||||||
|
# def callback_for_menu_items(text_item, *arg):
|
||||||
|
# """Callback of alert box"""
|
||||||
|
# toast(text_item)
|
||||||
|
|
||||||
def refresh_callback(self, *args):
|
def refresh_callback(self, *args):
|
||||||
"""Method updates the state of application,
|
"""Method updates the state of application,
|
||||||
While the spinner remains on the screen"""
|
While the spinner remains on the screen"""
|
||||||
|
@ -654,9 +665,9 @@ class AddressBook(Screen):
|
||||||
for item in self.queryreturn[start_index:end_index]:
|
for item in self.queryreturn[start_index:end_index]:
|
||||||
meny = TwoLineAvatarIconListItem(
|
meny = TwoLineAvatarIconListItem(
|
||||||
text=item[0], secondary_text=item[1], theme_text_color='Custom',
|
text=item[0], secondary_text=item[1], theme_text_color='Custom',
|
||||||
text_color=NavigateApp().theme_cls.primary_color)
|
text_color=ThemeClsColor)
|
||||||
meny.add_widget(AvatarSampleWidget(
|
meny.add_widget(AvatarSampleWidget(
|
||||||
source='./images/text_images/{}.png'.format(
|
source=state.imageDir + '/text_images/{}.png'.format(
|
||||||
avatarImageFirstLetter(item[0].strip()))))
|
avatarImageFirstLetter(item[0].strip()))))
|
||||||
meny.bind(on_press=partial(
|
meny.bind(on_press=partial(
|
||||||
self.addBook_detail, item[1], item[0]))
|
self.addBook_detail, item[1], item[0]))
|
||||||
|
@ -873,17 +884,26 @@ class DropDownWidget(BoxLayout):
|
||||||
def address_error_message(self, msg):
|
def address_error_message(self, msg):
|
||||||
"""Generates error message"""
|
"""Generates error message"""
|
||||||
width = .8 if platform == 'android' else .55
|
width = .8 if platform == 'android' else .55
|
||||||
msg_dialog = MDDialog(
|
dialog_box=MDDialog(
|
||||||
text=msg,
|
text=msg,
|
||||||
title='', size_hint=(width, .25), text_button_ok='Ok',
|
size_hint=(width, .25),
|
||||||
events_callback=self.callback_for_menu_items)
|
buttons=[
|
||||||
msg_dialog.open()
|
MDFlatButton(
|
||||||
|
text="Ok", on_release=lambda x: callback_for_menu_items("Ok")
|
||||||
|
),
|
||||||
|
],)
|
||||||
|
dialog_box.open()
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def callback_for_menu_items(text_item, *arg):
|
def callback_for_menu_items(text_item, *arg):
|
||||||
"""Callback of alert box"""
|
"""Callback of alert box"""
|
||||||
|
dialog_box.dismiss()
|
||||||
toast(text_item)
|
toast(text_item)
|
||||||
|
|
||||||
|
# @staticmethod
|
||||||
|
# def callback_for_menu_items(text_item, *arg):
|
||||||
|
# """Callback of alert box"""
|
||||||
|
# toast(text_item)
|
||||||
|
|
||||||
def reset_composer(self):
|
def reset_composer(self):
|
||||||
"""Method will reset composer"""
|
"""Method will reset composer"""
|
||||||
self.ids.ti.text = ''
|
self.ids.ti.text = ''
|
||||||
|
@ -1265,10 +1285,10 @@ class Sent(Screen):
|
||||||
meny = TwoLineAvatarIconListItem(
|
meny = TwoLineAvatarIconListItem(
|
||||||
text=item['text'], secondary_text=item['secondary_text'],
|
text=item['text'], secondary_text=item['secondary_text'],
|
||||||
theme_text_color='Custom',
|
theme_text_color='Custom',
|
||||||
text_color=NavigateApp().theme_cls.primary_color)
|
text_color=ThemeClsColor)
|
||||||
meny._txt_right_pad = dp(70)
|
meny._txt_right_pad = dp(70)
|
||||||
meny.add_widget(AvatarSampleWidget(
|
meny.add_widget(AvatarSampleWidget(
|
||||||
source='./images/text_images/{}.png'.format(
|
source=state.imageDir + '/text_images/{}.png'.format(
|
||||||
avatarImageFirstLetter(item['secondary_text'].strip()))))
|
avatarImageFirstLetter(item['secondary_text'].strip()))))
|
||||||
meny.bind(on_press=partial(self.sent_detail, item['ackdata']))
|
meny.bind(on_press=partial(self.sent_detail, item['ackdata']))
|
||||||
meny.add_widget(AddTimeWidget(item['senttime']))
|
meny.add_widget(AddTimeWidget(item['senttime']))
|
||||||
|
@ -1484,9 +1504,9 @@ class Trash(Screen):
|
||||||
secondary_text=(item[2][:50] + '........' if len(
|
secondary_text=(item[2][:50] + '........' if len(
|
||||||
subject) >= 50 else (subject + ',' + body)[0:50] + '........').replace('\t', '').replace(' ', ''),
|
subject) >= 50 else (subject + ',' + body)[0:50] + '........').replace('\t', '').replace(' ', ''),
|
||||||
theme_text_color='Custom',
|
theme_text_color='Custom',
|
||||||
text_color=NavigateApp().theme_cls.primary_color)
|
text_color=ThemeClsColor)
|
||||||
meny._txt_right_pad = dp(70)
|
meny._txt_right_pad = dp(70)
|
||||||
img_latter = './images/text_images/{}.png'.format(
|
img_latter =state.imageDir + '/text_images/{}.png'.format(
|
||||||
subject[0].upper() if (subject[0].upper() >= 'A' and subject[0].upper() <= 'Z') else '!')
|
subject[0].upper() if (subject[0].upper() >= 'A' and subject[0].upper() <= 'Z') else '!')
|
||||||
meny.add_widget(AvatarSampleWidget(source=img_latter))
|
meny.add_widget(AvatarSampleWidget(source=img_latter))
|
||||||
meny.add_widget(AddTimeWidget(item[7]))
|
meny.add_widget(AddTimeWidget(item[7]))
|
||||||
|
@ -1539,22 +1559,34 @@ class Trash(Screen):
|
||||||
def delete_confirmation(self):
|
def delete_confirmation(self):
|
||||||
"""Show confirmation delete popup"""
|
"""Show confirmation delete popup"""
|
||||||
width = .8 if platform == 'android' else .55
|
width = .8 if platform == 'android' else .55
|
||||||
delete_msg_dialog = MDDialog(
|
dialog_box=MDDialog(
|
||||||
text='Are you sure you want to delete this'
|
text='Are you sure you want to delete this'
|
||||||
' message permanently from trash?',
|
' message permanently from trash?',
|
||||||
title='',
|
|
||||||
size_hint=(width, .25),
|
size_hint=(width, .25),
|
||||||
text_button_ok='Yes',
|
buttons=[
|
||||||
text_button_cancel='No',
|
MDFlatButton(
|
||||||
events_callback=self.callback_for_delete_msg)
|
text="Yes", on_release=lambda x: callback_for_delete_msg("Yes")
|
||||||
delete_msg_dialog.open()
|
),
|
||||||
|
MDFlatButton(
|
||||||
|
text="No",on_release=lambda x: callback_for_delete_msg("No"),
|
||||||
|
),
|
||||||
|
],)
|
||||||
|
dialog_box.open()
|
||||||
|
|
||||||
def callback_for_delete_msg(self, text_item, *arg):
|
def callback_for_delete_msg(text_item, *arg):
|
||||||
"""Getting the callback of alert box"""
|
"""Getting the callback of alert box"""
|
||||||
if text_item == 'Yes':
|
if text_item == 'Yes':
|
||||||
self.delete_message_from_trash()
|
self.delete_message_from_trash()
|
||||||
else:
|
else:
|
||||||
toast(text_item)
|
toast(text_item)
|
||||||
|
dialog_box.dismiss()
|
||||||
|
|
||||||
|
# def callback_for_delete_msg(self, text_item, *arg):
|
||||||
|
# """Getting the callback of alert box"""
|
||||||
|
# if text_item == 'Yes':
|
||||||
|
# self.delete_message_from_trash()
|
||||||
|
# else:
|
||||||
|
# toast(text_item)
|
||||||
|
|
||||||
def delete_message_from_trash(self):
|
def delete_message_from_trash(self):
|
||||||
"""Deleting message from trash"""
|
"""Deleting message from trash"""
|
||||||
|
@ -1625,6 +1657,10 @@ class NavigateApp(MDApp):
|
||||||
imgstatus = False
|
imgstatus = False
|
||||||
count = 0
|
count = 0
|
||||||
manager_open = False
|
manager_open = False
|
||||||
|
file_manager = None
|
||||||
|
# state.imageDir = os.path.join(os.path.abspath(os.path.join(__file__ ,"../../..")),'images', 'kivy')
|
||||||
|
state.imageDir = os.path.join('./images', 'kivy')
|
||||||
|
image_path = state.imageDir
|
||||||
|
|
||||||
def build(self):
|
def build(self):
|
||||||
"""Method builds the widget"""
|
"""Method builds the widget"""
|
||||||
|
@ -1658,7 +1694,7 @@ class NavigateApp(MDApp):
|
||||||
|
|
||||||
def getCurrentAccountData(self, text):
|
def getCurrentAccountData(self, text):
|
||||||
"""Get Current Address Account Data"""
|
"""Get Current Address Account Data"""
|
||||||
if os.path.exists('./images/default_identicon/{}.png'.format(text)):
|
if os.path.exists(state.imageDir + '/default_identicon/{}.png'.format(text)):
|
||||||
self.load_selected_Image(text)
|
self.load_selected_Image(text)
|
||||||
else:
|
else:
|
||||||
self.set_identicon(text)
|
self.set_identicon(text)
|
||||||
|
@ -1672,8 +1708,16 @@ class NavigateApp(MDApp):
|
||||||
for nav_obj in self.root.ids.content_drawer.children[
|
for nav_obj in self.root.ids.content_drawer.children[
|
||||||
0].children[0].children[0].children:
|
0].children[0].children[0].children:
|
||||||
nav_obj.active = True if nav_obj.text == 'Inbox' else False
|
nav_obj.active = True if nav_obj.text == 'Inbox' else False
|
||||||
|
self.fileManagerSetting()
|
||||||
Clock.schedule_once(self.setCurrentAccountData, 0.5)
|
Clock.schedule_once(self.setCurrentAccountData, 0.5)
|
||||||
|
|
||||||
|
def fileManagerSetting(self):
|
||||||
|
"""This method is for file manager setting"""
|
||||||
|
if not self.root.ids.content_drawer.ids.file_manager.opacity and \
|
||||||
|
self.root.ids.content_drawer.ids.file_manager.disabled:
|
||||||
|
self.root.ids.content_drawer.ids.file_manager.opacity = 1
|
||||||
|
self.root.ids.content_drawer.ids.file_manager.disabled = False
|
||||||
|
|
||||||
def setCurrentAccountData(self, dt=0):
|
def setCurrentAccountData(self, dt=0):
|
||||||
"""This method set the current accout data on all the screens"""
|
"""This method set the current accout data on all the screens"""
|
||||||
self.root.ids.sc1.ids.ml.clear_widgets()
|
self.root.ids.sc1.ids.ml.clear_widgets()
|
||||||
|
@ -1714,20 +1758,20 @@ class NavigateApp(MDApp):
|
||||||
"""Getting Default Account Data"""
|
"""Getting Default Account Data"""
|
||||||
if BMConfigParser().addresses():
|
if BMConfigParser().addresses():
|
||||||
img = identiconGeneration.generate(BMConfigParser().addresses()[0])
|
img = identiconGeneration.generate(BMConfigParser().addresses()[0])
|
||||||
self.createFolder('./images/default_identicon/')
|
self.createFolder(state.imageDir + '/default_identicon/')
|
||||||
if platform == 'android':
|
if platform == 'android':
|
||||||
# android_path = os.path.expanduser
|
# android_path = os.path.expanduser
|
||||||
# ("~/user/0/org.test.bitapp/files/app/")
|
# ("~/user/0/org.test.bitapp/files/app/")
|
||||||
if not os.path.exists('./images/default_identicon/{}.png'.format(
|
if not os.path.exists(state.imageDir + '/default_identicon/{}.png'.format(
|
||||||
BMConfigParser().addresses()[0])):
|
BMConfigParser().addresses()[0])):
|
||||||
android_path = os.path.join(
|
android_path = os.path.join(
|
||||||
os.environ['ANDROID_PRIVATE'] + '/app/')
|
os.environ['ANDROID_PRIVATE'] + '/app/')
|
||||||
img.texture.save('{1}/images/default_identicon/{0}.png'.format(
|
img.texture.save('{1}/kivy/default_identicon/{0}.png'.format(
|
||||||
BMConfigParser().addresses()[0], android_path))
|
BMConfigParser().addresses()[0], android_path))
|
||||||
else:
|
else:
|
||||||
if not os.path.exists('./images/default_identicon/{}.png'.format(
|
if not os.path.exists(state.imageDir + '/default_identicon/{}.png'.format(
|
||||||
BMConfigParser().addresses()[0])):
|
BMConfigParser().addresses()[0])):
|
||||||
img.texture.save('./images/default_identicon/{}.png'.format(
|
img.texture.save(state.imageDir + '/default_identicon/{}.png'.format(
|
||||||
BMConfigParser().addresses()[0]))
|
BMConfigParser().addresses()[0]))
|
||||||
return BMConfigParser().addresses()[0]
|
return BMConfigParser().addresses()[0]
|
||||||
return 'Select Address'
|
return 'Select Address'
|
||||||
|
@ -1745,17 +1789,17 @@ class NavigateApp(MDApp):
|
||||||
def get_default_image():
|
def get_default_image():
|
||||||
"""Getting default image on address"""
|
"""Getting default image on address"""
|
||||||
if BMConfigParser().addresses():
|
if BMConfigParser().addresses():
|
||||||
return './images/default_identicon/{}.png'.format(
|
return state.imageDir + '/default_identicon/{}.png'.format(
|
||||||
BMConfigParser().addresses()[0])
|
BMConfigParser().addresses()[0])
|
||||||
return './images/no_identicons.png'
|
return state.imageDir + '/no_identicons.png'
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_default_logo():
|
def get_default_logo():
|
||||||
"""Getting default logo image"""
|
"""Getting default logo image"""
|
||||||
if BMConfigParser().addresses():
|
if BMConfigParser().addresses():
|
||||||
return './images/default_identicon/{}.png'.format(
|
return state.imageDir + '/default_identicon/{}.png'.format(
|
||||||
BMConfigParser().addresses()[0])
|
BMConfigParser().addresses()[0])
|
||||||
return './images/drawer_logo1.png'
|
return state.imageDir + '/drawer_logo1.png'
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def addressexist():
|
def addressexist():
|
||||||
|
@ -2148,68 +2192,57 @@ class NavigateApp(MDApp):
|
||||||
"""This method open the file manager of local system"""
|
"""This method open the file manager of local system"""
|
||||||
from kivymd.uix.filemanager import MDFileManager
|
from kivymd.uix.filemanager import MDFileManager
|
||||||
|
|
||||||
self.manager = ModalView(size_hint=(1, 1), auto_dismiss=False)
|
if not self.file_manager:
|
||||||
self.file_manager = MDFileManager(
|
self.file_manager = MDFileManager(
|
||||||
exit_manager=self.exit_manager,
|
exit_manager=self.exit_manager,
|
||||||
select_path=self.select_path,
|
select_path=self.select_path,
|
||||||
previous=False,
|
|
||||||
ext=['.png', '.jpg']
|
ext=['.png', '.jpg']
|
||||||
)
|
)
|
||||||
self.manager.add_widget(self.file_manager)
|
self.file_manager.previous = False
|
||||||
# self.file_manager.show(os.environ["HOME"])
|
self.file_manager.current_path = '/'
|
||||||
if platform == 'android':
|
if platform == 'android':
|
||||||
from android.permissions import request_permissions, Permission
|
from android.permissions import request_permissions, Permission, check_permission
|
||||||
request_permissions([Permission.WRITE_EXTERNAL_STORAGE, Permission.READ_EXTERNAL_STORAGE])
|
if check_permission(Permission.WRITE_EXTERNAL_STORAGE) and \
|
||||||
|
check_permission(Permission.READ_EXTERNAL_STORAGE):
|
||||||
# from android.storage import app_storage_path
|
self.file_manager.show(os.getenv('EXTERNAL_STORAGE'))
|
||||||
# settings_path = app_storage_path()
|
self.manager_open = True
|
||||||
# print('path1................................', settings_path)
|
else:
|
||||||
|
request_permissions([Permission.WRITE_EXTERNAL_STORAGE, Permission.READ_EXTERNAL_STORAGE])
|
||||||
# from android.storage import primary_external_storage_path
|
else:
|
||||||
# primary_ext_storage = primary_external_storage_path()
|
self.file_manager.show(os.environ["HOME"])
|
||||||
# print('path1................................', primary_ext_storage)
|
|
||||||
|
|
||||||
# from android.storage import secondary_external_storage_path
|
|
||||||
# secondary_ext_storage = secondary_external_storage_path()
|
|
||||||
# print('path1................................', secondary_ext_storage)
|
|
||||||
|
|
||||||
# from kivy.app import user_data_dir
|
|
||||||
# from os.path import dirname, join
|
|
||||||
# out = join(dirname(user_data_dir), 'DCIM')
|
|
||||||
# DCIM = join('/sdcard', 'DCIM')
|
|
||||||
self.file_manager.show(os.getenv('EXTERNAL_STORAGE') if platform == 'android' else os.environ["HOME"])
|
|
||||||
# self.file_manager.show(os.getenv('EXTERNAL_STORAGE'))
|
|
||||||
self.manager_open = True
|
self.manager_open = True
|
||||||
self.manager.open()
|
|
||||||
|
|
||||||
def select_path(self, path):
|
def select_path(self, path):
|
||||||
"""This method is used to save the select image"""
|
"""This method is used to save the select image"""
|
||||||
|
try:
|
||||||
from PIL import Image as PilImage
|
from PIL import Image as PilImage
|
||||||
newImg = PilImage.open(path).resize((300, 300))
|
newImg = PilImage.open(path).resize((300, 300))
|
||||||
if platform == 'android':
|
if platform == 'android':
|
||||||
android_path = os.path.join(
|
android_path = os.path.join(
|
||||||
os.environ['ANDROID_PRIVATE'] + '/app/')
|
os.environ['ANDROID_PRIVATE'] + '/app/')
|
||||||
newImg.save('{1}/images/default_identicon/{0}.png'.format(
|
newImg.save('{1}/kivy/default_identicon/{0}.png'.format(
|
||||||
state.association, android_path))
|
state.association, android_path))
|
||||||
else:
|
else:
|
||||||
if not os.path.exists('./images/default_identicon/'):
|
if not os.path.exists(state.imageDir + '/default_identicon/'):
|
||||||
os.makedirs('./images/default_identicon/')
|
os.makedirs(state.imageDir + '/default_identicon/')
|
||||||
newImg.save('./images/default_identicon/{0}.png'.format(state.association))
|
newImg.save(state.imageDir + '/default_identicon/{0}.png'.format(state.association))
|
||||||
self.load_selected_Image(state.association)
|
self.load_selected_Image(state.association)
|
||||||
self.exit_manager()
|
|
||||||
toast('Image changed')
|
toast('Image changed')
|
||||||
|
except Exception:
|
||||||
|
toast('Exit')
|
||||||
|
self.exit_manager()
|
||||||
|
|
||||||
def exit_manager(self, *args):
|
def exit_manager(self, *args):
|
||||||
"""Called when the user reaches the root of the directory tree."""
|
"""Called when the user reaches the root of the directory tree."""
|
||||||
self.manager.dismiss()
|
|
||||||
self.manager_open = False
|
self.manager_open = False
|
||||||
|
self.file_manager.close()
|
||||||
|
|
||||||
def load_selected_Image(self, curerentAddr):
|
def load_selected_Image(self, curerentAddr):
|
||||||
"""This method load the selected image on screen"""
|
"""This method load the selected image on screen"""
|
||||||
top_box_obj = self.root.ids.content_drawer.ids.top_box.children[0]
|
top_box_obj = self.root.ids.content_drawer.ids.top_box.children[0]
|
||||||
# spinner_img_obj = self.root.ids.content_drawer.ids.btn.children[1]
|
# spinner_img_obj = self.root.ids.content_drawer.ids.btn.children[1]
|
||||||
# spinner_img_obj.source = top_box_obj.source ='./images/default_identicon/{0}.png'.format(curerentAddr)
|
# spinner_img_obj.source = top_box_obj.source ='./images/default_identicon/{0}.png'.format(curerentAddr)
|
||||||
top_box_obj.source = './images/default_identicon/{0}.png'.format(curerentAddr)
|
top_box_obj.source = state.imageDir + '/default_identicon/{0}.png'.format(curerentAddr)
|
||||||
top_box_obj.reload()
|
top_box_obj.reload()
|
||||||
# spinner_img_obj.reload()
|
# spinner_img_obj.reload()
|
||||||
|
|
||||||
|
@ -2441,8 +2474,8 @@ class MailDetail(Screen): # pylint: disable=too-many-instance-attributes
|
||||||
if len(data[0]) == 7:
|
if len(data[0]) == 7:
|
||||||
self.status = data[0][4]
|
self.status = data[0][4]
|
||||||
self.time_tag = ShowTimeHistoy(data[0][4]) if state.detailPageType == 'inbox' else ShowTimeHistoy(data[0][6])
|
self.time_tag = ShowTimeHistoy(data[0][4]) if state.detailPageType == 'inbox' else ShowTimeHistoy(data[0][6])
|
||||||
self.avatarImg = './images/avatar.png' if state.detailPageType == 'draft' else (
|
self.avatarImg = state.imageDir + '/avatar.png' if state.detailPageType == 'draft' else (
|
||||||
'./images/text_images/{0}.png'.format(avatarImageFirstLetter(self.subject.strip())))
|
state.imageDir + '/text_images/{0}.png'.format(avatarImageFirstLetter(self.subject.strip())))
|
||||||
self.timeinseconds = data[0][4] if state.detailPageType == 'inbox' else data[0][6]
|
self.timeinseconds = data[0][4] if state.detailPageType == 'inbox' else data[0][6]
|
||||||
|
|
||||||
def delete_mail(self):
|
def delete_mail(self):
|
||||||
|
@ -2673,6 +2706,9 @@ class ShowQRCode(Screen):
|
||||||
"""Method used for showing QR Code"""
|
"""Method used for showing QR Code"""
|
||||||
self.ids.qr.clear_widgets()
|
self.ids.qr.clear_widgets()
|
||||||
state.kivyapp.set_toolbar_for_QrCode()
|
state.kivyapp.set_toolbar_for_QrCode()
|
||||||
|
try:
|
||||||
|
from kivy.garden.qrcode import QRCodeWidget
|
||||||
|
except Exception as e:
|
||||||
from kivy_garden.qrcode import QRCodeWidget
|
from kivy_garden.qrcode import QRCodeWidget
|
||||||
try:
|
try:
|
||||||
address = self.manager.get_parent_window().children[0].address
|
address = self.manager.get_parent_window().children[0].address
|
||||||
|
@ -2761,10 +2797,10 @@ class Draft(Screen):
|
||||||
meny = TwoLineAvatarIconListItem(
|
meny = TwoLineAvatarIconListItem(
|
||||||
text='Draft', secondary_text=item['text'],
|
text='Draft', secondary_text=item['text'],
|
||||||
theme_text_color='Custom',
|
theme_text_color='Custom',
|
||||||
text_color=NavigateApp().theme_cls.primary_color)
|
text_color=ThemeClsColor)
|
||||||
meny._txt_right_pad = dp(70)
|
meny._txt_right_pad = dp(70)
|
||||||
meny.add_widget(AvatarSampleWidget(
|
meny.add_widget(AvatarSampleWidget(
|
||||||
source='./images/avatar.png'))
|
source=state.imageDir + '/avatar.png'))
|
||||||
meny.bind(on_press=partial(
|
meny.bind(on_press=partial(
|
||||||
self.draft_detail, item['ackdata']))
|
self.draft_detail, item['ackdata']))
|
||||||
meny.add_widget(AddTimeWidget(item['senttime']))
|
meny.add_widget(AddTimeWidget(item['senttime']))
|
||||||
|
@ -2964,10 +3000,10 @@ class Allmails(Screen):
|
||||||
subject) >= 50 else (
|
subject) >= 50 else (
|
||||||
subject + ',' + body)[0:50] + '........').replace('\t', '').replace(' ', ''),
|
subject + ',' + body)[0:50] + '........').replace('\t', '').replace(' ', ''),
|
||||||
theme_text_color='Custom',
|
theme_text_color='Custom',
|
||||||
text_color=NavigateApp().theme_cls.primary_color)
|
text_color=ThemeClsColor)
|
||||||
meny._txt_right_pad = dp(70)
|
meny._txt_right_pad = dp(70)
|
||||||
meny.add_widget(AvatarSampleWidget(
|
meny.add_widget(AvatarSampleWidget(
|
||||||
source='./images/text_images/{}.png'.format(
|
source= state.imageDir +'/text_images/{}.png'.format(
|
||||||
avatarImageFirstLetter(body.strip()))))
|
avatarImageFirstLetter(body.strip()))))
|
||||||
meny.bind(on_press=partial(
|
meny.bind(on_press=partial(
|
||||||
self.mail_detail, item[5], item[4]))
|
self.mail_detail, item[5], item[4]))
|
||||||
|
@ -3246,21 +3282,33 @@ class OneLineListTitle(OneLineListItem):
|
||||||
def copymessageTitle(self, text):
|
def copymessageTitle(self, text):
|
||||||
"""this method is for displaying dialog box"""
|
"""this method is for displaying dialog box"""
|
||||||
width = .8 if platform == 'android' else .55
|
width = .8 if platform == 'android' else .55
|
||||||
msg_dialog = MDDialog(
|
dialog_box=MDDialog(
|
||||||
text=text,
|
text=text,
|
||||||
title='', size_hint=(width, .25),
|
size_hint=(width, .25),
|
||||||
text_button_cancel='Cancel',
|
buttons=[
|
||||||
text_button_ok='Copy',
|
MDFlatButton(
|
||||||
events_callback=self.callback_for_copy_title)
|
text="Copy", on_release=lambda x: callback_for_copy_title(text)
|
||||||
msg_dialog.open()
|
),
|
||||||
|
MDFlatButton(
|
||||||
|
text="Cancel",on_release=lambda x: callback_for_copy_title(text),
|
||||||
|
),
|
||||||
|
],)
|
||||||
|
dialog_box.open()
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def callback_for_copy_title(text_item, *arg):
|
def callback_for_copy_title(text_item, *arg):
|
||||||
"""Callback of alert box"""
|
"""Callback of alert box"""
|
||||||
if text_item == 'Copy':
|
if text_item == 'Copy':
|
||||||
Clipboard.copy(str(arg[0].text))
|
Clipboard.copy()
|
||||||
|
dialog_box.dismiss()
|
||||||
toast(text_item)
|
toast(text_item)
|
||||||
|
|
||||||
|
# @staticmethod
|
||||||
|
# def callback_for_copy_title(text_item, *arg):
|
||||||
|
# """Callback of alert box"""
|
||||||
|
# if text_item == 'Copy':
|
||||||
|
# Clipboard.copy(str(arg[0].text))
|
||||||
|
# toast(text_item)
|
||||||
|
|
||||||
|
|
||||||
class ToAddrBoxlayout(BoxLayout):
|
class ToAddrBoxlayout(BoxLayout):
|
||||||
"""class for BoxLayout behaviour"""
|
"""class for BoxLayout behaviour"""
|
||||||
|
@ -3340,9 +3388,9 @@ class ChatList(Screen):
|
||||||
for item in self.queryreturn:
|
for item in self.queryreturn:
|
||||||
meny = TwoLineAvatarIconListItem(
|
meny = TwoLineAvatarIconListItem(
|
||||||
text=item[0], secondary_text=item[1], theme_text_color='Custom',
|
text=item[0], secondary_text=item[1], theme_text_color='Custom',
|
||||||
text_color=NavigateApp().theme_cls.primary_color)
|
text_color=ThemeClsColor)
|
||||||
meny.add_widget(AvatarSampleWidget(
|
meny.add_widget(AvatarSampleWidget(
|
||||||
source='./images/text_images/{}.png'.format(
|
source= state.imageDir + '/text_images/{}.png'.format(
|
||||||
avatarImageFirstLetter(item[0].strip()))))
|
avatarImageFirstLetter(item[0].strip()))))
|
||||||
meny.bind(on_release=partial(
|
meny.bind(on_release=partial(
|
||||||
self.redirect_to_chat, item[0], item[1]))
|
self.redirect_to_chat, item[0], item[1]))
|
||||||
|
|
|
@ -48,7 +48,8 @@ requirements =
|
||||||
pillow,
|
pillow,
|
||||||
bitmsghash,
|
bitmsghash,
|
||||||
#git+https://github.com/surbhicis/KivyMD-1.git,
|
#git+https://github.com/surbhicis/KivyMD-1.git,
|
||||||
git+https://github.com/surbhicis/KivyMD-1#egg=kivymd,
|
#git+https://github.com/surbhicis/KivyMD-1#egg=kivymd,
|
||||||
|
git+https://github.com/navjotcis/KivyMD#egg=kivymd,
|
||||||
kivy-garden,
|
kivy-garden,
|
||||||
qrcode,
|
qrcode,
|
||||||
msgpack
|
msgpack
|
||||||
|
@ -194,6 +195,9 @@ android.sdk = 20
|
||||||
# (list) Java classes to add as activities to the manifest.
|
# (list) Java classes to add as activities to the manifest.
|
||||||
#android.add_activites = com.example.ExampleActivity
|
#android.add_activites = com.example.ExampleActivity
|
||||||
|
|
||||||
|
# (str) python-for-android branch to use, defaults to stable
|
||||||
|
# p4a.branch = master
|
||||||
|
|
||||||
# (str) OUYA Console category. Should be one of GAME or APP
|
# (str) OUYA Console category. Should be one of GAME or APP
|
||||||
# If you leave this blank, OUYA support will not be enabled
|
# If you leave this blank, OUYA support will not be enabled
|
||||||
#android.ouya.category = GAME
|
#android.ouya.category = GAME
|
||||||
|
@ -248,10 +252,10 @@ android.arch = arm64-v8a
|
||||||
p4a.branch = develop
|
p4a.branch = develop
|
||||||
|
|
||||||
# (str) python-for-android git clone directory (if empty, it will be automatically cloned from github)
|
# (str) python-for-android git clone directory (if empty, it will be automatically cloned from github)
|
||||||
#p4a.source_dir =
|
# p4a.source_dir = /home/cis/Music/androidp4a/python-for-android
|
||||||
|
|
||||||
# (str) The directory in which python-for-android should look for your own build recipes (if any)
|
# (str) The directory in which python-for-android should look for your own build recipes (if any)
|
||||||
p4a.local_recipes = /home/surbhi/Downloads/peter3/PyBitmessage/src/bitmessagekivy/android/python-for-android/recipes/
|
p4a.local_recipes = %(source.dir)s/bitmessagekivy/android/python-for-android/recipes/
|
||||||
|
|
||||||
# (str) Filename to the hook for p4a
|
# (str) Filename to the hook for p4a
|
||||||
#p4a.hook =
|
#p4a.hook =
|
||||||
|
|
BIN
src/images/kivy/account_multiple.png
Normal file
After Width: | Height: | Size: 9.6 KiB |
BIN
src/images/kivy/addressbook.png
Normal file
After Width: | Height: | Size: 673 B |
BIN
src/images/kivy/addressbookadd.png
Normal file
After Width: | Height: | Size: 7.6 KiB |
BIN
src/images/kivy/avatar.png
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
src/images/kivy/back-button.png
Normal file
After Width: | Height: | Size: 51 KiB |
BIN
src/images/kivy/bitmessage.icns
Normal file
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
BIN
src/images/kivy/blacklist.png
Normal file
After Width: | Height: | Size: 752 B |
BIN
src/images/kivy/blue-plus-icon-12.png
Normal file
After Width: | Height: | Size: 41 KiB |
BIN
src/images/kivy/can-icon-16px.png
Normal file
After Width: | Height: | Size: 1007 B |
BIN
src/images/kivy/can-icon-24px-green.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
src/images/kivy/can-icon-24px-red.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
src/images/kivy/can-icon-24px-yellow.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
src/images/kivy/can-icon-24px.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
src/images/kivy/can-icon.ico
Normal file
After Width: | Height: | Size: 97 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
BIN
src/images/kivy/drawer_logo1.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
src/images/kivy/greenicon.png
Normal file
After Width: | Height: | Size: 820 B |
BIN
src/images/kivy/identities.png
Normal file
After Width: | Height: | Size: 870 B |
BIN
src/images/kivy/inbox.png
Normal file
After Width: | Height: | Size: 687 B |
BIN
src/images/kivy/kivymd_logo.png
Normal file
After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
BIN
src/images/kivy/me.jpg
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
src/images/kivy/networkstatus.png
Normal file
After Width: | Height: | Size: 629 B |
BIN
src/images/kivy/ngletteravatar/1.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
src/images/kivy/ngletteravatar/12.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
src/images/kivy/ngletteravatar/14.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
src/images/kivy/ngletteravatar/3.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
src/images/kivy/ngletteravatar/5.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
src/images/kivy/ngletteravatar/56.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
src/images/kivy/ngletteravatar/65.png
Normal file
After Width: | Height: | Size: 822 B |
BIN
src/images/kivy/ngletteravatar/8.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
src/images/kivy/ngletteravatar/90.png
Normal file
After Width: | Height: | Size: 9.5 KiB |
BIN
src/images/kivy/ngletteravatar/Galleryr_rcirclelogo_Small.jpg
Normal file
After Width: | Height: | Size: 36 KiB |
BIN
src/images/kivy/ngletteravatar/a.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
src/images/kivy/ngletteravatar/b.png
Normal file
After Width: | Height: | Size: 4.6 KiB |
BIN
src/images/kivy/ngletteravatar/c.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
src/images/kivy/ngletteravatar/d.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 238 KiB |
BIN
src/images/kivy/ngletteravatar/e.png
Normal file
After Width: | Height: | Size: 631 B |
BIN
src/images/kivy/ngletteravatar/g.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
src/images/kivy/ngletteravatar/h.png
Normal file
After Width: | Height: | Size: 537 B |
BIN
src/images/kivy/ngletteravatar/i.png
Normal file
After Width: | Height: | Size: 483 B |
BIN
src/images/kivy/ngletteravatar/j.png
Normal file
After Width: | Height: | Size: 656 B |
BIN
src/images/kivy/ngletteravatar/k.png
Normal file
After Width: | Height: | Size: 938 B |
BIN
src/images/kivy/ngletteravatar/l.png
Normal file
After Width: | Height: | Size: 806 B |
BIN
src/images/kivy/ngletteravatar/m.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
src/images/kivy/ngletteravatar/n.png
Normal file
After Width: | Height: | Size: 6.1 KiB |
BIN
src/images/kivy/ngletteravatar/o.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
src/images/kivy/ngletteravatar/p.png
Normal file
After Width: | Height: | Size: 783 B |
BIN
src/images/kivy/ngletteravatar/r.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
src/images/kivy/ngletteravatar/s.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
src/images/kivy/ngletteravatar/t.jpg
Normal file
After Width: | Height: | Size: 4.6 KiB |
BIN
src/images/kivy/ngletteravatar/u.png
Normal file
After Width: | Height: | Size: 972 B |
BIN
src/images/kivy/ngletteravatar/v.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
src/images/kivy/ngletteravatar/w.png
Normal file
After Width: | Height: | Size: 5.5 KiB |
BIN
src/images/kivy/ngletteravatar/x.jpg
Normal file
After Width: | Height: | Size: 8.9 KiB |
BIN
src/images/kivy/ngletteravatar/z.png
Normal file
After Width: | Height: | Size: 750 B |
Before Width: | Height: | Size: 197 B After Width: | Height: | Size: 197 B |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 101 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
BIN
src/images/kivy/plus-4-xxl.png
Normal file
After Width: | Height: | Size: 4.7 KiB |
BIN
src/images/kivy/plus.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
src/images/kivy/qidenticon.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
src/images/kivy/qidenticon_two.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
src/images/kivy/qidenticon_two_x.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
src/images/kivy/qidenticon_x.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 56 KiB |
BIN
src/images/kivy/redicon.png
Normal file
After Width: | Height: | Size: 716 B |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
BIN
src/images/kivy/send.png
Normal file
After Width: | Height: | Size: 823 B |