[glib] GApplication: Add an action example



commit 78407a00983d2fb70a94e00639408c80a58772b7
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Oct 31 20:49:53 2010 -0400

    GApplication: Add an action example

 gio/gapplication.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/gio/gapplication.c b/gio/gapplication.c
index 4ca811c..6be6036 100644
--- a/gio/gapplication.c
+++ b/gio/gapplication.c
@@ -69,6 +69,11 @@
  * The use count can be changed using g_application_hold() and
  * g_application_release(). If it drops to zero, the application exits.
  *
+ * GApplication also implements the #GActionGroup interface and lets you
+ * easily export actions by adding them with g_application_set_action_group().
+ * When invoking an action by calling g_action_group_activate_action() on
+ * the application, it is always invoked in the primary instance.
+ *
  * <example id="gapplication-example-open"><title>Opening files with a GApplication</title>
  * <programlisting>
  * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; parse="text" href="../../../../gio/tests/gapplication-example-open.c">
@@ -76,6 +81,14 @@
  * </xi:include>
  * </programlisting>
  * </example>
+ *
+ * <example id="gapplication-example-actions"><title>A GApplication with actions</title>
+ * <programlisting>
+ * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; parse="text" href="../../../../gio/tests/gapplication-example-actions.c">
+ *   <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
+ * </xi:include>
+ * </programlisting>
+ * </example>
  */
 
 struct _GApplicationPrivate



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