From 6c8d196383e86330dc0616a840ed9548750ab023 Mon Sep 17 00:00:00 2001 From: Jean-Marie Traissard Date: Thu, 1 May 2008 02:13:00 +0000 Subject: [PATCH] [modelfilter] -fix row not expanded when contact connected in group with no one online yet -fix WHEN filter is done when contact disconnect/connect -fix number of connected contacts not showed for new groups -fix General created when moving a contact to another group --- src/roster_window.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/roster_window.py b/src/roster_window.py index 919c5c886..457555a5e 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -344,6 +344,7 @@ class RosterWindow: gajim.interface.jabber_state_images['16']['closed'], gobject.markup_escape_text(group), 'group', group, account, None, None]) + self.draw_group(group, account) if contact.is_transport(): typestr = 'agent' @@ -616,7 +617,7 @@ class RosterWindow: for c, acc in contacts: self.draw_contact(c.jid, acc) self.draw_avatar(c.jid, acc) - for group in groups: + for group in groups: self.draw_group(group, account) self.draw_account(account) @@ -763,9 +764,8 @@ class RosterWindow: contact.groups.append(group) gajim.connections[account].update_contact(jid, contact.name, contact.groups) - - self.add_contact(jid, account) + self.add_contact(jid, account) def remove_contact_from_groups(self, jid, account, groups): '''Remove contact from given groups and redraw them. @@ -794,13 +794,12 @@ class RosterWindow: for group in groups: self.draw_group(group, account) - # FIXME: maybe move to gajim.py def remove_newly_added(self, jid, account): if jid in gajim.newly_added[account]: gajim.newly_added[account].remove(jid) self.draw_contact(jid, account) - + self.refilter_shown_roster_items() # FIXME: maybe move to gajim.py def remove_to_be_removed(self, jid, account): @@ -812,8 +811,6 @@ class RosterWindow: if jid in gajim.to_be_removed[account]: gajim.to_be_removed[account].remove(jid) self.draw_contact(jid, account) - self.refilter_shown_roster_items() - #FIXME: integrate into add_contact() def add_to_not_in_the_roster(self, account, jid, nick = '', resource = ''): @@ -991,10 +988,10 @@ class RosterWindow: '\n%s' \ % (colorstring, gobject.markup_escape_text(status)) - # Check if our metacontacts familiy has changed + # Check if our metacontacts family has changed brothers = [] family = gajim.contacts.get_metacontacts_family(account, jid) - if family: # Are we a metacontact (have a familiy) + if family: # Are we a metacontact (have a family) if self.regroup: # group all together @@ -1119,13 +1116,14 @@ class RosterWindow: contact.groups = [_('Observers')] if not groups: groups = [_('General')] - for group in groups: - self.draw_group(group, account) - self._adjust_group_expand_collapse_state(group, account) self.draw_account(account) self.draw_contact(jid, account) + for group in groups: + self.draw_group(group, account) + self._adjust_group_expand_collapse_state(group, account) + def _idle_draw_jids_of_account(self, jids, account): '''Draw given contacts and their avatars in a lazy fashion. @@ -3677,8 +3675,9 @@ class RosterWindow: context, etime, grp_source = None): if is_big_brother: # add whole metacontact to new group - self.remove_contact_from_groups(c_source.jid, account, [grp_source,]) self.add_contact_to_groups(c_source.jid, account, [grp_dest,]) + # remove after we have so contact is not moved in General between + self.remove_contact_from_groups(c_source.jid, account, [grp_source,]) else: # Normal contact or little brother family = gajim.contacts.get_metacontacts_family(account, @@ -3702,8 +3701,9 @@ class RosterWindow: else: # Normal contact - self.remove_contact_from_groups(c_source.jid, account, [grp_source,]) self.add_contact_to_groups(c_source.jid, account, [grp_dest,]) + # remove after we have so contact is not moved in General between + self.remove_contact_from_groups(c_source.jid, account, [grp_source,]) if context.action in (gtk.gdk.ACTION_MOVE, gtk.gdk.ACTION_COPY): context.finish(True, True, etime)