diff options
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | configure.in | 4 | ||||
-rw-r--r-- | embed/mozilla/mozilla-embed-single.cpp | 15 |
3 files changed, 24 insertions, 5 deletions
@@ -1,5 +1,15 @@ 2004-05-06 Christian Persch <chpe@cvs.gnome.org> + * configure.in: + + Check for nsIPassword.h + + * embed/mozilla/mozilla-embed-single.cpp: + + Allow compilation without nsIPassword (mozilla wallet extension). + +2004-05-06 Christian Persch <chpe@cvs.gnome.org> + * embed/mozilla/EphyBrowser.cpp: Adapt to mozilla API change. diff --git a/configure.in b/configure.in index b8e93841f..5f1ad8f60 100644 --- a/configure.in +++ b/configure.in @@ -175,6 +175,10 @@ AC_CHECK_FILE([$MOZILLA_INCLUDE_ROOT/pipnss/nsIX509Cert.h], [AC_DEFINE(HAVE_MOZILLA_PSM, 1, [Define if you have the mozilla psm headers installed])]) +AC_CHECK_FILE([$MOZILLA_INCLUDE_ROOT/nsIPassword.h], + [AC_DEFINE(HAVE_NSIPASSWORD_H, 1, + [Define if mozilla nsIPassword header is available])]) + MOZILLA_WARN_CXXFLAGS="-Wall -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor" AC_SUBST(MOZILLA_WARN_CXXFLAGS) diff --git a/embed/mozilla/mozilla-embed-single.cpp b/embed/mozilla/mozilla-embed-single.cpp index 693c39bec..939ebd2bb 100644 --- a/embed/mozilla/mozilla-embed-single.cpp +++ b/embed/mozilla/mozilla-embed-single.cpp @@ -50,17 +50,19 @@ #include <nsIIOService.h> #include <nsISupportsPrimitives.h> #include <nsICookieManager.h> -#include <nsIPassword.h> -#include <nsIPasswordManager.h> -#include <nsIPassword.h> #include <nsICookie2.h> #include <nsICookieManager.h> +#include <nsIPasswordManager.h> #include <nsCPasswordManager.h> #include <nsIPermission.h> #include <nsIPermissionManager.h> #include <nsILocalFile.h> #include <nsIURI.h> +#ifdef HAVE_NSIPASSWORD_H +#include <nsIPassword.h> +#endif + #ifdef ALLOW_PRIVATE_API // FIXME: For setting the locale. hopefully gtkmozembed will do itself soon #include <nsIChromeRegistry.h> @@ -432,8 +434,8 @@ init_services (MozillaEmbedSingle *single) /* Pre initialization */ mozilla_init_home (); mozilla_init_profile (); - - /* Fire up the best */ + + /* Fire up the beast */ gtk_moz_embed_push_startup (); /* Until gtkmozembed does this itself */ @@ -649,6 +651,8 @@ static GList * impl_list_passwords (EphyPasswordManager *manager) { GList *passwords = NULL; + +#ifdef HAVE_NSIPASSWORD_H nsresult rv; nsCOMPtr<nsIPasswordManager> passwordManager = @@ -684,6 +688,7 @@ impl_list_passwords (EphyPasswordManager *manager) passwords = g_list_prepend (passwords, p); } +#endif return passwords; } |