[gtk/wip/ebassi/shortcut: 5/5] Fix mismatch between header and documentation



commit 797fe29e45251d63d1fc7df2cdf6bd5a944c20ff
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Thu Feb 6 18:33:44 2020 +0000

    Fix mismatch between header and documentation

 gtk/gtkshortcuttrigger.c | 25 ++++++++++++-------------
 gtk/gtkshortcuttrigger.h | 10 +++++-----
 2 files changed, 17 insertions(+), 18 deletions(-)
---
diff --git a/gtk/gtkshortcuttrigger.c b/gtk/gtkshortcuttrigger.c
index d57f526e94..d74f4fcbd4 100644
--- a/gtk/gtkshortcuttrigger.c
+++ b/gtk/gtkshortcuttrigger.c
@@ -107,25 +107,25 @@ gtk_shortcut_trigger_new (const GtkShortcutTriggerClass *trigger_class)
 
 /**
  * gtk_shortcut_trigger_ref:
- * @trigger: a #GtkShortcutTrigger
+ * @self: a #GtkShortcutTrigger
  *
  * Acquires a reference on the given #GtkShortcutTrigger.
  *
  * Returns: (transfer full): the #GtkShortcutTrigger with an additional reference
  */
 GtkShortcutTrigger *
-gtk_shortcut_trigger_ref (GtkShortcutTrigger *trigger)
+gtk_shortcut_trigger_ref (GtkShortcutTrigger *self)
 {
-  g_return_val_if_fail (GTK_IS_SHORTCUT_TRIGGER (trigger), NULL);
+  g_return_val_if_fail (GTK_IS_SHORTCUT_TRIGGER (self), NULL);
 
-  g_atomic_ref_count_inc (&trigger->ref_count);
+  g_atomic_ref_count_inc (&self->ref_count);
 
-  return trigger;
+  return self;
 }
 
 /**
  * gtk_shortcut_trigger_unref:
- * @trigger: (transfer full): a #GtkShortcutTrigger
+ * @self: (transfer full): a #GtkShortcutTrigger
  *
  * Releases a reference on the given #GtkShortcutTrigger.
  *
@@ -133,12 +133,12 @@ gtk_shortcut_trigger_ref (GtkShortcutTrigger *trigger)
  * freed.
  */
 void
-gtk_shortcut_trigger_unref (GtkShortcutTrigger *trigger)
+gtk_shortcut_trigger_unref (GtkShortcutTrigger *self)
 {
-  g_return_if_fail (GTK_IS_SHORTCUT_TRIGGER (trigger));
+  g_return_if_fail (GTK_IS_SHORTCUT_TRIGGER (self));
 
-  if (g_atomic_ref_count_dec (&trigger->ref_count))
-    gtk_shortcut_trigger_finalize (trigger);
+  if (g_atomic_ref_count_dec (&self->ref_count))
+    gtk_shortcut_trigger_finalize (self);
 }
 
 /**
@@ -938,7 +938,7 @@ gtk_alternative_trigger_new (GtkShortcutTrigger *first,
 
 /**
  * gtk_alternative_trigger_get_first:
- * @self: an alternative #GtkShortcutTrigger
+ * @trigger: an alternative #GtkShortcutTrigger
  *
  * Gets the first of the 2 alternative triggers that may trigger @self.
  * gtk_alternative_trigger_get_second() will return the other one.
@@ -957,7 +957,7 @@ gtk_alternative_trigger_get_first (GtkShortcutTrigger *trigger)
 
 /**
  * gtk_alternative_trigger_get_second:
- * @self: an alternative #GtkShortcutTrigger
+ * @trigger: an alternative #GtkShortcutTrigger
  *
  * Gets the second of the 2 alternative triggers that may trigger @self.
  * gtk_alternative_trigger_get_first() will return the other one.
@@ -973,4 +973,3 @@ gtk_alternative_trigger_get_second (GtkShortcutTrigger *trigger)
 
   return self->second;
 }
-
diff --git a/gtk/gtkshortcuttrigger.h b/gtk/gtkshortcuttrigger.h
index 79a7542b71..f15159e88d 100644
--- a/gtk/gtkshortcuttrigger.h
+++ b/gtk/gtkshortcuttrigger.h
@@ -99,18 +99,18 @@ GDK_AVAILABLE_IN_ALL
 GtkShortcutTrigger *    gtk_keyval_trigger_new                  (guint               keyval,
                                                                  GdkModifierType     modifiers);
 GDK_AVAILABLE_IN_ALL
-GdkModifierType         gtk_keyval_trigger_get_modifiers        (GtkShortcutTrigger *self);
+GdkModifierType         gtk_keyval_trigger_get_modifiers        (GtkShortcutTrigger *trigger);
 GDK_AVAILABLE_IN_ALL
-guint                   gtk_keyval_trigger_get_keyval           (GtkShortcutTrigger *self);
+guint                   gtk_keyval_trigger_get_keyval           (GtkShortcutTrigger *trigger);
 
 GDK_AVAILABLE_IN_ALL
 GtkShortcutTrigger *    gtk_mnemonic_trigger_new                (guint               keyval);
 GDK_AVAILABLE_IN_ALL
-guint                   gtk_mnemonic_trigger_get_keyval         (GtkShortcutTrigger *self);
+guint                   gtk_mnemonic_trigger_get_keyval         (GtkShortcutTrigger *trigger);
 
 GDK_AVAILABLE_IN_ALL
-GtkShortcutTrigger *    gtk_alternative_trigger_new             (GtkShortcutTrigger *one,
-                                                                 GtkShortcutTrigger *two);
+GtkShortcutTrigger *    gtk_alternative_trigger_new             (GtkShortcutTrigger *first,
+                                                                 GtkShortcutTrigger *second);
 GDK_AVAILABLE_IN_ALL
 GtkShortcutTrigger *    gtk_alternative_trigger_get_first       (GtkShortcutTrigger *trigger);
 GDK_AVAILABLE_IN_ALL


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