[glib/wip/gapplication] [GApplication] Fix a few typos, add _get_application_description



commit ea49e393e1f6a56ae8f3ff389b86b7f7140edc9b
Author: Colin Walters <walters verbum org>
Date:   Tue May 18 10:31:08 2010 -0400

    [GApplication] Fix a few typos, add _get_application_description

 gio/gapplication.c |   30 +++++++++++++++++++++++++++---
 1 files changed, 27 insertions(+), 3 deletions(-)
---
diff --git a/gio/gapplication.c b/gio/gapplication.c
index e41d53d..44c851a 100644
--- a/gio/gapplication.c
+++ b/gio/gapplication.c
@@ -495,8 +495,8 @@ g_application_list_actions (GApplication *application)
  * Sets whether the action @name inside @application should be enabled
  * or disabled.
  *
- * Invoking disabled actions will not result in the #GApplication::changed
- * signal being emitted
+ * Invoking a disabled action will not result in the #GApplication::action
+ * signal being emitted.
  *
  * Since: 2.26
  */
@@ -522,6 +522,30 @@ g_application_set_action_enabled (GApplication *application,
   queue_actions_change_notification (application);
 }
 
+
+/**
+ * g_application_get_action_description:
+ * @application: a #GApplication
+ * @name: Action name
+ * 
+ * Returns: Description for the given action named @name
+ */
+void
+g_application_get_action_description (GApplication *application,
+				      const char *name)
+{
+  GApplicationAction *action;
+  
+  g_return_if_fail (G_IS_APPLICATION (application));
+  g_return_if_fail (name != NULL);
+
+  action = g_hash_table_lookup (application->priv->actions, name);
+  g_return_if_fail (action != NULL);
+
+  return action->description;
+}
+
+
 /**
  * g_application_get_action_enabled:
  * @application: a #GApplication
@@ -772,7 +796,7 @@ g_application_class_init (GApplicationClass *klass)
                                    PROP_APPID,
                                    g_param_spec_string ("appid",
                                                         P_("Application ID"),
-                                                        P_("Platform-specific identifer for this application"),
+                                                        P_("Platform-specific identifier for this application"),
                                                         NULL,
                                                         G_PARAM_READWRITE |
                                                         G_PARAM_CONSTRUCT_ONLY |



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