gapplication: never set the prgname to the app id
authorLars Uebernickel <lars.uebernickel@canonical.com>
Wed, 4 Feb 2015 10:01:41 +0000 (11:01 +0100)
committerLars Uebernickel <lars.uebernickel@canonical.com>
Tue, 17 Feb 2015 18:09:47 +0000 (19:09 +0100)
commitfcb30409ec7f5d2903f5f944c8b0b52fdffaab12
tree197586bd3e7990ab075dfa8a45f5a823275ec5ff
parent62f7ea8191bbfd05f40abee2af0146fb8a193362
gapplication: never set the prgname to the app id

GApplication set the prgname to the application's id when it was running
in service mode. This broke with the addition of new --app-id option,
because g_set_prgname() was called before parsing the options. Calling
it after option parsing doesn't work, because GOptionContext sets
prgname to argv[0] unconditionally.

Instead of changing the semantics of GOptionContext, simply remove this
functionality from GApplication. It is very unusual to have the prgname
set to the app id instead of the binary's name and might confuse people
when looking at logs etc.

When overriding local_command_line() from a subclass,
g_option_context_parse() might never be invokded. Thus, continue setting
the prgname to argv[0] in GApplication.

https://bugzilla.gnome.org/show_bug.cgi?id=743933
gio/gapplication.c