Primitivus: send_file first draft
- a new dialog for choosing a file is work in progress
This commit is contained in:
parent
cc547e5ec4
commit
7fa8f4d0c2
1 changed files with 112 additions and 3 deletions
|
|
@ -26,6 +26,7 @@ import custom_widgets
|
|||
import time
|
||||
from tools.jid import JID
|
||||
from card_game import CardGame
|
||||
from files_management import FileDialog
|
||||
|
||||
|
||||
class ChatText(urwid.FlowWidget):
|
||||
|
|
@ -131,6 +132,8 @@ class Chat(urwid.WidgetWrap, QuickChat):
|
|||
if self.type == 'group':
|
||||
game = _("Game")
|
||||
menu.addMenu(game, "Tarot", self.onTarotRequest)
|
||||
elif self.type == 'one2one':
|
||||
menu.addMenu(_("Action"), _("Send file"), self.onSendFileRequest)
|
||||
return menu
|
||||
|
||||
def setType(self, type):
|
||||
|
|
@ -250,3 +253,8 @@ class Chat(urwid.WidgetWrap, QuickChat):
|
|||
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))
|
||||
else:
|
||||
self.host.bridge.tarotGameCreate(self.id, list(self.occupants), self.host.profile)
|
||||
|
||||
def onSendFileRequest(self, menu):
|
||||
dialog = FileDialog()
|
||||
self.host.showPopUp(dialog, 80, 80)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue