Author: jim++ Date: 2008-05-01 04:13:00 +0200 (Thu, 01 May 2008) New Revision: 9549
Modified: trunk/src/roster_window.py Log: [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
Modified: trunk/src/roster_window.py =================================================================== --- trunk/src/roster_window.py 2008-04-30 02:55:13 UTC (rev 9548) +++ trunk/src/roster_window.py 2008-05-01 02:13:00 UTC (rev 9549) @@ -344,6 +344,7 @@ 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 @@ 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,10 +764,9 @@ contact.groups.append(group) gajim.connections[account].update_contact(jid, contact.name, contact.groups) - + self.add_contact(jid, account)
- def remove_contact_from_groups(self, jid, account, groups): '''Remove contact from given groups and redraw them. @@ -794,14 +794,13 @@ 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): if not gajim.interface.instances.has_key(account): @@ -812,9 +811,7 @@ 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 = ''): keyID = '' @@ -991,10 +988,10 @@ '\n<span size="small" style="italic" foreground="%s">%s</span>' \ % (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 @@ contact.groups = [_('Observers')] if not groups: groups = [_('General')] + + 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)
- self.draw_account(account) - self.draw_contact(jid, account) - def _idle_draw_jids_of_account(self, jids, account): '''Draw given contacts and their avatars in a lazy fashion. @@ -3677,8 +3675,9 @@ context, etime, grp_source = None): if is_big_brother: # add whole metacontact to new group + 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,]) - self.add_contact_to_groups(c_source.jid, account, [grp_dest,]) else: # Normal contact or little brother family = gajim.contacts.get_metacontacts_family(account, @@ -3702,8 +3701,9 @@
else: # Normal contact + 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,]) - self.add_contact_to_groups(c_source.jid, account, [grp_dest,])
if context.action in (gtk.gdk.ACTION_MOVE, gtk.gdk.ACTION_COPY): context.finish(True, True, etime)