Setup plugins path

This commit is contained in:
Marco Pesenti Gritti 2007-01-26 11:44:08 +01:00
parent 698e0cb7f9
commit 8a0728b169
2 changed files with 31 additions and 13 deletions

View File

@ -10,6 +10,7 @@ libsugarprivate_la_CPPFLAGS = \
-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

View File

@ -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();