mirror of https://github.com/GNOME/gimp.git
plug-ins/common/animationplay.c plug-ins/common/colormap-remap.c popup the
2006-06-22 Sven Neumann <sven@gimp.org> * plug-ins/common/animationplay.c * plug-ins/common/colormap-remap.c * plug-ins/helpbrowser/dialog.c: popup the menu on Shift-F10.
This commit is contained in:
parent
f7afa614e9
commit
559da590cc
|
@ -1,6 +1,8 @@
|
|||
2006-06-22 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* plug-ins/common/colormap-remap.c: popup the menu on Shift-F10.
|
||||
* plug-ins/common/animationplay.c
|
||||
* plug-ins/common/colormap-remap.c
|
||||
* plug-ins/helpbrowser/dialog.c: popup the menu on Shift-F10.
|
||||
|
||||
2006-06-22 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
|
|
|
@ -228,21 +228,26 @@ reshape_from_bitmap (const gchar *bitmap)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
menu_popup (GtkWidget *widget,
|
||||
popup_menu (GtkWidget *widget,
|
||||
GdkEventButton *event)
|
||||
{
|
||||
GtkWidget *menu = gtk_ui_manager_get_widget (ui_manager, "/anim-play-popup");
|
||||
|
||||
gtk_menu_set_screen (GTK_MENU (menu), gtk_widget_get_screen (widget));
|
||||
gtk_menu_popup (GTK_MENU (menu),
|
||||
NULL, NULL, NULL, NULL,
|
||||
event ? event->button : 0,
|
||||
event ? event->time : gtk_get_current_event_time ());
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
button_press (GtkWidget *widget,
|
||||
GdkEventButton *event)
|
||||
{
|
||||
if (event->button == 3 && event->type == GDK_BUTTON_PRESS)
|
||||
{
|
||||
GtkWidget *menu = gtk_ui_manager_get_widget (ui_manager,
|
||||
"/anim-play-popup");
|
||||
|
||||
gtk_menu_set_screen (GTK_MENU (menu), gtk_widget_get_screen (widget));
|
||||
gtk_menu_popup (GTK_MENU (menu),
|
||||
NULL, NULL, NULL, NULL,
|
||||
event->button, event->time);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
return popup_menu (widget, event);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -251,7 +256,7 @@ static gboolean
|
|||
shape_pressed (GtkWidget *widget,
|
||||
GdkEventButton *event)
|
||||
{
|
||||
if (menu_popup (widget, event))
|
||||
if (button_press (widget, event))
|
||||
return TRUE;
|
||||
|
||||
/* ignore double and triple click */
|
||||
|
@ -551,6 +556,9 @@ build_dialog (GimpImageBaseType basetype,
|
|||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (window_destroy),
|
||||
NULL);
|
||||
g_signal_connect (window, "popup-menu",
|
||||
G_CALLBACK (popup_menu),
|
||||
NULL);
|
||||
|
||||
gimp_help_connect (window, gimp_standard_help_func, PLUG_IN_PROC, NULL);
|
||||
|
||||
|
@ -586,7 +594,7 @@ build_dialog (GimpImageBaseType basetype,
|
|||
gtk_widget_show (drawing_area);
|
||||
|
||||
g_signal_connect (drawing_area, "button-press-event",
|
||||
G_CALLBACK (menu_popup),
|
||||
G_CALLBACK (button_press),
|
||||
NULL);
|
||||
|
||||
progress = gtk_progress_bar_new ();
|
||||
|
|
|
@ -565,18 +565,19 @@ remap_hints_new (void)
|
|||
return hbox;
|
||||
}
|
||||
|
||||
static void
|
||||
static gboolean
|
||||
remap_popup_menu (GtkWidget *widget,
|
||||
GdkEventButton *event)
|
||||
{
|
||||
GtkWidget *menu = gtk_ui_manager_get_widget (remap_ui, "/remap-popup");
|
||||
|
||||
gtk_menu_set_screen (GTK_MENU (menu), gtk_widget_get_screen (widget));
|
||||
|
||||
gtk_menu_popup (GTK_MENU (menu),
|
||||
NULL, NULL, NULL, NULL,
|
||||
event ? event->button : 0,
|
||||
event ? event->time : gtk_get_current_event_time ());
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@ -584,7 +585,7 @@ remap_button_press (GtkWidget *widget,
|
|||
GdkEventButton *event)
|
||||
{
|
||||
if (event->button == 3 && event->type == GDK_BUTTON_PRESS)
|
||||
remap_popup_menu (widget, event);
|
||||
return remap_popup_menu (widget, event);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -105,6 +105,8 @@ static void drag_data_get (GtkWidget *widget,
|
|||
gpointer data);
|
||||
static void view_realize (GtkWidget *widget);
|
||||
static void view_unrealize (GtkWidget *widget);
|
||||
static gboolean view_popup_menu (GtkWidget *widget,
|
||||
GdkEventButton *event);
|
||||
static gboolean view_button_press (GtkWidget *widget,
|
||||
GdkEventButton *event);
|
||||
|
||||
|
@ -315,6 +317,9 @@ browser_dialog_open (void)
|
|||
G_CALLBACK (view_unrealize),
|
||||
NULL);
|
||||
|
||||
g_signal_connect (html, "popup-menu",
|
||||
G_CALLBACK (view_popup_menu),
|
||||
NULL);
|
||||
g_signal_connect (html, "button-press-event",
|
||||
G_CALLBACK (view_button_press),
|
||||
NULL);
|
||||
|
@ -801,22 +806,28 @@ view_unrealize (GtkWidget *widget)
|
|||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
view_popup_menu (GtkWidget *widget,
|
||||
GdkEventButton *event)
|
||||
{
|
||||
GtkWidget *menu = gtk_ui_manager_get_widget (ui_manager,
|
||||
"/help-browser-popup");
|
||||
|
||||
gtk_menu_set_screen (GTK_MENU (menu), gtk_widget_get_screen (widget));
|
||||
gtk_menu_popup (GTK_MENU (menu),
|
||||
NULL, NULL, NULL, NULL,
|
||||
event ? event->button : 0,
|
||||
event ? event->time : gtk_get_current_event_time ());
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
view_button_press (GtkWidget *widget,
|
||||
GdkEventButton *event)
|
||||
{
|
||||
gtk_widget_grab_focus (widget);
|
||||
|
||||
if (event->button == 3 && event->type == GDK_BUTTON_PRESS)
|
||||
{
|
||||
GtkWidget *menu = gtk_ui_manager_get_widget (ui_manager,
|
||||
"/help-browser-popup");
|
||||
|
||||
gtk_menu_set_screen (GTK_MENU (menu), gtk_widget_get_screen (widget));
|
||||
gtk_menu_popup (GTK_MENU (menu),
|
||||
NULL, NULL, NULL, NULL,
|
||||
event->button, event->time);
|
||||
}
|
||||
return view_popup_menu (widget, event);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue