Changeset 85
- Timestamp:
- 07/16/07 22:06:21 (3 years ago)
- Location:
- gajim/branches/chat2muc/src
- Files:
-
- 3 modified
-
common/connection_handlers.py (modified) (2 diffs)
-
dialogs.py (modified) (2 diffs)
-
gajim.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
gajim/branches/chat2muc/src/common/connection_handlers.py
r11 r85 1448 1448 if xtag.getNamespace() == common.xmpp.NS_CONFERENCE and not invite: 1449 1449 room_jid = xtag.getAttr('jid') 1450 self.dispatch('GC_INVITATION', (room_jid, frm, '', None)) 1450 is_continued = False 1451 if xtag.getTag('continue'): 1452 is_continued = True 1453 self.dispatch('GC_INVITATION', (room_jid, frm, '', None, 1454 is_continued)) 1451 1455 return 1452 1456 # chatstates - look for chatstate tags in a message if not delayed … … 1524 1528 item = invite.getTag('password') 1525 1529 password = invite.getTagData('password') 1526 self.dispatch('GC_INVITATION',(frm, jid_from, reason, password)) 1530 is_continued = False 1531 if invite.getTag('continue'): 1532 is_continued = True 1533 print '1' 1534 else: 1535 print '0' 1536 self.dispatch('GC_INVITATION',(frm, jid_from, reason, password, 1537 is_continued)) 1527 1538 return 1528 1539 if self.name not in no_log_for and jid not in no_log_for and msgtxt: -
gajim/branches/chat2muc/src/dialogs.py
r84 r85 2563 2563 class InvitationReceivedDialog: 2564 2564 def __init__(self, account, room_jid, contact_jid, password = None, 2565 comment = None ):2565 comment = None, is_continued = False): 2566 2566 2567 2567 self.room_jid = room_jid 2568 2568 self.account = account 2569 self.is_continued = is_continued 2569 2570 xml = gtkgui_helpers.get_glade('invitation_received_dialog.glade') 2570 2571 self.dialog = xml.get_widget('invitation_received_dialog') 2571 2572 2572 2573 #Don't translate $Contact 2573 pritext = _('$Contact has invited you to group chat %(room_jid)s')\ 2574 % {'room_jid': room_jid} 2574 if is_continued: 2575 pritext = _('$Contact has invited you to join a discussion') 2576 else: 2577 pritext = _('$Contact has invited you to group chat %(room_jid)s')\ 2578 % {'room_jid': room_jid} 2575 2579 contact = gajim.contacts.get_first_contact_from_jid(account, contact_jid) 2576 2580 if contact and contact.name: … … 2600 2604 self.dialog.destroy() 2601 2605 try: 2602 JoinGroupchatWindow(self.account, self.room_jid) 2606 if self.is_continued: 2607 gajim.interface.roster.join_gc_room(self.account, self.room_jid, 2608 gajim.nicks[self.account], None, is_continued=True) 2609 else: 2610 JoinGroupchatWindow(self.account, self.room_jid) 2603 2611 except GajimGeneralException: 2604 2612 pass -
gajim/branches/chat2muc/src/gajim.py
r83 r85 1206 1206 1207 1207 def handle_event_gc_invitation(self, account, array): 1208 #('GC_INVITATION', (room_jid, jid_from, reason, password ))1208 #('GC_INVITATION', (room_jid, jid_from, reason, password, is_continued)) 1209 1209 jid = gajim.get_jid_without_resource(array[1]) 1210 1210 room_jid = array[0] 1211 1211 if helpers.allow_popup_window(account) or not self.systray_enabled: 1212 1212 dialogs.InvitationReceivedDialog(account, room_jid, jid, array[3], 1213 array[2] )1213 array[2], is_continued=array[3]) 1214 1214 return 1215 1215
