[gtk/dnd-gestures-2: 76/175] droptarget: Drop the track-motion property
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/dnd-gestures-2: 76/175] droptarget: Drop the track-motion property
- Date: Wed, 8 Jan 2020 16:44:13 +0000 (UTC)
commit 54ebcd72461e3d71628c4c65ec6ed039c3e54e3b
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Jan 5 17:27:26 2020 -0500
droptarget: Drop the track-motion property
It does not have any effect anymore.
Update all callers
gtk/gtkdragdest.c | 63 --------------------------------------------------
gtk/gtkdragdest.h | 6 -----
gtk/gtkexpander.c | 1 -
gtk/gtknotebook.c | 1 -
gtk/gtkstackswitcher.c | 1 -
5 files changed, 72 deletions(-)
---
diff --git a/gtk/gtkdragdest.c b/gtk/gtkdragdest.c
index dcaa9f160d..62d2647a85 100644
--- a/gtk/gtkdragdest.c
+++ b/gtk/gtkdragdest.c
@@ -58,7 +58,6 @@ struct _GtkDropTarget
GtkWidget *widget;
GdkDrop *drop;
- gboolean track_motion;
gboolean armed;
gboolean armed_pending;
};
@@ -75,7 +74,6 @@ struct _GtkDropTargetClass
enum {
PROP_FORMATS = 1,
PROP_ACTIONS,
- PROP_TRACK_MOTION,
PROP_ARMED,
NUM_PROPERTIES
};
@@ -131,10 +129,6 @@ gtk_drop_target_set_property (GObject *object,
gtk_drop_target_set_actions (dest, g_value_get_flags (value));
break;
- case PROP_TRACK_MOTION:
- gtk_drop_target_set_track_motion (dest, g_value_get_boolean (value));
- break;
-
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
@@ -158,10 +152,6 @@ gtk_drop_target_get_property (GObject *object,
g_value_set_flags (value, gtk_drop_target_get_actions (dest));
break;
- case PROP_TRACK_MOTION:
- g_value_set_boolean (value, gtk_drop_target_get_track_motion (dest));
- break;
-
case PROP_ARMED:
g_value_set_boolean (value, gtk_drop_target_get_armed (dest));
break;
@@ -202,17 +192,6 @@ gtk_drop_target_class_init (GtkDropTargetClass *class)
GDK_TYPE_DRAG_ACTION, 0,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY);
- /**
- * GtkDropTarget:track-motion:
- *
- * Whether the drop target should emit #GtkDropTarget::drag-motion signals
- * unconditionally
- */
- properties[PROP_TRACK_MOTION] =
- g_param_spec_boolean ("track-motion", P_("Track motion"), P_("Track motion"),
- FALSE,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY);
-
/**
* GtkDropTarget:armmed:
*
@@ -427,48 +406,6 @@ gtk_drop_target_get_actions (GtkDropTarget *dest)
return dest->actions;
}
-/**
- * gtk_drop_target_set_track_motion:
- * @dest: a #GtkDropTarget
- * @track_motion: whether to accept all targets
- *
- * Tells the drop target to emit #GtkDropTarget::drag-motion and
- * #GtkDropTarget::drag-leave events regardless of the targets and
- * the %GTK_DEST_DEFAULT_MOTION flag.
- *
- * This may be used when a drop target wants to do generic
- * actions regardless of the targets that the source offers.
- */
-void
-gtk_drop_target_set_track_motion (GtkDropTarget *dest,
- gboolean track_motion)
-{
- g_return_if_fail (GTK_IS_DROP_TARGET (dest));
-
- if (dest->track_motion == track_motion)
- return;
-
- dest->track_motion = track_motion;
-
- g_object_notify_by_pspec (G_OBJECT (dest), properties[PROP_TRACK_MOTION]);
-}
-
-/**
- * gtk_drop_target_get_track_motion:
- * @dest: a #GtkDropTarget
- *
- * Gets the value of the #GtkDropTarget::track-motion property.
- *
- * Returns: whether to accept all targets
- */
-gboolean
-gtk_drop_target_get_track_motion (GtkDropTarget *dest)
-{
- g_return_val_if_fail (GTK_IS_DROP_TARGET (dest), FALSE);
-
- return dest->track_motion;
-}
-
static void
gtk_drag_dest_realized (GtkWidget *widget)
{
diff --git a/gtk/gtkdragdest.h b/gtk/gtkdragdest.h
index dae74edff1..267600b4b5 100644
--- a/gtk/gtkdragdest.h
+++ b/gtk/gtkdragdest.h
@@ -68,12 +68,6 @@ void gtk_drop_target_set_actions (GtkDropTarget *dest,
GDK_AVAILABLE_IN_ALL
GdkDragAction gtk_drop_target_get_actions (GtkDropTarget *dest);
-GDK_AVAILABLE_IN_ALL
-void gtk_drop_target_set_track_motion (GtkDropTarget *dest,
- gboolean track_motion);
-GDK_AVAILABLE_IN_ALL
-gboolean gtk_drop_target_get_track_motion (GtkDropTarget *dest);
-
GDK_AVAILABLE_IN_ALL
void gtk_drop_target_attach (GtkDropTarget *dest,
GtkWidget *widget);
diff --git a/gtk/gtkexpander.c b/gtk/gtkexpander.c
index e4322fb202..5528c8416e 100644
--- a/gtk/gtkexpander.c
+++ b/gtk/gtkexpander.c
@@ -376,7 +376,6 @@ gtk_expander_init (GtkExpander *expander)
formats = gdk_content_formats_new (NULL, 0);
dest = gtk_drop_target_new (formats, 0);
- gtk_drop_target_set_track_motion (dest, TRUE);
gdk_content_formats_unref (formats);
g_signal_connect (dest, "drag-motion", G_CALLBACK (gtk_expander_drag_motion), expander);
g_signal_connect (dest, "drag-leave", G_CALLBACK (gtk_expander_drag_leave), expander);
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 7eb521c6fe..c1eda8ea3e 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -1329,7 +1329,6 @@ gtk_notebook_init (GtkNotebook *notebook)
g_signal_connect (dest, "drag-motion", G_CALLBACK (gtk_notebook_drag_motion), NULL);
g_signal_connect (dest, "drag-leave", G_CALLBACK (gtk_notebook_drag_leave), NULL);
g_signal_connect (dest, "drag-drop", G_CALLBACK (gtk_notebook_drag_drop), NULL);
- gtk_drop_target_set_track_motion (dest, TRUE);
gtk_drop_target_attach (dest, GTK_WIDGET (notebook));
gdk_content_formats_unref (targets);
diff --git a/gtk/gtkstackswitcher.c b/gtk/gtkstackswitcher.c
index 708477988f..b3688ab4d4 100644
--- a/gtk/gtkstackswitcher.c
+++ b/gtk/gtkstackswitcher.c
@@ -118,7 +118,6 @@ gtk_stack_switcher_init (GtkStackSwitcher *switcher)
formats = gdk_content_formats_new (NULL, 0);
dest = gtk_drop_target_new (formats, 0);
gdk_content_formats_unref (formats);
- gtk_drop_target_set_track_motion (dest, TRUE);
g_signal_connect (dest, "drag-leave", G_CALLBACK (gtk_stack_switcher_drag_leave), switcher);
g_signal_connect (dest, "drag-motion", G_CALLBACK (gtk_stack_switcher_drag_motion), switcher);
gtk_drop_target_attach (dest, GTK_WIDGET (switcher));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]