[gnome-builder] libide/tweaks: add ide_tweaks_item_get_id()



commit 3f920ec74374b92ded3a9fca6c941f9720372676
Author: Christian Hergert <chergert redhat com>
Date:   Tue Aug 2 12:54:09 2022 -0700

    libide/tweaks: add ide_tweaks_item_get_id()
    
    This is a getter which basically maps to the same GtkBuildable
    gtk_buildable_get_buildable_id(). Useful as it maps to the property.

 src/libide/tweaks/ide-tweaks-item.c | 10 ++++++++++
 src/libide/tweaks/ide-tweaks-item.h |  2 ++
 2 files changed, 12 insertions(+)
---
diff --git a/src/libide/tweaks/ide-tweaks-item.c b/src/libide/tweaks/ide-tweaks-item.c
index 74c1206b4..adb27f302 100644
--- a/src/libide/tweaks/ide-tweaks-item.c
+++ b/src/libide/tweaks/ide-tweaks-item.c
@@ -174,6 +174,16 @@ ide_tweaks_item_accepts (IdeTweaksItem *self,
   return FALSE;
 }
 
+const char *
+ide_tweaks_item_get_id (IdeTweaksItem *self)
+{
+  IdeTweaksItemPrivate *priv = ide_tweaks_item_get_instance_private (self);
+
+  g_return_val_if_fail (IDE_IS_TWEAKS_ITEM (self), NULL);
+
+  return priv->id;
+}
+
 const char * const *
 ide_tweaks_item_get_keywords (IdeTweaksItem *self)
 {
diff --git a/src/libide/tweaks/ide-tweaks-item.h b/src/libide/tweaks/ide-tweaks-item.h
index 0335d29ff..83a4de6a9 100644
--- a/src/libide/tweaks/ide-tweaks-item.h
+++ b/src/libide/tweaks/ide-tweaks-item.h
@@ -41,6 +41,8 @@ struct _IdeTweaksItemClass
                        IdeTweaksItem *child);
 };
 
+IDE_AVAILABLE_IN_ALL
+const char *        ide_tweaks_item_get_id               (IdeTweaksItem      *self);
 IDE_AVAILABLE_IN_ALL
 const char * const *ide_tweaks_item_get_keywords         (IdeTweaksItem      *self);
 IDE_AVAILABLE_IN_ALL


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