command line, client-test: avoid "g_set_application_name not set" warning

When glib logging is invoked, it check the application name and complains
if not set:
** (process:10130): WARNING **: g_set_application_name not set.

With output redirection we hide this in the command line, but it
showed up in client-test when the system was in a state were another
glib WARNING was triggered.

This patch sets the unlocalized program name instead of using a
localized application name, because we don't have and don't need
localization for these two programs. That seems to satisfy glib.
This commit is contained in:
Patrick Ohly 2010-04-19 16:29:49 +02:00
parent f0e0c4c373
commit 443a3b5925
2 changed files with 2 additions and 0 deletions

View File

@ -477,6 +477,7 @@ public:
// this is required when using glib directly or indirectly
g_type_init();
g_thread_init(NULL);
g_set_prgname("client-test");
#endif
EDSAbiWrapperInit();
testClient.registerTests();

View File

@ -469,6 +469,7 @@ int main( int argc, char **argv )
// this is required when using glib directly or indirectly
g_type_init();
g_thread_init(NULL);
g_set_prgname("syncevolution");
#endif
setvbuf(stderr, NULL, _IONBF, 0);