[gaim-migrate @ 4688]

Sun, 26 Jan 2003 01:22:02 +0000

author
Christian Hammond <chipx86@chipx86.com>
date
Sun, 26 Jan 2003 01:22:02 +0000
changeset 4415
eca21938871e
parent 4414
308f05d1046d
child 4416
008b56d257e1

[gaim-migrate @ 4688]
Tabs are no longer off to the right one when reordered.

src/conversation.c file | annotate | diff | comparison | revisions
src/gtkconv.c file | annotate | diff | comparison | revisions
--- 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);
 }
--- 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);
 }

mercurial