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:
parent
663851e2c4
commit
465bc95687
1 changed files with 137 additions and 14 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue