droptarget: Drop the track-motion property

It does not have any effect anymore.

Update all callers
This commit is contained in:
Matthias Clasen 2020-01-05 17:27:26 -05:00
parent 46f42fc53d
commit 1262184269
5 changed files with 0 additions and 72 deletions

View File

@ -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)
{

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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));