invitations to groupchat is now queued when systray is enabled. missing icon for popup window: gc_invitation.png. Fixes #1196
This commit is contained in:
parent
a5c2880b45
commit
eff34ac6ab
27
src/gajim.py
27
src/gajim.py
|
@ -885,13 +885,26 @@ class Interface:
|
||||||
#('GC_AFFILIATION', account, (room_jid, affiliation, list)) list is list
|
#('GC_AFFILIATION', account, (room_jid, affiliation, list)) list is list
|
||||||
room_jid = array[0]
|
room_jid = array[0]
|
||||||
if self.instances[account]['gc_config'].has_key(room_jid):
|
if self.instances[account]['gc_config'].has_key(room_jid):
|
||||||
self.instances[account]['gc_config'][room_jid].affiliation_list_received(
|
self.instances[account]['gc_config'][room_jid].\
|
||||||
array[1], array[2])
|
affiliation_list_received(array[1], array[2])
|
||||||
|
|
||||||
def handle_event_gc_invitation(self, account, array):
|
def handle_event_gc_invitation(self, account, array):
|
||||||
#('GC_INVITATION', (room_jid, jid_from, reason, password))
|
#('GC_INVITATION', (room_jid, jid_from, reason, password))
|
||||||
dialogs.InvitationReceivedDialog(account, array[0], array[1],
|
jid = gajim.get_jid_without_resource(array[1])
|
||||||
array[3], array[2])
|
room_jid = array[0]
|
||||||
|
if gajim.popup_window(account):
|
||||||
|
dialogs.InvitationReceivedDialog(account, room_jid, jid, array[3],
|
||||||
|
array[2])
|
||||||
|
return
|
||||||
|
|
||||||
|
self.add_event(account, jid, 'gc-invitation', (room_jid, array[2],
|
||||||
|
array[3]))
|
||||||
|
|
||||||
|
if gajim.show_notification(account):
|
||||||
|
path = os.path.join(gajim.DATA_DIR, 'pixmaps', 'events',
|
||||||
|
'gc_invitation.png')
|
||||||
|
notify.notify(_('Groupchat Invitation'),
|
||||||
|
jid, account, 'gc-invitation', path, room_jid)
|
||||||
|
|
||||||
def handle_event_bad_passphrase(self, account, array):
|
def handle_event_bad_passphrase(self, account, array):
|
||||||
use_gpg_agent = gajim.config.get('use_gpg_agent')
|
use_gpg_agent = gajim.config.get('use_gpg_agent')
|
||||||
|
@ -1551,6 +1564,12 @@ class Interface:
|
||||||
else:
|
else:
|
||||||
url = ('http://mail.google.com/')
|
url = ('http://mail.google.com/')
|
||||||
helpers.launch_browser_mailer('url', url)
|
helpers.launch_browser_mailer('url', url)
|
||||||
|
elif typ == 'gc-invitation':
|
||||||
|
ev = gajim.get_first_event(account, jid, typ)
|
||||||
|
data = ev[1]
|
||||||
|
dialogs.InvitationReceivedDialog(account, data[0], jid, data[2],
|
||||||
|
data[1])
|
||||||
|
self.remove_first_event(account, jid, typ)
|
||||||
if w:
|
if w:
|
||||||
w.set_active_tab(jid, account)
|
w.set_active_tab(jid, account)
|
||||||
w.window.present()
|
w.window.present()
|
||||||
|
|
Loading…
Reference in New Issue