Add gimp_button_event_triggers_context_menu() and use it

instead of checking for event->button == 3, so context menus
work correctly on the Mac. Didn't change the image menu yet
because thet requires some more refactoring.
This commit is contained in:
Michael Natterer
2011-09-19 00:45:36 +02:00
parent f8a2644b13
commit d92cd2f6c8
19 changed files with 124 additions and 114 deletions

View File

@ -724,18 +724,13 @@ gimp_container_grid_view_viewport_resized (GtkWidget *widget,
}
static gboolean
gimp_container_grid_view_button_press (GtkWidget *widget,
GdkEventButton *bevent,
GimpContainerGridView *grid_view)
gimp_container_grid_view_button_press (GtkWidget *widget,
GdkEventButton *bevent,
GimpContainerGridView *grid_view)
{
switch (bevent->button)
if (gimp_button_event_triggers_context_menu (bevent))
{
case 3:
gimp_editor_popup_menu (GIMP_EDITOR (grid_view), NULL, NULL);
break;
default:
break;
}
return TRUE;