# HG changeset patch # User souliane # Date 1425651885 -3600 # Node ID 14fc88275e65ffd705a4c5edd1f48e7c7cb94aa1 # Parent 361b0fe72961f3874212afdd023399b7adc78dbf frontends (primitivus): fixes setting the presence and status (for now all the profiles share the same info) diff -r 361b0fe72961 -r 14fc88275e65 frontends/src/primitivus/status.py --- 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()