From 38fd32a8c0541a959537161ac7dd8737a0c86b7b Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Thu, 7 Oct 2004 11:04:25 +0000 Subject: reviewed by: Christian Persch 2004-10-07 Marco Pesenti Gritti reviewed by: Christian Persch * configure.ac: * embed/mozilla/Makefile.am: * embed/mozilla/mozilla-embed-single.cpp: Initialize plugins path env var for backward compatibility --- embed/mozilla/Makefile.am | 1 + embed/mozilla/mozilla-embed-single.cpp | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) (limited to 'embed/mozilla') diff --git a/embed/mozilla/Makefile.am b/embed/mozilla/Makefile.am index 1b83bfa1c..58ca89e96 100644 --- a/embed/mozilla/Makefile.am +++ b/embed/mozilla/Makefile.am @@ -34,6 +34,7 @@ INCLUDES = \ $(EPIPHANY_DEPENDENCY_CFLAGS) \ -DSHARE_DIR=\"$(pkgdatadir)\" \ -DMOZILLA_HOME=\"$(MOZILLA_HOME)\" \ + -DMOZILLA_PREFIX=\"$(MOZILLA_PREFIX)\" \ -DALLOW_PRIVATE_API if MAINTAINER_MODE diff --git a/embed/mozilla/mozilla-embed-single.cpp b/embed/mozilla/mozilla-embed-single.cpp index 59a8cb00e..94f3123e3 100644 --- a/embed/mozilla/mozilla-embed-single.cpp +++ b/embed/mozilla/mozilla-embed-single.cpp @@ -320,6 +320,23 @@ mozilla_embed_single_new_window_orphan_cb (GtkMozEmbedSingle *embed, *retval = _mozilla_embed_new_xul_dialog (); } +static void +mozilla_init_plugin_path () +{ + const char *user_path; + char *new_path; + + user_path = g_getenv ("MOZ_PLUGIN_PATH"); + new_path = g_strconcat (user_path ? user_path : "", + user_path ? ":" : "", + MOZILLA_PREFIX "/lib/mozilla/plugins:" + MOZILLA_HOME "/plugins", + NULL); + + g_setenv ("MOZ_PLUGIN_PATH", new_path, TRUE); + g_free (new_path); +} + static void mozilla_init_single (MozillaEmbedSingle *mes) { @@ -463,6 +480,7 @@ static gboolean init_services (MozillaEmbedSingle *single) { /* Pre initialization */ + mozilla_init_plugin_path (); mozilla_init_home (); mozilla_init_profile (); -- cgit v1.2.3