[gtk/dnd-gestures-2: 23/30] dragsource: Rename ::drag-failed to ::drag-cancel



commit 284425e68140933d6e159ef923f02874c75906e6
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Jan 6 20:29:42 2020 -0500

    dragsource: Rename ::drag-failed to ::drag-cancel
    
    This matches the names of the GdkDrag signals.

 gtk/gtkdragsource.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtkdragsource.c b/gtk/gtkdragsource.c
index af58913e73..10d5fe7555 100644
--- a/gtk/gtkdragsource.c
+++ b/gtk/gtkdragsource.c
@@ -115,7 +115,7 @@ enum {
   PREPARE,
   DRAG_BEGIN,
   DRAG_END,
-  DRAG_FAILED,
+  DRAG_CANCEL,
   NUM_SIGNALS
 };
 
@@ -368,20 +368,20 @@ gtk_drag_source_class_init (GtkDragSourceClass *class)
                     G_TYPE_BOOLEAN);
 
   /**
-   * GtkDragSource::drag-failed:
+   * GtkDragSource::drag-cancel:
    * @source: the #GtkDragSource
    * @drag: the #GtkDrag object
    * @reason: information on why the drag failed
    *
-   * The ::drag-failed signal is emitted on the drag source when a drag has
+   * The ::drag-cancel signal is emitted on the drag source when a drag has
    * failed. The signal handler may handle a failed drag operation based on
    * the type of error. It should return %TRUE if the failure has been handled
-   * and the default "drag operation failed" should not be shown.
+   * and the default "drag operation failed" animation should not be shown.
    *
    * Returns: %TRUE if the failed drag operation has been already handled
    */
-  signals[DRAG_FAILED] =
-      g_signal_new (I_("drag-failed"),
+  signals[DRAG_CANCEL] =
+      g_signal_new (I_("drag-cancel"),
                     G_TYPE_FROM_CLASS (class),
                     G_SIGNAL_RUN_LAST,
                     0,
@@ -434,7 +434,7 @@ gtk_drag_source_cancel_cb (GdkDrag             *drag,
 {
   gboolean success = FALSE;
 
-  g_signal_emit (source, signals[DRAG_FAILED], 0, source->drag, reason, &success);
+  g_signal_emit (source, signals[DRAG_CANCEL], 0, source->drag, reason, &success);
   drag_end (source, FALSE);
 }
 
@@ -677,7 +677,7 @@ gtk_drag_source_drag_cancel (GtkDragSource *source)
     {
       gboolean success = FALSE;
 
-      g_signal_emit (source, signals[DRAG_FAILED], 0, source->drag, GDK_DRAG_CANCEL_ERROR, &success);
+      g_signal_emit (source, signals[DRAG_CANCEL], 0, source->drag, GDK_DRAG_CANCEL_ERROR, &success);
 
       gdk_drag_drop_done (source->drag, success);
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]