comparison src/browser/libervia_main.py @ 714:03e9fe91081c

browser_side: use favico.js to display alerts counter
author souliane <souliane@mailoo.org>
date Mon, 20 Jul 2015 10:18:02 +0200
parents 052d1d19016d
children 3b91225b457a
comparison
equal deleted inserted replaced
713:d75935e2b279 714:03e9fe91081c
84 self.tab_panel.addTabListener(self) 84 self.tab_panel.addTabListener(self)
85 self._register_box = None 85 self._register_box = None
86 RootPanel().add(self.panel) 86 RootPanel().add(self.panel)
87 87
88 self.notification = notification.Notification() 88 self.notification = notification.Notification()
89 self.alerts_counter = notification.FaviconCounter()
89 DOM.addEventPreview(self) 90 DOM.addEventPreview(self)
90 self.importPlugins() 91 self.importPlugins()
91 self._register = json.RegisterCall() 92 self._register = json.RegisterCall()
92 self._register.call('getMenus', self.gotMenus) 93 self._register.call('getMenus', self.gotMenus)
93 self._register.call('registerParams', None) 94 self._register.call('registerParams', None)
640 dialog.ConfirmDialog(confirm_cb, text=data["message"], title=data["title"]).show() 641 dialog.ConfirmDialog(confirm_cb, text=data["message"], title=data["title"]).show()
641 642
642 def _newAlert(self, message, title, alert_type): 643 def _newAlert(self, message, title, alert_type):
643 dialog.InfoDialog(title, message).show() 644 dialog.InfoDialog(title, message).show()
644 645
646 def updateAlertsCounter(self):
647 """Update the over whole alerts counter
648
649 """
650 self.alerts_counter.update(self.alerts_count)
651
645 def _paramUpdate(self, name, value, category, refresh=True): 652 def _paramUpdate(self, name, value, category, refresh=True):
646 """This is called when the paramUpdate signal is received, but also 653 """This is called when the paramUpdate signal is received, but also
647 during initialization when the UI parameters values are retrieved. 654 during initialization when the UI parameters values are retrieved.
648 @param refresh: set to True to refresh the general UI 655 @param refresh: set to True to refresh the general UI
649 """ 656 """