Mercurial > libervia-web
comparison browser_side/panels.py @ 139:b6658f3ac8a0
browser side: own microblogs print
- our microblogs are gotten on startup and put in cache
- FillMicroblogPanel add our own microblogs from cache in a new panel
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 30 Oct 2012 00:52:30 +0100 |
parents | b145da69a218 |
children | 8635bc9db9bf |
comparison
equal
deleted
inserted
replaced
138:008fa8d36602 | 139:b6658f3ac8a0 |
---|---|
97 item_type = None | 97 item_type = None |
98 DOM.eventPreventDefault(event) | 98 DOM.eventPreventDefault(event) |
99 if item_type=="GROUP": | 99 if item_type=="GROUP": |
100 _new_panel = MicroblogPanel(self.host, [item]) | 100 _new_panel = MicroblogPanel(self.host, [item]) |
101 _new_panel.setAcceptedGroup(item) | 101 _new_panel.setAcceptedGroup(item) |
102 #self.host.FillMicroblogPanel(_new_panel) #XXX: cache is temporarly deactivated, need to be reworked | 102 self.host.FillMicroblogPanel(_new_panel) |
103 self.host.bridge.call('getMassiveLastMblogs', _new_panel.massiveInsert, 'GROUP', [item], 10) | 103 self.host.bridge.call('getMassiveLastMblogs', _new_panel.massiveInsert, 'GROUP', [item], 10) |
104 elif item_type=="CONTACT": | 104 elif item_type=="CONTACT": |
105 _contact = JID(item) | 105 _contact = JID(item) |
106 self.host.contact_panel.setContactMessageWaiting(_contact.bare, False) | 106 self.host.contact_panel.setContactMessageWaiting(_contact.bare, False) |
107 _new_panel = ChatPanel(self.host, _contact) | 107 _new_panel = ChatPanel(self.host, _contact) |
108 _new_panel.historyPrint() | 108 _new_panel.historyPrint() |
109 elif item_type=="CONTACT_TITLE": | 109 elif item_type=="CONTACT_TITLE": |
110 _new_panel = MicroblogPanel(self.host, []) | 110 _new_panel = MicroblogPanel(self.host, []) |
111 #self.host.FillMicroblogPanel(_new_panel) #XXX: cache is temporarly deactivated, need to be reworked | 111 self.host.FillMicroblogPanel(_new_panel) |
112 self.host.bridge.call('getMassiveLastMblogs', _new_panel.massiveInsert, 'ALL', [], 10) | 112 self.host.bridge.call('getMassiveLastMblogs', _new_panel.massiveInsert, 'ALL', [], 10) |
113 else: | 113 else: |
114 return False | 114 return False |
115 if isinstance(self, LiberviaWidget): | 115 if isinstance(self, LiberviaWidget): |
116 self.host.unregisterWidget(self) | 116 self.host.unregisterWidget(self) |