diff -Nru browser/components/preferences/advanced.xul browser/components-gil/preferences/advanced.xul --- browser/components/preferences/advanced.xul 2011-01-22 01:24:21.000000000 +0100 +++ browser/components-gil/preferences/advanced.xul 2011-01-26 07:42:03.000000000 +0100 @@ -194,10 +194,11 @@ #ifdef HAVE_SHELL_SERVICE +#ifdef MOZ_CRASHREPORTER - +#ifdef 0 +#endif #ifdef MOZ_CRASHREPORTER #endif +#endif diff -Nru browser/components/shell/src/nsGNOMEShellService.cpp browser/components-gil/shell/src/nsGNOMEShellService.cpp --- browser/components/shell/src/nsGNOMEShellService.cpp 2011-01-22 01:24:22.000000000 +0100 +++ browser/components-gil/shell/src/nsGNOMEShellService.cpp 2011-01-26 07:51:36.000000000 +0100 @@ -140,27 +140,21 @@ PRBool nsGNOMEShellService::KeyMatchesAppName(const char *aKeyValue) const { + nsCAutoString appName; - gchar *commandPath; if (mUseLocaleFilenames) { gchar *nativePath = g_filename_from_utf8(aKeyValue, -1, NULL, NULL, NULL); if (!nativePath) { NS_ERROR("Error converting path to filesystem encoding"); return PR_FALSE; } - - commandPath = g_find_program_in_path(nativePath); + appName.Assign(nativePath); g_free(nativePath); } else { - commandPath = g_find_program_in_path(aKeyValue); + appName.Assign(aKeyValue); } - - if (!commandPath) - return PR_FALSE; - - PRBool matches = mAppPath.Equals(commandPath); - g_free(commandPath); - return matches; + // Compare default browser command retrieved from gconf with MOZ_APP_NAME + return appName.EqualsLiteral(MOZ_APP_NAME); } NS_IMETHODIMP @@ -215,8 +209,8 @@ nsCOMPtr gconf = do_GetService(NS_GCONFSERVICE_CONTRACTID); if (gconf) { - nsCAutoString appKeyValue(mAppPath); - appKeyValue.Append(" \"%s\""); + nsCAutoString appKeyValue(MOZ_APP_NAME); + appKeyValue.Append(" %s"); for (unsigned int i = 0; i < NS_ARRAY_LENGTH(appProtocols); ++i) { if (appProtocols[i].essential || aClaimAllTypes) { gconf->SetAppForProtocol(nsDependentCString(appProtocols[i].name), diff -Nru browser/components/shell/src/nsGNOMEShellService.h browser/components-gil/shell/src/nsGNOMEShellService.h --- browser/components/shell/src/nsGNOMEShellService.h 2011-01-22 01:24:22.000000000 +0100 +++ browser/components-gil/shell/src/nsGNOMEShellService.h 2011-01-26 07:39:05.000000000 +0100 @@ -43,7 +43,7 @@ class nsGNOMEShellService : public nsIShellService { public: - nsGNOMEShellService() : mCheckedThisSession(PR_FALSE) { } + nsGNOMEShellService() : mCheckedThisSession(PR_TRUE) { } NS_DECL_ISUPPORTS NS_DECL_NSISHELLSERVICE