Add enable/disable method in bmconfigparser & initialize kivy state variable inside NavigateApp
This commit is contained in:
parent
d024deb977
commit
25d58c2a0c
|
@ -211,7 +211,6 @@ class CustomSpinner(Spinner):
|
|||
class NavigateApp(MDApp):
|
||||
"""Navigation Layout of class"""
|
||||
# pylint: disable=too-many-public-methods,inconsistent-return-statements
|
||||
kivyy = KivyStateVariables()
|
||||
# theme_cls = ThemeManager()
|
||||
def __init__(self):
|
||||
super(NavigateApp, self).__init__()
|
||||
|
|
|
@ -199,3 +199,13 @@ class BMConfigParser(configparser.ConfigParser):
|
|||
def search_addresses(address, searched_text):
|
||||
return [x for x in [BMConfigParser().get(address, 'label').lower(), address.lower()]
|
||||
if searched_text in x]
|
||||
|
||||
def disable_address(self, address):
|
||||
""""To disable the Address"""
|
||||
self.set(str(address), 'enabled', 'false')
|
||||
self.save()
|
||||
|
||||
def enable_address(self, address):
|
||||
""""To enable the Address"""
|
||||
self.set(address, 'enabled', 'true')
|
||||
self.save()
|
||||
|
|
Reference in New Issue
Block a user