Thu, 31 May 2007 00:47:24 +0000
Only auto-expand buddies when the mouse is hovering over the middle third of the buddy. This prevents un-intended expanding of buddies when you're only trying to re-order. Fixes #608
| pidgin/gtkblist.c | file | annotate | diff | comparison | revisions |
--- a/pidgin/gtkblist.c Wed May 30 22:47:51 2007 +0000 +++ b/pidgin/gtkblist.c Thu May 31 00:47:24 2007 +0000 @@ -2721,6 +2721,7 @@ { GtkTreePath *path; int delay; + GdkRectangle rect; /* * When dragging a buddy into a contact, this is the delay before @@ -2736,7 +2737,17 @@ } gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(tv), x, y, &path, NULL, NULL, NULL); - gtk_tree_view_get_cell_area(GTK_TREE_VIEW(tv), path, NULL, >kblist->tip_rect); + gtk_tree_view_get_cell_area(GTK_TREE_VIEW(tv), path, NULL, &rect); + + /* Only autoexpand when in the middle of the cell to avoid annoying un-intended expands */ + if (y < rect.y + (rect.height / 3) || + y > rect.y + (2 * (rect.height /3))) + return FALSE; + + rect.height = rect.height / 3; + rect.y += rect.height; + + gtkblist->tip_rect = rect; if (path) gtk_tree_path_free(path);