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)
This commit is contained in:
Goffi 2010-08-16 21:16:43 +08:00
commit 465bc95687

View file

@ -255,6 +255,12 @@ class Chat(urwid.WidgetWrap, QuickChat):
self.host.bridge.tarotGameCreate(self.id, list(self.occupants), self.host.profile)
def onSendFileRequest(self, menu):
dialog = FileDialog()
dialog = FileDialog(ok_cb=self.onFileSelected, cancel_cb=self.host.removePopUp)
self.host.showPopUp(dialog, 80, 80)
#MISC EVENTS#
def onFileSelected(self, filepath):
self.host.removePopUp()
full_jid = self.host.CM.get_full(self.target)
id = self.host.bridge.sendFile(full_jid, filepath)
self.host.addProgress(id,filepath)