[Jim++] some elif instead of if
This commit is contained in:
parent
dea51bd596
commit
946a28b26b
|
@ -1026,7 +1026,7 @@ class ChatControl(ChatControlBase):
|
|||
ChatControlBase.print_conversation_line(self, msg,
|
||||
'status', '', tim)
|
||||
ec.append(jid)
|
||||
if not encrypted and jid in ec:
|
||||
elif not encrypted and jid in ec:
|
||||
msg = _('Encryption disabled')
|
||||
ChatControlBase.print_conversation_line(self, msg,
|
||||
'status', '', tim)
|
||||
|
@ -1196,7 +1196,7 @@ class ChatControl(ChatControlBase):
|
|||
self.reset_kbd_mouse_timeout_vars()
|
||||
|
||||
# if we're inactive prevent composing (JEP violation)
|
||||
if contact.our_chatstate == 'inactive' and state == 'composing':
|
||||
elif contact.our_chatstate == 'inactive' and state == 'composing':
|
||||
MessageControl.send_message(self, None, chatstate = 'active') # go active before
|
||||
contact.our_chatstate = 'active'
|
||||
self.reset_kbd_mouse_timeout_vars()
|
||||
|
|
|
@ -727,7 +727,7 @@ _('You can not join a group chat unless you are connected.')).get_response()
|
|||
self.recently_combobox.append_text(g)
|
||||
if len(self.recently_groupchat) == 0:
|
||||
self.recently_combobox.set_sensitive(False)
|
||||
if len(self.recently_groupchat) and server == '' and room == '':
|
||||
elif server == '' and room == '':
|
||||
self.recently_combobox.set_active(0)
|
||||
self.xml.get_widget('room_entry').select_region(0, -1)
|
||||
elif room and server:
|
||||
|
|
|
@ -359,7 +359,7 @@ class Interface:
|
|||
gajim.to_be_removed[account].remove(contact1.jid)
|
||||
gobject.timeout_add(5000, self.roster.remove_newly_added,
|
||||
contact1.jid, account)
|
||||
if old_show > 1 and new_show == 0 and gajim.connections[account].\
|
||||
elif old_show > 1 and new_show == 0 and gajim.connections[account].\
|
||||
connected > 1:
|
||||
if not contact1.jid in gajim.to_be_removed[account]:
|
||||
gajim.to_be_removed[account].append(contact1.jid)
|
||||
|
|
|
@ -218,7 +218,7 @@ class RosterWindow:
|
|||
groups = contact.groups
|
||||
if observer:
|
||||
groups = [_('Observers')]
|
||||
if not groups:
|
||||
elif not groups:
|
||||
groups = [_('General')]
|
||||
for g in groups:
|
||||
iterG = self.get_group_iter(g, account)
|
||||
|
@ -1410,9 +1410,9 @@ _('If "%s" accepts this request you will know his or her status.') % jid)
|
|||
if event.keyval == gtk.keysyms.Menu:
|
||||
self.show_treeview_menu(event)
|
||||
return True
|
||||
if event.keyval == gtk.keysyms.Escape:
|
||||
elif event.keyval == gtk.keysyms.Escape:
|
||||
self.tree.get_selection().unselect_all()
|
||||
if event.keyval == gtk.keysyms.F2:
|
||||
elif event.keyval == gtk.keysyms.F2:
|
||||
treeselection = self.tree.get_selection()
|
||||
model, iter = treeselection.get_selected()
|
||||
if not iter:
|
||||
|
@ -1422,7 +1422,7 @@ _('If "%s" accepts this request you will know his or her status.') % jid)
|
|||
path = model.get_path(iter)
|
||||
self.on_rename(widget, iter, path)
|
||||
|
||||
if event.keyval == gtk.keysyms.Delete:
|
||||
elif event.keyval == gtk.keysyms.Delete:
|
||||
treeselection = self.tree.get_selection()
|
||||
model, iter = treeselection.get_selected()
|
||||
if not iter:
|
||||
|
@ -1481,7 +1481,7 @@ _('If "%s" accepts this request you will know his or her status.') % jid)
|
|||
self.show_appropriate_context_menu(event, iter)
|
||||
return True
|
||||
|
||||
if event.button == 2: # Middle click
|
||||
elif event.button == 2: # Middle click
|
||||
try:
|
||||
path, column, x, y = self.tree.get_path_at_pos(int(event.x),
|
||||
int(event.y))
|
||||
|
@ -1527,7 +1527,7 @@ _('If "%s" accepts this request you will know his or her status.') % jid)
|
|||
self.send_status(acct, current_show, message)
|
||||
return True
|
||||
|
||||
if event.button == 1: # Left click
|
||||
elif event.button == 1: # Left click
|
||||
try:
|
||||
path, column, x, y = self.tree.get_path_at_pos(int(event.x),
|
||||
int(event.y))
|
||||
|
@ -1598,25 +1598,26 @@ _('If "%s" accepts this request you will know his or her status.') % jid)
|
|||
if gajim.connections[account].connected < 2:
|
||||
self.set_connecting_state(account)
|
||||
|
||||
if gajim.connections[account].connected < 2 and \
|
||||
not gajim.connections[account].password:
|
||||
passphrase = ''
|
||||
w = dialogs.PassphraseDialog(
|
||||
_('Password Required'),
|
||||
_('Enter your password for account %s') % account,
|
||||
_('Save password'))
|
||||
passphrase, save = w.run()
|
||||
if passphrase == -1:
|
||||
if accountIter:
|
||||
model[accountIter][0] = self.jabber_state_images['16']['offline']
|
||||
if gajim.interface.systray_enabled:
|
||||
gajim.interface.systray.change_status('offline')
|
||||
self.update_status_combobox()
|
||||
return
|
||||
gajim.connections[account].password = passphrase
|
||||
if save:
|
||||
gajim.config.set_per('accounts', account, 'savepass', True)
|
||||
gajim.config.set_per('accounts', account, 'password', passphrase)
|
||||
if not gajim.connections[account].password:
|
||||
passphrase = ''
|
||||
w = dialogs.PassphraseDialog(
|
||||
_('Password Required'),
|
||||
_('Enter your password for account %s') % account,
|
||||
_('Save password'))
|
||||
passphrase, save = w.run()
|
||||
if passphrase == -1:
|
||||
if accountIter:
|
||||
model[accountIter][0] = self.jabber_state_images['16']\
|
||||
['offline']
|
||||
if gajim.interface.systray_enabled:
|
||||
gajim.interface.systray.change_status('offline')
|
||||
self.update_status_combobox()
|
||||
return
|
||||
gajim.connections[account].password = passphrase
|
||||
if save:
|
||||
gajim.config.set_per('accounts', account, 'savepass', True)
|
||||
gajim.config.set_per('accounts', account, 'password',
|
||||
passphrase)
|
||||
|
||||
keyid = None
|
||||
use_gpg_agent = gajim.config.get('use_gpg_agent')
|
||||
|
|
|
@ -309,9 +309,9 @@ class Systray:
|
|||
self.on_tray_leave_notify_event(widget, None)
|
||||
if event.button == 1: # Left click
|
||||
self.on_left_click()
|
||||
if event.button == 2: # middle click
|
||||
elif event.button == 2: # middle click
|
||||
self.on_middle_click()
|
||||
if event.button == 3: # right click
|
||||
elif event.button == 3: # right click
|
||||
self.make_menu(event)
|
||||
|
||||
def on_show_menuitem_activate(self, widget, show):
|
||||
|
|
Loading…
Reference in New Issue