core, quick_frontend, primitivus, wix: Contacts List refactoring phase 1:
- QuickContactManagement is not used anymore and will be removed, ContactList + Core are used instead - disconnected contacts are now displayed in Primitivus (M-d to show/hide them) - avatars are temporary unavailable in wix - new bridge method: getContactsFromGroup
This commit is contained in:
parent
97420f39d5
commit
b44412ec0d
1 changed files with 207 additions and 130 deletions
|
|
@ -262,11 +262,8 @@ class Chat(urwid.WidgetWrap, QuickChat):
|
|||
def startGame(self, game_type, referee, players):
|
||||
"""Configure the chat window to start a game"""
|
||||
if game_type=="Tarot":
|
||||
try:
|
||||
self.tarot_wid = CardGame(self, referee, players, self.nick)
|
||||
self.__appendGamePanel(self.tarot_wid)
|
||||
except e:
|
||||
self.host.debug()
|
||||
self.tarot_wid = CardGame(self, referee, players, self.nick)
|
||||
self.__appendGamePanel(self.tarot_wid)
|
||||
|
||||
def getGame(self, game_type):
|
||||
"""Return class managing the game type"""
|
||||
|
|
@ -288,6 +285,11 @@ class Chat(urwid.WidgetWrap, QuickChat):
|
|||
#MISC EVENTS#
|
||||
def onFileSelected(self, filepath):
|
||||
self.host.removePopUp()
|
||||
full_jid = self.host.CM.get_full(self.target)
|
||||
#FIXME: check last_resource: what if self.target.resource exists ?
|
||||
last_resource = self.host.bridge.getLastResource(unicode(self.target.short), self.host.profile)
|
||||
if last_resource:
|
||||
full_jid = JID("%s/%s" % (self.target.short, last_resource))
|
||||
else:
|
||||
full_jid = self.target
|
||||
id = self.host.bridge.sendFile(full_jid, filepath, {}, self.host.profile)
|
||||
self.host.addProgress(id,filepath)
|
||||
|
|
|
|||
Loading…
Reference in a new issue