From 3b23977cbfb50d52ada734b12936894ac8c89a0c Mon Sep 17 00:00:00 2001 From: shekhar-cis Date: Mon, 21 Nov 2022 16:31:08 +0530 Subject: [PATCH] Rename btn to composer_dropwdown --- src/bitmessagekivy/baseclass/addressbook_widgets.py | 2 +- src/bitmessagekivy/baseclass/login.py | 4 ++-- src/bitmessagekivy/baseclass/maildetail.py | 2 +- src/bitmessagekivy/baseclass/msg_composer.py | 8 ++++---- src/bitmessagekivy/baseclass/myaddress.py | 2 +- src/bitmessagekivy/baseclass/popup.py | 2 +- src/bitmessagekivy/kv/msg_composer.kv | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/bitmessagekivy/baseclass/addressbook_widgets.py b/src/bitmessagekivy/baseclass/addressbook_widgets.py index 73cc8828..3654dfa3 100644 --- a/src/bitmessagekivy/baseclass/addressbook_widgets.py +++ b/src/bitmessagekivy/baseclass/addressbook_widgets.py @@ -44,7 +44,7 @@ class HelperAddressBook(object): if from_addr: window_obj.id_create.children[1].ids.txt_input.text = from_addr window_obj.id_create.children[1].ids.ti.text = '' - window_obj.id_create.children[1].ids.btn.text = 'Select' + window_obj.id_create.children[1].ids.composer_dropdown.text = 'Select' window_obj.id_create.children[1].ids.subject.text = '' window_obj.id_create.children[1].ids.body.text = '' window_obj.scr_mngr.current = 'create' diff --git a/src/bitmessagekivy/baseclass/login.py b/src/bitmessagekivy/baseclass/login.py index e1c948bc..c5dd9ef4 100644 --- a/src/bitmessagekivy/baseclass/login.py +++ b/src/bitmessagekivy/baseclass/login.py @@ -74,8 +74,8 @@ class Random(Screen): if config.getboolean(str(addr), 'enabled')] self.manager.parent.ids.content_drawer.ids.identity_dropdown.values = [] self.manager.parent.ids.content_drawer.ids.identity_dropdown.values = addresses - self.manager.parent.ids.id_create.children[1].ids.btn.values = [] - self.manager.parent.ids.id_create.children[1].ids.btn.values = addresses + self.manager.parent.ids.id_create.children[1].ids.composer_dropdown.values = [] + self.manager.parent.ids.id_create.children[1].ids.composer_dropdown.values = addresses @staticmethod def add_validation(instance): diff --git a/src/bitmessagekivy/baseclass/maildetail.py b/src/bitmessagekivy/baseclass/maildetail.py index 33da216a..6ddf322d 100644 --- a/src/bitmessagekivy/baseclass/maildetail.py +++ b/src/bitmessagekivy/baseclass/maildetail.py @@ -193,7 +193,7 @@ class MailDetail(Screen): # pylint: disable=too-many-instance-attributes message_time = '\n\n --------------On ' composer_obj = self.parent.screens[1].children[1].ids composer_obj.ti.text = data[0][0] - composer_obj.btn.text = data[0][0] + composer_obj.composer_dropdown.text = data[0][0] composer_obj.txt_input.text = data[0][1] split_subject = data[0][2].split('Re:', 1) composer_obj.subject.text = 'Re: ' + (split_subject[1] if len(split_subject) > 1 else split_subject[0]) diff --git a/src/bitmessagekivy/baseclass/msg_composer.py b/src/bitmessagekivy/baseclass/msg_composer.py index 4c385e25..a36996e0 100644 --- a/src/bitmessagekivy/baseclass/msg_composer.py +++ b/src/bitmessagekivy/baseclass/msg_composer.py @@ -48,8 +48,8 @@ class Create(Screen): def check_scroll_y(self, instance, somethingelse): # pylint: disable=unused-argument """show data on scroll down""" - if self.children[1].ids.btn.is_open: - self.children[1].ids.btn.is_open = False + if self.children[1].ids.composer_dropdown.is_open: + self.children[1].ids.composer_dropdown.is_open = False class RV(RecycleView): @@ -91,7 +91,7 @@ class DropDownWidget(BoxLayout): def reset_composer(self): """Method will reset composer""" self.ids.ti.text = "" - self.ids.btn.text = "Select" + self.ids.composer_dropdown.text = "Select" self.ids.txt_input.text = "" self.ids.subject.text = "" self.ids.body.text = "" @@ -99,7 +99,7 @@ class DropDownWidget(BoxLayout): def auto_fill_fromaddr(self): """Fill the text automatically From Address""" - self.ids.ti.text = self.ids.btn.text + self.ids.ti.text = self.ids.composer_dropdown.text self.ids.ti.focus = True def is_camara_attached(self): diff --git a/src/bitmessagekivy/baseclass/myaddress.py b/src/bitmessagekivy/baseclass/myaddress.py index 5c90121f..18788c1b 100644 --- a/src/bitmessagekivy/baseclass/myaddress.py +++ b/src/bitmessagekivy/baseclass/myaddress.py @@ -220,7 +220,7 @@ class MyAddress(Screen, HelperMyAddress): addresses = [addr for addr in config.addresses() if config.getboolean(str(addr), 'enabled')] self.parent.parent.ids.content_drawer.ids.identity_dropdown.values = addresses - self.parent.parent.ids.id_create.children[1].ids.btn.values = addresses + self.parent.parent.ids.id_create.children[1].ids.composer_dropdown.values = addresses self.kivy_running_app.identity_list = addresses def toggleAction(self, instance): diff --git a/src/bitmessagekivy/baseclass/popup.py b/src/bitmessagekivy/baseclass/popup.py index 2425684b..3f328e52 100644 --- a/src/bitmessagekivy/baseclass/popup.py +++ b/src/bitmessagekivy/baseclass/popup.py @@ -153,7 +153,7 @@ class MyaddDetailPopup(BoxLayout): App.get_running_app().set_navbar_for_composer() window_obj = App.get_running_app().root.ids window_obj.id_create.children[1].ids.ti.text = self.address - window_obj.id_create.children[1].ids.btn.text = self.address + window_obj.id_create.children[1].ids.composer_dropdown.text = self.address window_obj.id_create.children[1].ids.txt_input.text = '' window_obj.id_create.children[1].ids.subject.text = '' window_obj.id_create.children[1].ids.body.text = '' diff --git a/src/bitmessagekivy/kv/msg_composer.kv b/src/bitmessagekivy/kv/msg_composer.kv index e6b71f05..13db4f4e 100644 --- a/src/bitmessagekivy/kv/msg_composer.kv +++ b/src/bitmessagekivy/kv/msg_composer.kv @@ -35,7 +35,7 @@ size_hint_y: None height: dp(40) IdentitySpinner: - id: btn + id: composer_dropdown background_color: app.theme_cls.primary_dark values: app.identity_list on_text: root.auto_fill_fromaddr() if self.text != 'Select' else ''