From 98011e6273f9b41c0677446ad49518e95720dc8a Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 18 Mar 2020 22:40:13 -0400 Subject: [PATCH] gtk-demo: Stop emitting ::popup-menu The signal was not used anyway, in the font explorer demo. --- demos/gtk-demo/fontplane.c | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/demos/gtk-demo/fontplane.c b/demos/gtk-demo/fontplane.c index b7b07cb7ad..1f7e074adb 100644 --- a/demos/gtk-demo/fontplane.c +++ b/demos/gtk-demo/fontplane.c @@ -140,17 +140,6 @@ update_value (GtkFontPlane *plane, gtk_widget_queue_draw (widget); } -static void -hold_action (GtkGestureLongPress *gesture, - gdouble x, - gdouble y, - GtkFontPlane *plane) -{ - gboolean handled; - - g_signal_emit_by_name (plane, "popup-menu", &handled); -} - static void plane_drag_gesture_begin (GtkGestureDrag *gesture, gdouble start_x, @@ -161,13 +150,6 @@ plane_drag_gesture_begin (GtkGestureDrag *gesture, button = gtk_gesture_single_get_current_button (GTK_GESTURE_SINGLE (gesture)); - if (button == GDK_BUTTON_SECONDARY) - { - gboolean handled; - - g_signal_emit_by_name (plane, "popup-menu", &handled); - } - if (button != GDK_BUTTON_PRIMARY) { gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_DENIED); @@ -218,13 +200,6 @@ gtk_font_plane_init (GtkFontPlane *plane) G_CALLBACK (plane_drag_gesture_end), plane); gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (gesture), 0); gtk_widget_add_controller (GTK_WIDGET (plane), GTK_EVENT_CONTROLLER (gesture)); - - gesture = gtk_gesture_long_press_new (); - g_signal_connect (gesture, "pressed", - G_CALLBACK (hold_action), plane); - gtk_gesture_single_set_touch_only (GTK_GESTURE_SINGLE (gesture), - TRUE); - gtk_widget_add_controller (GTK_WIDGET (plane), GTK_EVENT_CONTROLLER (gesture)); } static void