Take out the HAVE_GECKO_1_9 ifdefs, we only support Gecko 1.9 now.
This commit is contained in:
parent
16304b33c8
commit
50d2b66501
@ -1,7 +1,5 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#ifdef HAVE_GECKO_1_9
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <gtkmozembed.h>
|
#include <gtkmozembed.h>
|
||||||
@ -183,5 +181,3 @@ GeckoBrowserPersist::SaveURI(const char *uri, const char *filename)
|
|||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#ifdef HAVE_GECKO_1_9
|
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
@ -237,5 +235,3 @@ GeckoDocumentObject::SaveImage(const char *filename)
|
|||||||
GeckoBrowserPersist browserPersist(mBrowser);
|
GeckoBrowserPersist browserPersist(mBrowser);
|
||||||
return browserPersist.SaveURI(mImageURI.get(), filename);
|
return browserPersist.SaveURI(mImageURI.get(), filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -86,7 +86,6 @@ GeckoDownload::OnStateChange(nsIWebProgress *aWebProgress,
|
|||||||
mMIMEInfo->GetMIMEType(mimeType);
|
mMIMEInfo->GetMIMEType(mimeType);
|
||||||
mSource->GetSpec(url);
|
mSource->GetSpec(url);
|
||||||
|
|
||||||
#ifdef HAVE_GECKO_1_9
|
|
||||||
/* If the file is application/octet-stream, look up a better mime type
|
/* If the file is application/octet-stream, look up a better mime type
|
||||||
from the extension. */
|
from the extension. */
|
||||||
if(mimeType.Equals(APPLICATION_OCTET_STREAM)) {
|
if(mimeType.Equals(APPLICATION_OCTET_STREAM)) {
|
||||||
@ -106,7 +105,6 @@ GeckoDownload::OnStateChange(nsIWebProgress *aWebProgress,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
sugar_download_manager_download_started(download_manager,
|
sugar_download_manager_download_started(download_manager,
|
||||||
url.get(),
|
url.get(),
|
||||||
@ -187,8 +185,6 @@ GeckoDownload::OnSecurityChange (nsIWebProgress *aWebProgress,
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_GECKO_1_9
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
GeckoDownload::OnRefreshAttempted (nsIWebProgress *aWebProgress,
|
GeckoDownload::OnRefreshAttempted (nsIWebProgress *aWebProgress,
|
||||||
nsIURI *aRefreshURI,
|
nsIURI *aRefreshURI,
|
||||||
@ -199,8 +195,6 @@ GeckoDownload::OnRefreshAttempted (nsIWebProgress *aWebProgress,
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//*****************************************************************************
|
//*****************************************************************************
|
||||||
// GeckoDownloadFactory
|
// GeckoDownloadFactory
|
||||||
//*****************************************************************************
|
//*****************************************************************************
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#ifdef HAVE_GECKO_1_9
|
|
||||||
|
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
@ -214,5 +212,3 @@ GeckoDragDropHooks::OnPasteOrDrop(nsIDOMEvent *event, nsITransferable *trans,
|
|||||||
{
|
{
|
||||||
return NS_ERROR_NOT_IMPLEMENTED;
|
return NS_ERROR_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -23,13 +23,10 @@
|
|||||||
#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"
|
||||||
#include "GeckoDirectoryProvider.h"
|
#include "GeckoDirectoryProvider.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <gdk/gdkx.h>
|
#include <gdk/gdkx.h>
|
||||||
#include <gtkmozembed_internal.h>
|
#include <gtkmozembed_internal.h>
|
||||||
@ -591,7 +588,6 @@ 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;
|
||||||
@ -621,9 +617,6 @@ 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
|
||||||
@ -650,7 +643,6 @@ sugar_browser_scroll_pixels(SugarBrowser *browser,
|
|||||||
int dx,
|
int dx,
|
||||||
int dy)
|
int dy)
|
||||||
{
|
{
|
||||||
#ifndef HAVE_GECKO_1_9
|
|
||||||
nsCOMPtr<nsIWebBrowser> webBrowser;
|
nsCOMPtr<nsIWebBrowser> webBrowser;
|
||||||
gtk_moz_embed_get_nsIWebBrowser (GTK_MOZ_EMBED(browser),
|
gtk_moz_embed_get_nsIWebBrowser (GTK_MOZ_EMBED(browser),
|
||||||
getter_AddRefs(webBrowser));
|
getter_AddRefs(webBrowser));
|
||||||
@ -668,7 +660,6 @@ sugar_browser_scroll_pixels(SugarBrowser *browser,
|
|||||||
NS_ENSURE_TRUE (DOMWindow, );
|
NS_ENSURE_TRUE (DOMWindow, );
|
||||||
|
|
||||||
DOMWindow->ScrollBy (dx, dy);
|
DOMWindow->ScrollBy (dx, dy);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -690,12 +681,8 @@ 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
|
||||||
|
@ -57,8 +57,6 @@ AC_SUBST(MOZILLA_INCLUDE_DIR)
|
|||||||
AC_SUBST(XPIDL)
|
AC_SUBST(XPIDL)
|
||||||
AC_SUBST(MOZILLA_IDL_DIR)
|
AC_SUBST(MOZILLA_IDL_DIR)
|
||||||
|
|
||||||
AC_DEFINE([HAVE_GECKO_1_9],[1],[Define if we have gecko 1.9])
|
|
||||||
|
|
||||||
PKG_CHECK_MODULES(NSPR, [nspr],
|
PKG_CHECK_MODULES(NSPR, [nspr],
|
||||||
[have_nspr=true],
|
[have_nspr=true],
|
||||||
[
|
[
|
||||||
|
@ -21,15 +21,11 @@
|
|||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#ifdef HAVE_GECKO_1_9
|
|
||||||
#include "gtkmozembed_glue.cpp"
|
#include "gtkmozembed_glue.cpp"
|
||||||
#endif
|
|
||||||
|
|
||||||
extern "C" int
|
extern "C" int
|
||||||
xulrunner_startup(void)
|
xulrunner_startup(void)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_GECKO_1_9
|
|
||||||
|
|
||||||
static const GREVersionRange greVersion = {
|
static const GREVersionRange greVersion = {
|
||||||
"1.9a", PR_TRUE,
|
"1.9a", PR_TRUE,
|
||||||
"2", PR_TRUE
|
"2", PR_TRUE
|
||||||
@ -61,5 +57,4 @@ xulrunner_startup(void)
|
|||||||
*lastSlash = '\0';
|
*lastSlash = '\0';
|
||||||
|
|
||||||
gtk_moz_embed_set_path(xpcomPath);
|
gtk_moz_embed_set_path(xpcomPath);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user