comparison src/cagou/plugins/plugin_wid_chat.py @ 54:514c187afebc

chat: changed udpate to use dict instead of single key/value
author Goffi <goffi@goffi.org>
date Thu, 15 Sep 2016 21:59:39 +0200
parents abb81efef3bb
children a51ea7874e43
comparison
equal deleted inserted replaced
53:65775152aac1 54:514c187afebc
80 if text_width < self.text_max: 80 if text_width < self.text_max:
81 self.mess_label.text_size = (None, None) 81 self.mess_label.text_size = (None, None)
82 else: 82 else:
83 self.mess_label.text_size = (parent.width - padding_x, None) 83 self.mess_label.text_size = (parent.width - padding_x, None)
84 84
85 def update(self, key, value=None): 85 def update(self, update_dict):
86 if key == 'avatar': 86 if 'avatar' in update_dict:
87 self.avatar.source = value 87 self.avatar.source = update_dict['avatar']
88 88
89 89
90 class MessageInputWidget(TextInput): 90 class MessageInputWidget(TextInput):
91 91
92 def _key_down(self, key, repeat=False): 92 def _key_down(self, key, repeat=False):