g_set_prgname("<unknown>") if argc is 0 as well, instead of leaving it

Fri Aug  1 15:06:25 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdk.c (gdk_parse_args): g_set_prgname("<unknown>")
        if argc is 0 as well, instead of leaving it unset.
        (#116023, Michael Meeks)
This commit is contained in:
Owen Taylor 2003-08-01 19:28:19 +00:00 committed by Owen Taylor
parent f47431b226
commit 4fbca22e4a
6 changed files with 41 additions and 11 deletions

View File

@ -1,3 +1,9 @@
Fri Aug 1 15:06:25 2003 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_parse_args): g_set_prgname("<unknown>")
if argc is 0 as well, instead of leaving it unset.
(#116023, Michael Meeks)
Thu Jul 31 23:09:02 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c (gtk_toolbar_class_init): make show_arrow

View File

@ -1,3 +1,9 @@
Fri Aug 1 15:06:25 2003 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_parse_args): g_set_prgname("<unknown>")
if argc is 0 as well, instead of leaving it unset.
(#116023, Michael Meeks)
Thu Jul 31 23:09:02 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c (gtk_toolbar_class_init): make show_arrow

View File

@ -1,3 +1,9 @@
Fri Aug 1 15:06:25 2003 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_parse_args): g_set_prgname("<unknown>")
if argc is 0 as well, instead of leaving it unset.
(#116023, Michael Meeks)
Thu Jul 31 23:09:02 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c (gtk_toolbar_class_init): make show_arrow

View File

@ -1,3 +1,9 @@
Fri Aug 1 15:06:25 2003 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_parse_args): g_set_prgname("<unknown>")
if argc is 0 as well, instead of leaving it unset.
(#116023, Michael Meeks)
Thu Jul 31 23:09:02 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c (gtk_toolbar_class_init): make show_arrow

View File

@ -1,3 +1,9 @@
Fri Aug 1 15:06:25 2003 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_parse_args): g_set_prgname("<unknown>")
if argc is 0 as well, instead of leaving it unset.
(#116023, Michael Meeks)
Thu Jul 31 23:09:02 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c (gtk_toolbar_class_init): make show_arrow

View File

@ -103,7 +103,6 @@ gdk_arg_context_parse (GdkArgContext *context, gint *argc, gchar ***argv)
{
int i, j, k;
/* Save a copy of the original argc and argv */
if (argc && argv)
{
for (i = 1; i < *argc; i++)
@ -294,6 +293,7 @@ gdk_parse_args (int *argc,
gdk_initialized = TRUE;
/* Save a copy of the original argc and argv */
if (argc && argv)
{
gdk_argc = *argc;
@ -302,17 +302,17 @@ gdk_parse_args (int *argc,
for (i = 0; i < gdk_argc; i++)
gdk_argv[i] = g_strdup ((*argv)[i]);
gdk_argv[gdk_argc] = NULL;
}
if (*argc > 0)
{
gchar *d;
d = strrchr((*argv)[0], G_DIR_SEPARATOR);
if (d != NULL)
g_set_prgname (d + 1);
else
g_set_prgname ((*argv)[0]);
}
if (argc && argv && *argc > 0)
{
gchar *d;
d = strrchr((*argv)[0], G_DIR_SEPARATOR);
if (d != NULL)
g_set_prgname (d + 1);
else
g_set_prgname ((*argv)[0]);
}
else
{