Setup plugins path
This commit is contained in:
parent
698e0cb7f9
commit
8a0728b169
@ -10,6 +10,7 @@ libsugarprivate_la_CPPFLAGS = \
|
|||||||
-I$(MOZILLA_INCLUDE_DIR)/pref \
|
-I$(MOZILLA_INCLUDE_DIR)/pref \
|
||||||
-I$(MOZILLA_INCLUDE_DIR)/uriloader \
|
-I$(MOZILLA_INCLUDE_DIR)/uriloader \
|
||||||
-I$(MOZILLA_INCLUDE_DIR)/webbrwsr \
|
-I$(MOZILLA_INCLUDE_DIR)/webbrwsr \
|
||||||
|
-DPLUGIN_DIR=\"$(libdir)/mozilla/plugins\" \
|
||||||
-DSHARE_DIR=\"$(pkgdatadir)\"
|
-DSHARE_DIR=\"$(pkgdatadir)\"
|
||||||
|
|
||||||
noinst_LTLIBRARIES = libsugarprivate.la
|
noinst_LTLIBRARIES = libsugarprivate.la
|
||||||
|
@ -69,11 +69,28 @@ static const nsModuleComponentInfo sSugarComponents[] = {
|
|||||||
|
|
||||||
#endif
|
#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
|
gboolean
|
||||||
sugar_browser_startup(const char *profile_path, const char *profile_name)
|
sugar_browser_startup(const char *profile_path, const char *profile_name)
|
||||||
{
|
{
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
|
|
||||||
|
setup_plugin_path();
|
||||||
|
|
||||||
gtk_moz_embed_set_profile_path(profile_path, profile_name);
|
gtk_moz_embed_set_profile_path(profile_path, profile_name);
|
||||||
|
|
||||||
gtk_moz_embed_push_startup();
|
gtk_moz_embed_push_startup();
|
||||||
|
Loading…
Reference in New Issue
Block a user