GNOME Bugzilla – Bug 537731
middle click in history view should open tab on button release, not press
Last modified: 2012-03-13 08:19:07 UTC
As per title. Performing actions on button release is the norm. I might submit a patch sometime soon but if somebody else wants to fix this then go right ahead. Actually, maybe this is good for GNOME love?
Confirming.
Created attachment 119267 [details] [review] node view middle click patch Please review this patch, thanks.
Created attachment 119449 [details] [review] slightly improved middle click patch After taking a second look, I improved a little on this patch. Since button_release_cb is no more drag&drop specific, I moved the handlers attachment to the constructor, and renamed the handler to reflect the change and to be consistent with ephy_node_view_button_press_cb. I hope I am doing it the right way :P
Thanks for the patch! (For further patches, please use diff -up with svn diff; see e.g. http://www.xenomai.org/index.php/Teaching_-p_to_svn_diff on how to do that. That makes reviewing patches easier.) gtk_tree_selection_select_path (selection, path); - } + + if (event->button == 2) + { + EphyNode *clicked_node; + + clicked_node = process_middle_click (path, view); + g_signal_emit (G_OBJECT (view), + ephy_node_view_signals[NODE_MIDDLE_CLICKED], 0, clicked_node); + } + } Shouldn't that be "else if (...)" here?
Created attachment 119622 [details] [review] middle click patch Thanks for the diff tip, I'll make sure my future patches are on this format. Regarding the if {} block, as far as I understand it shouldn't be else if {}, because it is not following another if (button = 1) block, it is inside an if ( button = 1or2 && other conditions) block which contains code for both buttons. I'm attaching another patch, the change is in 1 line and makes the middle mouse button consistent to the left button's behavior when having selected multiple links. BTW, I think I should point out that my patch as a side effect enables drag & drop for the middle mouse button, which if I'm not mistaken is the expected behavior for Gnome HIG applications.
Fixed as part of bug 671635.