Fix pylint global variable undefined at the module level issue
This commit is contained in:
parent
f4d25ab0ed
commit
abd3e02d72
|
@ -35,22 +35,21 @@ class NavigateApp(App, TextInput):
|
||||||
An application can be built if you return a widget on build(), or if you set
|
An application can be built if you return a widget on build(), or if you set
|
||||||
self.root.
|
self.root.
|
||||||
"""
|
"""
|
||||||
global main_widget
|
state.main_widget = Builder.load_file(
|
||||||
main_widget = Builder.load_file(
|
|
||||||
os.path.join(os.path.dirname(__file__), 'main.kv'))
|
os.path.join(os.path.dirname(__file__), 'main.kv'))
|
||||||
self.nav_drawer = Navigator()
|
self.nav_drawer = Navigator()
|
||||||
return main_widget
|
return state.main_widget
|
||||||
|
|
||||||
def getCurrentAccountData(self, text):
|
def getCurrentAccountData(self, text):
|
||||||
"""Get Current Address Account Data."""
|
"""Get Current Address Account Data."""
|
||||||
state.association = text
|
state.association = text
|
||||||
main_widget.ids.sc1.clear_widgets()
|
state.main_widget.ids.sc1.clear_widgets()
|
||||||
main_widget.ids.sc2.clear_widgets()
|
state.main_widget.ids.sc2.clear_widgets()
|
||||||
main_widget.ids.sc3.clear_widgets()
|
state.main_widget.ids.sc3.clear_widgets()
|
||||||
main_widget.ids.sc1.add_widget(Inbox())
|
state.main_widget.ids.sc1.add_widget(Inbox())
|
||||||
main_widget.ids.sc2.add_widget(Sent())
|
state.main_widget.ids.sc2.add_widget(Sent())
|
||||||
main_widget.ids.sc3.add_widget(Trash())
|
state.main_widget.ids.sc3.add_widget(Trash())
|
||||||
main_widget.ids.toolbar.title = BMConfigParser().get(
|
state.main_widget.ids.toolbar.title = BMConfigParser().get(
|
||||||
state.association, 'label') + '({})'.format(state.association)
|
state.association, 'label') + '({})'.format(state.association)
|
||||||
Inbox()
|
Inbox()
|
||||||
Sent()
|
Sent()
|
||||||
|
|
|
@ -72,3 +72,5 @@ testmode = False
|
||||||
kivy = False
|
kivy = False
|
||||||
|
|
||||||
association = ''
|
association = ''
|
||||||
|
|
||||||
|
main_widget = ''
|
||||||
|
|
Reference in New Issue
Block a user