Mercurial > libervia-web
comparison browser_side/panels.py @ 57:e552a67b933d
Contact update + add dedication in About dialog
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 29 May 2011 16:07:46 +0200 |
parents | 5fa710058e2d |
children | 4fa3d57f72f8 |
comparison
equal
deleted
inserted
replaced
56:5fa710058e2d | 57:e552a67b933d |
---|---|
110 You can contact the author at <a href="mailto:goffi@goffi.org">goffi@goffi.org</a><br /> | 110 You can contact the author at <a href="mailto:goffi@goffi.org">goffi@goffi.org</a><br /> |
111 Blog available (mainly in french) at <a href="http://www.goffi.org" target="_blank">http://www.goffi.org</a><br /> | 111 Blog available (mainly in french) at <a href="http://www.goffi.org" target="_blank">http://www.goffi.org</a><br /> |
112 Project page: <a href="http://wiki.goffi.org/wiki/Salut_à_Toi"target="_blank">http://wiki.goffi.org/wiki/Salut_à_Toi</a><br /> | 112 Project page: <a href="http://wiki.goffi.org/wiki/Salut_à_Toi"target="_blank">http://wiki.goffi.org/wiki/Salut_à_Toi</a><br /> |
113 <br /> | 113 <br /> |
114 Any help welcome :) | 114 Any help welcome :) |
115 <p style='font-size:x-small;text-align:center'>This project is dedicated to Roger Poisson</p> | |
115 """) | 116 """) |
116 _dialog = dialog.GenericDialog("About", _about) | 117 _dialog = dialog.GenericDialog("About", _about) |
117 _dialog.show() | 118 _dialog.show() |
118 | 119 |
119 #Contact menu | 120 #Contact menu |
135 _dialog = dialog.GroupSelector([label, edit], self.host.contact_panel.getGroups(), [], addContactCb) | 136 _dialog = dialog.GroupSelector([label, edit], self.host.contact_panel.getGroups(), [], addContactCb) |
136 _dialog.setHTML('<b>Adding contact</b>') | 137 _dialog.setHTML('<b>Adding contact</b>') |
137 _dialog.show() | 138 _dialog.show() |
138 | 139 |
139 def onUpdateContact(self): | 140 def onUpdateContact(self): |
140 pass | 141 _dialog = None |
142 _contacts_list = ListBox() | |
143 | |
144 def updateContactCb(sender): | |
145 _jid = _contacts_list.getValue(_contacts_list.getSelectedIndex()) | |
146 self.host.bridge.call('updateContact', None, _jid, '', _dialog.getSelectedGroups()) | |
147 print "contactUpdated" | |
148 | |
149 def onContactChange(_list): | |
150 _jid = _contacts_list.getValue(_contacts_list.getSelectedIndex()) | |
151 groups = self.host.contact_panel.getContactGroups(_jid) | |
152 _dialog.setGroupsSelected(groups) | |
153 | |
154 for contact in self.host.contact_panel.getContacts(): | |
155 _contacts_list.addItem(contact) | |
156 _contacts_list.addChangeListener(onContactChange) | |
157 _jid = _contacts_list.getValue(_contacts_list.getSelectedIndex()) | |
158 _selected_groups = self.host.contact_panel.getContactGroups(_jid) | |
159 _dialog = dialog.GroupSelector([Label('Which contact do you want to update ?'), _contacts_list], | |
160 self.host.contact_panel.getGroups(), _selected_groups, updateContactCb) | |
161 _dialog.setHTML('<b>Updating contact</b>') | |
162 _dialog.show() | |
141 | 163 |
142 def onRemoveContact(self): | 164 def onRemoveContact(self): |
143 _dialog = None | 165 _dialog = None |
144 _contacts_list = ListBox() | 166 _contacts_list = ListBox() |
145 | 167 |