Mercurial > pidgin
diff src/multi.c @ 2204:5014b802eb41
[gaim-migrate @ 2214]
if you load a protocol for an unknown account or unload one, update the account editor.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Fri, 31 Aug 2001 18:09:27 +0000 |
parents | 14100685c95f |
children | cef6d4e81aec |
line wrap: on
line diff
--- a/src/multi.c Fri Aug 31 17:09:24 2001 +0000 +++ b/src/multi.c Fri Aug 31 18:09:27 2001 +0000 @@ -154,13 +154,34 @@ return "Unknown"; } +void regenerate_user_list() +{ + char *titles[4]; + GList *u = aim_users; + struct aim_user *a; + int i; + + if (!acctedit) + return; + + gtk_clist_clear(GTK_CLIST(list)); + + while (u) { + a = (struct aim_user *)u->data; + titles[0] = a->username; + titles[1] = a->gc ? "Yes" : "No"; + titles[2] = (a->options & OPT_USR_AUTO) ? "True" : "False"; + titles[3] = proto_name(a->protocol); + i = gtk_clist_append(GTK_CLIST(list), titles); + gtk_clist_set_row_data(GTK_CLIST(list), i, a); + u = u->next; + } +} + static GtkWidget *generate_list() { GtkWidget *win; char *titles[4] = { "Screenname", "Currently Online", "Auto-login", "Protocol" }; - GList *u = aim_users; - struct aim_user *a; - int i; win = gtk_scrolled_window_new(0, 0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(win), GTK_POLICY_AUTOMATIC, @@ -173,16 +194,7 @@ gtk_container_add(GTK_CONTAINER(win), list); gtk_widget_show(list); - while (u) { - a = (struct aim_user *)u->data; - titles[0] = a->username; - titles[1] = a->gc ? "Yes" : "No"; - titles[2] = (a->options & OPT_USR_AUTO) ? "True" : "False"; - titles[3] = proto_name(a->protocol); - i = gtk_clist_append(GTK_CLIST(list), titles); - gtk_clist_set_row_data(GTK_CLIST(list), i, a); - u = u->next; - } + regenerate_user_list(); gtk_widget_show(win); return win;