diff -up mozilla-beta/browser/components/preferences/advanced.xul.default mozilla-beta/browser/components/preferences/advanced.xul --- mozilla-beta/browser/components/preferences/advanced.xul.default 2012-01-24 08:59:48.000000000 +0100 +++ mozilla-beta/browser/components/preferences/advanced.xul 2012-01-29 15:22:47.239735643 +0100 @@ -76,7 +76,7 @@ #endif <preference id="layout.spellcheckDefault" name="layout.spellcheckDefault" type="int"/> -#ifdef HAVE_SHELL_SERVICE +#ifdef 0 <preference id="browser.shell.checkDefaultBrowser" name="browser.shell.checkDefaultBrowser" type="bool"/> @@ -100,7 +100,7 @@ type="bool"/> <!-- Update tab --> -#ifdef MOZ_UPDATER +#ifdef 0 <preference id="app.update.enabled" name="app.update.enabled" type="bool"/> <preference id="app.update.auto" name="app.update.auto" type="bool"/> <preference id="app.update.mode" name="app.update.mode" type="int"/> @@ -131,7 +131,7 @@ type="bool"/> </preferences> -#ifdef HAVE_SHELL_SERVICE +#ifdef 0 <stringbundle id="bundleShell" src="chrome://browser/locale/shellservice.properties"/> <stringbundle id="bundleBrand" src="chrome://branding/locale/brand.properties"/> #endif @@ -199,7 +199,7 @@ <groupbox id="systemDefaultsGroup" orient="vertical"> <caption label="&systemDefaults.label;"/> -#ifdef HAVE_SHELL_SERVICE +#ifdef 0 <hbox id="checkDefaultBox" align="center" flex="1"> <checkbox id="alwaysCheckDefault" preference="browser.shell.checkDefaultBrowser" label="&alwaysCheckDefault.label;" accesskey="&alwaysCheckDefault.accesskey;" diff -up mozilla-beta/browser/components/shell/src/Makefile.in.default mozilla-beta/browser/components/shell/src/Makefile.in --- mozilla-beta/browser/components/shell/src/Makefile.in.default 2012-01-24 08:59:48.000000000 +0100 +++ mozilla-beta/browser/components/shell/src/Makefile.in 2012-01-29 15:22:47.239735643 +0100 @@ -66,7 +66,7 @@ ifdef CPPSRCS LIBRARY_NAME = shellservice_s endif -EXTRA_COMPONENTS = nsSetDefaultBrowser.js nsSetDefaultBrowser.manifest +#EXTRA_COMPONENTS = nsSetDefaultBrowser.js nsSetDefaultBrowser.manifest include $(topsrcdir)/config/rules.mk diff -up mozilla-beta/browser/components/shell/src/nsGNOMEShellService.cpp.default mozilla-beta/browser/components/shell/src/nsGNOMEShellService.cpp --- mozilla-beta/browser/components/shell/src/nsGNOMEShellService.cpp.default 2012-01-24 08:59:48.000000000 +0100 +++ mozilla-beta/browser/components/shell/src/nsGNOMEShellService.cpp 2012-01-29 15:33:33.993123665 +0100 @@ -184,8 +184,8 @@ nsGNOMEShellService::GetAppPathFromLaunc bool 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) { @@ -193,17 +193,13 @@ nsGNOMEShellService::KeyMatchesAppName(c return 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 false; - - bool matches = mAppPath.Equals(commandPath); - g_free(commandPath); + bool matches = mAppPath.Equals(appName); return matches; } @@ -286,17 +282,8 @@ nsGNOMEShellService::SetDefaultBrowser(b nsCOMPtr<nsIGConfService> gconf = do_GetService(NS_GCONFSERVICE_CONTRACTID); nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID); - if (gconf) { - nsCAutoString appKeyValue; - if (mAppIsInPath) { - // mAppPath is in the users path, so use only the basename as the launcher - gchar *tmp = g_path_get_basename(mAppPath.get()); - appKeyValue = tmp; - g_free(tmp); - } else { - appKeyValue = mAppPath; - } - + if (gconf) { + nsCAutoString appKeyValue(MOZ_APP_NAME); appKeyValue.AppendLiteral(" %s"); for (unsigned int i = 0; i < ArrayLength(appProtocols); ++i) { diff -up mozilla-beta/browser/components/shell/src/nsGNOMEShellService.h.default mozilla-beta/browser/components/shell/src/nsGNOMEShellService.h --- mozilla-beta/browser/components/shell/src/nsGNOMEShellService.h.default 2012-01-24 08:59:48.000000000 +0100 +++ mozilla-beta/browser/components/shell/src/nsGNOMEShellService.h 2012-01-29 15:22:47.242735631 +0100 @@ -43,7 +43,7 @@ class nsGNOMEShellService : public nsIShellService { public: - nsGNOMEShellService() : mCheckedThisSession(false), mAppIsInPath(false) { } + nsGNOMEShellService() : mCheckedThisSession(true), mAppIsInPath(true) { } NS_DECL_ISUPPORTS NS_DECL_NSISHELLSERVICE