Mercurial > libervia-backend
comparison frontends/src/primitivus/primitivus @ 2016:f09562b0704d
quick_frontend, primitivus: better notifications handling
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 24 Jul 2016 17:56:14 +0200 |
parents | b536dd121da1 |
children | 88c41a195728 |
comparison
equal
deleted
inserted
replaced
2015:20fb71b656e3 | 2016:f09562b0704d |
---|---|
671 def setProgress(self, percentage): | 671 def setProgress(self, percentage): |
672 """Set the progression shown in notification bar""" | 672 """Set the progression shown in notification bar""" |
673 self.notif_bar.setProgress(percentage) | 673 self.notif_bar.setProgress(percentage) |
674 | 674 |
675 def contactSelected(self, contact_list, entity): | 675 def contactSelected(self, contact_list, entity): |
676 self.clearNotifs(entity, profile=contact_list.profile) | |
676 if entity.resource: | 677 if entity.resource: |
677 # we have clicked on a private MUC conversation | 678 # we have clicked on a private MUC conversation |
678 chat_widget = self.widgets.getOrCreateWidget(Chat, entity, on_new_widget=None, force_hash = Chat.getPrivateHash(contact_list.profile, entity), profile=contact_list.profile) | 679 chat_widget = self.widgets.getOrCreateWidget(Chat, entity, on_new_widget=None, force_hash = Chat.getPrivateHash(contact_list.profile, entity), profile=contact_list.profile) |
679 else: | 680 else: |
680 self.clearNotifs(entity, profile=contact_list.profile) | |
681 chat_widget = self.widgets.getOrCreateWidget(Chat, entity, on_new_widget=None, profile=contact_list.profile) | 681 chat_widget = self.widgets.getOrCreateWidget(Chat, entity, on_new_widget=None, profile=contact_list.profile) |
682 self.selectWidget(chat_widget) | 682 self.selectWidget(chat_widget) |
683 self.menu_roller.addMenu(_('Chat menu'), chat_widget.getMenu(), C.MENU_ID_WIDGET) | 683 self.menu_roller.addMenu(_('Chat menu'), chat_widget.getMenu(), C.MENU_ID_WIDGET) |
684 | 684 |
685 def _dialogOkCb(self, widget, data): | 685 def _dialogOkCb(self, widget, data): |