[gtk+] Fix the docs for gtk_recent_info_get_application_info()



commit 362127c33c16b8626d4a4b8925bfb7b03bee0b6b
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Jun 15 17:22:58 2009 -0400

    Fix the docs for gtk_recent_info_get_application_info()
    
    The documentation for the function says that the app_exec string
    should be freed, but we return a pointer to the internal string
    without duplicating it. Since the app_exec string is valid as long
    as the GtkRecentInfo is valid the documentation should be fixed
    and the out argument should be constified. Fixes #584832.

 gtk/gtkrecentmanager.c |    7 ++++---
 gtk/gtkrecentmanager.h |    2 +-
 2 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkrecentmanager.c b/gtk/gtkrecentmanager.c
index 317b3d5..5cedaa0 100644
--- a/gtk/gtkrecentmanager.c
+++ b/gtk/gtkrecentmanager.c
@@ -1735,15 +1735,16 @@ recent_app_info_free (RecentAppInfo *app_info)
  * storage specification, they will be expanded.
  *
  * Return value: %TRUE if an application with @app_name has registered this
- *   resource inside the recently used list, or %FALSE otherwise.  You should
- *   free the returned command line using g_free().
+ *   resource inside the recently used list, or %FALSE otherwise. The
+ *   @app_exec string is owned by the #GtkRecentInfo and should not be
+ *   modified or freed
  *
  * Since: 2.10
  */
 gboolean
 gtk_recent_info_get_application_info (GtkRecentInfo  *info,
 				      const gchar    *app_name,
-				      gchar         **app_exec,
+				      const gchar   **app_exec,
 				      guint          *count,
 				      time_t         *time_)
 {
diff --git a/gtk/gtkrecentmanager.h b/gtk/gtkrecentmanager.h
index 4127e67..ccc6581 100644
--- a/gtk/gtkrecentmanager.h
+++ b/gtk/gtkrecentmanager.h
@@ -186,7 +186,7 @@ time_t                gtk_recent_info_get_visited          (GtkRecentInfo  *info
 gboolean              gtk_recent_info_get_private_hint     (GtkRecentInfo  *info);
 gboolean              gtk_recent_info_get_application_info (GtkRecentInfo  *info,
 							    const gchar    *app_name,
-							    gchar         **app_exec,
+							    const gchar   **app_exec,
 							    guint          *count,
 							    time_t         *time_);
 gchar **              gtk_recent_info_get_applications     (GtkRecentInfo  *info,



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