[gaim-migrate @ 15142]

Mon, 09 Jan 2006 15:39:51 +0000

author
Sadrul Habib Chowdhury <sadrul@pidgin.im>
date
Mon, 09 Jan 2006 15:39:51 +0000
changeset 12795
83d09a3b4e3c
parent 12794
e4f178fc08b5
child 12796
8fb3611a91e1

[gaim-migrate @ 15142]
Part of SF Patch #1400162 from Sadrul

"This should make the
tab-dragging arrows appear in the right places for tabs
on the side/side-vertical."

I'm basically trusting Sadrul on this one.

committer: Richard Laager <rlaager@pidgin.im>

src/gtkconv.c file | annotate | diff | comparison | revisions
--- a/src/gtkconv.c	Mon Jan 09 15:32:00 2006 +0000
+++ b/src/gtkconv.c	Mon Jan 09 15:39:51 2006 +0000
@@ -5819,6 +5819,11 @@
 		}
 	}
 
+	if (page_num == -1) {
+		/* Add after the last tab */
+		page_num = count - 1;
+	}
+
 	return page_num;
 }
 
@@ -6606,15 +6611,13 @@
 			}
 
 			arrow1_y = nb_y + tab->allocation.y;
-			arrow2_y = nb_y + tab->allocation.y +
-				tab->allocation.height;
+			arrow2_y = nb_y + tab->allocation.y + tab->allocation.height;
 		} else {
 			arrow1_x = nb_x + tab->allocation.x;
-			arrow2_x = nb_x + tab->allocation.x +
-				tab->allocation.width;
-			arrow1_y = arrow2_y = nb_y + tab->allocation.y + tab->allocation.height/2;
-
-			if ((gpointer)win == (gpointer)dest_win && win->drag_tab < page_num) {
+			arrow2_x = nb_x + tab->allocation.x + tab->allocation.width;
+			arrow1_y = arrow2_y = nb_y + tab->allocation.y;
+
+			if (((gpointer)win == (gpointer)dest_win && win->drag_tab < page_num) || to_right) {
 				arrow1_y += tab->allocation.height;
 				arrow2_y += tab->allocation.height;
 			}

mercurial