Commit c8888faf authored by Matt Wilson's avatar Matt Wilson

app/channels_dialog.c Modified event handlers to bring up the popup menu

	* app/channels_dialog.c
	* app/layers_dialog.c: Modified event handlers to bring up the
	popup menu anywhere on layer/channel widget
--Matt
parent e9b670ef
Thu Apr 30 02:08:23 EDT 1998 Matthew Wilson <msw@gimp.org>
* app/channels_dialog.c
* app/layers_dialog.c: Modified event handlers to bring up the
popup menu anywhere on layer/channel widget
Wed Apr 29 22:29:16 PDT 1998 Manish Singh <yosh@gimp.org>
* app/app_procs.c: make splash screen honor gtkrc
......
......@@ -1134,6 +1134,7 @@ channel_widget_button_events (GtkWidget *widget,
static int exclusive;
ChannelWidget *channel_widget;
GtkWidget *event_widget;
GdkEventButton *bevent;
gint return_val;
int visible;
int width, height;
......@@ -1165,6 +1166,13 @@ channel_widget_button_events (GtkWidget *widget,
case GDK_BUTTON_PRESS:
return_val = TRUE;
bevent = (GdkEventButton *) event;
if (bevent->button == 3) {
gtk_menu_popup (GTK_MENU (channelsD->ops_menu), NULL, NULL, NULL, NULL, 3, bevent->time);
return TRUE;
}
button_down = 1;
click_widget = widget;
gtk_grab_add (click_widget);
......@@ -1249,6 +1257,7 @@ channel_widget_preview_events (GtkWidget *widget,
GdkEvent *event)
{
GdkEventExpose *eevent;
GdkEventButton *bevent;
ChannelWidget *channel_widget;
int valid;
......@@ -1256,6 +1265,16 @@ channel_widget_preview_events (GtkWidget *widget,
switch (event->type)
{
case GDK_BUTTON_PRESS:
bevent = (GdkEventButton *) event;
if (bevent->button == 3) {
gtk_menu_popup (GTK_MENU (channelsD->ops_menu), NULL, NULL, NULL, NULL, 3, bevent->time);
return TRUE;
}
break;
case GDK_EXPOSE:
if (!preview_size)
channel_widget_no_preview_redraw (channel_widget);
......
......@@ -1134,6 +1134,7 @@ channel_widget_button_events (GtkWidget *widget,
static int exclusive;
ChannelWidget *channel_widget;
GtkWidget *event_widget;
GdkEventButton *bevent;
gint return_val;
int visible;
int width, height;
......@@ -1165,6 +1166,13 @@ channel_widget_button_events (GtkWidget *widget,
case GDK_BUTTON_PRESS:
return_val = TRUE;
bevent = (GdkEventButton *) event;
if (bevent->button == 3) {
gtk_menu_popup (GTK_MENU (channelsD->ops_menu), NULL, NULL, NULL, NULL, 3, bevent->time);
return TRUE;
}
button_down = 1;
click_widget = widget;
gtk_grab_add (click_widget);
......@@ -1249,6 +1257,7 @@ channel_widget_preview_events (GtkWidget *widget,
GdkEvent *event)
{
GdkEventExpose *eevent;
GdkEventButton *bevent;
ChannelWidget *channel_widget;
int valid;
......@@ -1256,6 +1265,16 @@ channel_widget_preview_events (GtkWidget *widget,
switch (event->type)
{
case GDK_BUTTON_PRESS:
bevent = (GdkEventButton *) event;
if (bevent->button == 3) {
gtk_menu_popup (GTK_MENU (channelsD->ops_menu), NULL, NULL, NULL, NULL, 3, bevent->time);
return TRUE;
}
break;
case GDK_EXPOSE:
if (!preview_size)
channel_widget_no_preview_redraw (channel_widget);
......
......@@ -2074,6 +2074,7 @@ layer_widget_button_events (GtkWidget *widget,
static int exclusive;
LayerWidget *layer_widget;
GtkWidget *event_widget;
GdkEventButton *bevent;
gint return_val;
layer_widget = (LayerWidget *) gtk_object_get_user_data (GTK_OBJECT (widget));
......@@ -2093,10 +2094,17 @@ layer_widget_button_events (GtkWidget *widget,
case GDK_BUTTON_PRESS:
return_val = TRUE;
bevent = (GdkEventButton *) event;
if (bevent->button == 3) {
gtk_menu_popup (GTK_MENU (layersD->ops_menu), NULL, NULL, NULL, NULL, 3, bevent->time);
return TRUE;
}
button_down = 1;
click_widget = widget;
gtk_grab_add (click_widget);
if (widget == layer_widget->eye_widget)
{
old_state = GIMP_DRAWABLE(layer_widget->layer)->visible;
......@@ -2193,6 +2201,7 @@ layer_widget_preview_events (GtkWidget *widget,
{
GdkEventExpose *eevent;
GdkPixmap **pixmap;
GdkEventButton *bevent;
LayerWidget *layer_widget;
int valid;
int preview_type;
......@@ -2229,6 +2238,13 @@ layer_widget_preview_events (GtkWidget *widget,
{
case GDK_BUTTON_PRESS:
/* Control-button press disables the application of the mask */
bevent = (GdkEventButton *) event;
if (bevent->button == 3) {
gtk_menu_popup (GTK_MENU (layersD->ops_menu), NULL, NULL, NULL, NULL, 3, bevent->time);
return TRUE;
}
if (event->button.state & GDK_CONTROL_MASK)
{
if (preview_type == MASK_PREVIEW)
......
......@@ -2074,6 +2074,7 @@ layer_widget_button_events (GtkWidget *widget,
static int exclusive;
LayerWidget *layer_widget;
GtkWidget *event_widget;
GdkEventButton *bevent;
gint return_val;
layer_widget = (LayerWidget *) gtk_object_get_user_data (GTK_OBJECT (widget));
......@@ -2093,10 +2094,17 @@ layer_widget_button_events (GtkWidget *widget,
case GDK_BUTTON_PRESS:
return_val = TRUE;
bevent = (GdkEventButton *) event;
if (bevent->button == 3) {
gtk_menu_popup (GTK_MENU (layersD->ops_menu), NULL, NULL, NULL, NULL, 3, bevent->time);
return TRUE;
}
button_down = 1;
click_widget = widget;
gtk_grab_add (click_widget);
if (widget == layer_widget->eye_widget)
{
old_state = GIMP_DRAWABLE(layer_widget->layer)->visible;
......@@ -2193,6 +2201,7 @@ layer_widget_preview_events (GtkWidget *widget,
{
GdkEventExpose *eevent;
GdkPixmap **pixmap;
GdkEventButton *bevent;
LayerWidget *layer_widget;
int valid;
int preview_type;
......@@ -2229,6 +2238,13 @@ layer_widget_preview_events (GtkWidget *widget,
{
case GDK_BUTTON_PRESS:
/* Control-button press disables the application of the mask */
bevent = (GdkEventButton *) event;
if (bevent->button == 3) {
gtk_menu_popup (GTK_MENU (layersD->ops_menu), NULL, NULL, NULL, NULL, 3, bevent->time);
return TRUE;
}
if (event->button.state & GDK_CONTROL_MASK)
{
if (preview_type == MASK_PREVIEW)
......
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