Setup plugins path
This commit is contained in:
parent
698e0cb7f9
commit
8a0728b169
@ -1,17 +1,18 @@
|
|||||||
libsugarprivate_la_CPPFLAGS = \
|
libsugarprivate_la_CPPFLAGS = \
|
||||||
$(WARN_CFLAGS) \
|
$(WARN_CFLAGS) \
|
||||||
$(LIB_CFLAGS) \
|
$(LIB_CFLAGS) \
|
||||||
$(GECKO_CFLAGS) \
|
$(GECKO_CFLAGS) \
|
||||||
-I$(MOZILLA_INCLUDE_DIR)/dom \
|
-I$(MOZILLA_INCLUDE_DIR)/dom \
|
||||||
-I$(MOZILLA_INCLUDE_DIR)/exthandler \
|
-I$(MOZILLA_INCLUDE_DIR)/exthandler \
|
||||||
-I$(MOZILLA_INCLUDE_DIR)/gtkembedmoz \
|
-I$(MOZILLA_INCLUDE_DIR)/gtkembedmoz \
|
||||||
-I$(MOZILLA_INCLUDE_DIR)/mimetype \
|
-I$(MOZILLA_INCLUDE_DIR)/mimetype \
|
||||||
-I$(MOZILLA_INCLUDE_DIR)/necko \
|
-I$(MOZILLA_INCLUDE_DIR)/necko \
|
||||||
-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
|
||||||
|
|
||||||
libsugarprivate_la_LIBADD = \
|
libsugarprivate_la_LIBADD = \
|
||||||
|
@ -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