SOURCES: galeon-xulappinfo.patch (NEW) - fill XULAppInfo with proper data, ...
hawk
hawk at pld-linux.org
Thu Jul 31 11:05:44 CEST 2008
Author: hawk Date: Thu Jul 31 09:05:44 2008 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- fill XULAppInfo with proper data, fixes UA string, ported from Epiphany
---- Files affected:
SOURCES:
galeon-xulappinfo.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/galeon-xulappinfo.patch
diff -u /dev/null SOURCES/galeon-xulappinfo.patch:1.1
--- /dev/null Thu Jul 31 11:05:45 2008
+++ SOURCES/galeon-xulappinfo.patch Thu Jul 31 11:05:39 2008
@@ -0,0 +1,257 @@
+diff -urN galeon-2.0.6.orig/configure.in galeon-2.0.6/configure.in
+--- galeon-2.0.6.orig/configure.in 2008-07-25 14:30:47.000000000 +0200
++++ galeon-2.0.6/configure.in 2008-07-31 11:00:51.000000000 +0200
+@@ -7,6 +7,13 @@
+ AM_CONFIG_HEADER(config.h)
+ AC_CONFIG_SRCDIR(configure.in)
+
++AC_CANONICAL_HOST
++AC_DEFINE_UNQUOTED([EPHY_HOST],["$host"],[The host])
++AC_DEFINE_UNQUOTED([EPHY_HOST_CPU],["$host_cpu"],[The host CPU type])
++AC_DEFINE_UNQUOTED([EPHY_HOST_VENDOR],["$host_vendor"],[The host vendor])
++AC_DEFINE_UNQUOTED([EPHY_HOST_OS],["$host_os"],[The host OS])
++AC_DEFINE_UNQUOTED([EPHY_BUILD_ID],["$(TZ=UTC0 date +'%Y%m%d')"],[The build date])
++
+ AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
+
+ dnl put the ACLOCAL flags in the Makefile
+diff -urN galeon-2.0.6.orig/mozilla/EphyXULAppInfo.cpp galeon-2.0.6/mozilla/EphyXULAppInfo.cpp
+--- galeon-2.0.6.orig/mozilla/EphyXULAppInfo.cpp 1970-01-01 01:00:00.000000000 +0100
++++ galeon-2.0.6/mozilla/EphyXULAppInfo.cpp 2008-05-18 15:52:06.000000000 +0200
+@@ -0,0 +1,130 @@
++/*
++ * Copyright © 2008 Christian Persch
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2, or (at your option)
++ * any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
++ */
++
++#include "mozilla-config.h"
++#include "config.h"
++
++#include <nsStringGlue.h>
++
++#include "EphyXULAppInfo.h"
++
++NS_IMPL_ISUPPORTS2 (EphyXULAppInfo, nsIXULRuntime, nsIXULAppInfo)
++
++EphyXULAppInfo::EphyXULAppInfo ()
++ : mLogConsoleErrors (PR_TRUE)
++{
++}
++
++EphyXULAppInfo::~EphyXULAppInfo ()
++{
++}
++
++/* readonly attribute ACString vendor; */
++NS_IMETHODIMP
++EphyXULAppInfo::GetVendor(nsACString & aVendor)
++{
++ aVendor.Assign ("GNOME");
++ return NS_OK;
++}
++
++/* readonly attribute ACString name; */
++NS_IMETHODIMP
++EphyXULAppInfo::GetName(nsACString & aName)
++{
++ aName.Assign ("GNOME Web Browser");
++ return NS_OK;
++}
++
++/* readonly attribute ACString ID; */
++NS_IMETHODIMP
++EphyXULAppInfo::GetID(nsACString & aID)
++{
++ aID.Assign ("{8cbd4d83-3182-4d7e-9889-a8d77bf1f205}");
++ return NS_OK;
++}
++
++/* readonly attribute ACString version; */
++NS_IMETHODIMP
++EphyXULAppInfo::GetVersion(nsACString & aVersion)
++{
++ aVersion.Assign (VERSION);
++ return NS_OK;
++}
++
++/* readonly attribute ACString appBuildID; */
++NS_IMETHODIMP
++EphyXULAppInfo::GetAppBuildID(nsACString & aAppBuildID)
++{
++ aAppBuildID.Assign (EPHY_BUILD_ID);
++ return NS_OK;
++}
++
++/* readonly attribute ACString platformVersion; */
++NS_IMETHODIMP
++EphyXULAppInfo::GetPlatformVersion(nsACString & aPlatformVersion)
++{
++ aPlatformVersion.Assign ("1.9");
++ return NS_OK;
++}
++
++/* readonly attribute ACString platformBuildID; */
++NS_IMETHODIMP
++EphyXULAppInfo::GetPlatformBuildID(nsACString & aPlatformBuildID)
++{
++ aPlatformBuildID.Assign (EPHY_BUILD_ID);
++ return NS_OK;
++}
++
++/* readonly attribute boolean inSafeMode; */
++NS_IMETHODIMP
++EphyXULAppInfo::GetInSafeMode(PRBool *aInSafeMode)
++{
++ *aInSafeMode = PR_FALSE;
++ return NS_OK;
++}
++
++/* attribute boolean logConsoleErrors; */
++NS_IMETHODIMP
++EphyXULAppInfo::GetLogConsoleErrors(PRBool *aLogConsoleErrors)
++{
++ *aLogConsoleErrors = mLogConsoleErrors;
++ return NS_OK;
++}
++
++NS_IMETHODIMP
++EphyXULAppInfo::SetLogConsoleErrors(PRBool aLogConsoleErrors)
++{
++ mLogConsoleErrors = aLogConsoleErrors;
++ return NS_OK;
++}
++
++/* readonly attribute AUTF8String OS; */
++NS_IMETHODIMP
++EphyXULAppInfo::GetOS(nsACString & aOS)
++{
++ aOS.Assign (EPHY_HOST_OS);
++ return NS_OK;
++}
++
++/* readonly attribute AUTF8String XPCOMABI; */
++NS_IMETHODIMP
++EphyXULAppInfo::GetXPCOMABI(nsACString & aXPCOMABI)
++{
++ aXPCOMABI.Assign (EPHY_HOST_CPU "-gcc3");
++ return NS_OK;
++}
+diff -urN galeon-2.0.6.orig/mozilla/EphyXULAppInfo.h galeon-2.0.6/mozilla/EphyXULAppInfo.h
+--- galeon-2.0.6.orig/mozilla/EphyXULAppInfo.h 1970-01-01 01:00:00.000000000 +0100
++++ galeon-2.0.6/mozilla/EphyXULAppInfo.h 2008-05-18 15:14:46.000000000 +0200
+@@ -0,0 +1,48 @@
++/*
++ * Copyright © 2008 Christian Persch
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2, or (at your option)
++ * any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
++ */
++
++#ifndef EPHY_XUL_APP_INFO_H
++#define EPHY_XUL_APP_INFO_H
++
++#include <nsIXULAppInfo.h>
++#include <nsIXULRuntime.h>
++
++#include <nsAutoPtr.h>
++#include <nsCOMPtr.h>
++
++#define EPHY_XUL_APP_INFO_CLASSNAME "Epiphany XUL App Info"
++
++/* 3032bcd2-663c-4583-88bf-6f251123f6dd */
++#define EPHY_XUL_APP_INFO_CID { 0x3032bcd2, 0x663c, 0x4583, { 0x88, 0xbf, 0x6f, 0x25, 0x11, 0x23, 0xf6, 0xdd } }
++
++class EphyXULAppInfo : public nsIXULAppInfo,
++ public nsIXULRuntime
++{
++ public:
++ EphyXULAppInfo ();
++ virtual ~EphyXULAppInfo();
++
++ NS_DECL_ISUPPORTS
++ NS_DECL_NSIXULAPPINFO
++ NS_DECL_NSIXULRUNTIME
++
++ private:
++ PRBool mLogConsoleErrors;
++};
++
++#endif /* EPHY_XUL_APP_INFO_H */
+diff -urN galeon-2.0.6.orig/mozilla/Makefile.am galeon-2.0.6/mozilla/Makefile.am
+--- galeon-2.0.6.orig/mozilla/Makefile.am 2008-07-04 18:31:47.000000000 +0200
++++ galeon-2.0.6/mozilla/Makefile.am 2008-07-31 10:45:00.000000000 +0200
+@@ -54,6 +54,7 @@
+ -I$(MOZILLA_INCLUDE_ROOT)/windowwatcher \
+ -I$(MOZILLA_INCLUDE_ROOT)/xpcom \
+ -I$(MOZILLA_INCLUDE_ROOT)/xpconnect \
++ -I$(MOZILLA_INCLUDE_ROOT)/xulapp \
+ $(GCONF_CFLAGS) \
+ $(GALEON_DEPENDENCY_CFLAGS) \
+ -DLIB_DIR=\"$(pkglibdir)\" \
+@@ -98,6 +99,8 @@
+ EventContext.h \
+ EphyPromptService.cpp \
+ EphyPromptService.h \
++ EphyXULAppInfo.cpp \
++ EphyXULAppInfo.h \
+ FilePicker.cpp \
+ FilePicker.h \
+ GaleonWrapper.cpp \
+diff -urN galeon-2.0.6.orig/mozilla/MozRegisterComponents.cpp galeon-2.0.6/mozilla/MozRegisterComponents.cpp
+--- galeon-2.0.6.orig/mozilla/MozRegisterComponents.cpp 2008-07-05 18:18:24.000000000 +0200
++++ galeon-2.0.6/mozilla/MozRegisterComponents.cpp 2008-07-31 10:50:03.000000000 +0200
+@@ -41,6 +41,9 @@
+ #include "GtkNSSSecurityWarningDialogs.h"
+ #endif
+
++#include <nsXULAppAPI.h>
++#include "EphyXULAppInfo.h"
++
+ #include "ExternalProtocolService.h"
+ #include "GaleonAboutModule.h"
+
+@@ -85,6 +88,7 @@
+ #ifdef HAVE_NSIJSCONSOLESERVICE_H
+ NS_GENERIC_FACTORY_CONSTRUCTOR(JSConsoleService)
+ #endif
++NS_GENERIC_FACTORY_CONSTRUCTOR(EphyXULAppInfo)
+
+ // NS_DOWNLOAD_CONTRACTID was renamed in mozilla 1.8b
+ #ifndef NS_TRANSFER_CONTRACTID
+@@ -107,6 +111,12 @@
+
+ static const nsModuleComponentInfo sAppComps[] = {
+ {
++ EPHY_XUL_APP_INFO_CLASSNAME,
++ EPHY_XUL_APP_INFO_CID,
++ XULAPPINFO_SERVICE_CONTRACTID,
++ EphyXULAppInfoConstructor
++ },
++ {
+ G_PROGRESSDIALOG_CLASSNAME,
+ G_PROGRESSDIALOG_CID,
+ G_PROGRESSDIALOG_CONTRACTID,
================================================================
More information about the pld-cvs-commit
mailing list