diff --git a/ChangeLog b/ChangeLog index 9e66488c40..4bdb8e9455 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-09-08 Michael Natterer + + * app/widgets/gimpcontainergridview.c + * app/widgets/gimpcontainertreeview.c: allow to popup the context + menu from the views' empty area. Fixes bug #314719. + 2005-09-07 Michael Natterer * app/core/gimpchannel-combine.c (gimp_channel_combine_ellipse): diff --git a/app/widgets/gimpcontainergridview.c b/app/widgets/gimpcontainergridview.c index e5f9185a5d..a1b456dc8b 100644 --- a/app/widgets/gimpcontainergridview.c +++ b/app/widgets/gimpcontainergridview.c @@ -95,6 +95,9 @@ static void gimp_container_grid_view_highlight_item (GimpContainerView *v static void gimp_container_grid_view_viewport_resized (GtkWidget *widget, GtkAllocation *allocation, GimpContainerGridView *view); +static gboolean gimp_container_grid_view_button_press (GtkWidget *widget, + GdkEventButton *bevent, + GimpContainerGridView *view); static GimpContainerBoxClass *parent_class = NULL; @@ -213,6 +216,9 @@ gimp_container_grid_view_init (GimpContainerGridView *grid_view) g_signal_connect (grid_view->wrap_box->parent, "size-allocate", G_CALLBACK (gimp_container_grid_view_viewport_resized), grid_view); + g_signal_connect (grid_view->wrap_box->parent, "button-press-event", + G_CALLBACK (gimp_container_grid_view_button_press), + grid_view); GTK_WIDGET_SET_FLAGS (grid_view, GTK_CAN_FOCUS); } @@ -718,3 +724,21 @@ gimp_container_grid_view_viewport_resized (GtkWidget *widget, } } } + +static gboolean +gimp_container_grid_view_button_press (GtkWidget *widget, + GdkEventButton *bevent, + GimpContainerGridView *view) +{ + switch (bevent->button) + { + case 3: + gimp_editor_popup_menu (GIMP_EDITOR (view), NULL, NULL); + break; + + default: + break; + } + + return TRUE; +} diff --git a/app/widgets/gimpcontainertreeview.c b/app/widgets/gimpcontainertreeview.c index fb1b01f081..cdb102a29c 100644 --- a/app/widgets/gimpcontainertreeview.c +++ b/app/widgets/gimpcontainertreeview.c @@ -1057,6 +1057,18 @@ gimp_container_tree_view_button_press (GtkWidget *widget, gtk_tree_path_free (path); g_object_unref (renderer); } + else + { + switch (bevent->button) + { + case 3: + gimp_editor_popup_menu (GIMP_EDITOR (tree_view), NULL, NULL); + break; + + default: + break; + } + } return TRUE; }