comparison frontends/primitivus/chat.py @ 180:fdb961f27ae9

Primitivus: file sending and progress management - added "send file" in one2one chat's menu - new progress widget which is linked to the notification bar - the notification bar show the average progress of all the current progress bars, and is used to show progress details - if present, pudb is used for debugging (can continue without breaking terminal's setting)
author Goffi <goffi@goffi.org>
date Mon, 16 Aug 2010 21:16:43 +0800
parents a50953ac6191
children a566f654929e
comparison
equal deleted inserted replaced
179:d6c0c5dca9b9 180:fdb961f27ae9
253 self.host.showPopUp(custom_widgets.Alert(_("Can't start game"), _("You need to be exactly 4 peoples in the room to start a Tarot game"), ok_cb=self.host.removePopUp)) 253 self.host.showPopUp(custom_widgets.Alert(_("Can't start game"), _("You need to be exactly 4 peoples in the room to start a Tarot game"), ok_cb=self.host.removePopUp))
254 else: 254 else:
255 self.host.bridge.tarotGameCreate(self.id, list(self.occupants), self.host.profile) 255 self.host.bridge.tarotGameCreate(self.id, list(self.occupants), self.host.profile)
256 256
257 def onSendFileRequest(self, menu): 257 def onSendFileRequest(self, menu):
258 dialog = FileDialog() 258 dialog = FileDialog(ok_cb=self.onFileSelected, cancel_cb=self.host.removePopUp)
259 self.host.showPopUp(dialog, 80, 80) 259 self.host.showPopUp(dialog, 80, 80)
260 260
261 #MISC EVENTS#
262 def onFileSelected(self, filepath):
263 self.host.removePopUp()
264 full_jid = self.host.CM.get_full(self.target)
265 id = self.host.bridge.sendFile(full_jid, filepath)
266 self.host.addProgress(id,filepath)