[gtk/wip/matthiasc/shortcut-4: 114/147] gtk-demo: Stop emitting ::popup-menu
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/matthiasc/shortcut-4: 114/147] gtk-demo: Stop emitting ::popup-menu
- Date: Wed, 25 Mar 2020 22:58:25 +0000 (UTC)
commit 7d183af13b08f5f0ec36a361dc8f40e3efd73409
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Mar 18 22:40:13 2020 -0400
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]