[gtk/dnd-gestures-2: 5/14] Drop gtk_drag_(un)highlight
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/dnd-gestures-2: 5/14] Drop gtk_drag_(un)highlight
- Date: Wed, 8 Jan 2020 21:37:12 +0000 (UTC)
commit 500ee357698e6d889695a3cb410d08407fc98aaf
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Jan 7 19:20:32 2020 -0500
Drop gtk_drag_(un)highlight
gtk/gtkdragdest.c | 36 ++----------------------------------
gtk/gtkdragdest.h | 6 ------
2 files changed, 2 insertions(+), 40 deletions(-)
---
diff --git a/gtk/gtkdragdest.c b/gtk/gtkdragdest.c
index 2bc6f77b38..41d7b7d117 100644
--- a/gtk/gtkdragdest.c
+++ b/gtk/gtkdragdest.c
@@ -596,9 +596,9 @@ gtk_drop_target_set_contains (GtkDropTarget *dest,
dest->contains = contains;
if (contains)
- gtk_drag_highlight (widget);
+ gtk_widget_set_state_flags (widget, GTK_STATE_FLAG_DROP_ACTIVE, FALSE);
else
- gtk_drag_unhighlight (widget);
+ gtk_widget_unset_state_flags (widget, GTK_STATE_FLAG_DROP_ACTIVE);
g_object_notify_by_pspec (G_OBJECT (dest), properties[PROP_CONTAINS]);
}
@@ -778,38 +778,6 @@ gtk_drop_target_unset_widget (GtkEventController *controller)
GTK_EVENT_CONTROLLER_CLASS (gtk_drop_target_parent_class)->unset_widget (controller);
}
-/**
- * gtk_drag_highlight: (method)
- * @widget: a widget to highlight
- *
- * Highlights a widget as a currently hovered drop target.
- * To end the highlight, call gtk_drag_unhighlight().
- *
- * GTK calls this automatically if %GTK_DEST_DEFAULT_HIGHLIGHT is set.
- */
-void
-gtk_drag_highlight (GtkWidget *widget)
-{
- g_return_if_fail (GTK_IS_WIDGET (widget));
-
- gtk_widget_set_state_flags (widget, GTK_STATE_FLAG_DROP_ACTIVE, FALSE);
-}
-
-/**
- * gtk_drag_unhighlight: (method)
- * @widget: a widget to remove the highlight from
- *
- * Removes a highlight set by gtk_drag_highlight() from a widget.
- */
-void
-gtk_drag_unhighlight (GtkWidget *widget)
-{
- g_return_if_fail (GTK_IS_WIDGET (widget));
-
- gtk_widget_unset_state_flags (widget, GTK_STATE_FLAG_DROP_ACTIVE);
-}
-
-
static void
gtk_drag_get_data_got_data (GObject *source,
GAsyncResult *result,
diff --git a/gtk/gtkdragdest.h b/gtk/gtkdragdest.h
index 37cd2ef89e..a7ba6a5291 100644
--- a/gtk/gtkdragdest.h
+++ b/gtk/gtkdragdest.h
@@ -86,12 +86,6 @@ GtkSelectionData *gtk_drop_target_read_selection_finish
GAsyncResult *result,
GError **error);
-GDK_AVAILABLE_IN_ALL
-void gtk_drag_highlight (GtkWidget *widget);
-
-GDK_AVAILABLE_IN_ALL
-void gtk_drag_unhighlight (GtkWidget *widget);
-
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]