[gnome-builder/wip/gtk4-port] libide/core: add helper to get action state



commit fb182243333e1eb9a68040b75d943278b8b23e8d
Author: Christian Hergert <chergert redhat com>
Date:   Fri May 27 11:13:34 2022 -0700

    libide/core: add helper to get action state

 src/libide/core/ide-action-group.h | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/src/libide/core/ide-action-group.h b/src/libide/core/ide-action-group.h
index 97cc3e398..d60c63af4 100644
--- a/src/libide/core/ide-action-group.h
+++ b/src/libide/core/ide-action-group.h
@@ -96,6 +96,15 @@ _##prefix##_get_action_info (GActionGroup *group,
   return info;                                                                    \
 }                                                                                 \
                                                                                   \
+static inline GVariant *                                                          \
+prefix##_get_action_state (Type *self,                                            \
+                           const gchar *name)                                     \
+{                                                                                 \
+  Type##ActionInfo *info = _##prefix##_get_action_info (G_ACTION_GROUP (self),    \
+                                                        name);                    \
+  return info->state;                                                             \
+}                                                                                 \
+                                                                                  \
 static inline void                                                                \
 prefix##_set_action_state (Type *self,                                            \
                            const gchar *name,                                     \


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