mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
Bug 879746 - Port GTK2 to GTK3 - uriloader fixes. r=karlt
This commit is contained in:
parent
e349c33aac
commit
78d9b52f1a
@ -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
|
||||
|
@ -71,7 +71,7 @@ else:
|
||||
'nsOSHelperAppService.cpp',
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk2':
|
||||
if CONFIG['MOZ_ENABLE_GTK']:
|
||||
CPP_SOURCES += [
|
||||
'nsGNOMERegistry.cpp',
|
||||
'nsMIMEInfoUnix.cpp',
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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()));
|
||||
|
Loading…
Reference in New Issue
Block a user