Mercurial > pidgin.yaz
comparison src/gtkconv.c @ 11280:65658ff2deb8
[gaim-migrate @ 13477]
Removing gaim_gtkconv_get_dest_tab_at_xy, which is now useles.
Also:
(14:04:35) Sadrul Habib Chowdhury (sadrul): rlaager: while you are at it, there's a little mod to that patch: " gtkwin->drag_tab > page_num) " <-- ">" should be "<"
(14:04:49) Sadrul Habib Chowdhury (sadrul): (i forgot to test that for the vertical tabs)
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Tue, 16 Aug 2005 19:15:28 +0000 |
parents | ed5302df41b0 |
children | 421007f39e53 |
comparison
equal
deleted
inserted
replaced
11279:ed5302df41b0 | 11280:65658ff2deb8 |
---|---|
2114 gdk_window_get_origin(GTK_WIDGET(dest_notebook)->window, &nb_x, &nb_y); | 2114 gdk_window_get_origin(GTK_WIDGET(dest_notebook)->window, &nb_x, &nb_y); |
2115 | 2115 |
2116 arrow1_x = arrow2_x = nb_x; | 2116 arrow1_x = arrow2_x = nb_x; |
2117 arrow1_y = arrow2_y = nb_y; | 2117 arrow1_y = arrow2_y = nb_y; |
2118 | 2118 |
2119 page_num = gaim_gtkconv_get_dest_tab_at_xy(dest_win, | 2119 page_num = gaim_gtkconv_get_tab_at_xy(dest_win, |
2120 e->x_root, e->y_root); | 2120 e->x_root, e->y_root); |
2121 | 2121 |
2122 if (gtk_notebook_get_tab_pos(dest_notebook) == GTK_POS_TOP || | 2122 if (gtk_notebook_get_tab_pos(dest_notebook) == GTK_POS_TOP || |
2123 gtk_notebook_get_tab_pos(dest_notebook) == GTK_POS_BOTTOM) { | 2123 gtk_notebook_get_tab_pos(dest_notebook) == GTK_POS_BOTTOM) { |
2124 | 2124 |
2143 arrow1_x = nb_x + tab->allocation.x; | 2143 arrow1_x = nb_x + tab->allocation.x; |
2144 arrow2_x = nb_x + tab->allocation.x + | 2144 arrow2_x = nb_x + tab->allocation.x + |
2145 tab->allocation.width; | 2145 tab->allocation.width; |
2146 arrow1_y = arrow2_y = nb_y + tab->allocation.y + tab->allocation.height/2; | 2146 arrow1_y = arrow2_y = nb_y + tab->allocation.y + tab->allocation.height/2; |
2147 | 2147 |
2148 if ((gpointer)gtkwin == (gpointer)dest_win && gtkwin->drag_tab > page_num) { | 2148 if ((gpointer)gtkwin == (gpointer)dest_win && gtkwin->drag_tab < page_num) { |
2149 arrow1_y += tab->allocation.height; | 2149 arrow1_y += tab->allocation.height; |
2150 arrow2_y += tab->allocation.height; | 2150 arrow2_y += tab->allocation.height; |
2151 } | 2151 } |
2152 } | 2152 } |
2153 | 2153 |
2363 | 2363 |
2364 /* Get the destination notebook. */ | 2364 /* Get the destination notebook. */ |
2365 dest_notebook = GTK_NOTEBOOK(gtkwin->notebook); | 2365 dest_notebook = GTK_NOTEBOOK(gtkwin->notebook); |
2366 | 2366 |
2367 /* Get the destination page number. */ | 2367 /* Get the destination page number. */ |
2368 dest_page_num = gaim_gtkconv_get_dest_tab_at_xy(dest_win, | 2368 dest_page_num = gaim_gtkconv_get_tab_at_xy(dest_win, |
2369 e->x_root, e->y_root); | 2369 e->x_root, e->y_root); |
2370 | 2370 |
2371 if (win == dest_win) { | 2371 if (win == dest_win) { |
2372 gtk_notebook_reorder_child(GTK_NOTEBOOK(gtkwin->notebook), gtkconv->tab_cont, dest_page_num); | 2372 gtk_notebook_reorder_child(GTK_NOTEBOOK(gtkwin->notebook), gtkconv->tab_cont, dest_page_num); |
2373 } | 2373 } |
5927 } | 5927 } |
5928 | 5928 |
5929 return page_num; | 5929 return page_num; |
5930 } | 5930 } |
5931 | 5931 |
5932 int | |
5933 gaim_gtkconv_get_dest_tab_at_xy(GaimConvWindow *win, int x, int y) | |
5934 { | |
5935 return gaim_gtkconv_get_tab_at_xy(win, x, y); | |
5936 } | |
5937 | |
5938 static void | 5932 static void |
5939 close_on_tabs_pref_cb(const char *name, GaimPrefType type, gpointer value, | 5933 close_on_tabs_pref_cb(const char *name, GaimPrefType type, gpointer value, |
5940 gpointer data) | 5934 gpointer data) |
5941 { | 5935 { |
5942 GList *l; | 5936 GList *l; |