Merge pull request #61 from navjotcis/newwork
worked on suggestion text functionality on address creation
This commit is contained in:
commit
e67ba17c4e
|
@ -15,6 +15,7 @@
|
||||||
#:import Factory kivy.factory.Factory
|
#:import Factory kivy.factory.Factory
|
||||||
#:import MDScrollViewRefreshLayout kivymd.refreshlayout.MDScrollViewRefreshLayout
|
#:import MDScrollViewRefreshLayout kivymd.refreshlayout.MDScrollViewRefreshLayout
|
||||||
#:import MDSpinner kivymd.spinner.MDSpinner
|
#:import MDSpinner kivymd.spinner.MDSpinner
|
||||||
|
#:import NoTransition kivy.uix.screenmanager.NoTransition
|
||||||
|
|
||||||
#:set color_button (0.784, 0.443, 0.216, 1) # brown
|
#:set color_button (0.784, 0.443, 0.216, 1) # brown
|
||||||
#:set color_button_pressed (0.659, 0.522, 0.431, 1) # darker brown
|
#:set color_button_pressed (0.659, 0.522, 0.431, 1) # darker brown
|
||||||
|
@ -58,6 +59,7 @@
|
||||||
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)
|
||||||
NavigationDrawerIconButton:
|
NavigationDrawerIconButton:
|
||||||
id: send_cnt
|
id: send_cnt
|
||||||
icon: 'send'
|
icon: 'send'
|
||||||
|
@ -70,21 +72,21 @@
|
||||||
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:
|
#NavigationDrawerIconButton:
|
||||||
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:
|
#NavigationDrawerIconButton:
|
||||||
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:
|
#NavigationDrawerIconButton:
|
||||||
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:
|
NavigationDrawerIconButton:
|
||||||
id: trash_cnt
|
id: trash_cnt
|
||||||
icon: 'delete'
|
icon: 'delete'
|
||||||
|
@ -196,6 +198,7 @@ NavigationLayout:
|
||||||
|
|
||||||
<Inbox>:
|
<Inbox>:
|
||||||
name: 'inbox'
|
name: 'inbox'
|
||||||
|
transition: NoTransition()
|
||||||
BoxLayout:
|
BoxLayout:
|
||||||
orientation: 'vertical'
|
orientation: 'vertical'
|
||||||
spacing: dp(10)
|
spacing: dp(10)
|
||||||
|
@ -478,6 +481,7 @@ NavigationLayout:
|
||||||
size_hint: .5, .35
|
size_hint: .5, .35
|
||||||
height: dp(40)
|
height: dp(40)
|
||||||
on_press: app.root.ids.scr_mngr.current = 'random'
|
on_press: app.root.ids.scr_mngr.current = 'random'
|
||||||
|
on_press: app.root.ids.sc7.reset_address_label()
|
||||||
MDLabel:
|
MDLabel:
|
||||||
font_style: 'Title'
|
font_style: 'Title'
|
||||||
text: 'proceed'
|
text: 'proceed'
|
||||||
|
|
|
@ -834,13 +834,16 @@ class Random(Screen):
|
||||||
for obj in BMConfigParser().addresses()]
|
for obj in BMConfigParser().addresses()]
|
||||||
if entered_label in lables:
|
if entered_label in lables:
|
||||||
self.ids.label.error = True
|
self.ids.label.error = True
|
||||||
self.ids.label.helper_text = 'Label name is already exist'
|
self.ids.label.helper_text = 'Label name is already exist you can try this Ex. ( {0}_1, {0}_2 )'.format(entered_label)
|
||||||
elif entered_label:
|
elif entered_label:
|
||||||
self.ids.label.error = False
|
self.ids.label.error = False
|
||||||
else:
|
else:
|
||||||
self.ids.label.error = False
|
self.ids.label.error = False
|
||||||
self.ids.label.helper_text = 'This field is required'
|
self.ids.label.helper_text = 'This field is required'
|
||||||
|
|
||||||
|
def reset_address_label(self):
|
||||||
|
self.ids.label.text = ''
|
||||||
|
|
||||||
|
|
||||||
class Sent(Screen):
|
class Sent(Screen):
|
||||||
"""Sent Screen uses screen to show widgets of screens."""
|
"""Sent Screen uses screen to show widgets of screens."""
|
||||||
|
@ -1621,6 +1624,20 @@ class NavigateApp(App):
|
||||||
delete_btn]
|
delete_btn]
|
||||||
toolbar_obj.right_action_items = dynamic_list
|
toolbar_obj.right_action_items = dynamic_list
|
||||||
|
|
||||||
|
def load_screen(self, instance):
|
||||||
|
"""This method is used for loading screen on every click"""
|
||||||
|
if instance.text == 'Inbox':
|
||||||
|
self.root.ids.scr_mngr.current = 'inbox'
|
||||||
|
self.root.ids.sc1.children[1].active = True
|
||||||
|
self.root.ids.sc1.ids.ml.clear_widgets()
|
||||||
|
Clock.schedule_once(partial(self.load_screen_callback, instance), 0.5)
|
||||||
|
|
||||||
|
def load_screen_callback(self, instance, dt=0):
|
||||||
|
"""This method is rotating loader for few seconds"""
|
||||||
|
if instance.text == 'Inbox':
|
||||||
|
self.root.ids.sc1.loadMessagelist(state.association)
|
||||||
|
self.root.ids.sc1.children[1].active = False
|
||||||
|
|
||||||
|
|
||||||
class GrashofPopup(Popup):
|
class GrashofPopup(Popup):
|
||||||
"""Methods for saving contacts, error messages."""
|
"""Methods for saving contacts, error messages."""
|
||||||
|
@ -1808,6 +1825,7 @@ class MailDetail(Screen):
|
||||||
"""Method for mail delete."""
|
"""Method for mail delete."""
|
||||||
msg_count_objs = state.kivyapp.root.children[2].children[0].ids
|
msg_count_objs = state.kivyapp.root.children[2].children[0].ids
|
||||||
state.searcing_text = ''
|
state.searcing_text = ''
|
||||||
|
self.children[0].children[0].active = True
|
||||||
if state.detailPageType == 'sent':
|
if state.detailPageType == 'sent':
|
||||||
state.kivyapp.root.ids.sc4.children[2].children[1].ids.search_field.text = ''
|
state.kivyapp.root.ids.sc4.children[2].children[1].ids.search_field.text = ''
|
||||||
sqlExecute(
|
sqlExecute(
|
||||||
|
@ -1847,12 +1865,11 @@ class MailDetail(Screen):
|
||||||
int(state.all_count) - 1)
|
int(state.all_count) - 1)
|
||||||
state.trash_count = str(int(state.trash_count) + 1)
|
state.trash_count = str(int(state.trash_count) + 1)
|
||||||
state.all_count = str(int(state.all_count) - 1)
|
state.all_count = str(int(state.all_count) - 1)
|
||||||
self.parent.screens[4].clear_widgets()
|
self.parent.screens[4].ids.ml.clear_widgets()
|
||||||
self.parent.screens[4].add_widget(Trash())
|
self.parent.screens[4].init_ui(dt=0)
|
||||||
self.parent.screens[16].clear_widgets()
|
self.parent.screens[16].ids.ml.clear_widgets()
|
||||||
self.parent.screens[16].add_widget(Allmails())
|
self.parent.screens[16].init_ui(dt=0)
|
||||||
self.children[0].children[0].active = True
|
Clock.schedule_once(self.callback_for_delete, 4)
|
||||||
Clock.schedule_once(self.callback_for_delete, 3)
|
|
||||||
|
|
||||||
def callback_for_delete(self, dt=0):
|
def callback_for_delete(self, dt=0):
|
||||||
self.children[0].children[0].active = False
|
self.children[0].children[0].active = False
|
||||||
|
|
Reference in New Issue
Block a user