Make it compile with firefox

This commit is contained in:
Marco Pesenti Gritti 2007-04-17 22:46:33 +02:00
parent 734d16022e
commit 093ed2f2f2
4 changed files with 24 additions and 1 deletions

View File

@ -1,3 +1,5 @@
#ifdef HAVE_GECKO_1_9
#include <stdio.h> #include <stdio.h>
#include <gtkmozembed.h> #include <gtkmozembed.h>
@ -183,3 +185,5 @@ GeckoBrowserPersist::SaveURI(const char *uri, const char *filename)
return TRUE; return TRUE;
} }
#endif

View File

@ -1,3 +1,5 @@
#ifdef HAVE_GECKO_1_9
#include <unistd.h> #include <unistd.h>
#include <glib.h> #include <glib.h>
@ -185,3 +187,5 @@ GeckoDocumentObject::SaveImage(const char *filename)
GeckoBrowserPersist browserPersist(mBrowser); GeckoBrowserPersist browserPersist(mBrowser);
return browserPersist.SaveURI(mImageURI.get(), filename); return browserPersist.SaveURI(mImageURI.get(), filename);
} }
#endif

View File

@ -1,3 +1,5 @@
#ifdef HAVE_GECKO_1_9
#include <sys/time.h> #include <sys/time.h>
#include <time.h> #include <time.h>
@ -183,3 +185,5 @@ GeckoDragDropHooks::OnPasteOrDrop(nsIDOMEvent *event, nsITransferable *trans,
{ {
return NS_ERROR_NOT_IMPLEMENTED; return NS_ERROR_NOT_IMPLEMENTED;
} }
#endif

View File

@ -23,9 +23,12 @@
#include "sugar-marshal.h" #include "sugar-marshal.h"
#include "GeckoContentHandler.h" #include "GeckoContentHandler.h"
#include "GeckoDownload.h" #include "GeckoDownload.h"
#ifdef HAVE_GECKO_1_9
#include "GeckoDragDropHooks.h" #include "GeckoDragDropHooks.h"
#include "GeckoDocumentObject.h" #include "GeckoDocumentObject.h"
#include "GeckoBrowserPersist.h" #include "GeckoBrowserPersist.h"
#endif
#include <gdk/gdkx.h> #include <gdk/gdkx.h>
#include <gtkmozembed_internal.h> #include <gtkmozembed_internal.h>
@ -563,6 +566,7 @@ location_cb(GtkMozEmbed *embed)
static gboolean static gboolean
dom_mouse_click_cb(GtkMozEmbed *embed, nsIDOMMouseEvent *mouseEvent) dom_mouse_click_cb(GtkMozEmbed *embed, nsIDOMMouseEvent *mouseEvent)
{ {
#ifdef HAVE_GECKO_1_9
SugarBrowser *browser = SUGAR_BROWSER(embed); SugarBrowser *browser = SUGAR_BROWSER(embed);
SugarBrowserEvent *event; SugarBrowserEvent *event;
gint return_value = FALSE; gint return_value = FALSE;
@ -592,6 +596,9 @@ dom_mouse_click_cb(GtkMozEmbed *embed, nsIDOMMouseEvent *mouseEvent)
sugar_browser_event_free(event); sugar_browser_event_free(event);
return return_value; return return_value;
#else
return FALSE;
#endif
} }
static void static void
@ -658,8 +665,12 @@ sugar_browser_save_uri(SugarBrowser *browser,
const char *uri, const char *uri,
const char *filename) const char *filename)
{ {
#ifdef HAVE_GECKO_1_9
GeckoBrowserPersist browserPersist(browser); GeckoBrowserPersist browserPersist(browser);
return browserPersist.SaveURI(uri, filename); return browserPersist.SaveURI(uri, filename);
#else
return FALSE;
#endif
} }
gboolean gboolean