epiphany-extensions r1728 - in branches/gnome-2-22/extensions: error-viewer/mozilla greasemonkey/mozilla java-console java-console/mozilla page-info/mozilla select-stylesheet/mozilla smart-bookmarks/mozilla



Author: chpe
Date: Sun May 18 21:51:17 2008
New Revision: 1728
URL: http://svn.gnome.org/viewvc/epiphany-extensions?rev=1728&view=rev

Log:
Fix the glue in the java-console extension.


Modified:
   branches/gnome-2-22/extensions/error-viewer/mozilla/mozilla-helpers.cpp
   branches/gnome-2-22/extensions/greasemonkey/mozilla/mozilla-helpers.cpp
   branches/gnome-2-22/extensions/java-console/java-console.c
   branches/gnome-2-22/extensions/java-console/mozilla/Makefile.am
   branches/gnome-2-22/extensions/java-console/mozilla/java-console.cpp
   branches/gnome-2-22/extensions/java-console/mozilla/java-console.h
   branches/gnome-2-22/extensions/page-info/mozilla/mozilla-helpers.cpp
   branches/gnome-2-22/extensions/select-stylesheet/mozilla/mozilla-helpers.cpp
   branches/gnome-2-22/extensions/smart-bookmarks/mozilla/mozilla-selection.cpp

Modified: branches/gnome-2-22/extensions/error-viewer/mozilla/mozilla-helpers.cpp
==============================================================================
--- branches/gnome-2-22/extensions/error-viewer/mozilla/mozilla-helpers.cpp	(original)
+++ branches/gnome-2-22/extensions/error-viewer/mozilla/mozilla-helpers.cpp	Sun May 18 21:51:17 2008
@@ -118,7 +118,6 @@
 
         return TRUE;
 #else
-#error hi there!
         return TRUE;
 #endif /* XPCOM_GLUE */
 }

Modified: branches/gnome-2-22/extensions/greasemonkey/mozilla/mozilla-helpers.cpp
==============================================================================
--- branches/gnome-2-22/extensions/greasemonkey/mozilla/mozilla-helpers.cpp	(original)
+++ branches/gnome-2-22/extensions/greasemonkey/mozilla/mozilla-helpers.cpp	Sun May 18 21:51:17 2008
@@ -125,7 +125,6 @@
 
         return TRUE;
 #else
-#error hi there!
         return TRUE;
 #endif /* XPCOM_GLUE */
 }

Modified: branches/gnome-2-22/extensions/java-console/java-console.c
==============================================================================
--- branches/gnome-2-22/extensions/java-console/java-console.c	(original)
+++ branches/gnome-2-22/extensions/java-console/java-console.c	Sun May 18 21:51:17 2008
@@ -21,6 +21,7 @@
 #include "config.h"
 
 #include "ephy-java-console-extension.h"
+#include "java-console.h"
 #include "ephy-debug.h"
 
 #include <gmodule.h>
@@ -33,6 +34,9 @@
 {
 	LOG ("Registering EphyJavaConsoleExtension");
 
+        if (!mozilla_glue_startup ())
+              return 0;
+
 #ifdef ENABLE_NLS
        /* Initialise the i18n stuff */
         bindtextdomain (GETTEXT_PACKAGE, EPHY_EXTENSIONS_LOCALEDIR);

Modified: branches/gnome-2-22/extensions/java-console/mozilla/Makefile.am
==============================================================================
--- branches/gnome-2-22/extensions/java-console/mozilla/Makefile.am	(original)
+++ branches/gnome-2-22/extensions/java-console/mozilla/Makefile.am	Sun May 18 21:51:17 2008
@@ -21,3 +21,10 @@
 	$(MOZILLA_COMPONENT_CFLAGS)	\
 	$(EPIPHANY_DEPENDENCY_CFLAGS) 	\
 	$(AM_CXXFLAGS)
+
+if HAVE_GECKO_1_9
+if HAVE_GECKO_XPCOM_GLUE
+libjavaconsolemozilla_la_CPPFLAGS += \
+ 	-DXPCOM_GLUE_USE_NSPR
+endif
+endif

Modified: branches/gnome-2-22/extensions/java-console/mozilla/java-console.cpp
==============================================================================
--- branches/gnome-2-22/extensions/java-console/mozilla/java-console.cpp	(original)
+++ branches/gnome-2-22/extensions/java-console/mozilla/java-console.cpp	Sun May 18 21:51:17 2008
@@ -21,6 +21,12 @@
 #include "mozilla-config.h"
 #include "config.h"
 
+
+#ifdef XPCOM_GLUE
+#include <nsXPCOMGlue.h>
+#include <gtkmozembed_glue.cpp>
+#endif
+
 #include <nsCOMPtr.h>
 #include <nsIJVMManager.h>
 #include <nsServiceManagerUtils.h>
@@ -48,3 +54,25 @@
 
 	jvmmgr->ShowJavaConsole ();
 }
