|
|
|
@ -47,12 +47,8 @@ from kivymd.uix.list import (
|
|
|
|
|
ILeftBodyTouch,
|
|
|
|
|
IRightBodyTouch,
|
|
|
|
|
TwoLineAvatarIconListItem,
|
|
|
|
|
TwoLineListItem,
|
|
|
|
|
OneLineIconListItem,
|
|
|
|
|
OneLineAvatarListItem,
|
|
|
|
|
IRightBody,
|
|
|
|
|
OneLineAvatarIconListItem,
|
|
|
|
|
IRightBodyTouch,
|
|
|
|
|
OneLineListItem
|
|
|
|
|
)
|
|
|
|
|
# from kivymd.uix.navigationdrawer import (
|
|
|
|
@ -60,7 +56,6 @@ from kivymd.uix.list import (
|
|
|
|
|
# NavigationDrawerHeaderBase
|
|
|
|
|
# )
|
|
|
|
|
from kivymd.uix.selectioncontrol import MDCheckbox
|
|
|
|
|
from kivymd.theming import ThemeManager
|
|
|
|
|
|
|
|
|
|
import queues
|
|
|
|
|
from semaphores import kivyuisignaler
|
|
|
|
@ -69,10 +64,12 @@ import state
|
|
|
|
|
from addresses import decodeAddress
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
KVFILES = ['settings', 'popup', 'allmails', 'draft',
|
|
|
|
|
KVFILES = [
|
|
|
|
|
'settings', 'popup', 'allmails', 'draft',
|
|
|
|
|
'maildetail', 'common_widgets', 'addressbook',
|
|
|
|
|
'myaddress', 'composer', 'payment', 'sent',
|
|
|
|
|
'network', 'login', 'credits', 'trash', 'inbox']
|
|
|
|
|
'network', 'login', 'credits', 'trash', 'inbox'
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def toast(text):
|
|
|
|
@ -151,7 +148,7 @@ class Inbox(Screen):
|
|
|
|
|
valign='top')
|
|
|
|
|
self.ids.ml.add_widget(content)
|
|
|
|
|
|
|
|
|
|
def set_inboxCount(self, msgCnt):
|
|
|
|
|
def set_inboxCount(self, msgCnt): # pylint: disable=no-self-use
|
|
|
|
|
"""This method is used to sent inbox message count"""
|
|
|
|
|
src_mng_obj = state.kivyapp.root.ids.content_drawer.ids.inbox_cnt
|
|
|
|
|
src_mng_obj.children[0].children[0].text = showLimitedCnt(int(msgCnt))
|
|
|
|
@ -539,7 +536,7 @@ class SelectableLabel(RecycleDataViewBehavior, Label):
|
|
|
|
|
return super(SelectableLabel, self).refresh_view_attrs(
|
|
|
|
|
rv, index, data)
|
|
|
|
|
|
|
|
|
|
def on_touch_down(self, touch):
|
|
|
|
|
def on_touch_down(self, touch): # pylint: disable=inconsistent-return-statements
|
|
|
|
|
"""Add selection on touch down"""
|
|
|
|
|
if super(SelectableLabel, self).on_touch_down(touch):
|
|
|
|
|
return True
|
|
|
|
@ -1136,7 +1133,7 @@ class Trash(Screen):
|
|
|
|
|
" ORDER BY actionTime DESC limit {1}, {2}".format(
|
|
|
|
|
state.association, start_indx, end_indx))
|
|
|
|
|
|
|
|
|
|
def set_TrashCnt(self, Count):
|
|
|
|
|
def set_TrashCnt(self, Count): # pylint: disable=no-self-use
|
|
|
|
|
"""This method is used to set trash message count"""
|
|
|
|
|
trashCnt_obj = state.kivyapp.root.ids.content_drawer.ids.trash_cnt
|
|
|
|
|
trashCnt_obj.children[0].children[0].text = showLimitedCnt(int(Count))
|
|
|
|
@ -1408,6 +1405,7 @@ class NavigateApp(MDApp):
|
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
|
def on_key(self, window, key, *args):
|
|
|
|
|
# pylint: disable=inconsistent-return-statements
|
|
|
|
|
"""Method is used for going on previous screen"""
|
|
|
|
|
if key == 27:
|
|
|
|
|
if state.in_search_mode and self.root.ids.scr_mngr.current != (
|
|
|
|
@ -1735,7 +1733,7 @@ class NavigateApp(MDApp):
|
|
|
|
|
except Exception:
|
|
|
|
|
self.root.ids.sc17.children[0].children[1].active = False
|
|
|
|
|
|
|
|
|
|
def on_request_close(self, *args):
|
|
|
|
|
def on_request_close(self, *args): # pylint: disable=no-self-use
|
|
|
|
|
"""This method is for app closing request"""
|
|
|
|
|
AppClosingPopup().open()
|
|
|
|
|
return True
|
|
|
|
@ -1874,7 +1872,6 @@ class IconRightSampleWidget(IRightBodyTouch, MDCheckbox):
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class MailDetail(Screen):
|
|
|
|
|
"""MailDetail Screen uses to show the detail of mails"""
|
|
|
|
|
|
|
|
|
@ -2128,7 +2125,7 @@ class ShowQRCode(Screen):
|
|
|
|
|
from kivy.garden.qrcode import QRCodeWidget
|
|
|
|
|
try:
|
|
|
|
|
address = self.manager.get_parent_window().children[0].address
|
|
|
|
|
except Exception as e:
|
|
|
|
|
except Exception:
|
|
|
|
|
address = self.manager.get_parent_window().children[1].address
|
|
|
|
|
self.ids.qr.add_widget(QRCodeWidget(data=address))
|
|
|
|
|
toast('Show QR code')
|
|
|
|
@ -2189,7 +2186,7 @@ class Draft(Screen):
|
|
|
|
|
xAddress, self.account, "draft", where, what,
|
|
|
|
|
False, start_indx, end_indx)
|
|
|
|
|
|
|
|
|
|
def set_draftCnt(self, Count):
|
|
|
|
|
def set_draftCnt(self, Count): # pylint: disable=no-self-use
|
|
|
|
|
"""This method set the count of draft mails"""
|
|
|
|
|
draftCnt_obj = state.kivyapp.root.ids.content_drawer.ids.draft_cnt
|
|
|
|
|
draftCnt_obj.children[0].children[0].text = showLimitedCnt(int(Count))
|
|
|
|
@ -2394,7 +2391,7 @@ class Allmails(Screen):
|
|
|
|
|
" ORDER BY actionTime DESC limit {1}, {2}".format(
|
|
|
|
|
self.account, start_indx, end_indx))
|
|
|
|
|
|
|
|
|
|
def set_AllmailCnt(self, Count):
|
|
|
|
|
def set_AllmailCnt(self, Count): # pylint: disable=no-self-use
|
|
|
|
|
"""This method is used to set allmails message count"""
|
|
|
|
|
allmailCnt_obj = state.kivyapp.root.ids.content_drawer.ids.allmail_cnt
|
|
|
|
|
allmailCnt_obj.children[0].children[0].text = showLimitedCnt(int(Count))
|
|
|
|
@ -2565,6 +2562,7 @@ class AddressDropdown(OneLineIconListItem):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class BadgeText(IRightBodyTouch, MDLabel):
|
|
|
|
|
"""Class for badgetext"""
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -2610,6 +2608,7 @@ class AppClosingPopup(Popup):
|
|
|
|
|
super(AppClosingPopup, self).__init__(**kwargs)
|
|
|
|
|
|
|
|
|
|
def closingAction(self, text):
|
|
|
|
|
"""Action on closing window"""
|
|
|
|
|
if text == 'Yes':
|
|
|
|
|
print("*******************EXITING FROM APPLICATION*******************")
|
|
|
|
|
import shutdown
|
|
|
|
|