Commit 7e34681f authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

app/widgets/gimpcontainergridview.c allow to popup the context menu from

2005-09-08  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpcontainergridview.c
	* app/widgets/gimpcontainertreeview.c: allow to popup the context
	menu from the views' empty area. Fixes bug #314719.
parent 0f37b516
2005-09-08 Michael Natterer <mitch@gimp.org>
* 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 <mitch@gimp.org>
* app/core/gimpchannel-combine.c (gimp_channel_combine_ellipse):
......
......@@ -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;
}
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment