No space in indentation, checked by drpython (editor). /src part

This commit is contained in:
Jean-Marie Traissard 2007-02-04 13:01:04 +00:00
parent e4fca50eb7
commit d37e7d8e3e
11 changed files with 29 additions and 29 deletions

View file

@ -2387,7 +2387,7 @@ class GroupchatConfigWindow(DataFormWindow):
prompt = _('<b>Whom do you want to make an administrator?</b>\n\n') prompt = _('<b>Whom do you want to make an administrator?</b>\n\n')
prompt += _('Can be one of the following:\n' prompt += _('Can be one of the following:\n'
'1. user@domain/resource (only that resource matches).\n' '1. user@domain/resource (only that resource matches).\n'
'2. user@domain (any resource matches).\n' '2. user@domain (any resource matches).\n'
'3. domain/resource (only that resource matches).\n' '3. domain/resource (only that resource matches).\n'
'4. domain (the domain itself matches, as does any user@domain,\n' '4. domain (the domain itself matches, as does any user@domain,\n'
'domain/resource, or address containing a subdomain.') 'domain/resource, or address containing a subdomain.')

View file

@ -747,7 +747,7 @@ class ConversationTextview:
# number of days since epoch for current time (in GMT) - # number of days since epoch for current time (in GMT) -
# number of days since epoch for message (in GMT) # number of days since epoch for message (in GMT)
diff_day = int(timegm(time.localtime())) / 86400 -\ diff_day = int(timegm(time.localtime())) / 86400 -\
int(timegm(tim)) / 86400 int(timegm(tim)) / 86400
if diff_day == 0: if diff_day == 0:
day_str = '' day_str = ''
elif diff_day == 1: elif diff_day == 1:

View file

@ -1658,7 +1658,7 @@ class SingleMessageWindow:
sender_list = [i[0].jid + '/' + i[0].resource for i in self.to] sender_list = [i[0].jid + '/' + i[0].resource for i in self.to]
else: else:
sender_list = [self.to_entry.get_text().decode('utf-8')] sender_list = [self.to_entry.get_text().decode('utf-8')]
for to_whom_jid in sender_list: for to_whom_jid in sender_list:
if self.completion_dict.has_key(to_whom_jid): if self.completion_dict.has_key(to_whom_jid):
to_whom_jid = self.completion_dict[to_whom_jid].jid to_whom_jid = self.completion_dict[to_whom_jid].jid

View file

