Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2007-01-26 10:44:08 (GMT)
committer Marco Pesenti Gritti <mpg@redhat.com>2007-01-26 10:44:08 (GMT)
commit8a0728b169535e83ba1c1540cd6ddc42d24f16e3 (patch)
treef0fc8f6f8924dd2a2ebe14d16338990a4e4eb7ef /lib
parent698e0cb7f9c66aa34e752d3cd9c9bcdf50958259 (diff)
Setup plugins path
Diffstat (limited to 'lib')
-rw-r--r--lib/src/Makefile.am27
-rw-r--r--lib/src/sugar-browser.cpp17
2 files changed, 31 insertions, 13 deletions
diff --git a/lib/src/Makefile.am b/lib/src/Makefile.am
index f7d0e17..407b469 100644
--- a/lib/src/Makefile.am
+++ b/lib/src/Makefile.am
@@ -1,17 +1,18 @@
-libsugarprivate_la_CPPFLAGS = \
- $(WARN_CFLAGS) \
- $(LIB_CFLAGS) \
- $(GECKO_CFLAGS) \
- -I$(MOZILLA_INCLUDE_DIR)/dom \
- -I$(MOZILLA_INCLUDE_DIR)/exthandler \
- -I$(MOZILLA_INCLUDE_DIR)/gtkembedmoz \
- -I$(MOZILLA_INCLUDE_DIR)/mimetype \
- -I$(MOZILLA_INCLUDE_DIR)/necko \
- -I$(MOZILLA_INCLUDE_DIR)/pref \
- -I$(MOZILLA_INCLUDE_DIR)/uriloader \
- -I$(MOZILLA_INCLUDE_DIR)/webbrwsr \
+libsugarprivate_la_CPPFLAGS = \
+ $(WARN_CFLAGS) \
+ $(LIB_CFLAGS) \
+ $(GECKO_CFLAGS) \
+ -I$(MOZILLA_INCLUDE_DIR)/dom \
+ -I$(MOZILLA_INCLUDE_DIR)/exthandler \
+ -I$(MOZILLA_INCLUDE_DIR)/gtkembedmoz \
+ -I$(MOZILLA_INCLUDE_DIR)/mimetype \
+ -I$(MOZILLA_INCLUDE_DIR)/necko \
+ -I$(MOZILLA_INCLUDE_DIR)/pref \
+ -I$(MOZILLA_INCLUDE_DIR)/uriloader \
+ -I$(MOZILLA_INCLUDE_DIR)/webbrwsr \
+ -DPLUGIN_DIR=\"$(libdir)/mozilla/plugins\" \
-DSHARE_DIR=\"$(pkgdatadir)\"
-
+
noinst_LTLIBRARIES = libsugarprivate.la
libsugarprivate_la_LIBADD = \
diff --git a/lib/src/sugar-browser.cpp b/lib/src/sugar-browser.cpp
index fe94378..4bbbb62 100644
--- a/lib/src/sugar-browser.cpp
+++ b/lib/src/sugar-browser.cpp
@@ -69,11 +69,28 @@ static const nsModuleComponentInfo sSugarComponents[] = {
#endif
+static void
+setup_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 ? ":" : "",
+ PLUGIN_DIR,
+ (char *) NULL);
+ g_setenv ("MOZ_PLUGIN_PATH", new_path, TRUE);
+ g_free (new_path);
+}
+
gboolean
sugar_browser_startup(const char *profile_path, const char *profile_name)
{
nsresult rv;
+ setup_plugin_path();
+
gtk_moz_embed_set_profile_path(profile_path, profile_name);
gtk_moz_embed_push_startup();