Merge pull request #11 from jaicis/kivyfixes
worked on kivy fixes part 3
This commit is contained in:
commit
59861ca6fb
|
@ -20,7 +20,7 @@ def search_sql(xAddress="toaddress", account=None, folder="inbox", where=None, w
|
||||||
sqlStatementBase = '''SELECT label, address From addressbook '''
|
sqlStatementBase = '''SELECT label, address From addressbook '''
|
||||||
else:
|
else:
|
||||||
sqlStatementBase = (
|
sqlStatementBase = (
|
||||||
'''SELECT folder, toaddress, message, fromaddress, subject,'''
|
'''SELECT folder, msgid, toaddress, message, fromaddress, subject,'''
|
||||||
''' received, read FROM inbox ''')
|
''' received, read FROM inbox ''')
|
||||||
|
|
||||||
sqlStatementParts = []
|
sqlStatementParts = []
|
||||||
|
|
|
@ -25,7 +25,8 @@
|
||||||
#:set color_font (0.957, 0.890, 0.843, 1) # off white
|
#:set color_font (0.957, 0.890, 0.843, 1) # off white
|
||||||
|
|
||||||
<MyNavigationDrawerIconButton@NavigationDrawerIconButton>:
|
<MyNavigationDrawerIconButton@NavigationDrawerIconButton>:
|
||||||
icon: 'checkbox-blank-circle'
|
font_style: 'Body1'
|
||||||
|
theme_text_color: 'Secondary'
|
||||||
|
|
||||||
<MySpinnerOption@SpinnerOption>:
|
<MySpinnerOption@SpinnerOption>:
|
||||||
font_size: '12.5sp'
|
font_size: '12.5sp'
|
||||||
|
@ -39,7 +40,7 @@
|
||||||
height: dp(7)
|
height: dp(7)
|
||||||
NavigationDrawerSubheader:
|
NavigationDrawerSubheader:
|
||||||
text: "Accounts"
|
text: "Accounts"
|
||||||
NavigationDrawerIconButton:
|
AddressDropdown:
|
||||||
CustomSpinner:
|
CustomSpinner:
|
||||||
id: btn
|
id: btn
|
||||||
pos_hint:{"x":0,"y":.25}
|
pos_hint:{"x":0,"y":.25}
|
||||||
|
@ -57,47 +58,48 @@
|
||||||
y: self.parent.y + self.parent.height/4
|
y: self.parent.y + self.parent.height/4
|
||||||
size: self.parent.height/2, self.parent.height/2
|
size: self.parent.height/2, self.parent.height/2
|
||||||
ArrowImg:
|
ArrowImg:
|
||||||
NavigationDrawerIconButton:
|
MyNavigationDrawerIconButton:
|
||||||
id: inbox_cnt
|
id: inbox_cnt
|
||||||
icon: 'email-open'
|
icon: 'email-open'
|
||||||
text: "Inbox"
|
text: "Inbox"
|
||||||
on_release: app.root.ids.scr_mngr.current = 'inbox'
|
on_release: app.root.ids.scr_mngr.current = 'inbox'
|
||||||
badge_text: "0"
|
badge_text: "0"
|
||||||
on_press: app.load_screen(self)
|
on_press: app.load_screen(self)
|
||||||
NavigationDrawerIconButton:
|
MyNavigationDrawerIconButton:
|
||||||
id: send_cnt
|
id: send_cnt
|
||||||
icon: 'send'
|
icon: 'send'
|
||||||
text: "Sent"
|
text: "Sent"
|
||||||
|
#use_active: False
|
||||||
on_release: app.root.ids.scr_mngr.current = 'sent'
|
on_release: app.root.ids.scr_mngr.current = 'sent'
|
||||||
badge_text: "0"
|
badge_text: "0"
|
||||||
NavigationDrawerIconButton:
|
MyNavigationDrawerIconButton:
|
||||||
id: draft_cnt
|
id: draft_cnt
|
||||||
icon: 'message-draw'
|
icon: 'message-draw'
|
||||||
text: "Draft"
|
text: "Draft"
|
||||||
on_release: app.root.ids.scr_mngr.current = 'draft'
|
on_release: app.root.ids.scr_mngr.current = 'draft'
|
||||||
badge_text: "0"
|
badge_text: "0"
|
||||||
#NavigationDrawerIconButton:
|
#MyNavigationDrawerIconButton:
|
||||||
#text: "Starred"
|
#text: "Starred"
|
||||||
#icon:'star'
|
#icon:'star'
|
||||||
#on_release: app.root.ids.scr_mngr.current = 'starred'
|
#on_release: app.root.ids.scr_mngr.current = 'starred'
|
||||||
#badge_text: "0"
|
#badge_text: "0"
|
||||||
#NavigationDrawerIconButton:
|
#MyNavigationDrawerIconButton:
|
||||||
#icon: 'archive'
|
#icon: 'archive'
|
||||||
#text: "Archieve"
|
#text: "Archieve"
|
||||||
#on_release: app.root.ids.scr_mngr.current = 'archieve'
|
#on_release: app.root.ids.scr_mngr.current = 'archieve'
|
||||||
#badge_text: "0"
|
#badge_text: "0"
|
||||||
#NavigationDrawerIconButton:
|
#MyNavigationDrawerIconButton:
|
||||||
#icon: 'email-open-outline'
|
#icon: 'email-open-outline'
|
||||||
#text: "Spam"
|
#text: "Spam"
|
||||||
#on_release: app.root.ids.scr_mngr.current = 'spam'
|
#on_release: app.root.ids.scr_mngr.current = 'spam'
|
||||||
#badge_text: "0"
|
#badge_text: "0"
|
||||||
NavigationDrawerIconButton:
|
MyNavigationDrawerIconButton:
|
||||||
id: trash_cnt
|
id: trash_cnt
|
||||||
icon: 'delete'
|
icon: 'delete'
|
||||||
text: "Trash"
|
text: "Trash"
|
||||||
on_release: app.root.ids.scr_mngr.current = 'trash'
|
on_release: app.root.ids.scr_mngr.current = 'trash'
|
||||||
badge_text: "0"
|
badge_text: "0"
|
||||||
NavigationDrawerIconButton:
|
MyNavigationDrawerIconButton:
|
||||||
id: allmail_cnt
|
id: allmail_cnt
|
||||||
text: "All Mails"
|
text: "All Mails"
|
||||||
icon:'contact-mail'
|
icon:'contact-mail'
|
||||||
|
@ -107,31 +109,31 @@
|
||||||
NavigationDrawerDivider:
|
NavigationDrawerDivider:
|
||||||
NavigationDrawerSubheader:
|
NavigationDrawerSubheader:
|
||||||
text: "All labels"
|
text: "All labels"
|
||||||
NavigationDrawerIconButton:
|
MyNavigationDrawerIconButton:
|
||||||
text: "Address Book"
|
text: "Address Book"
|
||||||
icon:'book-multiple'
|
icon:'book-multiple'
|
||||||
on_release: app.root.ids.scr_mngr.current = 'addressbook'
|
on_release: app.root.ids.scr_mngr.current = 'addressbook'
|
||||||
NavigationDrawerIconButton:
|
MyNavigationDrawerIconButton:
|
||||||
text: "Settings"
|
text: "Settings"
|
||||||
icon:'settings'
|
icon:'settings'
|
||||||
on_release: app.root.ids.scr_mngr.current = 'set'
|
on_release: app.root.ids.scr_mngr.current = 'set'
|
||||||
NavigationDrawerIconButton:
|
MyNavigationDrawerIconButton:
|
||||||
text: "Subscriptions/Payment"
|
text: "Subscriptions/Payment"
|
||||||
icon:'bell'
|
icon:'bell'
|
||||||
on_release: app.root.ids.scr_mngr.current = 'payment'
|
on_release: app.root.ids.scr_mngr.current = 'payment'
|
||||||
NavigationDrawerIconButton:
|
MyNavigationDrawerIconButton:
|
||||||
text: "Credits"
|
text: "Credits"
|
||||||
icon:'wallet'
|
icon:'wallet'
|
||||||
on_release: app.root.ids.scr_mngr.current = 'credits'
|
on_release: app.root.ids.scr_mngr.current = 'credits'
|
||||||
NavigationDrawerIconButton:
|
MyNavigationDrawerIconButton:
|
||||||
text: "new address"
|
text: "new address"
|
||||||
icon:'account-plus'
|
icon:'account-plus'
|
||||||
on_release: app.root.ids.scr_mngr.current = 'login'
|
on_release: app.root.ids.scr_mngr.current = 'login'
|
||||||
NavigationDrawerIconButton:
|
MyNavigationDrawerIconButton:
|
||||||
text: "Network Status"
|
text: "Network Status"
|
||||||
icon:'server-network'
|
icon:'server-network'
|
||||||
on_release: app.root.ids.scr_mngr.current = 'networkstat'
|
on_release: app.root.ids.scr_mngr.current = 'networkstat'
|
||||||
NavigationDrawerIconButton:
|
MyNavigationDrawerIconButton:
|
||||||
text: "My Addresses"
|
text: "My Addresses"
|
||||||
icon:'account-multiple'
|
icon:'account-multiple'
|
||||||
on_release: app.root.ids.scr_mngr.current = 'myaddress'
|
on_release: app.root.ids.scr_mngr.current = 'myaddress'
|
||||||
|
@ -545,12 +547,6 @@ NavigationLayout:
|
||||||
color: (1,1,1,1)
|
color: (1,1,1,1)
|
||||||
halign: 'center'
|
halign: 'center'
|
||||||
|
|
||||||
<AddressSuccessful>:
|
|
||||||
name: 'add_sucess'
|
|
||||||
Label:
|
|
||||||
text: 'Successfully created a new bit address'
|
|
||||||
color: 0,0,0,1
|
|
||||||
|
|
||||||
<Setting>:
|
<Setting>:
|
||||||
name: 'set'
|
name: 'set'
|
||||||
ScrollView:
|
ScrollView:
|
||||||
|
|
|
@ -45,7 +45,8 @@ from kivymd.uix.list import (
|
||||||
ILeftBodyTouch,
|
ILeftBodyTouch,
|
||||||
IRightBodyTouch,
|
IRightBodyTouch,
|
||||||
TwoLineAvatarIconListItem,
|
TwoLineAvatarIconListItem,
|
||||||
TwoLineListItem
|
TwoLineListItem,
|
||||||
|
OneLineIconListItem
|
||||||
)
|
)
|
||||||
from kivymd.uix.navigationdrawer import (
|
from kivymd.uix.navigationdrawer import (
|
||||||
MDNavigationDrawer,
|
MDNavigationDrawer,
|
||||||
|
@ -873,12 +874,6 @@ class Random(Screen):
|
||||||
self.ids.label.text = ''
|
self.ids.label.text = ''
|
||||||
|
|
||||||
|
|
||||||
class AddressSuccessful(Screen):
|
|
||||||
"""Getting Address Detail."""
|
|
||||||
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class Sent(Screen):
|
class Sent(Screen):
|
||||||
"""Sent Screen uses screen to show widgets of screens"""
|
"""Sent Screen uses screen to show widgets of screens"""
|
||||||
queryreturn = ListProperty()
|
queryreturn = ListProperty()
|
||||||
|
@ -1439,8 +1434,8 @@ class NavigateApp(App): # pylint: disable=too-many-public-methods
|
||||||
self.root.ids.scr_mngr.transition.direction = 'right'
|
self.root.ids.scr_mngr.transition.direction = 'right'
|
||||||
self.root.ids.scr_mngr.transition.bind(on_complete=self.reset)
|
self.root.ids.scr_mngr.transition.bind(on_complete=self.reset)
|
||||||
return True
|
return True
|
||||||
elif key == 13:
|
elif key == 13 and state.searcing_text:
|
||||||
if state.search_screen == 'inbox' and state.searcing_text:
|
if state.search_screen == 'inbox':
|
||||||
self.root.ids.sc1.children[1].active = True
|
self.root.ids.sc1.children[1].active = True
|
||||||
Clock.schedule_once(self.search_callback, 0.5)
|
Clock.schedule_once(self.search_callback, 0.5)
|
||||||
elif state.search_screen == 'addressbook':
|
elif state.search_screen == 'addressbook':
|
||||||
|
@ -1930,7 +1925,7 @@ class MailDetail(Screen):
|
||||||
elif state.detailPageType == 'inbox':
|
elif state.detailPageType == 'inbox':
|
||||||
data = sqlQuery(
|
data = sqlQuery(
|
||||||
"select toaddress, fromaddress, subject, message from inbox"
|
"select toaddress, fromaddress, subject, message from inbox"
|
||||||
" where msgid = ?;", str(state.mail_id))
|
" where msgid = ?;", state.mail_id)
|
||||||
self.assign_mail_details(data)
|
self.assign_mail_details(data)
|
||||||
state.kivyapp.set_mail_detail_header()
|
state.kivyapp.set_mail_detail_header()
|
||||||
|
|
||||||
|
@ -2589,3 +2584,8 @@ class LoadingPopup(Popup):
|
||||||
def dismiss_popup(self, dt):
|
def dismiss_popup(self, dt):
|
||||||
"""Dismiss popups"""
|
"""Dismiss popups"""
|
||||||
self.dismiss()
|
self.dismiss()
|
||||||
|
|
||||||
|
|
||||||
|
class AddressDropdown(OneLineIconListItem):
|
||||||
|
"""AddressDropdown showns all the addresses"""
|
||||||
|
pass
|
Reference in New Issue
Block a user