@ -1158,7 +1158,7 @@ class Interface:
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')
if use_gpg_agent: if use_gpg_agent:
return return
keyID = gajim.config.get_per('accounts', account, 'keyid') keyID = gajim.config.get_per('accounts', account, 'keyid')
self.roster.forget_gpg_passphrase(keyID) self.roster.forget_gpg_passphrase(keyID)
dialogs.WarningDialog(_('Your passphrase is incorrect'), dialogs.WarningDialog(_('Your passphrase is incorrect'),

View file

@ -1491,8 +1491,8 @@ class GroupchatControl(ChatControlBase):
splitted_text2 = text.split(None, 1) splitted_text2 = text.split(None, 1)
if text.startswith('/topic '): if text.startswith('/topic '):
if len(splitted_text2) == 2 and \ if len(splitted_text2) == 2 and \
self.subject.startswith(splitted_text2[1]) and\ self.subject.startswith(splitted_text2[1]) and\
len(self.subject) > len(splitted_text2[1]): len(self.subject) > len(splitted_text2[1]):
message_buffer.insert_at_cursor( message_buffer.insert_at_cursor(
self.subject[len(splitted_text2[1]):]) self.subject[len(splitted_text2[1]):])
return True return True

View file

@ -497,8 +497,8 @@ def _get_fade_color(treeview, selected, focused):
p = 0.3 # background p = 0.3 # background
q = 0.7 # foreground # p + q should do 1.0 q = 0.7 # foreground # p + q should do 1.0
return gtk.gdk.Color(int(bg.red*p + fg.red*q), return gtk.gdk.Color(int(bg.red*p + fg.red*q),
int(bg.green*p + fg.green*q), int(bg.green*p + fg.green*q),
int(bg.blue*p + fg.blue*q)) int(bg.blue*p + fg.blue*q))
def get_scaled_pixbuf(pixbuf, kind): def get_scaled_pixbuf(pixbuf, kind):
'''returns scaled pixbuf, keeping ratio etc or None '''returns scaled pixbuf, keeping ratio etc or None

View file

@ -220,7 +220,7 @@ class HistoryManager:
list_of_rowrefs = [] list_of_rowrefs = []
for path in list_of_paths: # make them treerowrefs (it's needed) for path in list_of_paths: # make them treerowrefs (it's needed)
list_of_rowrefs.append(gtk.TreeRowReference(liststore, path)) list_of_rowrefs.append(gtk.TreeRowReference(liststore, path))
for rowref in list_of_rowrefs: # FILL THE STORE, for all rows selected for rowref in list_of_rowrefs: # FILL THE STORE, for all rows selected
path = rowref.get_path() path = rowref.get_path()
@ -433,7 +433,7 @@ class HistoryManager:
list_of_rowrefs = [] list_of_rowrefs = []
for path in list_of_paths: # make them treerowrefs (it's needed) for path in list_of_paths: # make them treerowrefs (it's needed)
list_of_rowrefs.append(gtk.TreeRowReference(liststore, path)) list_of_rowrefs.append(gtk.TreeRowReference(liststore, path))
for rowref in list_of_rowrefs: for rowref in list_of_rowrefs:
path = rowref.get_path() path = rowref.get_path()
@ -486,7 +486,7 @@ class HistoryManager:
self.dialog.destroy() self.dialog.destroy()
list_of_rowrefs = [] list_of_rowrefs = []
for path in list_of_paths: # make them treerowrefs (it's needed) for path in list_of_paths: # make them treerowrefs (it's needed)
list_of_rowrefs.append(gtk.TreeRowReference(liststore, path)) list_of_rowrefs.append(gtk.TreeRowReference(liststore, path))
for rowref in list_of_rowrefs: for rowref in list_of_rowrefs:
path = rowref.get_path() path = rowref.get_path()
@ -528,7 +528,7 @@ class HistoryManager:
# delete rows from db that match log_line_id # delete rows from db that match log_line_id
list_of_rowrefs = [] list_of_rowrefs = []
for path in list_of_paths: # make them treerowrefs (it's needed) for path in list_of_paths: # make them treerowrefs (it's needed)
list_of_rowrefs.append(gtk.TreeRowReference(liststore, path)) list_of_rowrefs.append(gtk.TreeRowReference(liststore, path))
for rowref in list_of_rowrefs: for rowref in list_of_rowrefs:
path = rowref.get_path() path = rowref.get_path()

View file

@ -537,10 +537,10 @@ class MessageWindow:
'''Set tab label as drag source and connect the drag_data_get signal''' '''Set tab label as drag source and connect the drag_data_get signal'''
tab_label = self.notebook.get_tab_label(child) tab_label = self.notebook.get_tab_label(child)
tab_label.dnd_handler = tab_label.connect('drag_data_get', tab_label.dnd_handler = tab_label.connect('drag_data_get',
self.on_tab_label_drag_data_get_cb) self.on_tab_label_drag_data_get_cb)
self.handlers[tab_label.dnd_handler] = tab_label self.handlers[tab_label.dnd_handler] = tab_label
tab_label.drag_source_set(gtk.gdk.BUTTON1_MASK, self.DND_TARGETS, tab_label.drag_source_set(gtk.gdk.BUTTON1_MASK, self.DND_TARGETS,
gtk.gdk.ACTION_MOVE) gtk.gdk.ACTION_MOVE)
tab_label.page_num = self.notebook.page_num(child) tab_label.page_num = self.notebook.page_num(child)
def on_tab_label_drag_data_get_cb(self, widget, drag_context, selection, def on_tab_label_drag_data_get_cb(self, widget, drag_context, selection,
@ -573,14 +573,14 @@ class MessageWindow:
tab_alloc = tab.get_allocation() tab_alloc = tab.get_allocation()
if horiz: if horiz:
if (x >= tab_alloc.x) and \ if (x >= tab_alloc.x) and \
(x <= (tab_alloc.x + tab_alloc.width)): (x <= (tab_alloc.x + tab_alloc.width)):
page_num = i page_num = i
if x >= tab_alloc.x + (tab_alloc.width / 2.0): if x >= tab_alloc.x + (tab_alloc.width / 2.0):
to_right = True to_right = True
break break
else: else:
if (y >= tab_alloc.y) and \ if (y >= tab_alloc.y) and \
(y <= (tab_alloc.y + tab_alloc.height)): (y <= (tab_alloc.y + tab_alloc.height)):
page_num = i page_num = i
if y > tab_alloc.y + (tab_alloc.height / 2.0): if y > tab_alloc.y + (tab_alloc.height / 2.0):
@ -621,10 +621,10 @@ class MessageWindowMgr:
def __init__(self): def __init__(self):
''' A dictionary of windows; the key depends on the config: ''' A dictionary of windows; the key depends on the config:
ONE_MSG_WINDOW_NEVER: The key is the contact JID ONE_MSG_WINDOW_NEVER: The key is the contact JID
ONE_MSG_WINDOW_ALWAYS: The key is MessageWindowMgr.MAIN_WIN ONE_MSG_WINDOW_ALWAYS: The key is MessageWindowMgr.MAIN_WIN
ONE_MSG_WINDOW_PERACCT: The key is the account name ONE_MSG_WINDOW_PERACCT: The key is the account name
ONE_MSG_WINDOW_PERTYPE: The key is a message type constant''' ONE_MSG_WINDOW_PERTYPE: The key is a message type constant'''
self._windows = {} self._windows = {}
# Map the mode to a int constant for frequent compares # Map the mode to a int constant for frequent compares
mode = gajim.config.get('one_message_window') mode = gajim.config.get('one_message_window')

View file

@ -321,8 +321,8 @@ class ProfileWindow:
return return
if gajim.connections[self.account].connected < 2: if gajim.connections[self.account].connected < 2:
dialogs.ErrorDialog(_('You are not connected to the server'), dialogs.ErrorDialog(_('You are not connected to the server'),
_('Without a connection you can not publish your contact ' _('Without a connection you can not publish your contact '
'information.')) 'information.'))
return return
vcard = self.make_vcard() vcard = self.make_vcard()
nick = '' nick = ''

View file

@ -400,7 +400,7 @@ class RosterWindow:
def add_to_not_in_the_roster(self, account, jid, nick = '', resource = ''): def add_to_not_in_the_roster(self, account, jid, nick = '', resource = ''):
''' add jid to group "not in the roster", he MUST not be in roster yet, ''' add jid to group "not in the roster", he MUST not be in roster yet,
return contact ''' return contact '''
keyID = '' keyID = ''
attached_keys = gajim.config.get_per('accounts', account, attached_keys = gajim.config.get_per('accounts', account,
'attached_gpg_keys').split() 'attached_gpg_keys').split()
@ -986,7 +986,7 @@ class RosterWindow:
for account in connected_accounts_with_vcard: for account in connected_accounts_with_vcard:
# profile, avatar # profile, avatar
profile_avatar_item = gtk.MenuItem(_('of account %s') % account, profile_avatar_item = gtk.MenuItem(_('of account %s') % account,
False) False)
profile_avatar_sub_menu.append(profile_avatar_item) profile_avatar_sub_menu.append(profile_avatar_item)
profile_avatar_item.connect('activate', profile_avatar_item.connect('activate',
self.on_profile_avatar_menuitem_activate, account) self.on_profile_avatar_menuitem_activate, account)

View file

@ -298,7 +298,7 @@ class GCTooltip(BaseTooltip):
# escape markup entities # escape markup entities
status = helpers.reduce_chars_newlines(status, 100, 5) status = helpers.reduce_chars_newlines(status, 100, 5)
status = '<i>' +\ status = '<i>' +\
gobject.markup_escape_text(status) + '</i>' gobject.markup_escape_text(status) + '</i>'
properties.append((status, None)) properties.append((status, None))
else: # no status message, show SHOW instead else: # no status message, show SHOW instead
show = helpers.get_uf_show(contact.show) show = helpers.get_uf_show(contact.show)
@ -588,7 +588,7 @@ class FileTransfersTooltip(BaseTooltip):
status = _('Not started') status = _('Not started')
elif file_props.has_key('connected'): elif file_props.has_key('connected'):
if file_props.has_key('stopped') and \ if file_props.has_key('stopped') and \
file_props['stopped'] == True: file_props['stopped'] == True:
status = _('Stopped') status = _('Stopped')
elif file_props['completed']: elif file_props['completed']:
status = _('Completed') status = _('Completed')
@ -597,10 +597,10 @@ class FileTransfersTooltip(BaseTooltip):
status = _('Completed') status = _('Completed')
else: else:
if file_props.has_key('paused') and \ if file_props.has_key('paused') and \
file_props['paused'] == True: file_props['paused'] == True:
status = _('?transfer status:Paused') status = _('?transfer status:Paused')
elif file_props.has_key('stalled') and \ elif file_props.has_key('stalled') and \
file_props['stalled'] == True: file_props['stalled'] == True:
#stalled is not paused. it is like 'frozen' it stopped alone #stalled is not paused. it is like 'frozen' it stopped alone
status = _('Stalled') status = _('Stalled')
else: else: