[Pidgin] #10410: ui ops and blist-node-added signal not called for first group added

Pidgin trac at pidgin.im
Thu Oct 1 12:28:23 EDT 2009


#10410: ui ops and blist-node-added signal not called for first group added
--------------------------+-------------------------------------------------
 Reporter:  jochendesmet  |        Owner:           
     Type:  patch         |       Status:  new      
Milestone:                |    Component:  libpurple
  Version:  2.6.2         |   Resolution:           
 Keywords:  blist         |  
--------------------------+-------------------------------------------------

Comment(by sadrul):

 I think [http://pidgin.im/~sadrul/pp/fix_10410.diff this] is a more
 appropriate fix:
 {{{
 #
 # old_revision [f4c4106a9ee0234db09b269d26c98f0b8370a3ba]
 #
 # patch "libpurple/blist.c"
 #  from [25c0a901a1503b70830120fc894fbabe0329973d]
 #    to [b57dd4fbe3beea4eb1846eea0e9dab7a2fe90a96]
 #
 ============================================================
 --- libpurple/blist.c   25c0a901a1503b70830120fc894fbabe0329973d
 +++ libpurple/blist.c   b57dd4fbe3beea4eb1846eea0e9dab7a2fe90a96
 @@ -2009,18 +2009,14 @@ void purple_blist_add_group(PurpleGroup

         ops = purple_blist_get_ui_ops();

 -       if (!purplebuddylist->root) {
 -               purplebuddylist->root = gnode;
 -
 -               key = g_utf8_collate_key(group->name, -1);
 -               g_hash_table_insert(groups_cache, key, group);
 -               return;
 +       /* if we're moving to overtop of ourselves, do nothing */
 +       if (gnode == node) {
 +               if (!purplebuddylist->root)
 +                       node = NULL;
 +               else
 +                       return;
         }

 -       /* if we're moving to overtop of ourselves, do nothing */
 -       if (gnode == node)
 -               return;
 -
         if (purple_find_group(group->name)) {
                 /* This is just being moved */

 }}}

 Basically, we do not really need to special case the first group.

-- 
Ticket URL: <http://developer.pidgin.im/ticket/10410#comment:2>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list