diff options
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | data/Makefile.am | 2 | ||||
-rw-r--r-- | data/conspiracy.xhtml | 62 | ||||
-rw-r--r-- | data/epiphany.html | 1 | ||||
-rw-r--r-- | embed/mozilla/EphyAboutRedirector.cpp | 115 | ||||
-rw-r--r-- | embed/mozilla/EphyAboutRedirector.h | 75 | ||||
-rw-r--r-- | embed/mozilla/Makefile.am | 2 | ||||
-rw-r--r-- | embed/mozilla/MozRegisterComponents.cpp | 20 |
8 files changed, 13 insertions, 276 deletions
@@ -1,3 +1,15 @@ +2004-12-31 Christian Persch <chpe@cvs.gnome.org> + + * data/Makefile.am: + R data/conspiracy.xhtml: + R data/epiphany.html: + R embed/mozilla/EphyAboutRedirector.cpp: + R embed/mozilla/EphyAboutRedirector.h: + * embed/mozilla/Makefile.am: + * embed/mozilla/MozRegisterComponents.cpp: + + Remove about: redirections. + 2004-12-30 Christian Persch <chpe@cvs.gnome.org> * src/window-commands.c: (window_cmd_file_send_to): diff --git a/data/Makefile.am b/data/Makefile.am index 142a2badb..184d8ca69 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -37,7 +37,7 @@ extensionschemadir = $(pkgdatadir) extensionschema_DATA = epiphany-extension.xsd aboutdir = $(pkgdatadir) -about_DATA = epiphany.xhtml conspiracy.xhtml +about_DATA = epiphany.xhtml mimepermissiondir = $(pkgdatadir) mimepermission_DATA = mime-types-permissions.xml diff --git a/data/conspiracy.xhtml b/data/conspiracy.xhtml deleted file mode 100644 index 9b5446875..000000000 --- a/data/conspiracy.xhtml +++ /dev/null @@ -1,62 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" - "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - -<!-- - Copyright (C) 2003 Xan Lopez, xan@masilla.org - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - --> - - -<html xmlns="http://www.w3.org/1999/xhtml"> -<head> -<title>Alla hyllar våra svenska härskare</title> -<style type="text/css"> -html { - background: white; - color: black; - font-weight: bolder; - font-size: xx-large; -} - -#conspirancy { - margin-top: 15%; - font-size: 1.1em; - text-align: center; -} - -#laughter { - color: white; - text-align: center; -} - -span { - font-size: 1.3em; -} -</style> -</head> -<body> - -<div id="conspirancy"> -THERE IS NO SWEDE CONSPIRACY -</div> - -<div id="laughter"> -*MWAHAHAHAHAHA* -</div> - -</body> -</html> diff --git a/data/epiphany.html b/data/epiphany.html deleted file mode 100644 index c49cc81e6..000000000 --- a/data/epiphany.html +++ /dev/null @@ -1 +0,0 @@ -<html><body>WRITEME</body></html> diff --git a/embed/mozilla/EphyAboutRedirector.cpp b/embed/mozilla/EphyAboutRedirector.cpp deleted file mode 100644 index 54a602673..000000000 --- a/embed/mozilla/EphyAboutRedirector.cpp +++ /dev/null @@ -1,115 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: NPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Netscape Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Gagan Saksena (original author) - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the NPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the NPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** - * - * $Id$ - */ - -#include "mozilla-config.h" - -#include "config.h" - -#include "EphyAboutRedirector.h" - -#include <nsNetCID.h> -#include <nsIIOService.h> -#include <nsIServiceManager.h> -#include <nsCOMPtr.h> -#include <nsIURI.h> -#define MOZILLA_STRICT_API -#include <nsEmbedString.h> -#undef MOZILLA_STRICT_API - -static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID); - -NS_IMPL_ISUPPORTS1(EphyAboutRedirector, nsIAboutModule) - -struct RedirEntry { - const char* id; - const char* url; -}; - -static RedirEntry kRedirMap[] = { - { "epiphany", "file://" SHARE_DIR "/epiphany.xhtml" }, - { "conspiracy", "file://" SHARE_DIR "/conspiracy.xhtml" }, - { "marco", "http://mpgritti.oltrelinux.com" } -}; -static const int kRedirTotal = sizeof(kRedirMap)/sizeof(*kRedirMap); - -NS_IMETHODIMP -EphyAboutRedirector::NewChannel(nsIURI *aURI, nsIChannel **result) -{ - NS_ENSURE_ARG(aURI); - nsEmbedCString path; - (void)aURI->GetPath(path); - - nsCOMPtr<nsIIOService> ioService(do_GetService(kIOServiceCID)); - NS_ENSURE_TRUE (ioService, NS_ERROR_FAILURE); - - for (int i = 0; i< kRedirTotal; i++) - { - if (strcmp(path.get(), kRedirMap[i].id) == 0) - { - nsCOMPtr<nsIChannel> tempChannel; - ioService->NewChannel(nsEmbedCString(kRedirMap[i].url), - nsnull, nsnull, getter_AddRefs(tempChannel)); - NS_ENSURE_TRUE (tempChannel, NS_ERROR_FAILURE); - - tempChannel->SetOriginalURI(aURI); - - *result = tempChannel.get(); - NS_ADDREF(*result); - - return NS_OK; - } - } - - NS_ASSERTION(0, "EphyAboutRedirector called for unknown case"); - return NS_ERROR_ILLEGAL_VALUE; -} - -NS_METHOD -EphyAboutRedirector::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult) -{ - EphyAboutRedirector* about = new EphyAboutRedirector(); - if (about == nsnull) - return NS_ERROR_OUT_OF_MEMORY; - NS_ADDREF(about); - nsresult rv = about->QueryInterface(aIID, aResult); - NS_RELEASE(about); - return rv; -} diff --git a/embed/mozilla/EphyAboutRedirector.h b/embed/mozilla/EphyAboutRedirector.h deleted file mode 100644 index ed970c862..000000000 --- a/embed/mozilla/EphyAboutRedirector.h +++ /dev/null @@ -1,75 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: NPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Netscape Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Gagan Saksena (original author) - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the NPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the NPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** - * - * $Id$ - */ - -#ifndef EphyAboutRedirector_h__ -#define EphyAboutRedirector_h__ - -#include <nsIAboutModule.h> - -class EphyAboutRedirector : public nsIAboutModule -{ -public: - NS_DECL_ISUPPORTS - - NS_DECL_NSIABOUTMODULE - - EphyAboutRedirector() {} - virtual ~EphyAboutRedirector() {} - - static NS_METHOD - Create(nsISupports *aOuter, REFNSIID aIID, void **aResult); - -protected: -}; -#define EPHY_ABOUT_REDIRECTOR_CID \ -{ /* f5314c66-b6f6-49b0-bfd0-52f69545afb7 */ \ - 0xf5314c66, \ - 0xb6f6, \ - 0x49b0, \ - {0xbf, 0xd0, 0x52, 0xf6, 0x94, 0x45, 0xaf, 0xb7} \ -} - -#define EPHY_ABOUT_REDIRECTOR_EPIPHANY_CONTRACTID NS_ABOUT_MODULE_CONTRACTID_PREFIX "epiphany" -#define EPHY_ABOUT_REDIRECTOR_CONSPIRACY_CONTRACTID NS_ABOUT_MODULE_CONTRACTID_PREFIX "conspiracy" -#define EPHY_ABOUT_REDIRECTOR_MARCO_CONTRACTID NS_ABOUT_MODULE_CONTRACTID_PREFIX "marco" -#define EPHY_ABOUT_REDIRECTOR_CLASSNAME "Epiphany's about redirector" - -#endif // EphyAboutRedirector_h__ diff --git a/embed/mozilla/Makefile.am b/embed/mozilla/Makefile.am index db227c1e2..5c4b96ed1 100644 --- a/embed/mozilla/Makefile.am +++ b/embed/mozilla/Makefile.am @@ -3,8 +3,6 @@ noinst_LTLIBRARIES = libephymozillaembed.la libephymozillaembed_la_SOURCES = \ ContentHandler.cpp \ ContentHandler.h \ - EphyAboutRedirector.cpp \ - EphyAboutRedirector.h \ EphyContentPolicy.cpp \ EphyContentPolicy.h \ EphyHeaderSniffer.cpp \ diff --git a/embed/mozilla/MozRegisterComponents.cpp b/embed/mozilla/MozRegisterComponents.cpp index aac33b00e..5cebf9f38 100644 --- a/embed/mozilla/MozRegisterComponents.cpp +++ b/embed/mozilla/MozRegisterComponents.cpp @@ -27,7 +27,6 @@ #include "GlobalHistory.h" #include "PrintingPromptService.h" #include "MozDownload.h" -#include "EphyAboutRedirector.h" #include "EphyContentPolicy.h" #ifdef ENABLE_FILEPICKER @@ -51,7 +50,6 @@ #include <glib/gmessages.h> -NS_GENERIC_FACTORY_CONSTRUCTOR(EphyAboutRedirector) NS_GENERIC_FACTORY_CONSTRUCTOR(MozDownload) NS_GENERIC_FACTORY_CONSTRUCTOR(GContentHandler) NS_GENERIC_FACTORY_CONSTRUCTOR(MozGlobalHistory) @@ -148,24 +146,6 @@ static const nsModuleComponentInfo sAppComps[] = { GPrintingPromptServiceConstructor }, { - EPHY_ABOUT_REDIRECTOR_CLASSNAME, - EPHY_ABOUT_REDIRECTOR_CID, - EPHY_ABOUT_REDIRECTOR_EPIPHANY_CONTRACTID, - EphyAboutRedirectorConstructor - }, - { - EPHY_ABOUT_REDIRECTOR_CLASSNAME, - EPHY_ABOUT_REDIRECTOR_CID, - EPHY_ABOUT_REDIRECTOR_CONSPIRACY_CONTRACTID, - EphyAboutRedirectorConstructor - }, - { - EPHY_ABOUT_REDIRECTOR_CLASSNAME, - EPHY_ABOUT_REDIRECTOR_CID, - EPHY_ABOUT_REDIRECTOR_MARCO_CONTRACTID, - EphyAboutRedirectorConstructor - }, - { EPHY_CONTENT_POLICY_CLASSNAME, EPHY_CONTENT_POLICY_CID, EPHY_CONTENT_POLICY_CONTRACTID, |