fix wrong replacement

This commit is contained in:
Nikos Kouremenos 2005-08-27 14:08:00 +00:00
parent 7b5997156b
commit 461041ae5b
3 changed files with 5 additions and 6 deletions

View File

@ -920,7 +920,7 @@ class Interface:
self.sth_at_sth_dot_sth_re = sre.compile(r'\S+@\S+\.\S*[^\s)?]')
def on_launch_browser_mailer(self, widget, url, kind):
helpers.launch_browser_mailer(kind, url)
helpers.launch_browser_mailer(kind, url.decode('utf-8'))
def init_regexp(self):
#initialize emoticons dictionary

View File

@ -80,6 +80,7 @@ class GajimThemesWindow:
model = self.themes_tree.get_model()
iter = model.get_iter_from_string(row)
old_name = model.get_value(iter, 0).decode('utf-8')
new_name = new_name.decode('utf-8')
if old_name == new_name:
return
if new_name in gajim.config.get_per('themes'):

View File

@ -184,12 +184,10 @@ class RosterWindow:
if model.iter_n_children(parent_i) == 0:
model.remove(parent_i)
# We need to check all contacts, even offline contacts
group_empty = True
for jid in gajim.contacts[account]:
if group in gajim.contacts[account][jid][0].groups:
group_empty = False
break
if group_empty:
else:
del gajim.groups[account][group]
def get_appropriate_state_images(self, jid):
@ -2002,10 +2000,10 @@ _('If "%s" accepts this request you will know his status.') %jid)
model.remove(iter_group_source)
#delete the group if it is empty (need to look for offline users too)
for jid in gajim.contacts[account]:
if group in gajim.contacts[account][jid][0].groups:
if grp_source in gajim.contacts[account][jid][0].groups:
break
else:
del gajim.groups[account][group]
del gajim.groups[account][grp_source]
if not grp_dest in u.groups:
u.groups.append(grp_dest)
self.add_contact_to_roster(data, account)