aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
Diffstat (limited to 'embed')
-rw-r--r--embed/mozilla/Makefile.am1
-rw-r--r--embed/mozilla/mozilla-embed-single.cpp18
2 files changed, 19 insertions, 0 deletions
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
@@ -321,6 +321,23 @@ mozilla_embed_single_new_window_orphan_cb (GtkMozEmbedSingle *embed,
}
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)
{
GtkMozEmbedSingle *single;
@@ -463,6 +480,7 @@ static gboolean
init_services (MozillaEmbedSingle *single)
{
/* Pre initialization */
+ mozilla_init_plugin_path ();
mozilla_init_home ();
mozilla_init_profile ();