Mercurial > pidgin.yaz
changeset 3075:c0928d7fdcf9
[gaim-migrate @ 3089]
Can reorder accounts in the account editor. Thanks Luke.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Sun, 17 Mar 2002 21:49:56 +0000 |
parents | 793fb2e9d53b |
children | a7e03c5d2205 |
files | ChangeLog src/multi.c |
diffstat | 2 files changed, 20 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sun Mar 17 20:23:34 2002 +0000 +++ b/ChangeLog Sun Mar 17 21:49:56 2002 +0000 @@ -7,6 +7,8 @@ * Login process shown in single window (Thanks Michael Golden) * Server side buddy lists for ICQ again + * Can reorder your accounts in the account editor (Thanks + Luke Schierer) version 0.54 (03/14/2002): * Compiles without GdkPixbuf again
--- a/src/multi.c Sun Mar 17 20:23:34 2002 +0000 +++ b/src/multi.c Sun Mar 17 21:49:56 2002 +0000 @@ -164,6 +164,18 @@ return "Unknown"; } + +static void reorder_list(GtkCList *cl, int from, int to, void *p) +{ + struct aim_user *au; + if (from == to) + return; /* This shouldn't happen, but just in case */ + au = (struct aim_user*)g_slist_nth_data(aim_users, from); + aim_users = g_slist_remove (aim_users, au); + aim_users = g_slist_insert(aim_users, au, to); + save_prefs(); +} + void regenerate_user_list() { char *titles[4]; @@ -201,11 +213,15 @@ gtk_clist_set_column_width(GTK_CLIST(list), 0, 90); gtk_clist_set_selection_mode(GTK_CLIST(list), GTK_SELECTION_EXTENDED); gtk_clist_column_titles_passive(GTK_CLIST(list)); + gtk_container_add(GTK_CONTAINER(win), list); gtk_widget_show(list); regenerate_user_list(); - + gtk_clist_set_reorderable (GTK_CLIST(list), TRUE); + gtk_clist_set_use_drag_icons (GTK_CLIST(list), TRUE); + gtk_signal_connect(GTK_OBJECT(list), "row-move", GTK_SIGNAL_FUNC(reorder_list), NULL); + gtk_widget_show(win); return win; } @@ -923,7 +939,7 @@ l = l->next; } } - + static void do_del_acct(gpointer w, struct aim_user *u) { if (u->gc) {