Hello community,
here is the log from the commit of package mozilla-xulrunner191 for openSUSE:Factory
checked in at Fri Aug 21 16:39:04 CEST 2009.
--------
--- mozilla-xulrunner191/mozilla-xulrunner191.changes 2009-08-09 09:16:01.000000000 +0200
+++ mozilla-xulrunner191/mozilla-xulrunner191.changes 2009-08-19 22:13:23.000000000 +0200
@@ -1,0 +2,6 @@
+Wed Aug 19 22:12:06 CEST 2009 - wr@rosenauer.org
+
+- remove obsolete code for protocol handlers (bmo#389732)
+ (mozilla-protocol_handler.patch)
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
New:
----
mozilla-protocol_handler.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ mozilla-xulrunner191.spec ++++++
--- /var/tmp/diff_new_pack.nAiC1M/_old 2009-08-21 16:38:34.000000000 +0200
+++ /var/tmp/diff_new_pack.nAiC1M/_new 2009-08-21 16:38:34.000000000 +0200
@@ -34,7 +34,7 @@
%endif
License: GPL v2 or later ; LGPL v2.1 or later ; MPL 1.1 or later
Version: 1.9.1.2
-Release: 2
+Release: 3
Summary: Mozilla Runtime Environment 1.9.1
Url: http://www.mozilla.org
Group: Productivity/Other
@@ -59,6 +59,7 @@
Patch8: mozilla-helper-app.patch
Patch9: mozilla-system-hunspell.patch.bz2
Patch10: mozilla-gtkfilepicker-buttonorder.patch
+Patch11: mozilla-protocol_handler.patch
Patch12: mozilla-prefer_plugin_pref.patch
Patch15: mozilla-pyxpcom.patch
# PATCH-FEATURE-SLED FATE#302023, FATE#302024 - hfiguiere@novell.com
@@ -194,6 +195,7 @@
%patch9
popd
%patch10 -p1
+%patch11 -p1
%patch12 -p1
%patch15
%patch16 -p1
++++++ mozilla-protocol_handler.patch ++++++
From: Wolfgang Rosenauer
Subject: Remove obsolete code which only confuses UI behaviour
References:
https://bugzilla.mozilla.org/show_bug.cgi?id=389732
https://bugzilla.mozilla.org/show_bug.cgi?id=480709
diff --git a/uriloader/exthandler/unix/nsOSHelperAppService.cpp b/uriloader/exthandler/unix/nsOSHelperAppService.cpp
--- a/uriloader/exthandler/unix/nsOSHelperAppService.cpp
+++ b/uriloader/exthandler/unix/nsOSHelperAppService.cpp
@@ -1199,97 +1199,28 @@ nsOSHelperAppService::GetHandlerAndDescr
rv = mailcap->ReadLine(cBuffer, &more);
} while (NS_SUCCEEDED(rv));
mailcapFile->Close();
return rv;
}
-/* Looks up the handler for a specific scheme from prefs and returns the
- * file representing it in aApp. Note: This function doesn't guarantee the
- * existance of *aApp.
- */
-nsresult
-nsOSHelperAppService::GetHandlerAppFromPrefs(const char* aScheme, /*out*/ nsIFile** aApp)
-{
- nsresult rv;
- nsCOMPtr<nsIPrefService> srv(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv));
- if (NS_FAILED(rv)) // we have no pref service... that's bad
- return rv;
-
- nsCOMPtr<nsIPrefBranch> branch;
- srv->GetBranch("network.protocol-handler.app.", getter_AddRefs(branch));
- if (!branch) // No protocol handlers set up -> can't load url
- return NS_ERROR_NOT_AVAILABLE;
-
- nsXPIDLCString appPath;
- rv = branch->GetCharPref(aScheme, getter_Copies(appPath));
- if (NS_FAILED(rv))
- return rv;
-
- LOG((" found app %s\n", appPath.get()));
-
- // First, try to treat |appPath| as absolute path, if it starts with '/'
- NS_ConvertUTF8toUTF16 utf16AppPath(appPath);
- if (appPath.First() == '/') {
- nsILocalFile* file;
- rv = NS_NewLocalFile(utf16AppPath, PR_TRUE, &file);
- *aApp = file;
- // If this worked, we are finished
- if (NS_SUCCEEDED(rv))
- return NS_OK;
- }
-
- // Second, check for a file in the mozilla app directory
- rv = NS_GetSpecialDirectory(NS_OS_CURRENT_PROCESS_DIR, aApp);
- if (NS_SUCCEEDED(rv)) {
- rv = (*aApp)->Append(utf16AppPath);
- if (NS_SUCCEEDED(rv)) {
- PRBool exists = PR_FALSE;
- rv = (*aApp)->Exists(&exists);
- if (NS_SUCCEEDED(rv) && exists)
- return NS_OK;
- }
- NS_RELEASE(*aApp);
- }
-
- // Thirdly, search the path
- return GetFileTokenForPath(utf16AppPath.get(), aApp);
-}
-
nsresult nsOSHelperAppService::OSProtocolHandlerExists(const char * aProtocolScheme, PRBool * aHandlerExists)
{
LOG(("-- nsOSHelperAppService::OSProtocolHandlerExists for '%s'\n",
aProtocolScheme));
*aHandlerExists = PR_FALSE;
- nsCOMPtr<nsIFile> app;
- nsresult rv = GetHandlerAppFromPrefs(aProtocolScheme, getter_AddRefs(app));
- if (NS_SUCCEEDED(rv)) {
- PRBool isExecutable = PR_FALSE, exists = PR_FALSE;
- nsresult rv1 = app->Exists(&exists);
- nsresult rv2 = app->IsExecutable(&isExecutable);
- *aHandlerExists = (NS_SUCCEEDED(rv1) && exists && NS_SUCCEEDED(rv2) && isExecutable);
- LOG((" handler exists: %s\n", *aHandlerExists ? "yes" : "no"));
- }
-
#ifdef MOZ_WIDGET_GTK2
// Check the GConf registry for a protocol handler
- if (!*aHandlerExists)
- *aHandlerExists = nsGNOMERegistry::HandlerExists(aProtocolScheme);
+ *aHandlerExists = nsGNOMERegistry::HandlerExists(aProtocolScheme);
#endif
return NS_OK;
}
NS_IMETHODIMP nsOSHelperAppService::GetApplicationDescription(const nsACString& aScheme, nsAString& _retval)
{
- nsCOMPtr<nsIFile> appFile;
- nsresult rv = GetHandlerAppFromPrefs(PromiseFlatCString(aScheme).get(),
- getter_AddRefs(appFile));
- if (NS_SUCCEEDED(rv))
- return appFile->GetLeafName(_retval);
-
#ifdef MOZ_WIDGET_GTK2
nsGNOMERegistry::GetAppDescForScheme(aScheme, _retval);
return _retval.IsEmpty() ? NS_ERROR_NOT_AVAILABLE : NS_OK;
#else
return NS_ERROR_NOT_AVAILABLE;
#endif
diff --git a/uriloader/exthandler/unix/nsOSHelperAppService.h b/uriloader/exthandler/unix/nsOSHelperAppService.h
--- a/uriloader/exthandler/unix/nsOSHelperAppService.h
+++ b/uriloader/exthandler/unix/nsOSHelperAppService.h
@@ -159,11 +159,9 @@ private:
const nsAString& aMajorType,
const nsAString& aMinorType,
nsHashtable& aTypeOptions,
nsAString& aHandler,
nsAString& aDescription,
nsAString& aMozillaFlags);
-
- nsresult GetHandlerAppFromPrefs(const char* aScheme, nsIFile** aApp);
};
#endif // nsOSHelperAppService_h__
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org