Bug 776325 - Set gtk program name to the one defined in application.ini. r=karlt,a=lsblakk
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 09 Aug 2012 16:34:26 +0200
changeset 100483 59e1040773a10069029ccf282837fdcef3d28cbe
parent 100482 bd0b4c2ac18e557637e2a0a03c4eb0f9b51121d1
child 100484 3b33a689e63d2486d09ee79893c742cbaa0fc972
push id1265
push usermh@glandium.org
push dateMon, 13 Aug 2012 07:00:22 +0000
treeherdermozilla-beta@59e1040773a1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskarlt, lsblakk
bugs776325
milestone15.0
Bug 776325 - Set gtk program name to the one defined in application.ini. r=karlt,a=lsblakk
toolkit/xre/nsAppRunner.cpp
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -3209,16 +3209,23 @@ XREMain::XRE_mainStartup(bool* aExitFlag
 #if defined(MOZ_WIDGET_GTK2)
   // setup for private colormap.  Ideally we'd like to do this
   // in nsAppShell::Create, but we need to get in before gtk
   // has been initialized to make sure everything is running
   // consistently.
   if (CheckArg("install"))
     gdk_rgb_set_install(TRUE);
 
+  // Set program name to the one defined in application.ini.
+  {
+    nsCAutoString program(gAppData->name);
+    ToLowerCase(program);
+    g_set_prgname(program.get());
+  }
+
   // Initialize GTK here for splash.
 
   // Open the display ourselves instead of using gtk_init, so that we can
   // close it without fear that one day gtk might clean up the display it
   // opens.
   if (!gtk_parse_args(&gArgc, &gArgv))
     return 1;