indentation
This commit is contained in:
parent
a54ee0229d
commit
95bdf480b4
|
@ -453,7 +453,7 @@ class Interface:
|
|||
gajim.connections[account].remove_transfers_for_contact(contact1)
|
||||
self.roster.chg_contact_status(contact1, array[1], status_message,
|
||||
account)
|
||||
# play sound
|
||||
# Notifications
|
||||
if old_show < 2 and new_show > 1:
|
||||
notify.notify('contact_connected', jid, account, status_message)
|
||||
if self.remote_ctrl:
|
||||
|
@ -466,7 +466,8 @@ class Interface:
|
|||
self.remote_ctrl.raise_signal('ContactAbsence', (account, array))
|
||||
# FIXME: stop non active file transfers
|
||||
elif new_show > 1: # Status change (not connected/disconnected or error (<1))
|
||||
notify.notify('status_change', jid, account, [new_show, status_message])
|
||||
notify.notify('status_change', jid, account, [new_show,
|
||||
status_message])
|
||||
else:
|
||||
# FIXME: Msn transport (CMSN1.2.1 and PyMSN0.10) doesn't follow the JEP
|
||||
# remove in 2007
|
||||
|
@ -567,7 +568,8 @@ class Interface:
|
|||
msg_type, array[5], resource, msg_id, array[9])
|
||||
nickname = gajim.get_name_from_jid(account, jid)
|
||||
# Check and do wanted notifications
|
||||
notify.notify('new_message', jid, account, [msg_type, first, nickname, message])
|
||||
notify.notify('new_message', jid, account, [msg_type, first, nickname,
|
||||
message])
|
||||
|
||||
if self.remote_ctrl:
|
||||
self.remote_ctrl.raise_signal('NewMessage', (account, array))
|
||||
|
|
|
@ -143,8 +143,7 @@ def notify(event, jid, account, parameters):
|
|||
text = message
|
||||
elif message_type == 'pm': # private message
|
||||
event_type = _('New Private Message')
|
||||
room_name, t = gajim.get_room_name_and_server_from_room_jid(
|
||||
jid)
|
||||
room_name, t = gajim.get_room_name_and_server_from_room_jid(jid)
|
||||
img = os.path.join(gajim.DATA_DIR, 'pixmaps', 'events',
|
||||
'priv_msg_recv.png')
|
||||
title = _('New Private Message from room %s') % room_name
|
||||
|
@ -167,7 +166,7 @@ def notify(event, jid, account, parameters):
|
|||
helpers.play_sound('first_message_received')
|
||||
else:
|
||||
helpers.play_sound('next_message_received')
|
||||
elif (event == 'contact_connected' or event == 'contact_disconnected'):
|
||||
elif event in ('contact_connected', 'contact_disconnected'):
|
||||
helpers.play_sound(event)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue