From 50d2b665017ea4a5284bbcf44fc16a890b3a1a5d Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Fri, 4 May 2007 19:51:15 +0200 Subject: [PATCH] Take out the HAVE_GECKO_1_9 ifdefs, we only support Gecko 1.9 now. --- browser/GeckoBrowserPersist.cpp | 4 ---- browser/GeckoDocumentObject.cpp | 4 ---- browser/GeckoDownload.cpp | 6 ------ browser/GeckoDragDropHooks.cpp | 4 ---- browser/sugar-browser.cpp | 13 ------------- configure.ac | 2 -- sugar/browser/xulrunner.cpp | 5 ----- 7 files changed, 38 deletions(-) diff --git a/browser/GeckoBrowserPersist.cpp b/browser/GeckoBrowserPersist.cpp index a614e4db..0a4b7f32 100644 --- a/browser/GeckoBrowserPersist.cpp +++ b/browser/GeckoBrowserPersist.cpp @@ -1,7 +1,5 @@ #include -#ifdef HAVE_GECKO_1_9 - #include #include @@ -183,5 +181,3 @@ GeckoBrowserPersist::SaveURI(const char *uri, const char *filename) return TRUE; } - -#endif diff --git a/browser/GeckoDocumentObject.cpp b/browser/GeckoDocumentObject.cpp index 26eb13dc..260b964b 100644 --- a/browser/GeckoDocumentObject.cpp +++ b/browser/GeckoDocumentObject.cpp @@ -1,7 +1,5 @@ #include -#ifdef HAVE_GECKO_1_9 - #include #include @@ -237,5 +235,3 @@ GeckoDocumentObject::SaveImage(const char *filename) GeckoBrowserPersist browserPersist(mBrowser); return browserPersist.SaveURI(mImageURI.get(), filename); } - -#endif diff --git a/browser/GeckoDownload.cpp b/browser/GeckoDownload.cpp index 6f099bdb..2ec1fe4e 100644 --- a/browser/GeckoDownload.cpp +++ b/browser/GeckoDownload.cpp @@ -86,7 +86,6 @@ GeckoDownload::OnStateChange(nsIWebProgress *aWebProgress, mMIMEInfo->GetMIMEType(mimeType); mSource->GetSpec(url); -#ifdef HAVE_GECKO_1_9 /* If the file is application/octet-stream, look up a better mime type from the extension. */ if(mimeType.Equals(APPLICATION_OCTET_STREAM)) { @@ -106,7 +105,6 @@ GeckoDownload::OnStateChange(nsIWebProgress *aWebProgress, } } } -#endif sugar_download_manager_download_started(download_manager, url.get(), @@ -187,8 +185,6 @@ GeckoDownload::OnSecurityChange (nsIWebProgress *aWebProgress, return NS_OK; } -#ifdef HAVE_GECKO_1_9 - NS_IMETHODIMP GeckoDownload::OnRefreshAttempted (nsIWebProgress *aWebProgress, nsIURI *aRefreshURI, @@ -199,8 +195,6 @@ GeckoDownload::OnRefreshAttempted (nsIWebProgress *aWebProgress, return NS_OK; } -#endif - //***************************************************************************** // GeckoDownloadFactory //***************************************************************************** diff --git a/browser/GeckoDragDropHooks.cpp b/browser/GeckoDragDropHooks.cpp index 6439f42c..995ee87f 100644 --- a/browser/GeckoDragDropHooks.cpp +++ b/browser/GeckoDragDropHooks.cpp @@ -1,7 +1,5 @@ #include -#ifdef HAVE_GECKO_1_9 - #include #include @@ -214,5 +212,3 @@ GeckoDragDropHooks::OnPasteOrDrop(nsIDOMEvent *event, nsITransferable *trans, { return NS_ERROR_NOT_IMPLEMENTED; } - -#endif diff --git a/browser/sugar-browser.cpp b/browser/sugar-browser.cpp index d997fffb..4afbeaae 100644 --- a/browser/sugar-browser.cpp +++ b/browser/sugar-browser.cpp @@ -23,13 +23,10 @@ #include "sugar-marshal.h" #include "GeckoContentHandler.h" #include "GeckoDownload.h" - -#ifdef HAVE_GECKO_1_9 #include "GeckoDragDropHooks.h" #include "GeckoDocumentObject.h" #include "GeckoBrowserPersist.h" #include "GeckoDirectoryProvider.h" -#endif #include #include @@ -591,7 +588,6 @@ location_cb(GtkMozEmbed *embed) static gboolean dom_mouse_click_cb(GtkMozEmbed *embed, nsIDOMMouseEvent *mouseEvent) { -#ifdef HAVE_GECKO_1_9 SugarBrowser *browser = SUGAR_BROWSER(embed); SugarBrowserEvent *event; gint return_value = FALSE; @@ -621,9 +617,6 @@ dom_mouse_click_cb(GtkMozEmbed *embed, nsIDOMMouseEvent *mouseEvent) sugar_browser_event_free(event); return return_value; -#else - return FALSE; -#endif } static void @@ -650,7 +643,6 @@ sugar_browser_scroll_pixels(SugarBrowser *browser, int dx, int dy) { -#ifndef HAVE_GECKO_1_9 nsCOMPtr webBrowser; gtk_moz_embed_get_nsIWebBrowser (GTK_MOZ_EMBED(browser), getter_AddRefs(webBrowser)); @@ -668,7 +660,6 @@ sugar_browser_scroll_pixels(SugarBrowser *browser, NS_ENSURE_TRUE (DOMWindow, ); DOMWindow->ScrollBy (dx, dy); -#endif } void @@ -690,12 +681,8 @@ sugar_browser_save_uri(SugarBrowser *browser, const char *uri, const char *filename) { -#ifdef HAVE_GECKO_1_9 GeckoBrowserPersist browserPersist(browser); return browserPersist.SaveURI(uri, filename); -#else - return FALSE; -#endif } gboolean diff --git a/configure.ac b/configure.ac index 5376c3f4..4e6ddbac 100644 --- a/configure.ac +++ b/configure.ac @@ -57,8 +57,6 @@ AC_SUBST(MOZILLA_INCLUDE_DIR) AC_SUBST(XPIDL) AC_SUBST(MOZILLA_IDL_DIR) -AC_DEFINE([HAVE_GECKO_1_9],[1],[Define if we have gecko 1.9]) - PKG_CHECK_MODULES(NSPR, [nspr], [have_nspr=true], [ diff --git a/sugar/browser/xulrunner.cpp b/sugar/browser/xulrunner.cpp index 1880e3ba..f7dc0fd1 100644 --- a/sugar/browser/xulrunner.cpp +++ b/sugar/browser/xulrunner.cpp @@ -21,15 +21,11 @@ #include -#ifdef HAVE_GECKO_1_9 #include "gtkmozembed_glue.cpp" -#endif extern "C" int xulrunner_startup(void) { -#ifdef HAVE_GECKO_1_9 - static const GREVersionRange greVersion = { "1.9a", PR_TRUE, "2", PR_TRUE @@ -61,5 +57,4 @@ xulrunner_startup(void) *lastSlash = '\0'; gtk_moz_embed_set_path(xpcomPath); -#endif }