fix indentation
This commit is contained in:
parent
ed135f3207
commit
7a157ac986
|
@ -77,7 +77,7 @@ class GroupchatWindow(chat.Chat):
|
|||
'on_groupchat_window_focus_out_event': self.on_groupchat_window_focus_out_event,
|
||||
'on_chat_notebook_key_press_event': self.on_chat_notebook_key_press_event,
|
||||
'on_chat_notebook_switch_page': self.on_chat_notebook_switch_page,
|
||||
}
|
||||
}
|
||||
|
||||
self.xml.signal_autoconnect(signal_dict)
|
||||
|
||||
|
@ -707,7 +707,7 @@ class GroupchatWindow(chat.Chat):
|
|||
message_array = message_array[0].split()
|
||||
nick = message_array.pop(0)
|
||||
room_nicks = self.get_nick_list(room_jid)
|
||||
reason = ' '.join(message_array)
|
||||
reason = ' '.join(message_array)
|
||||
if nick in room_nicks:
|
||||
ban_jid = gajim.construct_fjid(room_jid, nick)
|
||||
gajim.connections[self.account].gc_set_affiliation(room_jid, ban_jid, 'outcast', reason)
|
||||
|
@ -982,17 +982,17 @@ class GroupchatWindow(chat.Chat):
|
|||
item = xml.get_widget('kick_menuitem')
|
||||
item.connect('activate', self.kick, room_jid, nick)
|
||||
if user_role != 'moderator' or \
|
||||
(user_affiliation == 'admin' and target_affiliation == 'owner') or \
|
||||
(user_affiliation == 'member' and target_affiliation in ('admin', 'owner')) or \
|
||||
(user_affiliation == 'none' and target_affiliation != 'none'):
|
||||
(user_affiliation == 'admin' and target_affiliation == 'owner') or \
|
||||
(user_affiliation == 'member' and target_affiliation in ('admin', 'owner')) or \
|
||||
(user_affiliation == 'none' and target_affiliation != 'none'):
|
||||
item.set_sensitive(False)
|
||||
|
||||
item = xml.get_widget('voice_checkmenuitem')
|
||||
item.set_active(target_role != 'visitor')
|
||||
if user_role != 'moderator' or \
|
||||
user_affiliation == 'none' or \
|
||||
(user_affiliation=='member' and target_affiliation!='none') or \
|
||||
target_affiliation in ('admin', 'owner'):
|
||||
user_affiliation == 'none' or \
|
||||
(user_affiliation=='member' and target_affiliation!='none') or \
|
||||
target_affiliation in ('admin', 'owner'):
|
||||
item.set_sensitive(False)
|
||||
item.connect('activate', self.on_voice_checkmenuitem_activate, room_jid,
|
||||
nick)
|
||||
|
@ -1000,22 +1000,22 @@ class GroupchatWindow(chat.Chat):
|
|||
item = xml.get_widget('moderator_checkmenuitem')
|
||||
item.set_active(target_role == 'moderator')
|
||||
if not user_affiliation in ('admin', 'owner') or \
|
||||
target_affiliation in ('admin', 'owner'):
|
||||
target_affiliation in ('admin', 'owner'):
|
||||
item.set_sensitive(False)
|
||||
item.connect('activate', self.on_moderator_checkmenuitem_activate,
|
||||
room_jid, nick)
|
||||
|
||||
item = xml.get_widget('ban_menuitem')
|
||||
if not user_affiliation in ('admin', 'owner') or \
|
||||
(target_affiliation in ('admin', 'owner') and\
|
||||
user_affiliation != 'owner'):
|
||||
(target_affiliation in ('admin', 'owner') and\
|
||||
user_affiliation != 'owner'):
|
||||
item.set_sensitive(False)
|
||||
item.connect('activate', self.ban, room_jid, jid)
|
||||
|
||||
item = xml.get_widget('member_checkmenuitem')
|
||||
item.set_active(target_affiliation != 'none')
|
||||
if not user_affiliation in ('admin', 'owner') or \
|
||||
(user_affiliation != 'owner' and target_affiliation in ('admin','owner')):
|
||||
(user_affiliation != 'owner' and target_affiliation in ('admin','owner')):
|
||||
item.set_sensitive(False)
|
||||
item.connect('activate', self.on_member_checkmenuitem_activate,
|
||||
room_jid, jid)
|
||||
|
|
|
@ -64,7 +64,7 @@ class TabbedChatWindow(chat.Chat):
|
|||
'on_chat_notebook_key_press_event': self.on_chat_notebook_key_press_event,
|
||||
'on_chat_notebook_switch_page': self.on_chat_notebook_switch_page, # in chat.py
|
||||
'on_tabbed_chat_window_motion_notify_event': self.on_tabbed_chat_window_motion_notify_event,
|
||||
}
|
||||
}
|
||||
|
||||
self.xml.signal_autoconnect(signal_dict)
|
||||
|
||||
|
@ -369,7 +369,7 @@ timestamp, contact):
|
|||
self.on_drag_data_received, contact)
|
||||
self.childs[contact.jid].drag_dest_set( gtk.DEST_DEFAULT_MOTION |
|
||||
gtk.DEST_DEFAULT_HIGHLIGHT | gtk.DEST_DEFAULT_DROP,
|
||||
self.dnd_list, gtk.gdk.ACTION_COPY)
|
||||
self.dnd_list, gtk.gdk.ACTION_COPY)
|
||||
|
||||
message_textview = self.xmls[contact.jid].get_widget('message_textview')
|
||||
message_tv_buffer = message_textview.get_buffer()
|
||||
|
@ -452,7 +452,7 @@ timestamp, contact):
|
|||
if yes we go active
|
||||
if no we go inactive '''
|
||||
contact = gajim.get_first_contact_instance_from_jid(self.account, jid)
|
||||
if jid not in self.xmls or contact is None:
|
||||
if jid not in self.xmls or contact is None:
|
||||
# the tab with jid is no longer open or contact left
|
||||
return False # stop looping
|
||||
|
||||
|
@ -464,7 +464,7 @@ timestamp, contact):
|
|||
return True # loop forever
|
||||
|
||||
if not (self.mouse_over_in_last_30_secs or\
|
||||
self.kbd_activity_in_last_30_secs):
|
||||
self.kbd_activity_in_last_30_secs):
|
||||
self.send_chatstate('inactive', jid)
|
||||
|
||||
# assume no activity and let the motion-notify or 'insert-text' make them True
|
||||
|
|
Loading…
Reference in New Issue