gui/sidebar: Start editing on a double-middle click

A single middle click could happen by accident, especially if the user
has a touchpad.  A double click is more likely to be deliberate.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This commit is contained in:
Anna Schumaker 2017-08-29 09:38:31 -04:00
parent 8b17962b4e
commit a7280356c8
1 changed files with 2 additions and 1 deletions

View File

@ -162,7 +162,8 @@ bool __gui_sidebar_button_press(GtkTreeView *treeview, GdkEventButton *event,
GtkTreeIter iter, child;
GtkTreePath *path;
if (event->button != GDK_BUTTON_MIDDLE)
if (event->type != GDK_2BUTTON_PRESS ||
event->button != GDK_BUTTON_MIDDLE)
return false;
if (!gtk_tree_view_get_path_at_pos(treeview, event->x, event->y,
&path, NULL, NULL, NULL))