comparison sat_frontends/quick_frontend/quick_widgets.py @ 2792:441b536e28ed

quick frontend (chat): use right type in getOrCreateWidget on new message
author Goffi <goffi@goffi.org>
date Tue, 22 Jan 2019 18:52:16 +0100
parents 003b8b4b56a7
children 42380a4f6433
comparison
equal deleted inserted replaced
2791:034c88e9cd93 2792:441b536e28ed
182 _kwargs["profiles"] = [_kwargs.pop("profile")] 182 _kwargs["profiles"] = [_kwargs.pop("profile")]
183 except KeyError: 183 except KeyError:
184 if not "profiles" in _kwargs: 184 if not "profiles" in _kwargs:
185 _kwargs["profiles"] = None 185 _kwargs["profiles"] = None
186 186
187 # on_new_widget tell what to do for the new widget creation 187 # on_new_widget tells what to do for the new widget creation
188 try: 188 try:
189 on_new_widget = _kwargs.pop("on_new_widget") 189 on_new_widget = _kwargs.pop("on_new_widget")
190 except KeyError: 190 except KeyError:
191 on_new_widget = C.WIDGET_NEW 191 on_new_widget = C.WIDGET_NEW
192 192
193 # on_existing_widget tell what to do when the widget already exists 193 # on_existing_widget tells what to do when the widget already exists
194 try: 194 try:
195 on_existing_widget = _kwargs.pop("on_existing_widget") 195 on_existing_widget = _kwargs.pop("on_existing_widget")
196 except KeyError: 196 except KeyError:
197 on_existing_widget = C.WIDGET_KEEP 197 on_existing_widget = C.WIDGET_KEEP
198 198