From debbdb7ce7818beb9d73aafa6b261db4d7c9aa4f Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 7 Jun 2017 20:57:24 +0200 Subject: [PATCH] docs: The program name is also set by g_application_run https://bugzilla.gnome.org/show_bug.cgi?id=783524 --- glib/gutils.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/glib/gutils.c b/glib/gutils.c index 5f98e6e3d..70b08b6e1 100644 --- a/glib/gutils.c +++ b/glib/gutils.c @@ -1003,9 +1003,11 @@ static gchar *g_prgname = NULL; * Gets the name of the program. This name should not be localized, * in contrast to g_get_application_name(). * - * If you are using GDK or GTK+ the program name is set in gdk_init(), - * which is called by gtk_init(). The program name is found by taking - * the last component of @argv[0]. + * If you are using #GApplication the program name is set in + * g_application_run(). In case of GDK or GTK+ it is set in + * gdk_init(), which is called by gtk_init() and the + * #GtkApplication::startup handler. The program name is found by + * taking the last component of @argv[0]. * * Returns: the name of the program. The returned string belongs * to GLib and must not be modified or freed. @@ -1052,6 +1054,12 @@ g_get_prgname (void) * Sets the name of the program. This name should not be localized, * in contrast to g_set_application_name(). * + * If you are using #GApplication the program name is set in + * g_application_run(). In case of GDK or GTK+ it is set in + * gdk_init(), which is called by gtk_init() and the + * #GtkApplication::startup handler. The program name is found by + * taking the last component of @argv[0]. + * * Note that for thread-safety reasons this function can only be called once. */ void