From 79836c7a0f9785867ff3232102d7ac4f0d717838 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Sat, 02 Jun 2007 21:46:25 +0000 Subject: Add $prefix/lib/mozilla/plugins to the plugin path. Fix dpi calculation. --- (limited to 'src') diff --git a/src/Makefile.am b/src/Makefile.am index fd3f647..5afe7b3 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,25 +1,26 @@ -INCLUDES = \ - $(DEPS_CFLAGS) \ - $(PYTHON_INCLUDES) \ - $(MOZILLA_CFLAGS) \ - -I$(MOZILLA_INCLUDE_ROOT)/docshell \ - -I$(MOZILLA_INCLUDE_ROOT)/dom \ - -I$(MOZILLA_INCLUDE_ROOT)/xulapp \ - -I$(MOZILLA_INCLUDE_ROOT)/nspr \ - -I$(MOZILLA_INCLUDE_ROOT)/pyxpcom \ - -I$(MOZILLA_INCLUDE_ROOT)/string \ - -I$(MOZILLA_INCLUDE_ROOT)/webbrwsr \ - -I$(MOZILLA_INCLUDE_ROOT)/widget \ - -I$(MOZILLA_INCLUDE_ROOT)/xpcom \ - -DMOZILLA_HOME=\"$(MOZILLA_HOME)\" \ +INCLUDES = \ + $(DEPS_CFLAGS) \ + $(PYTHON_INCLUDES) \ + $(MOZILLA_CFLAGS) \ + -I$(MOZILLA_INCLUDE_ROOT)/docshell \ + -I$(MOZILLA_INCLUDE_ROOT)/dom \ + -I$(MOZILLA_INCLUDE_ROOT)/xulapp \ + -I$(MOZILLA_INCLUDE_ROOT)/nspr \ + -I$(MOZILLA_INCLUDE_ROOT)/pyxpcom \ + -I$(MOZILLA_INCLUDE_ROOT)/string \ + -I$(MOZILLA_INCLUDE_ROOT)/webbrwsr \ + -I$(MOZILLA_INCLUDE_ROOT)/widget \ + -I$(MOZILLA_INCLUDE_ROOT)/xpcom \ + -DMOZILLA_HOME=\"$(MOZILLA_HOME)\" \ + -DPLUGIN_PATH=\"$(libdir)/mozilla/plugins\" \ -DDATA_DIR=\"$(pkgdatadir)\" noinst_LTLIBRARIES = libhulahop.la -libhulahop_la_SOURCES = \ +libhulahop_la_SOURCES = \ HulahopDirectoryProvider.cpp \ - HulahopDirectoryProvider.h \ - hulahop.cpp \ - hulahop.h \ - hulahop-web-view.cpp \ + HulahopDirectoryProvider.h \ + hulahop.cpp \ + hulahop.h \ + hulahop-web-view.cpp \ hulahop-web-view.h diff --git a/src/hulahop.cpp b/src/hulahop.cpp index 32c9f4f..8448a5b 100644 --- a/src/hulahop.cpp +++ b/src/hulahop.cpp @@ -26,11 +26,28 @@ static HulahopDirectoryProvider kDirectoryProvider; +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_PATH, + (char *) NULL); + g_setenv ("MOZ_PLUGIN_PATH", new_path, TRUE); + g_free (new_path); +} + gboolean hulahop_startup() { nsresult rv; + setup_plugin_path(); + nsCOMPtr greDir; rv = NS_NewNativeLocalFile(nsCString(MOZILLA_HOME), PR_TRUE, getter_AddRefs(greDir)); -- cgit v0.9.1