Actually make it work on 1.9. Had to disable some stuff, temporarily.

master
Marco Pesenti Gritti 18 years ago
parent 94d7f94534
commit 997a90d7cc

@ -43,7 +43,7 @@ if test "x$with_libxul_sdk" != x ; then
# xulrunner 1.9
GECKO_CFLAGS="-I$with_libxul_sdk/sdk/include"
GECKO_CFLAGS="-I$with_libxul_sdk/sdk/include -DXPCOM_GLUE"
XPCOMGLUE_LIBS="-L$with_libxul_sdk/sdk/lib -lxpcomglue"
MOZILLA_INCLUDE_DIR="$with_libxul_sdk/include"

@ -20,7 +20,9 @@ _sugar_la_LIBADD = \
$(top_builddir)/lib/src/libsugarprivate.la
_sugar_la_SOURCES = \
_sugarmodule.c
_sugarmodule.c \
xulrunner.cpp \
xulrunner.h
nodist__sugar_la_SOURCES = _sugar.c

@ -2,6 +2,8 @@
#include "config.h"
#endif
#include "xulrunner.h"
/* include this first, before NO_IMPORT_PYGOBJECT is defined */
#include <pygobject.h>
@ -17,6 +19,8 @@ init_sugar(void)
{
PyObject *m, *d;
xulrunner_startup();
init_pygobject ();
Pycairo_IMPORT;

@ -17,6 +17,8 @@
* Boston, MA 02111-1307, USA.
*/
#include <config.h>
#include "sugar-browser.h"
#include "GeckoContentHandler.h"
#include "GeckoDownload.h"
@ -35,9 +37,6 @@
#include <nsIComponentRegistrar.h>
#include <nsIComponentManager.h>
NS_GENERIC_FACTORY_CONSTRUCTOR(GeckoContentHandler)
NS_GENERIC_FACTORY_CONSTRUCTOR(GeckoDownload)
enum {
PROP_0,
PROP_PROGRESS,
@ -48,6 +47,11 @@ enum {
PROP_LOADING
};
#ifndef HAVE_GECKO_1_9
NS_GENERIC_FACTORY_CONSTRUCTOR(GeckoContentHandler)
NS_GENERIC_FACTORY_CONSTRUCTOR(GeckoDownload)
static const nsModuleComponentInfo sSugarComponents[] = {
{
"Gecko Content Handler",
@ -63,6 +67,8 @@ static const nsModuleComponentInfo sSugarComponents[] = {
}
};
#endif
gboolean
sugar_browser_startup(const char *profile_path, const char *profile_name)
{
@ -97,6 +103,8 @@ sugar_browser_startup(const char *profile_path, const char *profile_name)
g_warning ("failed to read user preferences, error: %x", rv);
}
#ifndef HAVE_GECKO_1_9
/* Register our components */
nsCOMPtr<nsIComponentRegistrar> componentRegistrar;
NS_GetComponentRegistrar(getter_AddRefs(componentRegistrar));
@ -135,6 +143,8 @@ sugar_browser_startup(const char *profile_path, const char *profile_name)
}
}
}
#endif
return TRUE;
}
@ -370,6 +380,7 @@ sugar_browser_scroll_pixels(SugarBrowser *browser,
int dx,
int dy)
{
#ifndef HAVE_GECKO_1_9
nsCOMPtr<nsIWebBrowser> webBrowser;
gtk_moz_embed_get_nsIWebBrowser (GTK_MOZ_EMBED(browser),
getter_AddRefs(webBrowser));
@ -387,6 +398,7 @@ sugar_browser_scroll_pixels(SugarBrowser *browser,
NS_ENSURE_TRUE (DOMWindow, );
DOMWindow->ScrollBy (dx, dy);
#endif
}
void

Loading…
Cancel
Save