comparison src/gtkblist.c @ 13195:c242836ff793

[gaim-migrate @ 15558] sf patch #1421206, from Sadrul Habib Chowdhury Fix a crash when renaming a group to an already existing group name (sf bug #1421118) committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Thu, 09 Feb 2006 00:10:12 +0000
parents 02268b52ced3
children f04dffe22957
comparison
equal deleted inserted replaced
13194:7099a443131d 13195:c242836ff793
4020 4020
4021 if(gaim_prefs_get_bool("/gaim/gtk/blist/show_offline_buddies")) 4021 if(gaim_prefs_get_bool("/gaim/gtk/blist/show_offline_buddies"))
4022 count = gaim_blist_get_group_size(group, FALSE); 4022 count = gaim_blist_get_group_size(group, FALSE);
4023 else 4023 else
4024 count = gaim_blist_get_group_online_count(group); 4024 count = gaim_blist_get_group_online_count(group);
4025 4025
4026 if (count > 0 || gaim_prefs_get_bool("/gaim/gtk/blist/show_empty_groups")) 4026 if (count > 0 || gaim_prefs_get_bool("/gaim/gtk/blist/show_empty_groups"))
4027 show = TRUE; 4027 show = TRUE;
4028 else { 4028 else {
4029 GaimBlistNode *n; 4029 GaimBlistNode *n;
4030 n = node->child; 4030 n = node->child;
4031 while (n && !GAIM_BLIST_NODE_IS_GROUP(n)) { 4031 while (n && !GAIM_BLIST_NODE_IS_GROUP(n)) {
4032 if (GAIM_BLIST_NODE_IS_BUDDY(n)) { 4032 if (GAIM_BLIST_NODE_IS_BUDDY(n)) {
4033 if (buddy_is_displayable((GaimBuddy*)n)) { 4033 if (buddy_is_displayable((GaimBuddy*)n)) {
4034 show = TRUE; 4034 show = TRUE;
4035 break; 4035 break;
4036 } 4036 }
4037 } 4037 }
4038 n = gaim_blist_node_next(n, FALSE); 4038 n = gaim_blist_node_next(n, FALSE);
4039 } 4039 }
4040 } 4040 }
4041 4041
4254 4254
4255 static void gaim_gtk_blist_update(GaimBuddyList *list, GaimBlistNode *node) 4255 static void gaim_gtk_blist_update(GaimBuddyList *list, GaimBlistNode *node)
4256 { 4256 {
4257 if(!gtkblist || !node) 4257 if(!gtkblist || !node)
4258 return; 4258 return;
4259
4260 if (node->ui_data == NULL)
4261 gaim_gtk_blist_new_node(node);
4259 4262
4260 switch(node->type) { 4263 switch(node->type) {
4261 case GAIM_BLIST_GROUP_NODE: 4264 case GAIM_BLIST_GROUP_NODE:
4262 gaim_gtk_blist_update_group(list, node); 4265 gaim_gtk_blist_update_group(list, node);
4263 break; 4266 break;