diff src/browser/sat_browser/game_radiocol.py @ 839:09ace5cbcb9b

browser (games, menu): rename showFailureRoomInvalid to onJoinMUCFailure and display a nice message when the room has already been joined (it is not a real error)
author souliane <souliane@mailoo.org>
date Wed, 13 Jan 2016 13:11:44 +0100
parents f8a7a046ff9c
children 0c0551967bdf
line wrap: on
line diff
--- a/src/browser/sat_browser/game_radiocol.py	Tue Jan 12 20:34:20 2016 +0100
+++ b/src/browser/sat_browser/game_radiocol.py	Wed Jan 13 13:11:44 2016 +0100
@@ -257,7 +257,7 @@
         help_msg = """Accepted file formats: Ogg Vorbis (recommended), MP3.<br />
         Please do not submit files that are protected by copyright.<br />
         Click <a style="color: red;">here</a> if you need some support :)"""
-        link_cb = lambda: self._parent.host.bridge.joinMUC(self._parent.host.default_muc, self._parent.nick, profile=C.PROF_KEY_NONE, callback=lambda dummy: None, errback=self.host.showFailureRoomInvalid)
+        link_cb = lambda: self._parent.host.bridge.joinMUC(self._parent.host.default_muc, self._parent.nick, profile=C.PROF_KEY_NONE, callback=lambda dummy: None, errback=self._parent.host.onJoinMUCFailure)
         self._parent.printInfo(help_msg, type_='link', link_cb=link_cb)
 
     def pushNextSong(self, title):
@@ -333,7 +333,7 @@
         def callback(room_jid, contacts):
             contacts = [unicode(contact) for contact in contacts]
             room_jid_s = unicode(room_jid) if room_jid else ''
-            host.bridge.launchRadioCollective(contacts, room_jid_s, profile=C.PROF_KEY_NONE, callback=lambda dummy: None, errback=host.showFailureRoomInvalid)
+            host.bridge.launchRadioCollective(contacts, room_jid_s, profile=C.PROF_KEY_NONE, callback=lambda dummy: None, errback=host.onJoinMUCFailure)
         dialog.RoomAndContactsChooser(host, callback, ok_button="Choose", title="Collective Radio", visible=(False, True))