+
+gboolean
+mozilla_glue_startup (void)
+{
+#ifdef XPCOM_GLUE
+	static const GREVersionRange greVersion = {
+	  "1.9a", PR_TRUE,
+	  "2", PR_TRUE
+	};
+	char xpcomLocation[4096];
+
+	if (NS_FAILED (GRE_GetGREPathWithProperties(&greVersion, 1, nsnull, 0, xpcomLocation, sizeof (xpcomLocation))) ||
+	    NS_FAILED (XPCOMGlueStartup (xpcomLocation)) ||
+	    NS_FAILED (GTKEmbedGlueStartup ()) ||
+	    NS_FAILED (GTKEmbedGlueStartupInternal()))
+                return FALSE;
+
+        return TRUE;
+#else
+        return TRUE;
+#endif /* XPCOM_GLUE */
+}

Modified: branches/gnome-2-22/extensions/java-console/mozilla/java-console.h
==============================================================================
--- branches/gnome-2-22/extensions/java-console/mozilla/java-console.h	(original)
+++ branches/gnome-2-22/extensions/java-console/mozilla/java-console.h	Sun May 18 21:51:17 2008
@@ -29,6 +29,8 @@
 
 void	 	java_console_show	  (void);
 
+gboolean       mozilla_glue_startup       (void);
+
 G_END_DECLS
 
 #endif

Modified: branches/gnome-2-22/extensions/page-info/mozilla/mozilla-helpers.cpp
==============================================================================
--- branches/gnome-2-22/extensions/page-info/mozilla/mozilla-helpers.cpp	(original)
+++ branches/gnome-2-22/extensions/page-info/mozilla/mozilla-helpers.cpp	Sun May 18 21:51:17 2008
@@ -1225,7 +1225,6 @@
 
         return TRUE;
 #else
-#error hi there!
         return TRUE;
 #endif /* XPCOM_GLUE */
 }

Modified: branches/gnome-2-22/extensions/select-stylesheet/mozilla/mozilla-helpers.cpp
==============================================================================
--- branches/gnome-2-22/extensions/select-stylesheet/mozilla/mozilla-helpers.cpp	(original)
+++ branches/gnome-2-22/extensions/select-stylesheet/mozilla/mozilla-helpers.cpp	Sun May 18 21:51:17 2008
@@ -103,9 +103,8 @@
 	NS_ENSURE_TRUE (aEmbed, NS_ERROR_FAILURE);
 
 	nsCOMPtr<nsIWebBrowser> browser;
-	gtk_moz_embed_get_nsIWebBrowser (
-			GTK_MOZ_EMBED (gtk_bin_get_child (GTK_BIN (aEmbed))),
-			getter_AddRefs (browser));
+	gtk_moz_embed_get_nsIWebBrowser (GTK_MOZ_EMBED (gtk_bin_get_child (GTK_BIN (embed))),
+					 getter_AddRefs (browser));
 	NS_ENSURE_TRUE (browser, NS_ERROR_FAILURE);
 
 	nsCOMPtr<nsIDOMWindow> domWindow;

Modified: branches/gnome-2-22/extensions/smart-bookmarks/mozilla/mozilla-selection.cpp
==============================================================================
--- branches/gnome-2-22/extensions/smart-bookmarks/mozilla/mozilla-selection.cpp	(original)
+++ branches/gnome-2-22/extensions/smart-bookmarks/mozilla/mozilla-selection.cpp	Sun May 18 21:51:17 2008
@@ -76,7 +76,7 @@
 {
 	nsCOMPtr<nsIWebBrowser> browser;
 	gtk_moz_embed_get_nsIWebBrowser (GTK_MOZ_EMBED (gtk_bin_get_child (GTK_BIN (embed))),
-			getter_AddRefs (browser));
+					 getter_AddRefs (browser));
 	nsCOMPtr<nsIWebBrowserFocus> focus (do_QueryInterface(browser));
 	NS_ENSURE_TRUE (focus, NULL);
 



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