Mercurial > libervia-backend
changeset 1354:14fc88275e65 frontends_multi_profiles
frontends (primitivus): fixes setting the presence and status (for now all the profiles share the same info)
author | souliane <souliane@mailoo.org> |
---|---|
date | Fri, 06 Mar 2015 15:24:45 +0100 |
parents | 361b0fe72961 |
children | 33a21f06551d |
files | frontends/src/primitivus/status.py |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/frontends/src/primitivus/status.py Fri Mar 06 14:46:03 2015 +0100 +++ b/frontends/src/primitivus/status.py Fri Mar 06 15:24:45 2015 +0100 @@ -39,7 +39,7 @@ urwid.connect_signal(self.status, 'click', self.onStatusClick) def onPresenceClick(self, sender=None): - if not self.host.bridge.isConnected(self.host.profile): + if not self.host.bridge.isConnected(self.host.current_profile): # FIXME: manage multi-profiles return options = [commonConst.PRESENCE[presence] for presence in commonConst.PRESENCE] list_widget = sat_widgets.GenericList(options=options, option_type=sat_widgets.ClickableText, on_click=self.onChange) @@ -47,7 +47,7 @@ self.host.showPopUp(decorated) def onStatusClick(self, sender=None): - if not self.host.bridge.isConnected(self.host.profile): + if not self.host.bridge.isConnected(self.host.current_profile): # FIXME: manage multi-profiles return pop_up_widget = sat_widgets.InputDialog(_('Set your status'), _('New status'), default_txt=self.status.get_text(), cancel_cb=self.host.removePopUp, ok_cb=self.onChange) @@ -61,7 +61,8 @@ elif isinstance(user_data, sat_widgets.AdvancedEdit): new = (previous[0], new_value[0]) if new != previous: - self.host.bridge.setPresence(show=new[0], statuses={'default': new[1]}, profile_key=self.host.profile) #FIXME: manage multilingual statuses + for profile in self.host.profiles: # FIXME: for now all the profiles share the same status + self.host.bridge.setPresence(show=new[0], statuses={'default': new[1]}, profile_key=profile) # FIXME: manage multilingual statuses self.setPresenceStatus(new[0], new[1]) self.host.removePopUp()