Skip to content
  • Lars Uebernickel's avatar
    gapplication: never set the prgname to the app id · fcb30409
    Lars Uebernickel authored
    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
    fcb30409