comparison src/blist.c @ 6006:0aeb4fd0fc65

[gaim-migrate @ 6454] A bit more pref clean up. Christian or Nathan: Could one of you take a look at blist_pref_cb in blist.c and let me know the correct way to do that? Or if you wanna fix that feel free :-) committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Thu, 03 Jul 2003 22:25:14 +0000
parents 60d9cbfb6bf8
children 4c16227f7cd9
comparison
equal deleted inserted replaced
6005:81869466b6a7 6006:0aeb4fd0fc65
68 static guint _gaim_blist_hbuddy_equal (struct _gaim_hbuddy *hb1, struct _gaim_hbuddy *hb2) 68 static guint _gaim_blist_hbuddy_equal (struct _gaim_hbuddy *hb1, struct _gaim_hbuddy *hb2)
69 { 69 {
70 return ((!strcmp(hb1->name, hb2->name)) && hb1->account == hb2->account && hb1->group == hb2->group); 70 return ((!strcmp(hb1->name, hb2->name)) && hb1->account == hb2->account && hb1->group == hb2->group);
71 } 71 }
72 72
73 static void blist_pref_cb(const char *name, GaimPrefType typ, gpointer value, gpointer data)
74 {
75 /* XXX - We shouldn't call gtk functions directly */
76 /* gaim_gtk_blist_refresh(gaimbuddylist); */
77 }
78
73 /***************************************************************************** 79 /*****************************************************************************
74 * Public API functions * 80 * Public API functions *
75 *****************************************************************************/ 81 *****************************************************************************/
76 82
77 struct gaim_buddy_list *gaim_blist_new() 83 struct gaim_buddy_list *gaim_blist_new()
83 gbl->buddies = g_hash_table_new ((GHashFunc)_gaim_blist_hbuddy_hash, 89 gbl->buddies = g_hash_table_new ((GHashFunc)_gaim_blist_hbuddy_hash,
84 (GEqualFunc)_gaim_blist_hbuddy_equal); 90 (GEqualFunc)_gaim_blist_hbuddy_equal);
85 91
86 if (gbl->ui_ops != NULL && gbl->ui_ops->new_list != NULL) 92 if (gbl->ui_ops != NULL && gbl->ui_ops->new_list != NULL)
87 gbl->ui_ops->new_list(gbl); 93 gbl->ui_ops->new_list(gbl);
94
95 gaim_prefs_connect_callback("/core/buddies/use_server_alias", blist_pref_cb, NULL);
88 96
89 return gbl; 97 return gbl;
90 } 98 }
91 99
92 void 100 void