diff options
author | Sadrul Habib Chowdhury <sadrul@pidgin.im> | 2006-01-09 15:39:51 +0000 |
---|---|---|
committer | Sadrul Habib Chowdhury <sadrul@pidgin.im> | 2006-01-09 15:39:51 +0000 |
commit | 1d7a374fb7e0bb9bef04fb0c6180d877dbece024 (patch) | |
tree | 67616e470bc87337d641d1ce6fe5e9ffe6afea54 | |
parent | b7dbb114ab6671dbf612c068095430219cf86c75 (diff) | |
download | pidgin-1d7a374fb7e0bb9bef04fb0c6180d877dbece024.tar.gz |
[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>
-rw-r--r-- | src/gtkconv.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/gtkconv.c b/src/gtkconv.c index ec83ce6796..7213033688 100644 --- a/src/gtkconv.c +++ b/src/gtkconv.c @@ -5819,6 +5819,11 @@ gaim_gtkconv_get_tab_at_xy(GaimGtkWindow *win, int x, int y, gboolean *to_right) } } + if (page_num == -1) { + /* Add after the last tab */ + page_num = count - 1; + } + return page_num; } @@ -6606,15 +6611,13 @@ notebook_motion_cb(GtkWidget *widget, GdkEventButton *e, GaimGtkWindow *win) } 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; + 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) { + if (((gpointer)win == (gpointer)dest_win && win->drag_tab < page_num) || to_right) { arrow1_y += tab->allocation.height; arrow2_y += tab->allocation.height; } |