Bug 879746 - Port GTK2 to GTK3 - uriloader fixes. r=karlt

This commit is contained in:
Martin Stransky 2013-06-10 08:36:26 -04:00
parent e349c33aac
commit 78d9b52f1a
5 changed files with 10 additions and 10 deletions

View File

@ -90,6 +90,6 @@ include $(topsrcdir)/config/config.mk
include $(topsrcdir)/ipc/chromium/chromium-config.mk
include $(topsrcdir)/config/rules.mk
ifneq (,$(filter qt gtk2, $(MOZ_WIDGET_TOOLKIT)))
ifneq (,$(filter qt gtk2 gtk3, $(MOZ_WIDGET_TOOLKIT)))
CXXFLAGS += $(TK_CFLAGS) $(MOZ_DBUS_GLIB_CFLAGS)
endif

View File

@ -71,7 +71,7 @@ else:
'nsOSHelperAppService.cpp',
]
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk2':
if CONFIG['MOZ_ENABLE_GTK']:
CPP_SOURCES += [
'nsGNOMERegistry.cpp',
'nsMIMEInfoUnix.cpp',

View File

@ -22,7 +22,7 @@ LIBS += \
include $(topsrcdir)/config/rules.mk
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
ifdef MOZ_WIDGET_GTK
export PERSONAL_MAILCAP=$(call core_abspath,$(srcdir))/mailcap
endif

View File

@ -13,7 +13,7 @@
#include "nsIGnomeVFSService.h"
#include "nsIGIOService.h"
#ifdef MOZ_WIDGET_GTK2
#ifdef MOZ_WIDGET_GTK
#include <glib.h>
#include <glib-object.h>
#endif

View File

@ -14,7 +14,7 @@
#include "nsOSHelperAppService.h"
#include "nsMIMEInfoUnix.h"
#ifdef MOZ_WIDGET_GTK2
#ifdef MOZ_WIDGET_GTK
#include "nsGNOMERegistry.h"
#endif
#include "nsISupports.h"
@ -1160,7 +1160,7 @@ nsresult nsOSHelperAppService::OSProtocolHandlerExists(const char * aProtocolSch
*aHandlerExists = true;
#endif
#ifdef MOZ_WIDGET_GTK2
#ifdef MOZ_WIDGET_GTK
// Check the GConf registry for a protocol handler
*aHandlerExists = nsGNOMERegistry::HandlerExists(aProtocolScheme);
#if (MOZ_PLATFORM_MAEMO == 5) && defined (MOZ_ENABLE_GNOMEVFS)
@ -1173,7 +1173,7 @@ nsresult nsOSHelperAppService::OSProtocolHandlerExists(const char * aProtocolSch
NS_IMETHODIMP nsOSHelperAppService::GetApplicationDescription(const nsACString& aScheme, nsAString& _retval)
{
#ifdef MOZ_WIDGET_GTK2
#ifdef MOZ_WIDGET_GTK
nsGNOMERegistry::GetAppDescForScheme(aScheme, _retval);
return _retval.IsEmpty() ? NS_ERROR_NOT_AVAILABLE : NS_OK;
#else
@ -1268,7 +1268,7 @@ nsOSHelperAppService::GetFromExtension(const nsCString& aFileExt) {
if (NS_FAILED(rv) || majorType.IsEmpty()) {
#ifdef MOZ_WIDGET_GTK2
#ifdef MOZ_WIDGET_GTK
LOG(("Looking in GNOME registry\n"));
nsRefPtr<nsMIMEInfoBase> gnomeInfo =
nsGNOMERegistry::GetFromExtension(aFileExt);
@ -1386,7 +1386,7 @@ nsOSHelperAppService::GetFromType(const nsCString& aMIMEType) {
NS_LossyConvertUTF16toASCII(handler).get(),
NS_LossyConvertUTF16toASCII(mailcap_description).get()));
#ifdef MOZ_WIDGET_GTK2
#ifdef MOZ_WIDGET_GTK
nsRefPtr<nsMIMEInfoBase> gnomeInfo;
if (handler.IsEmpty()) {
// No useful data yet. Check the GNOME registry. Unfortunately, newer
@ -1409,7 +1409,7 @@ nsOSHelperAppService::GetFromType(const nsCString& aMIMEType) {
extensions,
mime_types_description);
#ifdef MOZ_WIDGET_GTK2
#ifdef MOZ_WIDGET_GTK
if (gnomeInfo) {
LOG(("Got MIMEInfo from GNOME registry without extensions; setting them "
"to %s\n", NS_LossyConvertUTF16toASCII(extensions).get()));