aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
Diffstat (limited to 'embed')
-rw-r--r--embed/downloader-view.c2
-rw-r--r--embed/downloader-view.h2
-rw-r--r--embed/ephy-download.c2
-rw-r--r--embed/ephy-embed-dialog.c6
-rw-r--r--embed/ephy-embed-event.c4
-rw-r--r--embed/ephy-embed-factory.c5
-rw-r--r--embed/ephy-embed-factory.h2
-rw-r--r--embed/ephy-encodings.c2
-rwxr-xr-xembed/find-dialog.c4
-rw-r--r--embed/mozilla/ContentHandler.cpp29
-rw-r--r--embed/mozilla/EphyAboutRedirector.cpp5
-rw-r--r--embed/mozilla/EphyAboutRedirector.h5
-rw-r--r--embed/mozilla/EphyBrowser.cpp56
-rw-r--r--embed/mozilla/EphyBrowser.h2
-rw-r--r--embed/mozilla/EphyHeaderSniffer.cpp31
-rw-r--r--embed/mozilla/EphyHeaderSniffer.h5
-rw-r--r--embed/mozilla/EphySingle.cpp32
-rw-r--r--embed/mozilla/EventContext.cpp22
-rw-r--r--embed/mozilla/EventContext.h4
-rw-r--r--embed/mozilla/ExternalProtocolHandlers.cpp2
-rw-r--r--embed/mozilla/ExternalProtocolHandlers.h2
-rw-r--r--embed/mozilla/ExternalProtocolService.cpp156
-rw-r--r--embed/mozilla/ExternalProtocolService.h50
-rw-r--r--embed/mozilla/FilePicker.cpp32
-rw-r--r--embed/mozilla/GlobalHistory.cpp4
-rw-r--r--embed/mozilla/GtkNSSClientAuthDialogs.cpp12
-rw-r--r--embed/mozilla/GtkNSSClientAuthDialogs.h2
-rw-r--r--embed/mozilla/GtkNSSDialogs.cpp32
-rw-r--r--embed/mozilla/GtkNSSDialogs.h2
-rw-r--r--embed/mozilla/GtkNSSKeyPairDialogs.cpp24
-rw-r--r--embed/mozilla/GtkNSSKeyPairDialogs.h2
-rw-r--r--embed/mozilla/Makefile.am4
-rw-r--r--embed/mozilla/MozDownload.cpp2
-rw-r--r--embed/mozilla/MozDownload.h5
-rw-r--r--embed/mozilla/MozRegisterComponents.cpp13
-rw-r--r--embed/mozilla/MozRegisterComponents.h4
-rw-r--r--embed/mozilla/MozillaPrivate.cpp18
-rw-r--r--embed/mozilla/PrintingPromptService.h2
-rw-r--r--embed/mozilla/mozilla-embed-event.cpp4
-rw-r--r--embed/mozilla/mozilla-embed-persist.cpp3
-rw-r--r--embed/mozilla/mozilla-embed-single.cpp42
-rw-r--r--embed/mozilla/mozilla-embed.cpp6
-rw-r--r--embed/mozilla/mozilla-notifiers.h2
-rwxr-xr-xembed/print-dialog.c4
44 files changed, 158 insertions, 491 deletions
diff --git a/embed/downloader-view.c b/embed/downloader-view.c
index 735d808bf..c28ff131d 100644
--- a/embed/downloader-view.c
+++ b/embed/downloader-view.c
@@ -20,7 +20,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include "config.h"
#endif
#include "downloader-view.h"
diff --git a/embed/downloader-view.h b/embed/downloader-view.h
index 65d78ec40..2e3b869fc 100644
--- a/embed/downloader-view.h
+++ b/embed/downloader-view.h
@@ -14,6 +14,8 @@
* 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.
+ *
+ * $Id$
*/
#ifndef DOWNLOADER_VIEW_H
diff --git a/embed/ephy-download.c b/embed/ephy-download.c
index 041113466..ebb67d0c0 100644
--- a/embed/ephy-download.c
+++ b/embed/ephy-download.c
@@ -19,7 +19,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include "config.h"
#endif
#include "ephy-download.h"
diff --git a/embed/ephy-embed-dialog.c b/embed/ephy-embed-dialog.c
index d0b3abb28..79c9a8836 100644
--- a/embed/ephy-embed-dialog.c
+++ b/embed/ephy-embed-dialog.c
@@ -14,8 +14,14 @@
* 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.
+ *
+ * $Id$
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "ephy-embed-dialog.h"
static void
diff --git a/embed/ephy-embed-event.c b/embed/ephy-embed-event.c
index 6cd698d36..5d69b67e5 100644
--- a/embed/ephy-embed-event.c
+++ b/embed/ephy-embed-event.c
@@ -18,6 +18,10 @@
* $Id$
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "ephy-embed-event.h"
#include <glib/ghash.h>
diff --git a/embed/ephy-embed-factory.c b/embed/ephy-embed-factory.c
index 4c527234f..e753f4827 100644
--- a/embed/ephy-embed-factory.c
+++ b/embed/ephy-embed-factory.c
@@ -15,8 +15,13 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
+ * $Id$
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "ephy-embed-factory.h"
#include "mozilla-embed.h"
#include "mozilla-embed-persist.h"
diff --git a/embed/ephy-embed-factory.h b/embed/ephy-embed-factory.h
index c32c9cdff..9c8425f7d 100644
--- a/embed/ephy-embed-factory.h
+++ b/embed/ephy-embed-factory.h
@@ -15,6 +15,8 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
+ *
+ * $Id$
*/
#ifndef EPHY_EMBED_FACTORY_H
diff --git a/embed/ephy-encodings.c b/embed/ephy-encodings.c
index c9c6ccbbe..36f5ac14b 100644
--- a/embed/ephy-encodings.c
+++ b/embed/ephy-encodings.c
@@ -115,10 +115,8 @@ encoding_entries [] =
{ N_("R_omanian (ISO-8859-16)"), "ISO-8859-16", LG_SE_EUROPEAN, FALSE },
{ N_("South _European (ISO-8859-3)"), "ISO-8859-3", LG_SE_EUROPEAN, FALSE },
{ N_("Thai (TIS-_620)"), "TIS-620", LG_THAI, FALSE },
-#if MOZILLA_SNAPSHOT >= 10
{ N_("Thai (IS_O-8859-11)"), "iso-8859-11", LG_THAI, FALSE },
{ N_("_Thai (Windows-874)"), "windows-874", LG_THAI, FALSE },
-#endif
{ N_("Turkish (_IBM-857)"), "IBM857", LG_TURKISH, FALSE },
{ N_("Turkish (I_SO-8859-9)"), "ISO-8859-9", LG_TURKISH, FALSE },
{ N_("Turkish (_MacTurkish)"), "x-mac-turkish", LG_TURKISH, FALSE },
diff --git a/embed/find-dialog.c b/embed/find-dialog.c
index 53bb8e3b5..a5fa4fe35 100755
--- a/embed/find-dialog.c
+++ b/embed/find-dialog.c
@@ -20,6 +20,10 @@
* $Id$
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "find-dialog.h"
#include "ephy-file-helpers.h"
#include "ephy-prefs.h"
diff --git a/embed/mozilla/ContentHandler.cpp b/embed/mozilla/ContentHandler.cpp
index b39df19bd..dd192ef6a 100644
--- a/embed/mozilla/ContentHandler.cpp
+++ b/embed/mozilla/ContentHandler.cpp
@@ -73,15 +73,10 @@ GContentHandler::~GContentHandler()
// begin nsIHelperAppLauncher impl
////////////////////////////////////////////////////////////////////////////////
-#if MOZILLA_SNAPSHOT > 9
/* void show (in nsIHelperAppLauncher aLauncher, in nsISupports aContext); */
NS_IMETHODIMP GContentHandler::Show(nsIHelperAppLauncher *aLauncher,
nsISupports *aContext,
PRBool aForced)
-#else
-NS_IMETHODIMP GContentHandler::Show(nsIHelperAppLauncher *aLauncher,
- nsISupports *aContext)
-#endif
{
nsresult rv;
EphyEmbedSingle *single;
@@ -110,9 +105,7 @@ NS_IMETHODIMP GContentHandler::Show(nsIHelperAppLauncher *aLauncher,
/* nsILocalFile promptForSaveToFile (in nsISupports aWindowContext, in wstring aDefaultFile, in wstring aSuggestedFileExtension); */
NS_IMETHODIMP GContentHandler::PromptForSaveToFile(
-#if MOZILLA_SNAPSHOT > 10
- nsIHelperAppLauncher *aLauncher,
-#endif
+ nsIHelperAppLauncher *aLauncher,
nsISupports *aWindowContext,
const PRUnichar *aDefaultFile,
const PRUnichar *aSuggestedFileExtension,
@@ -124,7 +117,7 @@ NS_IMETHODIMP GContentHandler::PromptForSaveToFile(
if (mAction != CONTENT_ACTION_SAVEAS)
{
- return BuildDownloadPath (NS_ConvertUCS2toUTF8 (aDefaultFile).get(),
+ return BuildDownloadPath (NS_ConvertUTF16toUTF8 (aDefaultFile).get(),
_retval);
}
@@ -135,7 +128,7 @@ NS_IMETHODIMP GContentHandler::PromptForSaveToFile(
GTK_FILE_CHOOSER_ACTION_SAVE,
CONF_STATE_SAVE_DIR);
gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog),
- NS_ConvertUCS2toUTF8 (aDefaultFile).get());
+ NS_ConvertUTF16toUTF8 (aDefaultFile).get());
response = gtk_dialog_run (GTK_DIALOG (dialog));
if (response == EPHY_RESPONSE_SAVE)
@@ -160,15 +153,6 @@ NS_IMETHODIMP GContentHandler::PromptForSaveToFile(
}
}
-#if MOZILLA_SNAPSHOT < 10
-/* void showProgressDialog (in nsIHelperAppLauncher aLauncher, in nsISupports aContext); */
-NS_METHOD GContentHandler::ShowProgressDialog(nsIHelperAppLauncher *aLauncher,
- nsISupports *aContext)
-{
- return NS_ERROR_NOT_IMPLEMENTED;
-}
-#endif
-
NS_METHOD GContentHandler::LaunchHelperApp (void)
{
nsresult rv;
@@ -231,17 +215,10 @@ NS_METHOD GContentHandler::Init (void)
rv = MIMEInfo->GetMIMEType (&mMimeType);
-#if MOZILLA_SNAPSHOT > 11
mLauncher->GetTargetFile (getter_AddRefs(mTempFile));
mLauncher->GetSource (getter_AddRefs(mUri));
NS_ENSURE_TRUE (mUri, NS_ERROR_FAILURE);
-#else
- PRInt64 TimeDownloadStarted;
- rv = mLauncher->GetDownloadInfo (getter_AddRefs(mUri),
- &TimeDownloadStarted,
- getter_AddRefs(mTempFile));
-#endif
rv = mUri->GetSpec (mUrl);
rv = mUri->GetScheme (mScheme);
diff --git a/embed/mozilla/EphyAboutRedirector.cpp b/embed/mozilla/EphyAboutRedirector.cpp
index 6d1e9d479..b9f470b44 100644
--- a/embed/mozilla/EphyAboutRedirector.cpp
+++ b/embed/mozilla/EphyAboutRedirector.cpp
@@ -34,7 +34,10 @@
* 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 ***** */
+ * ***** END LICENSE BLOCK *****
+ *
+ * $Id$
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/embed/mozilla/EphyAboutRedirector.h b/embed/mozilla/EphyAboutRedirector.h
index 70421f089..86207ec1a 100644
--- a/embed/mozilla/EphyAboutRedirector.h
+++ b/embed/mozilla/EphyAboutRedirector.h
@@ -34,7 +34,10 @@
* 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 ***** */
+ * ***** END LICENSE BLOCK *****
+ *
+ * $Id$
+ */
#ifndef EphyAboutRedirector_h__
#define EphyAboutRedirector_h__
diff --git a/embed/mozilla/EphyBrowser.cpp b/embed/mozilla/EphyBrowser.cpp
index 018293bfb..4baee2fb2 100644
--- a/embed/mozilla/EphyBrowser.cpp
+++ b/embed/mozilla/EphyBrowser.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2000-2003 Marco Pesenti Gritti
+ * Copyright (C) 2000-2004 Marco Pesenti Gritti
*
* 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
@@ -136,13 +136,10 @@ EphyFaviconEventListener::HandleFaviconLink (nsIDOMNode *node)
#elif MOZILLA_SNAPSHOT > 11
nsIURI *uri;
uri = doc->GetDocumentURL ();
-#else
- nsCOMPtr<nsIURI> uri;
- doc->GetDocumentURL(getter_AddRefs(uri));
#endif
if (!uri) return NS_ERROR_FAILURE;
- const nsACString &link = NS_ConvertUCS2toUTF8(value);
+ const nsACString &link = NS_ConvertUTF16toUTF8(value);
nsCAutoString favicon_url;
result = uri->Resolve (link, favicon_url);
if (NS_FAILED (result)) return NS_ERROR_FAILURE;
@@ -646,9 +643,6 @@ nsresult EphyBrowser::GetDocumentUrl (nsCString &url)
#elif MOZILLA_SNAPSHOT > 11
nsIURI *uri;
uri = doc->GetDocumentURL ();
-#else
- nsCOMPtr<nsIURI> uri;
- doc->GetDocumentURL(getter_AddRefs(uri));
#endif
NS_ENSURE_TRUE (uri, NS_ERROR_FAILURE);
@@ -670,9 +664,6 @@ nsresult EphyBrowser::GetTargetDocumentUrl (nsCString &url)
#elif MOZILLA_SNAPSHOT > 11
nsIURI *uri;
uri = doc->GetDocumentURL ();
-#else
- nsCOMPtr<nsIURI> uri;
- doc->GetDocumentURL(getter_AddRefs(uri));
#endif
NS_ENSURE_TRUE (uri, NS_ERROR_FAILURE);
@@ -689,11 +680,7 @@ nsresult EphyBrowser::ForceEncoding (const char *encoding)
NS_ENSURE_TRUE (mdv, NS_ERROR_FAILURE);
nsresult result;
-#if MOZILLA_SNAPSHOT > 9
result = mdv->SetForceCharacterSet (nsDependentCString(encoding));
-#else
- result = mdv->SetForceCharacterSet (NS_ConvertUTF8toUCS2(encoding).get());
-#endif
return result;
}
@@ -728,12 +715,7 @@ nsresult EphyBrowser::GetEncodingInfo (EphyEncodingInfo **infoptr)
*infoptr = info;
PRInt32 source;
-#if MOZILLA_SNAPSHOT > 11
source = doc->GetDocumentCharacterSetSource ();
-#else
- result = doc->GetDocumentCharacterSetSource (&source);
- if (NS_FAILED (result)) return NS_ERROR_FAILURE;
-#endif
info->encoding_source = (EphyEncodingSource) source;
nsCOMPtr<nsIDocShell> ds;
@@ -772,26 +754,11 @@ nsresult EphyBrowser::GetEncodingInfo (EphyEncodingInfo **infoptr)
nsCOMPtr<nsIMarkupDocumentViewer> mdv = do_QueryInterface(contentViewer);
NS_ENSURE_TRUE (mdv, NS_ERROR_FAILURE);
-#if MOZILLA_SNAPSHOT > 11
const nsACString& charsetEnc = doc->GetDocumentCharacterSet ();
NS_ENSURE_TRUE (!charsetEnc.IsEmpty(), NS_ERROR_FAILURE);
info->encoding = g_strdup (PromiseFlatCString(charsetEnc).get());
-#elif MOZILLA_SNAPSHOT >= 10
- nsCAutoString charsetEnc;
- result = doc->GetDocumentCharacterSet (charsetEnc);
- if (NS_FAILED (result)) return NS_ERROR_FAILURE;
-
- info->encoding = g_strdup (charsetEnc.get());
-#else
- nsAutoString charsetEnc;
- result = doc->GetDocumentCharacterSet (charsetEnc);
- if (NS_FAILED (result)) return NS_ERROR_FAILURE;
-
- info->encoding = g_strdup (NS_ConvertUCS2toUTF8(charsetEnc).get());
-#endif
-#if MOZILLA_SNAPSHOT >= 10
nsCAutoString enc;
result = mdv->GetDefaultCharacterSet (enc);
@@ -809,25 +776,6 @@ nsresult EphyBrowser::GetEncodingInfo (EphyEncodingInfo **infoptr)
result = mdv->GetPrevDocCharacterSet (enc);
NS_ENSURE_SUCCESS (result, NS_ERROR_FAILURE);
info->prev_doc_encoding = g_strdup (enc.get());
-#else
- PRUnichar *str;
-
- result = mdv->GetDefaultCharacterSet (&str);
- if (NS_FAILED (result)) return NS_ERROR_FAILURE;
- info->default_encoding = g_strdup (NS_ConvertUCS2toUTF8(str).get());
-
- result = mdv->GetForceCharacterSet (&str);
- if (NS_FAILED (result)) return NS_ERROR_FAILURE;
- info->forced_encoding = g_strdup (NS_ConvertUCS2toUTF8(str).get());
-
- result = mdv->GetHintCharacterSet (&str);
- if (NS_FAILED (result)) return NS_ERROR_FAILURE;
- info->hint_encoding = g_strdup (NS_ConvertUCS2toUTF8(str).get());
-
- result = mdv->GetPrevDocCharacterSet (&str);
- if (NS_FAILED (result)) return NS_ERROR_FAILURE;
- info->prev_doc_encoding = g_strdup (NS_ConvertUCS2toUTF8(str).get());
-#endif
mdv->GetHintCharacterSetSource (&source);
NS_ENSURE_SUCCESS (result, NS_ERROR_FAILURE);
diff --git a/embed/mozilla/EphyBrowser.h b/embed/mozilla/EphyBrowser.h
index 0f3a89d85..0e4d7815d 100644
--- a/embed/mozilla/EphyBrowser.h
+++ b/embed/mozilla/EphyBrowser.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2000-2003 Marco Pesenti Gritti
+ * Copyright (C) 2000-2004 Marco Pesenti Gritti
*
* 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
diff --git a/embed/mozilla/EphyHeaderSniffer.cpp b/embed/mozilla/EphyHeaderSniffer.cpp
index 68e51ca6c..28bbf7e22 100644
--- a/embed/mozilla/EphyHeaderSniffer.cpp
+++ b/embed/mozilla/EphyHeaderSniffer.cpp
@@ -67,9 +67,7 @@
#include "nsIMIMEInfo.h"
#include "nsIDOMHTMLDocument.h"
#include "nsIDownload.h"
-#if MOZILLA_SNAPSHOT > 10
#include "nsIMIMEHeaderParam.h"
-#endif
#include <glib/gi18n.h>
#include <libgnomevfs/gnome-vfs-utils.h>
@@ -245,7 +243,6 @@ nsresult EphyHeaderSniffer::PerformSave (nsIURI* inOriginalURI)
if (defaultFileName.IsEmpty() && !mContentDisposition.IsEmpty())
{
/* 1 Use the HTTP header suggestion. */
-#if MOZILLA_SNAPSHOT > 10
nsCOMPtr<nsIMIMEHeaderParam> mimehdrpar =
do_GetService("@mozilla.org/network/mime-hdrparam;1");
@@ -274,17 +271,6 @@ nsresult EphyHeaderSniffer::PerformSave (nsIURI* inOriginalURI)
defaultFileName = fileName;
}
}
-#else
- PRInt32 index = mContentDisposition.Find("filename=");
- if (index >= 0)
- {
- /* Take the substring following the prefix. */
- index += strlen ("filename=");
- nsCAutoString filename;
- mContentDisposition.Right(filename, mContentDisposition.Length() - index);
- defaultFileName = NS_ConvertUTF8toUCS2(filename);
- }
-#endif
}
if (defaultFileName.IsEmpty())
@@ -296,10 +282,7 @@ nsresult EphyHeaderSniffer::PerformSave (nsIURI* inOriginalURI)
{
nsCAutoString fileNameCString;
url->GetFileName(fileNameCString);
- /* FIXME: when we can depend on moz >= 1.5, use
- * CopyUTF8toUTF16 instead
- */
- defaultFileName = NS_ConvertUTF8toUCS2(fileNameCString);
+ CopyUTF8toUTF16 (fileNameCString, defaultFileName);
}
}
@@ -319,25 +302,25 @@ nsresult EphyHeaderSniffer::PerformSave (nsIURI* inOriginalURI)
/* 4 Use the host. */
nsCAutoString hostName;
mURL->GetHost(hostName);
- /* FIXME: when we can depend on moz >= 1.5, use
- * CopyUTF8toUTF16 instead
- */
- defaultFileName = NS_ConvertUTF8toUCS2(hostName);
+ CopyUTF8toUTF16 (hostName, defaultFileName);
}
/* 5 One last case to handle about:blank and other untitled pages. */
if (defaultFileName.IsEmpty())
{
- defaultFileName = NS_ConvertUTF8toUCS2 (_("Untitled"));
+ CopyUTF8toUTF16 (_("Untitled"), defaultFileName);
}
/* Validate the file name to ensure legality. */
- char *default_name = g_strdup (NS_ConvertUCS2toUTF8 (defaultFileName).get());
+ char *default_name = g_strdup (NS_ConvertUTF16toUTF8 (defaultFileName).get());
default_name = g_strdelimit (default_name, "/", ' ');
const char *key;
key = ephy_embed_persist_get_persist_key (EPHY_EMBED_PERSIST (mEmbedPersist));
+ /* FIXME: do better here by using nsITextToSubURI service, like in
+ * http://lxr.mozilla.org/seamonkey/source/xpfe/communicator/resources/content/contentAreaUtils.js#763
+ */
char *filename;
filename = gnome_vfs_unescape_string (default_name, NULL);
diff --git a/embed/mozilla/EphyHeaderSniffer.h b/embed/mozilla/EphyHeaderSniffer.h
index 45a3b0f91..a2e9fcba4 100644
--- a/embed/mozilla/EphyHeaderSniffer.h
+++ b/embed/mozilla/EphyHeaderSniffer.h
@@ -34,7 +34,10 @@
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
- * ***** END LICENSE BLOCK ***** */
+ * ***** END LICENSE BLOCK *****
+ *
+ * $Id$
+ */
#include "mozilla-embed-persist.h"
diff --git a/embed/mozilla/EphySingle.cpp b/embed/mozilla/EphySingle.cpp
index bfdba4251..a15237596 100644
--- a/embed/mozilla/EphySingle.cpp
+++ b/embed/mozilla/EphySingle.cpp
@@ -32,9 +32,7 @@
#include <nsIPermissionManager.h>
#include <nsICookieManager.h>
#include <nsIServiceManager.h>
-#if MOZILLA_SNAPSHOT > 9
#include <nsICookie2.h>
-#endif
NS_IMPL_ISUPPORTS1(EphySingle, nsIObserver)
@@ -245,23 +243,19 @@ mozilla_cookie_to_ephy_cookie (nsICookie *cookie)
cookie->GetExpires (&dateTime);
info->expires = dateTime;
-#if MOZILLA_SNAPSHOT > 9
nsCOMPtr<nsICookie2> cookie2 = do_QueryInterface (cookie);
- if (cookie2)
- {
+ NS_ENSURE_TRUE (cookie2, info);
- PRBool isSession;
- cookie2->GetIsSession (&isSession);
- info->is_session = isSession != PR_FALSE;
+ PRBool isSession;
+ cookie2->GetIsSession (&isSession);
+ info->is_session = isSession != PR_FALSE;
- if (!isSession)
- {
- PRInt64 expiry;
- cookie2->GetExpiry (&expiry);
- info->real_expires = expiry;
- }
+ if (!isSession)
+ {
+ PRInt64 expiry;
+ cookie2->GetExpiry (&expiry);
+ info->real_expires = expiry;
}
-#endif
return info;
}
@@ -272,7 +266,6 @@ mozilla_permission_to_ephy_permission (nsIPermission *perm)
EphyPermissionType type = (EphyPermissionType) 0;
nsresult result;
-#if MOZILLA_SNAPSHOT >= 10
nsCAutoString str;
result = perm->GetType(str);
NS_ENSURE_SUCCESS (result, NULL);
@@ -289,13 +282,6 @@ mozilla_permission_to_ephy_permission (nsIPermission *perm)
{
type = EPT_POPUP;
}
-#else
- PRUint32 num;
- result = perm->GetType(&num);
- NS_ENSURE_SUCCESS (result, NULL);
-
- type = (EphyPermissionType) num;
-#endif
PRUint32 cap;
perm->GetCapability(&cap);
diff --git a/embed/mozilla/EventContext.cpp b/embed/mozilla/EventContext.cpp
index 230ce7dd3..59b3897fb 100644
--- a/embed/mozilla/EventContext.cpp
+++ b/embed/mozilla/EventContext.cpp
@@ -154,17 +154,9 @@ nsresult EventContext::ResolveBaseURL (nsIDocument *doc, const nsAString &relurl
nsIURI *base;
base = doc->GetBaseURL ();
if (!base) return NS_ERROR_FAILURE;
-#elif MOZILLA_SNAPSHOT > 9
- nsCOMPtr<nsIURI> base;
- rv = doc->GetBaseURL (getter_AddRefs(base));
- if (NS_FAILED(rv)) return rv;
-#else
- nsCOMPtr<nsIURI> base;
- rv = doc->GetBaseURL (*getter_AddRefs(base));
- if (NS_FAILED(rv)) return rv;
#endif
- return base->Resolve (NS_ConvertUCS2toUTF8(relurl), url);
+ return base->Resolve (NS_ConvertUTF16toUTF8(relurl), url);
}
nsresult EventContext::ResolveDocumentURL (nsIDocument *doc, const nsAString &relurl, nsACString &url)
@@ -178,13 +170,9 @@ nsresult EventContext::ResolveDocumentURL (nsIDocument *doc, const nsAString &re
nsIURI *uri;
uri = doc->GetDocumentURL ();
if (!uri) return NS_ERROR_FAILURE;
-#else
- nsCOMPtr<nsIURI> uri;
- rv = doc->GetDocumentURL(getter_AddRefs(uri));
- if (NS_FAILED(rv)) return rv;
#endif
- return uri->Resolve (NS_ConvertUCS2toUTF8(relurl), url);
+ return uri->Resolve (NS_ConvertUTF16toUTF8(relurl), url);
}
nsresult EventContext::GetEventContext (nsIDOMEventTarget *EventTarget,
@@ -261,7 +249,7 @@ nsresult EventContext::GetEventContext (nsIDOMEventTarget *EventTarget,
rv = ResolveDocumentURL (doc, img, imglongdesc);
SetStringProperty ("image_long_desc",
- NS_ConvertUTF8toUCS2(imglongdesc));
+ NS_ConvertUTF8toUTF16(imglongdesc));
}
int imgwidth, imgheight;
@@ -302,7 +290,7 @@ nsresult EventContext::GetEventContext (nsIDOMEventTarget *EventTarget,
rv = ResolveDocumentURL (doc, img, cImg);
if (NS_FAILED(rv)) return NS_ERROR_FAILURE;
SetStringProperty ("image",
- NS_ConvertUTF8toUCS2(cImg));
+ NS_ConvertUTF8toUTF16(cImg));
}
else if (!value.EqualsIgnoreCase("radio") &&
!value.EqualsIgnoreCase("submit") &&
@@ -839,5 +827,5 @@ nsresult EventContext::SetStringProperty (const char *name, const char *value)
nsresult EventContext::SetStringProperty (const char *name, const nsAString &value)
{
- return SetStringProperty (name, NS_ConvertUCS2toUTF8(value).get());
+ return SetStringProperty (name, NS_ConvertUTF16toUTF8(value).get());
}
diff --git a/embed/mozilla/EventContext.h b/embed/mozilla/EventContext.h
index a2deba41b..418c088a0 100644
--- a/embed/mozilla/EventContext.h
+++ b/embed/mozilla/EventContext.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2000 Marco Pesenti Gritti
+ * Copyright (C) 2000-2004 Marco Pesenti Gritti
*
* 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
@@ -14,6 +14,8 @@
* 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.
+ *
+ * $Id$
*/
#ifndef EVENT_CONTEXT_H
diff --git a/embed/mozilla/ExternalProtocolHandlers.cpp b/embed/mozilla/ExternalProtocolHandlers.cpp
index 8f85f2c01..5d9db4e47 100644
--- a/embed/mozilla/ExternalProtocolHandlers.cpp
+++ b/embed/mozilla/ExternalProtocolHandlers.cpp
@@ -14,6 +14,8 @@
* 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.
+ *
+ * $Id$
*/
#ifdef HAVE_CONFIG_H
diff --git a/embed/mozilla/ExternalProtocolHandlers.h b/embed/mozilla/ExternalProtocolHandlers.h
index 027556d5e..95073f99f 100644
--- a/embed/mozilla/ExternalProtocolHandlers.h
+++ b/embed/mozilla/ExternalProtocolHandlers.h
@@ -14,6 +14,8 @@
* 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.
+ *
+ * $Id$
*/
/* We are registering protocol handlers for news, mailto and irc
diff --git a/embed/mozilla/ExternalProtocolService.cpp b/embed/mozilla/ExternalProtocolService.cpp
deleted file mode 100644
index 9c00e080a..000000000
--- a/embed/mozilla/ExternalProtocolService.cpp
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Copyright (C) 2001 Philip Langdale
- *
- * 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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#if MOZILLA_SNAPSHOT < 12
-
-#include <gtk/gtkmessagedialog.h>
-#include <glib/gi18n.h>
-#include <libgnomevfs/gnome-vfs-utils.h>
-
-#include <nsString.h>
-#include <nsXPIDLString.h>
-#include <nsCOMPtr.h>
-#include <nsIURI.h>
-#include <nsIDOMWindow.h>
-#include <nsIWindowWatcher.h>
-#include <nsIServiceManager.h>
-
-#include "eel-gconf-extensions.h"
-
-#include "ExternalProtocolService.h"
-
-#define WINDOWWATCHER_CONTRACTID "@mozilla.org/embedcomp/window-watcher;1"
-
-/* Implementation file */
-NS_IMPL_ISUPPORTS1(GExternalProtocolService, nsIExternalProtocolService)
-
-GExternalProtocolService::GExternalProtocolService()
-{
-}
-
-GExternalProtocolService::~GExternalProtocolService()
-{
-}
-
-/* boolean externalProtocolHandlerExists (in string aProtocolScheme); */
-NS_IMETHODIMP GExternalProtocolService::
- ExternalProtocolHandlerExists(const char *aProtocolScheme,
- PRBool *_retval)
-{
- /* build the config key */
- char *key = g_strconcat ("/desktop/gnome/url-handlers/",
- aProtocolScheme,
- "/command", NULL);
-
- char *tmp = eel_gconf_get_string(key);
- g_free (key);
-
- *_retval = (tmp != NULL);
- g_free (tmp);
-
- return NS_OK;
-}
-
-/* void loadUrl (in nsIURI aURL); */
-NS_IMETHODIMP GExternalProtocolService::LoadUrl(nsIURI *aURL)
-{
- nsCAutoString cSpec;
- aURL->GetSpec (cSpec);
- nsCAutoString cScheme;
- aURL->GetScheme (cScheme);
-
- if (cScheme.Equals("http"))
- {
- nsresult rv;
- nsCOMPtr<nsIWindowWatcher> ww;
- ww = do_GetService(WINDOWWATCHER_CONTRACTID, &rv);
- if (NS_SUCCEEDED(rv))
- {
- nsCOMPtr<nsIDOMWindow> newWin;
- rv = ww->OpenWindow(nsnull, cSpec.get(),
- nsnull, nsnull, nsnull,
- getter_AddRefs(newWin));
- if (NS_SUCCEEDED(rv)) return NS_OK;
- }
- }
-
- /* build the config key */
- const nsCAutoString key(NS_LITERAL_CSTRING("/desktop/gnome/url-handlers/") +
- cScheme + NS_LITERAL_CSTRING("/command"));
-
- /* find it */
- char *result = eel_gconf_get_string(key.get());
- if (result)
- {
- gnome_vfs_url_show(cSpec.get());
- g_free (result);
- return NS_OK;
- }
-
- /* no luck, so offer the user the option of trying the
- * default handler -- we don't do this automatically in
- * case the default handler is erroneously set to epiphany */
- result = eel_gconf_get_string("/desktop/gnome/url-handlers/unknown/command");
-
- /* check there is a default */
- {
- GtkWidget *dialog;
-
- /* throw the error */
- dialog = gtk_message_dialog_new (NULL, (GtkDialogFlags)0,
- GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
- _("Epiphany cannot handle this protocol,\n"
- "and no GNOME default handler is set"));
- gtk_dialog_run (GTK_DIALOG(dialog));
- gtk_widget_destroy (dialog);
-
- /* don't let mozilla try blindly */
- return NS_ERROR_FAILURE;
- }
- g_free (result);
-
- /* offer the choice */
- GtkWidget *dialog = gtk_message_dialog_new (NULL, (GtkDialogFlags)0,
- GTK_MESSAGE_QUESTION,
- GTK_BUTTONS_YES_NO,
- _("The protocol specified "
- "is not recognised.\n\n"
- "Would you like to try "
- "the GNOME default?"));
-
- int ret = gtk_dialog_run (GTK_DIALOG(dialog));
- gtk_widget_destroy (dialog);
-
- if (ret == 0)
- {
- gnome_vfs_url_show(cSpec.get());
- return NS_OK;
- }
- else
- {
- return NS_ERROR_FAILURE;
- }
-
- return NS_OK;
-}
-
-#endif
diff --git a/embed/mozilla/ExternalProtocolService.h b/embed/mozilla/ExternalProtocolService.h
deleted file mode 100644
index 195e9daec..000000000
--- a/embed/mozilla/ExternalProtocolService.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2001 Philip Langdale
- *
- * 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.
- */
-
-#ifndef __ExternalProtocolService_h__
-#define __ExternalProtocolService_h__
-
-#include "nsError.h"
-#include "nsCExternalHandlerService.h"
-#include "nsIExternalProtocolService.h"
-
-class GExternalProtocolService : public nsIExternalProtocolService
-{
- public:
- NS_DECL_ISUPPORTS
- NS_DECL_NSIEXTERNALPROTOCOLSERVICE
-
- GExternalProtocolService();
- virtual ~GExternalProtocolService();
- /* additional members */
-};
-
-#define G_EXTERNALPROTOCOLSERVICE_CID \
-{ /* d2a2f743-f126-4f1f-8921-d4e50490f112 */ \
- 0xd2a2f743, \
- 0xf126, \
- 0x4f1f, \
- {0x89, 0x21, 0xd4, 0xe5, 0x04, 0x90, 0xf1, 0x12} \
-}
-#define G_EXTERNALPROTOCOLSERVICE_CLASSNAME "Epiphany's ExternalProtocolService"
-
-class nsIFactory;
-
-extern nsresult NS_NewExternalProtocolServiceFactory(nsIFactory** aFactory);
-
-#endif // __ExternalProtocolService_h__
diff --git a/embed/mozilla/FilePicker.cpp b/embed/mozilla/FilePicker.cpp
index d8e2e15a1..a456be78f 100644
--- a/embed/mozilla/FilePicker.cpp
+++ b/embed/mozilla/FilePicker.cpp
@@ -98,7 +98,7 @@ NS_IMETHODIMP GFilePicker::Init(nsIDOMWindowInternal *parent, const PRUnichar *t
gtk_window_set_transient_for (GTK_WINDOW (mDialog), GTK_WINDOW (pwin));
}
- gtk_window_set_title (GTK_WINDOW (mDialog), NS_ConvertUCS2toUTF8 (title).get());
+ gtk_window_set_title (GTK_WINDOW (mDialog), NS_ConvertUTF16toUTF8 (title).get());
mMode = mode;
@@ -160,32 +160,32 @@ NS_IMETHODIMP GFilePicker::AppendFilters(PRInt32 filterMask)
if (filterMask & nsIFilePicker::filterAll)
{
- AppendFilter (NS_ConvertUTF8toUCS2 (_("All files")).get(),
+ AppendFilter (NS_ConvertUTF8toUTF16 (_("All files")).get(),
NS_LITERAL_STRING ("*").get());
}
if (filterMask & nsIFilePicker::filterHTML)
{
- AppendFilter (NS_ConvertUTF8toUCS2 (_("HTML files")).get(),
+ AppendFilter (NS_ConvertUTF8toUTF16 (_("HTML files")).get(),
NS_LITERAL_STRING ("*.html; *.htm; *.shtml; *.xhtml").get());
}
if (filterMask & nsIFilePicker::filterText)
{
- AppendFilter (NS_ConvertUTF8toUCS2 (_("Text files")).get(),
+ AppendFilter (NS_ConvertUTF8toUTF16 (_("Text files")).get(),
NS_LITERAL_STRING ("*.txt; *.text").get());
}
if (filterMask & nsIFilePicker::filterImages)
{
- AppendFilter (NS_ConvertUTF8toUCS2 (_("Image files")).get(),
+ AppendFilter (NS_ConvertUTF8toUTF16 (_("Image files")).get(),
NS_LITERAL_STRING ("*.png; *.gif; *.jpeg; *.jpg").get());
}
if (filterMask & nsIFilePicker::filterXML)
{
- AppendFilter (NS_ConvertUTF8toUCS2 (_("XML files")).get(),
+ AppendFilter (NS_ConvertUTF8toUTF16 (_("XML files")).get(),
NS_LITERAL_STRING ("*.xml").get());
}
if (filterMask & nsIFilePicker::filterXUL)
{
- AppendFilter (NS_ConvertUTF8toUCS2 (_("XUL files")).get(),
+ AppendFilter (NS_ConvertUTF8toUTF16 (_("XUL files")).get(),
NS_LITERAL_STRING ("*.xul").get());
}
@@ -196,11 +196,12 @@ NS_IMETHODIMP GFilePicker::AppendFilters(PRInt32 filterMask)
NS_IMETHODIMP GFilePicker::AppendFilter(const PRUnichar *title, const PRUnichar *filter)
{
LOG ("GFilePicker::AppendFilter title '%s' for '%s'",
- NS_ConvertUCS2toUTF8 (title).get(),
- NS_ConvertUCS2toUTF8 (filter).get())
+ NS_ConvertUTF16toUTF8 (title).get(),
+ NS_ConvertUTF16toUTF8 (filter).get())
- nsCAutoString pattern = NS_ConvertUCS2toUTF8 (filter);
+ NS_ConvertUTF16toUTF8 pattern(filter);
pattern.StripWhitespace();
+ if (pattern.IsEmpty()) return NS_ERROR_FAILURE;
char **patterns = g_strsplit (pattern.get(), ";", -1);
@@ -211,7 +212,7 @@ NS_IMETHODIMP GFilePicker::AppendFilter(const PRUnichar *title, const PRUnichar
gtk_file_filter_add_pattern (filth, patterns[i]);
}
- gtk_file_filter_set_name (filth, NS_ConvertUCS2toUTF8(title).get());
+ gtk_file_filter_set_name (filth, NS_ConvertUTF16toUTF8(title).get());
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (mDialog), filth);
g_strfreev (patterns);
@@ -231,8 +232,7 @@ NS_IMETHODIMP GFilePicker::GetDefaultString(PRUnichar **aDefaultString)
{
converted = g_filename_to_utf8(filename, -1, NULL, NULL, NULL);
- /* FIXME: when can depend on moz >= 1.6, use CopyUTF8toUCS2 here */
- *aDefaultString = ToNewUnicode (NS_ConvertUTF8toUCS2 (converted));
+ *aDefaultString = ToNewUnicode (NS_ConvertUTF8toUTF16 (converted));
g_free (filename);
g_free (converted);
@@ -244,14 +244,14 @@ NS_IMETHODIMP GFilePicker::GetDefaultString(PRUnichar **aDefaultString)
NS_IMETHODIMP GFilePicker::SetDefaultString(const PRUnichar *aDefaultString)
{
LOG ("GFilePicker::SetDefaultString to %s",
- NS_ConvertUCS2toUTF8 (aDefaultString).get())
+ NS_ConvertUTF16toUTF8 (aDefaultString).get())
if (aDefaultString)
{
/* set_current_name takes UTF-8, not a filename */
gtk_file_chooser_set_current_name
(GTK_FILE_CHOOSER (mDialog),
- NS_ConvertUCS2toUTF8 (aDefaultString).get());
+ NS_ConvertUTF16toUTF8 (aDefaultString).get());
}
return NS_OK;
@@ -268,7 +268,7 @@ NS_IMETHODIMP GFilePicker::GetDefaultExtension(PRUnichar **aDefaultExtension)
NS_IMETHODIMP GFilePicker::SetDefaultExtension(const PRUnichar *aDefaultExtension)
{
LOG ("GFilePicker::SetDefaultExtension to %s",
- NS_ConvertUCS2toUTF8(aDefaultExtension).get())
+ NS_ConvertUTF16toUTF8(aDefaultExtension).get())
return NS_ERROR_NOT_IMPLEMENTED;
}
diff --git a/embed/mozilla/GlobalHistory.cpp b/embed/mozilla/GlobalHistory.cpp
index a612fb3b6..b8b7a19e5 100644
--- a/embed/mozilla/GlobalHistory.cpp
+++ b/embed/mozilla/GlobalHistory.cpp
@@ -111,7 +111,7 @@ NS_IMETHODIMP MozGlobalHistory::IsVisited (const char *aURL, PRBool *_retval)
NS_IMETHODIMP MozGlobalHistory::SetPageTitle (const char *aURL,
const PRUnichar *aTitle)
{
- const nsACString &title = NS_ConvertUCS2toUTF8 (aTitle);
+ const nsACString &title = NS_ConvertUTF16toUTF8 (aTitle);
ephy_history_set_page_title (mGlobalHistory, aURL, PromiseFlatCString(title).get());
@@ -159,7 +159,7 @@ NS_IMETHODIMP MozGlobalHistory::GetLastPageVisited(char **aLastPageVisited)
}
#endif
-#if MOZILLA_SNAPSHOT > 8 && MOZILLA_SNAPSHOT < 14
+#if MOZILLA_SNAPSHOT < 14
NS_IMETHODIMP MozGlobalHistory::SetLastPageVisited(const char *aLastPageVisited)
{
return NS_ERROR_NOT_IMPLEMENTED;
diff --git a/embed/mozilla/GtkNSSClientAuthDialogs.cpp b/embed/mozilla/GtkNSSClientAuthDialogs.cpp
index 141a7ca18..c6929b979 100644
--- a/embed/mozilla/GtkNSSClientAuthDialogs.cpp
+++ b/embed/mozilla/GtkNSSClientAuthDialogs.cpp
@@ -16,6 +16,8 @@
* 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.
+ *
+ * $Id$
*/
#ifdef HAVE_CONFIG_H
@@ -145,7 +147,7 @@ option_menu_changed_cb (GtkOptionMenu *optionmenu, GtkTextView *textview)
details = (PRUnichar*)g_object_get_data (G_OBJECT (item), "details");
g_return_if_fail (details);
- const nsACString &certnick = NS_ConvertUCS2toUTF8(details);
+ const nsACString &certnick = NS_ConvertUTF16toUTF8(details);
gtk_text_buffer_set_text (buffer, PromiseFlatCString(certnick).get(), -1);
}
@@ -217,7 +219,7 @@ GtkNSSClientAuthDialogs::ChooseCertificate (nsIInterfaceRequestor *ctx,
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
- const nsACString &utf8_cn = NS_ConvertUCS2toUTF8(cn);
+ const nsACString &utf8_cn = NS_ConvertUTF16toUTF8(cn);
tt_cn = g_strdup_printf ("\"<tt>%s</tt>\"",
PromiseFlatCString(utf8_cn).get());
@@ -236,8 +238,8 @@ GtkNSSClientAuthDialogs::ChooseCertificate (nsIInterfaceRequestor *ctx,
store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
for (i = 0; i < count; i++)
{
- const nsACString &certnick = NS_ConvertUCS2toUTF8(certNickList[i]);
- const nsACString &certdetail = NS_ConvertUCS2toUTF8(certDetailsList[i]);
+ const nsACString &certnick = NS_ConvertUTF16toUTF8(certNickList[i]);
+ const nsACString &certdetail = NS_ConvertUTF16toUTF8(certDetailsList[i]);
gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter,
@@ -266,7 +268,7 @@ GtkNSSClientAuthDialogs::ChooseCertificate (nsIInterfaceRequestor *ctx,
for (i = 0 ; i < count ; i++)
{
- const nsACString &certnick = NS_ConvertUCS2toUTF8(certNickList[i]);
+ const nsACString &certnick = NS_ConvertUTF16toUTF8(certNickList[i]);
GtkWidget *item = gtk_menu_item_new_with_label (PromiseFlatCString(certnick).get());
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
g_object_set_data (G_OBJECT (item), "details", (void*)certDetailsList[i]);
diff --git a/embed/mozilla/GtkNSSClientAuthDialogs.h b/embed/mozilla/GtkNSSClientAuthDialogs.h
index 5b0187c26..561b9e878 100644
--- a/embed/mozilla/GtkNSSClientAuthDialogs.h
+++ b/embed/mozilla/GtkNSSClientAuthDialogs.h
@@ -3,6 +3,8 @@
*
* Copyright (C) 2003 Crispin Flowerday <gnome@flowerday.cx>
* Available under the terms of the GNU General Public License version 2.
+ *
+ * $Id$
*/
#ifndef GTKNSSCLIENTAUTHDIALOGS_H
diff --git a/embed/mozilla/GtkNSSDialogs.cpp b/embed/mozilla/GtkNSSDialogs.cpp
index f443abef2..37414822a 100644
--- a/embed/mozilla/GtkNSSDialogs.cpp
+++ b/embed/mozilla/GtkNSSDialogs.cpp
@@ -16,6 +16,8 @@
* 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.
+ *
+ * $Id$
*/
/*
@@ -289,7 +291,7 @@ GtkNSSDialogs::ConfirmMismatchDomain (nsIInterfaceRequestor *ctx,
PromiseFlatCString(targetURL).get());
ttCommonName = g_strdup_printf ("\"<tt>%s</tt>\"",
- NS_ConvertUCS2toUTF8(commonName).get());
+ NS_ConvertUTF16toUTF8(commonName).get());
first = g_strdup_printf (_("The site %s returned security information for "
"%s. It is possible that someone is intercepting "
@@ -331,7 +333,7 @@ GtkNSSDialogs::ConfirmUnknownIssuer (nsIInterfaceRequestor *ctx,
cert->GetCommonName (commonName);
ttCommonName = g_strdup_printf ("\"<tt>%s</tt>\"",
- NS_ConvertUCS2toUTF8(commonName).get());
+ NS_ConvertUTF16toUTF8(commonName).get());
secondary = g_strdup_printf
(_("Your browser was unable to trust %s. "
@@ -435,7 +437,7 @@ GtkNSSDialogs::ConfirmCertExpired (nsIInterfaceRequestor *ctx,
fdate = g_locale_to_utf8 (formattedDate, -1, NULL, NULL, NULL);
ttCommonName = g_strdup_printf ("\"<tt>%s</tt>\"",
- NS_ConvertUCS2toUTF8(commonName).get());
+ NS_ConvertUTF16toUTF8(commonName).get());
secondary = g_strdup_printf (text, ttCommonName, fdate);
@@ -481,7 +483,7 @@ GtkNSSDialogs::NotifyCrlNextupdate (nsIInterfaceRequestor *ctx,
cert->GetCommonName (commonName);
ttCommonName = g_strdup_printf ("\"<tt>%s</tt>\"",
- NS_ConvertUCS2toUTF8(commonName).get());
+ NS_ConvertUTF16toUTF8(commonName).get());
ttTargetUrl = g_strdup_printf ("\"<tt>%s</tt>\"",
PromiseFlatCString(targetURL).get());
@@ -543,7 +545,7 @@ GtkNSSDialogs::ConfirmDownloadCACert(nsIInterfaceRequestor *ctx,
nsAutoString commonName;
cert->GetCommonName (commonName);
ttCommonName = g_strdup_printf ("\"<tt>%s</tt>\"",
- NS_ConvertUCS2toUTF8(commonName).get());
+ NS_ConvertUTF16toUTF8(commonName).get());
tertiary = g_strdup_printf (_("Trust %s to identify:"), ttCommonName );
g_free (ttCommonName);
@@ -831,7 +833,7 @@ GtkNSSDialogs::SetPKCS12FilePassword(nsIInterfaceRequestor *ctx,
else
{
gchar * text = gtk_editable_get_chars (GTK_EDITABLE (entry1), 0, -1);
- _password = NS_ConvertUTF8toUCS2 (text);
+ CopyUTF8toUTF16 (text, _password);
g_free (text);
*_retval = PR_TRUE;
}
@@ -891,7 +893,7 @@ GtkNSSDialogs::GetPKCS12FilePassword(nsIInterfaceRequestor *ctx,
else
{
gchar * text = gtk_editable_get_chars (GTK_EDITABLE (entry), 0, -1);
- _password = NS_ConvertUTF8toUCS2 (text);
+ CopyUTF8toUTF16 (text, _password);
g_free (text);
*_retval = PR_TRUE;
}
@@ -960,13 +962,13 @@ GtkNSSDialogs::CrlImportStatusDialog(nsIInterfaceRequestor *ctx, nsICRLInfo *crl
rv = crl->GetNextUpdateLocale (nextUpdate);
if (NS_FAILED(rv)) return rv;
- label = gtk_label_new (NS_ConvertUCS2toUTF8(org).get());
+ label = gtk_label_new (NS_ConvertUTF16toUTF8(org).get());
set_table_row (table, 0, _("Organization:"), label);
- label = gtk_label_new (NS_ConvertUCS2toUTF8(orgUnit).get());
+ label = gtk_label_new (NS_ConvertUTF16toUTF8(orgUnit).get());
set_table_row (table, 1, _("Unit:"), label);
- label = gtk_label_new (NS_ConvertUCS2toUTF8(nextUpdate).get());
+ label = gtk_label_new (NS_ConvertUTF16toUTF8(nextUpdate).get());
set_table_row (table, 2, _("Next Update:"), label);
gtk_box_pack_start (GTK_BOX (vbox), higgy_indent_widget (table), FALSE, FALSE, 0);
@@ -1002,7 +1004,7 @@ set_label_cert_attribute (GladeXML* gxml, const char* label_id, nsAutoString &va
{
gtk_label_set_use_markup (GTK_LABEL (label), FALSE);
gtk_label_set_text (GTK_LABEL (label),
- NS_ConvertUCS2toUTF8(value).get());
+ NS_ConvertUTF16toUTF8(value).get());
}
}
@@ -1040,7 +1042,7 @@ fill_cert_chain_tree (GtkTreeView *treeview, nsIArray *certChain)
if (!value.IsEmpty())
{
gtk_tree_store_set (GTK_TREE_STORE(model), &iter,
- 0, NS_ConvertUCS2toUTF8(value).get(),
+ 0, NS_ConvertUTF16toUTF8(value).get(),
1, nsCertP,
-1);
}
@@ -1081,7 +1083,7 @@ add_asn1_object_to_tree(GtkTreeModel *model, nsIASN1Object *object, GtkTreeIter
gtk_tree_store_append (GTK_TREE_STORE (model), &iter, parent);
gtk_tree_store_set (GTK_TREE_STORE(model), &iter,
- 0, NS_ConvertUCS2toUTF8(dispNameU).get(),
+ 0, NS_ConvertUTF16toUTF8(dispNameU).get(),
1, object,
-1);
@@ -1156,7 +1158,7 @@ field_tree_view_selection_changed_cb (GtkTreeSelection *selection,
object->GetDisplayValue(dispValU);
gtk_text_buffer_set_text (text_buffer,
- NS_ConvertUCS2toUTF8(dispValU).get(),
+ NS_ConvertUTF16toUTF8(dispValU).get(),
-1);
}
else
@@ -1322,7 +1324,7 @@ GtkNSSDialogs::ViewCert(nsIInterfaceRequestor *ctx,
GtkWidget *indent;
for (PRUint32 i = 0 ; i < count ; i++)
{
- const nsACString &msg = NS_ConvertUCS2toUTF8 (usage[i]);
+ const nsACString &msg = NS_ConvertUTF16toUTF8 (usage[i]);
GtkWidget *label = gtk_label_new(PromiseFlatCString(msg).get());
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
diff --git a/embed/mozilla/GtkNSSDialogs.h b/embed/mozilla/GtkNSSDialogs.h
index b46d21a69..4f387453c 100644
--- a/embed/mozilla/GtkNSSDialogs.h
+++ b/embed/mozilla/GtkNSSDialogs.h
@@ -3,6 +3,8 @@
*
* Copyright (C) 2003 Crispin Flowerday <gnome@flowerday.cx>
* Available under the terms of the GNU General Public License version 2.
+ *
+ * $Id$
*/
#ifndef GTKNSSDIALOGS_H
diff --git a/embed/mozilla/GtkNSSKeyPairDialogs.cpp b/embed/mozilla/GtkNSSKeyPairDialogs.cpp
index 031f3b822..f6aa6d29f 100644
--- a/embed/mozilla/GtkNSSKeyPairDialogs.cpp
+++ b/embed/mozilla/GtkNSSKeyPairDialogs.cpp
@@ -16,6 +16,8 @@
* 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.
+ *
+ * $Id$
*/
/*
@@ -267,14 +269,6 @@ NS_IMETHODIMP KeyPairHelperWindow::GetContent(nsIDOMWindow * *aContent)
MOZ_NOT_IMPLEMENTED
}
-#if MOZILLA_SNAPSHOT < 12
-/* readonly attribute nsISidebar sidebar; */
-NS_IMETHODIMP KeyPairHelperWindow::GetSidebar(nsISidebar * *aSidebar)
-{
- MOZ_NOT_IMPLEMENTED
-}
-#endif
-
/* [noscript] readonly attribute nsIPrompt prompter; */
NS_IMETHODIMP KeyPairHelperWindow::GetPrompter(nsIPrompt * *aPrompter)
{
@@ -585,20 +579,6 @@ NS_IMETHODIMP KeyPairHelperWindow::UpdateCommands(const nsAString & action)
MOZ_NOT_IMPLEMENTED
}
-#if MOZILLA_SNAPSHOT <= 12
-/* DOMString escape (in DOMString str); */
-NS_IMETHODIMP KeyPairHelperWindow::Escape(const nsAString & str, nsAString & _retval)
-{
- MOZ_NOT_IMPLEMENTED
-}
-
-/* DOMString unescape (in DOMString str); */
-NS_IMETHODIMP KeyPairHelperWindow::Unescape(const nsAString & str, nsAString & _retval)
-{
- MOZ_NOT_IMPLEMENTED
-}
-#endif
-
/* [noscript] boolean find (in DOMString str, in boolean caseSensitive, in boolean backwards, in boolean wrapAround, in boolean wholeWord, in boolean searchInFrames, in boolean showDialog); */
NS_IMETHODIMP KeyPairHelperWindow::Find(const nsAString & str, PRBool caseSensitive, PRBool backwards, PRBool wrapAround, PRBool wholeWord, PRBool searchInFrames, PRBool showDialog, PRBool *_retval)
{
diff --git a/embed/mozilla/GtkNSSKeyPairDialogs.h b/embed/mozilla/GtkNSSKeyPairDialogs.h
index 154f05d81..0252dab1a 100644
--- a/embed/mozilla/GtkNSSKeyPairDialogs.h
+++ b/embed/mozilla/GtkNSSKeyPairDialogs.h
@@ -3,6 +3,8 @@
*
* Copyright (C) 2003 Crispin Flowerday <gnome@flowerday.cx>
* Available under the terms of the GNU General Public License version 2.
+ *
+ * $Id$
*/
#ifndef GTKNSSKEYPAIRDIALOGS_H
diff --git a/embed/mozilla/Makefile.am b/embed/mozilla/Makefile.am
index 8e33860c4..f538c8ae6 100644
--- a/embed/mozilla/Makefile.am
+++ b/embed/mozilla/Makefile.am
@@ -1,10 +1,8 @@
-# Remove appcomps dir when 1.4 is deprecated
INCLUDES = \
-I$(top_srcdir)/lib \
-I$(top_srcdir)/embed \
-I$(top_srcdir) \
$(MOZILLA_COMPONENT_CFLAGS) \
- -I$(MOZILLA_INCLUDE_ROOT)/appcomps \
-I$(MOZILLA_INCLUDE_ROOT)/chardet \
-I$(MOZILLA_INCLUDE_ROOT)/chrome \
-I$(MOZILLA_INCLUDE_ROOT)/content \
@@ -63,8 +61,6 @@ libephymozillaembed_la_SOURCES = \
EventContext.h \
ExternalProtocolHandlers.cpp \
ExternalProtocolHandlers.h \
- ExternalProtocolService.cpp \
- ExternalProtocolService.h \
FilePicker.cpp \
FilePicker.h \
GlobalHistory.cpp \
diff --git a/embed/mozilla/MozDownload.cpp b/embed/mozilla/MozDownload.cpp
index a5c37e0f3..b75add16d 100644
--- a/embed/mozilla/MozDownload.cpp
+++ b/embed/mozilla/MozDownload.cpp
@@ -325,7 +325,7 @@ MozDownload::OnStateChange (nsIWebProgress *aWebProgress, nsIRequest *aRequest,
/* HACK we use the application description to decide
if we have to open the saved file */
- if ((strcmp (NS_ConvertUCS2toUTF8 (description).get(), "gnome-default") == 0) &&
+ if ((strcmp (NS_ConvertUTF16toUTF8 (description).get(), "gnome-default") == 0) &&
helperApp)
{
GList *params = NULL;
diff --git a/embed/mozilla/MozDownload.h b/embed/mozilla/MozDownload.h
index ad5cfb169..326056059 100644
--- a/embed/mozilla/MozDownload.h
+++ b/embed/mozilla/MozDownload.h
@@ -34,7 +34,10 @@
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
- * ***** END LICENSE BLOCK ***** */
+ * ***** END LICENSE BLOCK *****
+ *
+ * $Id$
+ */
#ifndef MozDownload_h__
#define MozDownload_h__
diff --git a/embed/mozilla/MozRegisterComponents.cpp b/embed/mozilla/MozRegisterComponents.cpp
index 692fc1710..595bc71c1 100644
--- a/embed/mozilla/MozRegisterComponents.cpp
+++ b/embed/mozilla/MozRegisterComponents.cpp
@@ -29,7 +29,6 @@
#include "ExternalProtocolHandlers.h"
#include "PrintingPromptService.h"
#include "MozDownload.h"
-#include "ExternalProtocolService.h"
#include "EphyAboutRedirector.h"
#include "EphyContentPolicy.h"
@@ -65,10 +64,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(GNewsProtocolHandler)
NS_GENERIC_FACTORY_CONSTRUCTOR(GMailtoProtocolHandler)
NS_GENERIC_FACTORY_CONSTRUCTOR(EphyContentPolicy)
-#if MOZILLA_SNAPSHOT < 12
-NS_GENERIC_FACTORY_CONSTRUCTOR(GExternalProtocolService)
-#endif
-
#ifdef HAVE_MOZILLA_PSM
NS_GENERIC_FACTORY_CONSTRUCTOR(GtkNSSClientAuthDialogs)
NS_GENERIC_FACTORY_CONSTRUCTOR(GtkNSSDialogs)
@@ -76,14 +71,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(GtkNSSKeyPairDialogs)
#endif
static const nsModuleComponentInfo sAppComps[] = {
-#if MOZILLA_SNAPSHOT < 12
- {
- G_EXTERNALPROTOCOLSERVICE_CLASSNAME,
- G_EXTERNALPROTOCOLSERVICE_CID,
- NS_EXTERNALPROTOCOLSERVICE_CONTRACTID,
- GExternalProtocolServiceConstructor
- },
-#endif
{
MOZ_DOWNLOAD_CLASSNAME,
MOZ_DOWNLOAD_CID,
diff --git a/embed/mozilla/MozRegisterComponents.h b/embed/mozilla/MozRegisterComponents.h
index 1e4730c40..67dd0025d 100644
--- a/embed/mozilla/MozRegisterComponents.h
+++ b/embed/mozilla/MozRegisterComponents.h
@@ -14,6 +14,8 @@
* 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.
+ *
+ * $Id$
*/
#ifndef MOZREGISTERCOMPONENTS_H
@@ -27,4 +29,4 @@ gboolean mozilla_unregister_FtpProtocolHandler (void);
gboolean mozilla_register_MailtoProtocolHandler (void);
-#endif // MOZREGISTERCOMPONENTS_H
+#endif /* MOZREGISTERCOMPONENTS_H */
diff --git a/embed/mozilla/MozillaPrivate.cpp b/embed/mozilla/MozillaPrivate.cpp
index aacb2c629..82dd5cd32 100644
--- a/embed/mozilla/MozillaPrivate.cpp
+++ b/embed/mozilla/MozillaPrivate.cpp
@@ -105,21 +105,21 @@ NS_METHOD MozillaCollatePrintSettings (const EmbedPrintInfo *info,
options->SetPrinterName(NS_LITERAL_STRING("PostScript/default").get());
- options->SetHeaderStrLeft(NS_ConvertUTF8toUCS2(info->header_left_string).get());
+ options->SetHeaderStrLeft(NS_ConvertUTF8toUTF16(info->header_left_string).get());
- options->SetHeaderStrCenter(NS_ConvertUTF8toUCS2(info->header_center_string).get());
+ options->SetHeaderStrCenter(NS_ConvertUTF8toUTF16(info->header_center_string).get());
- options->SetHeaderStrRight(NS_ConvertUTF8toUCS2(info->header_right_string).get());
+ options->SetHeaderStrRight(NS_ConvertUTF8toUTF16(info->header_right_string).get());
- options->SetFooterStrLeft(NS_ConvertUTF8toUCS2(info->footer_left_string).get());
+ options->SetFooterStrLeft(NS_ConvertUTF8toUTF16(info->footer_left_string).get());
- options->SetFooterStrCenter(NS_ConvertUTF8toUCS2(info->footer_center_string).get());
+ options->SetFooterStrCenter(NS_ConvertUTF8toUTF16(info->footer_center_string).get());
- options->SetFooterStrRight(NS_ConvertUTF8toUCS2(info->footer_right_string).get());
+ options->SetFooterStrRight(NS_ConvertUTF8toUTF16(info->footer_right_string).get());
- options->SetToFileName (NS_ConvertUTF8toUCS2(info->file).get());
+ options->SetToFileName (NS_ConvertUTF8toUTF16(info->file).get());
- options->SetPrintCommand (NS_ConvertUTF8toUCS2(info->printer).get());
+ options->SetPrintCommand (NS_ConvertUTF8toUTF16(info->printer).get());
/**
* Work around a mozilla bug where paper size & orientation are ignored
@@ -138,7 +138,7 @@ NS_METHOD MozillaCollatePrintSettings (const EmbedPrintInfo *info,
/* native paper size formats. Our dialog does not support custom yet */
options->SetPaperSize (nsIPrintSettings::kPaperSizeNativeData);
- options->SetPaperName (NS_ConvertUTF8toUCS2(info->paper).get());
+ options->SetPaperName (NS_ConvertUTF8toUTF16(info->paper).get());
options->SetPrintInColor (info->print_color);
options->SetOrientation (info->orientation);
diff --git a/embed/mozilla/PrintingPromptService.h b/embed/mozilla/PrintingPromptService.h
index 2b878a70a..31df4be61 100644
--- a/embed/mozilla/PrintingPromptService.h
+++ b/embed/mozilla/PrintingPromptService.h
@@ -14,6 +14,8 @@
* 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.
+ *
+ * $Id$
*/
#ifndef __PrintingPromptService_h
diff --git a/embed/mozilla/mozilla-embed-event.cpp b/embed/mozilla/mozilla-embed-event.cpp
index aae28b12a..979554ca1 100644
--- a/embed/mozilla/mozilla-embed-event.cpp
+++ b/embed/mozilla/mozilla-embed-event.cpp
@@ -19,6 +19,10 @@
* $Id$
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "mozilla-embed-event.h"
#include "ephy-debug.h"
diff --git a/embed/mozilla/mozilla-embed-persist.cpp b/embed/mozilla/mozilla-embed-persist.cpp
index b3620b3fc..a69c55aad 100644
--- a/embed/mozilla/mozilla-embed-persist.cpp
+++ b/embed/mozilla/mozilla-embed-persist.cpp
@@ -311,10 +311,9 @@ impl_to_string (EphyEmbedPersist *persist)
nsAutoString aOutputString;
encoder->EncodeToString(aOutputString);
- return g_strdup (NS_ConvertUCS2toUTF8(aOutputString).get());
+ return g_strdup (NS_ConvertUTF16toUTF8(aOutputString).get());
}
-
static GObject *
mozilla_embed_persist_constructor (GType type, guint n_construct_properties,
GObjectConstructParam *construct_params)
diff --git a/embed/mozilla/mozilla-embed-single.cpp b/embed/mozilla/mozilla-embed-single.cpp
index 055f5ff80..221523df8 100644
--- a/embed/mozilla/mozilla-embed-single.cpp
+++ b/embed/mozilla/mozilla-embed-single.cpp
@@ -58,16 +58,8 @@
#include <nsIPassword.h>
#include <nsIPasswordManager.h>
#include <nsIPassword.h>
-#if MOZILLA_SNAPSHOT > 9
#include <nsICookie2.h>
-#else
-#include <nsICookie.h>
-#endif
-#if MOZILLA_SNAPSHOT > 12
#include <nsICookieManager.h>
-#else
-#include <nsCCookieManager.h>
-#endif
#include <nsCPasswordManager.h>
#include <nsIPermission.h>
#include <nsIPermissionManager.h>
@@ -385,13 +377,7 @@ getUILang (nsAString& aUILang)
return NS_ERROR_FAILURE;
}
-#if MOZILLA_SNAPSHOT >= 12
result = localeService->GetLocaleComponentForUserAgent (aUILang);
-#else
- nsXPIDLString uiLang;
- result = localeService->GetLocaleComponentForUserAgent (getter_Copies(uiLang));
- aUILang.Assign (uiLang);
-#endif
if (NS_FAILED (result))
{
@@ -422,7 +408,7 @@ mozilla_init_chrome (void)
result = getUILang(uiLang);
NS_ENSURE_SUCCESS (result, NS_ERROR_FAILURE);
- return chromeRegistry->SelectLocale (NS_ConvertUCS2toUTF8(uiLang), PR_FALSE);
+ return chromeRegistry->SelectLocale (NS_ConvertUTF16toUTF8(uiLang), PR_FALSE);
}
static void
@@ -592,7 +578,7 @@ impl_get_font_list (EphyEmbedSingle *shell,
{
char *gFontString;
- gFontString = g_strdup (NS_ConvertUCS2toUTF8 (fontArray[i]).get());
+ gFontString = g_strdup (NS_ConvertUTF16toUTF8 (fontArray[i]).get());
l = g_list_prepend (l, gFontString);
nsMemory::Free (fontArray[i]);
}
@@ -691,7 +677,7 @@ impl_list_passwords (EphyPasswordManager *manager)
EphyPasswordInfo *p = g_new0 (EphyPasswordInfo, 1);
p->host = g_strdup (transfer.get());
- p->username = g_strdup(NS_ConvertUCS2toUTF8(unicodeName).get());
+ p->username = g_strdup(NS_ConvertUTF16toUTF8(unicodeName).get());
p->password = NULL;
passwords = g_list_prepend (passwords, p);
@@ -709,7 +695,7 @@ impl_remove_password (EphyPasswordManager *manager,
if (!pm) return;
pm->RemoveUser (nsDependentCString(info->host),
- NS_ConvertUTF8toUCS2(nsDependentCString(info->username)));
+ NS_ConvertUTF8toUTF16(nsDependentCString(info->username)));
}
static const char *permission_type_string [] =
@@ -739,11 +725,7 @@ impl_permission_manager_add (EphyPermissionManager *manager,
gboolean allow = (permission == EPHY_PERMISSION_ALLOWED);
pm->Add (uri,
-#if MOZILLA_SNAPSHOT >= 10
permission_type_string [type],
-#else
- type,
-#endif
allow ? (PRUint32) nsIPermissionManager::ALLOW_ACTION :
(PRUint32) nsIPermissionManager::DENY_ACTION);
}
@@ -757,11 +739,7 @@ impl_permission_manager_remove (EphyPermissionManager *manager,
(do_GetService (NS_PERMISSIONMANAGER_CONTRACTID));
if (!pm) return;
-#if MOZILLA_SNAPSHOT >= 10
pm->Remove (nsDependentCString (host), permission_type_string [type]);
-#else
- pm->Remove (nsDependentCString (host), type);
-#endif
}
void
@@ -789,11 +767,7 @@ impl_permission_manager_test (EphyPermissionManager *manager,
nsresult rv;
PRUint32 action;
-#if MOZILLA_SNAPSHOT >= 10
rv = pm->TestPermission (uri, permission_type_string [type], &action);
-#else
- rv = pm->TestPermission (uri, type, &action);
-#endif
NS_ENSURE_SUCCESS (rv, EPHY_PERMISSION_DEFAULT);
EphyPermission permission;
@@ -837,19 +811,11 @@ impl_permission_manager_list (EphyPermissionManager *manager,
if (!perm) continue;
nsresult rv;
-#if MOZILLA_SNAPSHOT >= 10
nsCAutoString str;
rv = perm->GetType(str);
if (NS_FAILED (rv)) continue;
if (str.Equals(permission_type_string[type]))
-#else
- PRUint32 num;
- rv = perm->GetType(&num);
- if (NS_FAILED (rv)) continue;
-
- if ((PRUint32) num == (PRUint32) type)
-#endif
{
EphyPermissionInfo *info =
mozilla_permission_to_ephy_permission (perm);
diff --git a/embed/mozilla/mozilla-embed.cpp b/embed/mozilla/mozilla-embed.cpp
index 89309eab7..b37e56cd2 100644
--- a/embed/mozilla/mozilla-embed.cpp
+++ b/embed/mozilla/mozilla-embed.cpp
@@ -197,7 +197,7 @@ impl_find_set_properties (EphyEmbed *embed,
MozillaEmbedPrivate *mpriv = MOZILLA_EMBED(embed)->priv;
mpriv->browser->FindSetProperties
- ((NS_ConvertUTF8toUCS2(search_string)).get(),
+ ((NS_ConvertUTF8toUTF16(search_string)).get(),
case_sensitive, wrap_around);
}
@@ -592,7 +592,7 @@ impl_shistory_get_nth (EphyEmbed *embed,
rv = mpriv->browser->GetSHTitleAtIndex(nth, &title);
- *aTitle = g_strdup (NS_ConvertUCS2toUTF8(title).get());
+ *aTitle = g_strdup (NS_ConvertUTF16toUTF8(title).get());
nsMemory::Free (title);
}
@@ -649,7 +649,7 @@ impl_get_security_level (EphyEmbed *embed,
if (tooltip)
{
- *description = g_strdup (NS_ConvertUCS2toUTF8(tooltip).get());
+ *description = g_strdup (NS_ConvertUTF16toUTF8(tooltip).get());
}
}
diff --git a/embed/mozilla/mozilla-notifiers.h b/embed/mozilla/mozilla-notifiers.h
index 579bc5638..b6559a5d2 100644
--- a/embed/mozilla/mozilla-notifiers.h
+++ b/embed/mozilla/mozilla-notifiers.h
@@ -14,6 +14,8 @@
* 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.
+ *
+ * $Id$
*/
#ifndef MOZILLA_NOTIFIERS_H
diff --git a/embed/print-dialog.c b/embed/print-dialog.c
index 4fc54788c..01e20e325 100755
--- a/embed/print-dialog.c
+++ b/embed/print-dialog.c
@@ -19,6 +19,10 @@
* $Id$
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "print-dialog.h"
#include "ephy-embed-dialog.h"
#include "ephy-file-chooser.h"