# HG changeset patch # User Christian Hammond # Date 1043544122 0 # Node ID c900391371720af792af9e206e7ba475b2d31bb8 # Parent 04d2e57b22c54263395d38ad2d66a949933e6ec9 [gaim-migrate @ 4688] Tabs are no longer off to the right one when reordered. committer: Tailor Script diff -r 04d2e57b22c5 -r c90039137172 src/conversation.c --- a/src/conversation.c Sat Jan 25 23:20:06 2003 +0000 +++ b/src/conversation.c Sun Jan 26 01:22:02 2003 +0000 @@ -689,14 +689,14 @@ if (ops != NULL && ops->move_conversation != NULL) ops->move_conversation(win, conv, new_index); - /* Insert it where it should go. */ - win->conversations = g_list_insert(win->conversations, conv, - (new_index > index ? new_index + 1 : new_index)); + if (new_index > index) + new_index--; /* Remove the old one. */ - l->data = NULL; - win->conversations = g_list_remove_link(win->conversations, l); - g_list_free_1(l); + win->conversations = g_list_delete_link(win->conversations, l); + + /* Insert it where it should go. */ + win->conversations = g_list_insert(win->conversations, conv, new_index); update_conv_indexes(win); } diff -r 04d2e57b22c5 -r c90039137172 src/gtkconv.c --- a/src/gtkconv.c Sat Jan 25 23:20:06 2003 +0000 +++ b/src/gtkconv.c Sun Jan 26 01:22:02 2003 +0000 @@ -3464,6 +3464,9 @@ gtkwin = GAIM_GTK_WINDOW(win); gtkconv = GAIM_GTK_CONVERSATION(conv); + if (new_index > gaim_conversation_get_index(conv)) + new_index--; + gtk_notebook_reorder_child(GTK_NOTEBOOK(gtkwin->notebook), gtkconv->tab_cont, new_index); }