[gtk/dnd-gestures-2: 77/100] droptarget: Drop the track-motion property
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/dnd-gestures-2: 77/100] droptarget: Drop the track-motion property
- Date: Mon, 6 Jan 2020 21:20:34 +0000 (UTC)
commit 1c2c90d8cfd98f685d69a5668ed5d800c2958b71
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 3ce1891627..4bed79bcfa 100644
--- a/gtk/gtkexpander.c
+++ b/gtk/gtkexpander.c
@@ -378,7 +378,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 a4f960ef9d..435934261a 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -1331,7 +1331,6 @@ gtk_notebook_init (GtkNotebook *notebook)
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);
g_signal_connect (dest, "notify::armed", G_CALLBACK (gtk_notebook_armed), 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 a48e9757c9..287aa9db44 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);
g_signal_connect_swapped (dest, "notify::armed", G_CALLBACK (gtk_stack_switcher_armed), switcher);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]