comparison src/browser/sat_browser/contact_list.py @ 779:fc941d0d97f8

browser_side: fixed ContactsPanel scrolling
author souliane <souliane@mailoo.org>
date Mon, 30 Nov 2015 21:52:41 +0100
parents dd70db1c48dc
children b2a75a103aac
comparison
equal deleted inserted replaced
778:31c682149d52 779:fc941d0d97f8
121 def __init__(self, host): 121 def __init__(self, host):
122 QuickContactList.__init__(self, host, C.PROF_KEY_NONE) 122 QuickContactList.__init__(self, host, C.PROF_KEY_NONE)
123 SimplePanel.__init__(self) 123 SimplePanel.__init__(self)
124 self.host = host 124 self.host = host
125 self.scroll_panel = ScrollPanel() 125 self.scroll_panel = ScrollPanel()
126 self.scroll_panel.addStyleName("gwt-ScrollPanel") # XXX: no class is set by Pyjamas
126 self.vPanel = VerticalPanel() 127 self.vPanel = VerticalPanel()
127 _title = ContactTitleLabel(host, 'Contacts') 128 _title = ContactTitleLabel(host, 'Contacts')
128 DOM.setStyleAttribute(_title.getElement(), "cursor", "pointer") 129 DOM.setStyleAttribute(_title.getElement(), "cursor", "pointer")
129 130
130 def on_click(contact_jid): 131 def on_click(contact_jid):
131 self.host.displayWidget(chat.Chat, contact_jid, type_=C.CHAT_ONE2ONE) 132 self.host.displayWidget(chat.Chat, contact_jid, type_=C.CHAT_ONE2ONE)
132 self.removeAlerts(contact_jid, True) 133 self.removeAlerts(contact_jid, True)
133 134
134 self._contacts_panel = contact_panel.ContactsPanel(host, contacts_click=on_click, contacts_menus=(C.MENU_JID_CONTEXT, C.MENU_ROSTER_JID_CONTEXT)) 135 self._contacts_panel = contact_panel.ContactsPanel(host, contacts_click=on_click, contacts_menus=(C.MENU_JID_CONTEXT, C.MENU_ROSTER_JID_CONTEXT))
135 self._contacts_panel.setStyleName('contactPanel') # FIXME: style doesn't exists !
136 self._group_panel = GroupPanel(self) 136 self._group_panel = GroupPanel(self)
137 137
138 self.vPanel.add(_title) 138 self.vPanel.add(_title)
139 self.vPanel.add(self._group_panel) 139 self.vPanel.add(self._group_panel)
140 self.vPanel.add(self._contacts_panel) 140 self.vPanel.add(self._contacts_panel)