evolution-rss r254 - in trunk: . src



Author: lucilanga
Date: Sun May  4 15:00:01 2008
New Revision: 254
URL: http://svn.gnome.org/viewvc/evolution-rss?rev=254&view=rev

Log:
fallback_engine fix

Modified:
   trunk/configure.ac
   trunk/src/Makefile.am
   trunk/src/Makefile.in
   trunk/src/rss.c

Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac	(original)
+++ trunk/configure.ac	Sun May  4 15:00:01 2008
@@ -176,25 +176,20 @@
 	if test "x$have_gecko" != "xno"; then
 		if test $GECKO = libxul-embedding; then
 			PKG_CHECK_MODULES([GECKO],[libxul-embedding $gecko_cv_extra_pkg_dependencies  >= $gecko_min_version])
+			GECKO_CFLAGS="$GECKO_CFLAGS $(pkg-config --cflags --define-variable=includetype=unstable libxul-embedding)"
 		else
 	    		#PKG_CHECK_MODULES([GECKO],[$GECKO_EXTRA_PKG_DEPENDENCIES $GECKO-xpcom >= $gecko_min_version])
 	    		PKG_CHECK_MODULES([GECKO],[$GECKO_EXTRA_PKG_DEPENDENCIES $GECKO >= $gecko_min_version])
 		fi
 	AC_SUBST([GECKO_CFLAGS])
 	AC_SUBST([GECKO_LIBS])
-echo $GECKO
-echo $GECKO_HOME
-echo $GECKO_INCLUDE_ROOT
-echo $GECKO_CFLAGS
-echo $GECKO_LIBS
-
 		if test "x$have_gecko" != "xno"; then
 		AC_DEFINE_UNQUOTED(HAVE_RENDERKIT,1, [either webkit or gtkmozemebed render engines are present])
 		AC_DEFINE_UNQUOTED(HAVE_GTKMOZEMBED,1, [gtkmozembed render engine present])
 		AC_SUBST(HAVE_RENDERKIT)
 		AC_SUBST(HAVE_GTKMOZEMEBED)
 		RENDER_CFLAGS="$GECKO_CFLAGS -I$GECKO_INCLUDE_ROOT" 
-		GECKO_RPATH="-Wl,--rpath -Wl,"$GECKO_HOME
+		#GECKO_RPATH="-Wl,--rpath -Wl,"$GECKO_HOME
 		AC_SUBST([GECKO_RPATH])
 	
 			if test "x$GECKO" == "xxulrunner"; then

Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am	(original)
+++ trunk/src/Makefile.am	Sun May  4 15:00:01 2008
@@ -64,7 +64,8 @@
 plugin_LTLIBRARIES = liborg-gnome-evolution-rss.la
 
 liborg_gnome_evolution_rss_la_SOURCES = rss.c
-liborg_gnome_evolution_rss_la_LDFLAGS = -module -avoid-version $(WEBKIT_LIBS) $(GECKO_LIBS) $(GECKO_RPATH)
+liborg_gnome_evolution_rss_la_LDFLAGS = -module -avoid-version $(WEBKIT_LIBS) $(GECKO_LIBS)
+# $(GECKO_RPATH)
 
 evolution_import_rss_SOURCES = evolution-import-rss.c
 evolution_import_rss_LDFLAGS = $(DBUS_LIBS)

Modified: trunk/src/Makefile.in
==============================================================================
--- trunk/src/Makefile.in	(original)
+++ trunk/src/Makefile.in	Sun May  4 15:00:01 2008
@@ -340,7 +340,8 @@
 
 plugin_LTLIBRARIES = liborg-gnome-evolution-rss.la
 liborg_gnome_evolution_rss_la_SOURCES = rss.c
-liborg_gnome_evolution_rss_la_LDFLAGS = -module -avoid-version $(WEBKIT_LIBS) $(GECKO_LIBS) $(GECKO_RPATH)
+liborg_gnome_evolution_rss_la_LDFLAGS = -module -avoid-version $(WEBKIT_LIBS) $(GECKO_LIBS)
+# $(GECKO_RPATH)
 evolution_import_rss_SOURCES = evolution-import-rss.c
 evolution_import_rss_LDFLAGS = $(DBUS_LIBS)
 schemadir = $(GCONF_SCHEMA_FILE_DIR)

Modified: trunk/src/rss.c
==============================================================================
--- trunk/src/rss.c	(original)
+++ trunk/src/rss.c	Sun May  4 15:00:01 2008
@@ -85,14 +85,22 @@
 
 #ifdef HAVE_RENDERKIT
 
+#ifndef XPCOM_GLUE
+#  define MOZILLA_INTERNAL_API
+#endif
+
+#ifdef XPCOM_GLUE
+#  include <gtkmozembed_glue.cpp>
+#endif
+
 #ifdef HAVE_GTKMOZEMBED
-#ifdef HAVE_LIBXUL
+//#ifdef HAVE_LIBXUL
 //#include <gtkembedmoz/gtkmozembed.h>
 #include <gtkmozembed.h>
 //#include <gtkmozembed_internal.h>
-#else
-#include <gtkmozembed.h>
-#endif
+//#else
+//#include <gtkmozembed.h>
+//#endif
 #endif
 
 #ifdef HAVE_OLD_WEBKIT
@@ -1533,6 +1541,41 @@
        	g_setenv("MOZILLA_FIVE_HOME", GECKO_HOME, 1);
 	g_unsetenv("MOZILLA_FIVE_HOME");
 
+#ifdef XPCOM_GLUE
+    static const GREVersionRange greVersion = {
+    "1.9a", PR_TRUE,
+    "2", PR_TRUE
+    };
+    char xpcomLocation[4096];
+    nsresult rv = GRE_GetGREPathWithProperties(&greVersion, 1, nsnull, 0, xpcomLocation, 4096);
+    if (NS_FAILED(rv)) {
+       printf("failed 1\n");
+       return;
+    }
+
+    // Startup the XPCOM Glue that links us up with XPCOM.
+    XPCOMGlueStartup(xpcomLocation);
+    if (NS_FAILED(rv)) {
+        printf("failed 2\n");
+        return;
+    }
+    printf("before 3\n");
+
+    rv = GTKEmbedGlueStartup();
+    if (NS_FAILED(rv)) {
+        printf("failed 3\n");
+        return;
+    }
+
+    //gtk_moz_embed_set_comp_path(xpcomLocation);
+
+    char *lastSlash = strrchr(xpcomLocation, '/');
+    if (lastSlash)
+      *lastSlash = '\0';
+
+    gtk_moz_embed_set_path(xpcomLocation);
+#endif
+
 // this means xulrunner at least 1.9
 #ifdef HAVE_LIBXUL
 	gtk_moz_embed_set_path(GECKO_HOME);
@@ -1597,6 +1640,7 @@
 			rf->test++;
 		}*/
 
+		g_print("DUDICI\n");
 		rf->mozembed = gtk_moz_embed_new();
 
 		/* FIXME add all those profile shits */
@@ -3045,14 +3089,16 @@
 #if !defined(HAVE_GTKMOZEMBED) && !defined (HAVE_WEBKIT)
         engine=0;
 #endif
-if (engine == 2)
+if (engine == 2) {
 #if !defined(HAVE_GTKMOZEMBED)
         engine=1;
 #endif
-if (engine == 1)
+}
+if (engine == 1) {
 #if !defined (HAVE_WEBKIT)
         engine=2;
 #endif
+}
 	return engine;
 #endif
 	return 0;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]