fixed CQ for bitmessagekivy.mpybit module part9
This commit is contained in:
parent
bf1a57d9ca
commit
15258a2105
|
@ -487,7 +487,7 @@ class MyAddress(Screen):
|
||||||
except Exception:
|
except Exception:
|
||||||
meny.canvas.children[9].rgba = [0, 0, 0, 0] if is_enable == 'true' else [0.5, 0.5, 0.5, 0.5]
|
meny.canvas.children[9].rgba = [0, 0, 0, 0] if is_enable == 'true' else [0.5, 0.5, 0.5, 0.5]
|
||||||
meny.add_widget(AvatarSampleWidget(
|
meny.add_widget(AvatarSampleWidget(
|
||||||
source= state.imageDir + '/text_images/{}.png'.format(
|
source=state.imageDir + '/text_images/{}.png'.format(
|
||||||
avatarImageFirstLetter(item['text'].strip()))))
|
avatarImageFirstLetter(item['text'].strip()))))
|
||||||
meny.bind(on_press=partial(
|
meny.bind(on_press=partial(
|
||||||
self.myadd_detail, item['secondary_text'], item['text']))
|
self.myadd_detail, item['secondary_text'], item['text']))
|
||||||
|
@ -528,7 +528,7 @@ class MyAddress(Screen):
|
||||||
if BMConfigParser().get(fromaddress, 'enabled') == 'true':
|
if BMConfigParser().get(fromaddress, 'enabled') == 'true':
|
||||||
obj = MyaddDetailPopup()
|
obj = MyaddDetailPopup()
|
||||||
self.address_label = obj.address_label = label
|
self.address_label = obj.address_label = label
|
||||||
self.text_address = obj.address =fromaddress
|
self.text_address = obj.address = fromaddress
|
||||||
width = .9 if platform == 'android' else .8
|
width = .9 if platform == 'android' else .8
|
||||||
self.myadddetail_popup = MDDialog(
|
self.myadddetail_popup = MDDialog(
|
||||||
type="custom",
|
type="custom",
|
||||||
|
@ -541,7 +541,7 @@ class MyAddress(Screen):
|
||||||
# p.set_address(fromaddress, label)
|
# p.set_address(fromaddress, label)
|
||||||
else:
|
else:
|
||||||
width = .8 if platform == 'android' else .55
|
width = .8 if platform == 'android' else .55
|
||||||
dialog_box=MDDialog(
|
dialog_box = MDDialog(
|
||||||
text='Address is not currently active. Please click on Toggle button to active it.',
|
text='Address is not currently active. Please click on Toggle button to active it.',
|
||||||
size_hint=(width, .25),
|
size_hint=(width, .25),
|
||||||
buttons=[
|
buttons=[
|
||||||
|
@ -961,7 +961,7 @@ class DropDownWidget(BoxLayout):
|
||||||
def address_error_message(self, msg):
|
def address_error_message(self, msg):
|
||||||
"""Generates error message"""
|
"""Generates error message"""
|
||||||
width = .8 if platform == 'android' else .55
|
width = .8 if platform == 'android' else .55
|
||||||
dialog_box=MDDialog(
|
dialog_box = MDDialog(
|
||||||
text=msg,
|
text=msg,
|
||||||
size_hint=(width, .25),
|
size_hint=(width, .25),
|
||||||
buttons=[
|
buttons=[
|
||||||
|
@ -976,12 +976,6 @@ class DropDownWidget(BoxLayout):
|
||||||
dialog_box.dismiss()
|
dialog_box.dismiss()
|
||||||
toast(text_item)
|
toast(text_item)
|
||||||
|
|
||||||
|
|
||||||
# @staticmethod
|
|
||||||
# def callback_for_menu_items(text_item, *arg):
|
|
||||||
# """Callback of alert box"""
|
|
||||||
# toast(text_item)
|
|
||||||
|
|
||||||
def reset_composer(self):
|
def reset_composer(self):
|
||||||
"""Method will reset composer"""
|
"""Method will reset composer"""
|
||||||
self.ids.ti.text = ""
|
self.ids.ti.text = ""
|
||||||
|
@ -1237,8 +1231,6 @@ class Random(Screen):
|
||||||
entered_label = str(self.ids.add_random_bx.children[0].ids.lab.text).strip()
|
entered_label = str(self.ids.add_random_bx.children[0].ids.lab.text).strip()
|
||||||
if not entered_label:
|
if not entered_label:
|
||||||
self.ids.add_random_bx.children[0].ids.lab.focus = True
|
self.ids.add_random_bx.children[0].ids.lab.focus = True
|
||||||
#self.ids.lab.error = True
|
|
||||||
#self.ids.lab.helper_text = 'This field is required'
|
|
||||||
streamNumberForAddress = 1
|
streamNumberForAddress = 1
|
||||||
eighteenByteRipe = False
|
eighteenByteRipe = False
|
||||||
nonceTrialsPerByte = 1000
|
nonceTrialsPerByte = 1000
|
||||||
|
@ -1594,7 +1586,7 @@ class Trash(Screen):
|
||||||
theme_text_color='Custom',
|
theme_text_color='Custom',
|
||||||
text_color=ThemeClsColor)
|
text_color=ThemeClsColor)
|
||||||
meny._txt_right_pad = dp(70)
|
meny._txt_right_pad = dp(70)
|
||||||
img_latter =state.imageDir + '/text_images/{}.png'.format(
|
img_latter = state.imageDir + '/text_images/{}.png'.format(
|
||||||
subject[0].upper() if (subject[0].upper() >= 'A' and subject[0].upper() <= 'Z') else '!')
|
subject[0].upper() if (subject[0].upper() >= 'A' and subject[0].upper() <= 'Z') else '!')
|
||||||
meny.add_widget(AvatarSampleWidget(source=img_latter))
|
meny.add_widget(AvatarSampleWidget(source=img_latter))
|
||||||
meny.add_widget(AddTimeWidget(item[7]))
|
meny.add_widget(AddTimeWidget(item[7]))
|
||||||
|
@ -1647,7 +1639,7 @@ class Trash(Screen):
|
||||||
def delete_confirmation(self):
|
def delete_confirmation(self):
|
||||||
"""Show confirmation delete popup"""
|
"""Show confirmation delete popup"""
|
||||||
width = .8 if platform == 'android' else .55
|
width = .8 if platform == 'android' else .55
|
||||||
dialog_box=MDDialog(
|
dialog_box = MDDialog(
|
||||||
text='Are you sure you want to delete this'
|
text='Are you sure you want to delete this'
|
||||||
' message permanently from trash?',
|
' message permanently from trash?',
|
||||||
size_hint=(width, .25),
|
size_hint=(width, .25),
|
||||||
|
@ -1656,7 +1648,7 @@ class Trash(Screen):
|
||||||
text="Yes", on_release=lambda x: callback_for_delete_msg("Yes")
|
text="Yes", on_release=lambda x: callback_for_delete_msg("Yes")
|
||||||
),
|
),
|
||||||
MDFlatButton(
|
MDFlatButton(
|
||||||
text="No",on_release=lambda x: callback_for_delete_msg("No"),
|
text="No", on_release=lambda x: callback_for_delete_msg("No"),
|
||||||
),
|
),
|
||||||
],)
|
],)
|
||||||
dialog_box.open()
|
dialog_box.open()
|
||||||
|
@ -1733,9 +1725,9 @@ class Setting(Screen):
|
||||||
Clock.schedule_once(self.init_ui, 0)
|
Clock.schedule_once(self.init_ui, 0)
|
||||||
|
|
||||||
def init_ui(self, dt=0):
|
def init_ui(self, dt=0):
|
||||||
menu_items = [{"text": f"{i}"} for i in ['System Setting','U.S. English','italiano',
|
menu_items = [{"text": f"{i}"} for i in ['System Setting', 'U.S. English', 'italiano',
|
||||||
'Esperanto','dansk','Deutsch','Pirate English','francais',
|
'Esperanto', 'dansk', 'Deutsch', 'Pirate English', 'francais',
|
||||||
'Nederlands','norsk bokmal','polski','portugues europeu']]
|
'Nederlands', 'norsk bokmal', 'polski', 'portugues europeu']]
|
||||||
self.menu = MDDropdownMenu(
|
self.menu = MDDropdownMenu(
|
||||||
caller=self,
|
caller=self,
|
||||||
items=menu_items,
|
items=menu_items,
|
||||||
|
@ -1746,7 +1738,7 @@ class Setting(Screen):
|
||||||
)
|
)
|
||||||
|
|
||||||
def set_caller(self):
|
def set_caller(self):
|
||||||
self.menu.caller= self.ids.drop_item
|
self.menu.caller = self.ids.drop_item
|
||||||
# self.menu.use_icon_item = False
|
# self.menu.use_icon_item = False
|
||||||
self.menu.target_height = 150
|
self.menu.target_height = 150
|
||||||
|
|
||||||
|
@ -1773,7 +1765,6 @@ class NavigateApp(MDApp):
|
||||||
count = 0
|
count = 0
|
||||||
manager_open = False
|
manager_open = False
|
||||||
file_manager = None
|
file_manager = None
|
||||||
#state.imageDir = os.path.join(os.path.abspath(os.path.join(__file__ ,"../../..")),'images', 'kivy')
|
|
||||||
state.imageDir = os.path.join('./images', 'kivy')
|
state.imageDir = os.path.join('./images', 'kivy')
|
||||||
image_path = state.imageDir
|
image_path = state.imageDir
|
||||||
|
|
||||||
|
@ -3080,7 +3071,7 @@ class Allmails(Screen):
|
||||||
text_color=ThemeClsColor)
|
text_color=ThemeClsColor)
|
||||||
meny._txt_right_pad = dp(70)
|
meny._txt_right_pad = dp(70)
|
||||||
meny.add_widget(AvatarSampleWidget(
|
meny.add_widget(AvatarSampleWidget(
|
||||||
source= state.imageDir +'/text_images/{}.png'.format(
|
source=state.imageDir + '/text_images/{}.png'.format(
|
||||||
avatarImageFirstLetter(body.strip()))))
|
avatarImageFirstLetter(body.strip()))))
|
||||||
meny.bind(on_press=partial(
|
meny.bind(on_press=partial(
|
||||||
self.mail_detail, item[5], item[4]))
|
self.mail_detail, item[5], item[4]))
|
||||||
|
@ -3360,7 +3351,7 @@ class OneLineListTitle(OneLineListItem):
|
||||||
"""this method is for displaying dialog box"""
|
"""this method is for displaying dialog box"""
|
||||||
self.title_text = title_text
|
self.title_text = title_text
|
||||||
width = .8 if platform == 'android' else .55
|
width = .8 if platform == 'android' else .55
|
||||||
self.dialog_box=MDDialog(
|
self.dialog_box = MDDialog(
|
||||||
text=title_text,
|
text=title_text,
|
||||||
size_hint=(width, .25),
|
size_hint=(width, .25),
|
||||||
buttons=[
|
buttons=[
|
||||||
|
@ -3368,7 +3359,7 @@ class OneLineListTitle(OneLineListItem):
|
||||||
text="Copy", on_release=self.callback_for_copy_title
|
text="Copy", on_release=self.callback_for_copy_title
|
||||||
),
|
),
|
||||||
MDFlatButton(
|
MDFlatButton(
|
||||||
text="Cancel",on_release=self.callback_for_copy_title,
|
text="Cancel", on_release=self.callback_for_copy_title,
|
||||||
),
|
),
|
||||||
],)
|
],)
|
||||||
self.dialog_box.open()
|
self.dialog_box.open()
|
||||||
|
@ -3461,7 +3452,7 @@ class ChatList(Screen):
|
||||||
text=item[0], secondary_text=item[1], theme_text_color='Custom',
|
text=item[0], secondary_text=item[1], theme_text_color='Custom',
|
||||||
text_color=ThemeClsColor)
|
text_color=ThemeClsColor)
|
||||||
meny.add_widget(AvatarSampleWidget(
|
meny.add_widget(AvatarSampleWidget(
|
||||||
source= state.imageDir + '/text_images/{}.png'.format(
|
source=state.imageDir + '/text_images/{}.png'.format(
|
||||||
avatarImageFirstLetter(item[0].strip()))))
|
avatarImageFirstLetter(item[0].strip()))))
|
||||||
meny.bind(on_release=partial(
|
meny.bind(on_release=partial(
|
||||||
self.redirect_to_chat, item[0], item[1]))
|
self.redirect_to_chat, item[0], item[1]))
|
||||||
|
|
Reference in New Issue
Block a user