Mercurial > libervia-backend
comparison frontends/src/primitivus/status.py @ 1184:62cba918cc63
Primitivus: fixed cancel button for status change
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 08 Sep 2014 18:15:15 +0200 |
parents | e2e1e27a3680 |
children | 89dc29afe01c |
comparison
equal
deleted
inserted
replaced
1183:f36d7068a44b | 1184:62cba918cc63 |
---|---|
48 | 48 |
49 def onStatusClick(self, sender=None): | 49 def onStatusClick(self, sender=None): |
50 if not self.host.bridge.isConnected(self.host.profile): | 50 if not self.host.bridge.isConnected(self.host.profile): |
51 return | 51 return |
52 pop_up_widget = sat_widgets.InputDialog(_('Set your status'), _('New status'), default_txt=self.status.get_text(), | 52 pop_up_widget = sat_widgets.InputDialog(_('Set your status'), _('New status'), default_txt=self.status.get_text(), |
53 cancel_cb=lambda dummy: self.host.removePopUp, ok_cb=self.onChange) | 53 cancel_cb=self.host.removePopUp, ok_cb=self.onChange) |
54 self.host.showPopUp(pop_up_widget) | 54 self.host.showPopUp(pop_up_widget) |
55 | 55 |
56 def onChange(self, sender=None, user_data=None): | 56 def onChange(self, sender=None, user_data=None): |
57 new_value = user_data.get_text() | 57 new_value = user_data.get_text() |
58 previous = ([key for key in Const.PRESENCE if Const.PRESENCE[key][0] == self.presence.get_text()][0], self.status.get_text()) | 58 previous = ([key for key in Const.PRESENCE if Const.PRESENCE[key][0] == self.presence.get_text()][0], self.status.get_text()) |