fix a bit of indentation
This commit is contained in:
parent
93d15da2b3
commit
e6a4eb7c17
|
@ -1319,9 +1319,9 @@ class GroupchatControl(ChatControlBase):
|
||||||
'reason': _('room configuration changed to members-only') }
|
'reason': _('room configuration changed to members-only') }
|
||||||
self.print_conversation(s, 'info', tim=tim, graphics=False)
|
self.print_conversation(s, 'info', tim=tim, graphics=False)
|
||||||
elif '332' in statusCode:
|
elif '332' in statusCode:
|
||||||
s = _('%(nick)s has been removed from the room (%(reason)s)') % {
|
s = _('%(nick)s has been removed from the room '
|
||||||
'nick': nick,
|
'(%(reason)s)') % {'nick': nick,
|
||||||
'reason': _('system shutdown') }
|
'reason': _('system shutdown') }
|
||||||
self.print_conversation(s, 'info', tim=tim, graphics=False)
|
self.print_conversation(s, 'info', tim=tim, graphics=False)
|
||||||
# Room has been destroyed.
|
# Room has been destroyed.
|
||||||
elif 'destroyed' in statusCode:
|
elif 'destroyed' in statusCode:
|
||||||
|
@ -1333,16 +1333,19 @@ class GroupchatControl(ChatControlBase):
|
||||||
self.remove_contact(nick)
|
self.remove_contact(nick)
|
||||||
self.draw_all_roles()
|
self.draw_all_roles()
|
||||||
else:
|
else:
|
||||||
c = gajim.contacts.get_gc_contact(self.account, self.room_jid, nick)
|
c = gajim.contacts.get_gc_contact(self.account, self.room_jid,
|
||||||
|
nick)
|
||||||
c.show = show
|
c.show = show
|
||||||
c.status = status
|
c.status = status
|
||||||
if nick == self.nick and (not statusCode or \
|
if nick == self.nick and (not statusCode or \
|
||||||
'303' not in statusCode): # We became offline
|
'303' not in statusCode): # We became offline
|
||||||
self.got_disconnected()
|
self.got_disconnected()
|
||||||
contact = gajim.contacts.\
|
contact = gajim.contacts.\
|
||||||
get_contact_with_highest_priority(self.account, self.room_jid)
|
get_contact_with_highest_priority(self.account,
|
||||||
|
self.room_jid)
|
||||||
if contact:
|
if contact:
|
||||||
gajim.interface.roster.draw_contact(self.room_jid, self.account)
|
gajim.interface.roster.draw_contact(self.room_jid,
|
||||||
|
self.account)
|
||||||
if self.parent_win:
|
if self.parent_win:
|
||||||
self.parent_win.redraw_tab(self)
|
self.parent_win.redraw_tab(self)
|
||||||
else:
|
else:
|
||||||
|
@ -1353,21 +1356,24 @@ class GroupchatControl(ChatControlBase):
|
||||||
self.nick = nick
|
self.nick = nick
|
||||||
s = _('You are now known as %s') % nick
|
s = _('You are now known as %s') % nick
|
||||||
self.print_conversation(s, 'info', tim=tim, graphics=False)
|
self.print_conversation(s, 'info', tim=tim, graphics=False)
|
||||||
iter_ = self.add_contact_to_roster(nick, show, role, affiliation,
|
iter_ = self.add_contact_to_roster(nick, show, role,
|
||||||
status, jid)
|
affiliation, status, jid)
|
||||||
newly_created = True
|
newly_created = True
|
||||||
self.draw_all_roles()
|
self.draw_all_roles()
|
||||||
if statusCode and '201' in statusCode: # We just created the room
|
if statusCode and '201' in statusCode:
|
||||||
gajim.connections[self.account].request_gc_config(self.room_jid)
|
# We just created the room
|
||||||
|
gajim.connections[self.account].request_gc_config(
|
||||||
|
self.room_jid)
|
||||||
else:
|
else:
|
||||||
gc_c = gajim.contacts.get_gc_contact(self.account, self.room_jid,
|
gc_c = gajim.contacts.get_gc_contact(self.account,
|
||||||
nick)
|
self.room_jid, nick)
|
||||||
if not gc_c:
|
if not gc_c:
|
||||||
log.error('%s has an iter, but no gc_contact instance')
|
log.error('%s has an iter, but no gc_contact instance' % \
|
||||||
|
nick)
|
||||||
return
|
return
|
||||||
# Re-get vcard if avatar has changed
|
# Re-get vcard if avatar has changed
|
||||||
# We do that here because we may request it to the real JID if we
|
# We do that here because we may request it to the real JID if
|
||||||
# knows it. connections.py doesn't know it.
|
# we knows it. connections.py doesn't know it.
|
||||||
con = gajim.connections[self.account]
|
con = gajim.connections[self.account]
|
||||||
if gc_c and gc_c.jid:
|
if gc_c and gc_c.jid:
|
||||||
real_jid = gc_c.jid
|
real_jid = gc_c.jid
|
||||||
|
|
Loading…
Reference in New Issue