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:
Goffi 2012-09-25 00:58:34 +02:00
commit b44412ec0d

View file

@ -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)