summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-01-05 17:27:26 -0500
committerMatthias Clasen <mclasen@redhat.com>2020-01-08 18:48:20 -0500
commit1262184269b58c8bea0d8b49fa077279daa8b481 (patch)
tree72ce6e772e098ccf7395d570ab6d4a9e5b5aaf68 /gtk
parent46f42fc53d62569282c539c3b5d325b2a8d0e63b (diff)
downloadgtk+-1262184269b58c8bea0d8b49fa077279daa8b481.tar.gz
droptarget: Drop the track-motion property
It does not have any effect anymore. Update all callers
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkdragdest.c63
-rw-r--r--gtk/gtkdragdest.h6
-rw-r--r--gtk/gtkexpander.c1
-rw-r--r--gtk/gtknotebook.c1
-rw-r--r--gtk/gtkstackswitcher.c1
5 files changed, 0 insertions, 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;
@@ -203,17 +193,6 @@ gtk_drop_target_class_init (GtkDropTargetClass *class)
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:
*
* Whether the drop target is currently the targed of an ongoing drag operation,
@@ -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
@@ -69,12 +69,6 @@ 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);
GDK_AVAILABLE_IN_ALL
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));