Mercurial > libervia-web
comparison browser_side/panels.py @ 75:4b4c0b9e2533
browser side: CSS: redesigned dialog boxes, and contacts
author | Adrien Vigneron <adrienvigneron@mailoo.org> |
---|---|
date | Sat, 18 Jun 2011 15:13:19 +0200 |
parents | 447dc8ac181b |
children | 12680e220b35 |
comparison
equal
deleted
inserted
replaced
74:3df602cf700a | 75:4b4c0b9e2533 |
---|---|
154 | 154 |
155 label = Label("new contact identifier (JID):") | 155 label = Label("new contact identifier (JID):") |
156 edit.setText('@libervia.org') | 156 edit.setText('@libervia.org') |
157 edit.setWidth('100%') | 157 edit.setWidth('100%') |
158 _dialog = dialog.GroupSelector([label, edit], self.host.contact_panel.getGroups(), [], addContactCb) | 158 _dialog = dialog.GroupSelector([label, edit], self.host.contact_panel.getGroups(), [], addContactCb) |
159 _dialog.setHTML('<b>Adding contact</b>') | 159 _dialog.setHTML('Adding contact') |
160 _dialog.show() | 160 _dialog.show() |
161 | 161 |
162 def onUpdateContact(self): | 162 def onUpdateContact(self): |
163 _dialog = None | 163 _dialog = None |
164 _contacts_list = ListBox() | 164 _contacts_list = ListBox() |
177 _contacts_list.addChangeListener(onContactChange) | 177 _contacts_list.addChangeListener(onContactChange) |
178 _jid = _contacts_list.getValue(_contacts_list.getSelectedIndex()) | 178 _jid = _contacts_list.getValue(_contacts_list.getSelectedIndex()) |
179 _selected_groups = self.host.contact_panel.getContactGroups(_jid) | 179 _selected_groups = self.host.contact_panel.getContactGroups(_jid) |
180 _dialog = dialog.GroupSelector([Label('Which contact do you want to update ?'), _contacts_list], | 180 _dialog = dialog.GroupSelector([Label('Which contact do you want to update ?'), _contacts_list], |
181 self.host.contact_panel.getGroups(), _selected_groups, updateContactCb) | 181 self.host.contact_panel.getGroups(), _selected_groups, updateContactCb) |
182 _dialog.setHTML('<b>Updating contact</b>') | 182 _dialog.setHTML('Updating contact') |
183 _dialog.show() | 183 _dialog.show() |
184 | 184 |
185 def onRemoveContact(self): | 185 def onRemoveContact(self): |
186 _dialog = None | 186 _dialog = None |
187 _contacts_list = ListBox() | 187 _contacts_list = ListBox() |
231 button_panel = HorizontalPanel() | 231 button_panel = HorizontalPanel() |
232 button_panel.add(Button("Join", onOK)) | 232 button_panel.add(Button("Join", onOK)) |
233 button_panel.add(Button("Cancel", onCancel)) | 233 button_panel.add(Button("Cancel", onCancel)) |
234 _main_panel.add(button_panel) | 234 _main_panel.add(button_panel) |
235 _dialog = DialogBox(centered=True) | 235 _dialog = DialogBox(centered=True) |
236 _dialog.setHTML('<b>Group discussions</b>') | 236 _dialog.setHTML('Group discussions') |
237 _dialog.setWidget(_main_panel) | 237 _dialog.setWidget(_main_panel) |
238 _dialog.show() | 238 _dialog.show() |
239 | 239 |
240 | 240 |
241 #Game menu | 241 #Game menu |