# HG changeset patch # User Sean Egan # Date 1016401796 0 # Node ID c0928d7fdcf9f471b2ddf269f18215ecafd15760 # Parent 793fb2e9d53b456b8f194ccd8e9244cbcbe05244 [gaim-migrate @ 3089] Can reorder accounts in the account editor. Thanks Luke. committer: Tailor Script diff -r 793fb2e9d53b -r c0928d7fdcf9 ChangeLog --- 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 diff -r 793fb2e9d53b -r c0928d7fdcf9 src/multi.c --- 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) {