Tue, 18 Jul 2017 15:18:31 -0500
Don't needlessly call g_set_prgname()
GOptionContext internally calls g_set_prgname() using the basename
of argv[0] if no prgname has been set. Therefore we don't need to
set it unless it's something other than argv[0]. This patch removes
the redundant calls.
| finch/finch.c | file | annotate | diff | comparison | revisions | |
| pidgin/pidgin.c | file | annotate | diff | comparison | revisions |
--- a/finch/finch.c Tue Jul 18 14:55:38 2017 -0500 +++ b/finch/finch.c Tue Jul 18 15:18:31 2017 -0500 @@ -32,7 +32,6 @@ signal(SIGPIPE, SIG_IGN); #endif - g_set_prgname("Finch"); g_set_application_name(_("Finch")); if (finch_start(&argc, &argv)) {
--- a/pidgin/pidgin.c Tue Jul 18 14:55:38 2017 -0500 +++ b/pidgin/pidgin.c Tue Jul 18 15:18:31 2017 -0500 @@ -40,7 +40,9 @@ /* This is for UI testing purposes only, don't use it! */ test_prgname = g_getenv("PIDGIN_TEST_PRGNAME"); - g_set_prgname(test_prgname ? test_prgname : "Pidgin"); + if (test_prgname != NULL) + g_set_prgname(test_prgname); + g_set_application_name(PIDGIN_NAME); #ifdef _WIN32