/pidgin/main: 54715f591a98: Merged in CMaiku/pidgin/purple-plugi...

Gary Kramlich grim at reaperworld.com
Thu Dec 31 11:59:27 EST 2015


Changeset: 54715f591a984b37c6e018e1f0c9082002fc81f9
Author:	 Gary Kramlich <grim at reaperworld.com>
Date:	 2015-12-31 02:55 -0600
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/54715f591a98

Description:

Merged in CMaiku/pidgin/purple-plugin-path (pull request #5)

Add PURPLE_PLUGIN_PATH environment variable

diffstat:

 libpurple/plugins.c |  17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diffs (34 lines):

diff --git a/libpurple/plugins.c b/libpurple/plugins.c
--- a/libpurple/plugins.c
+++ b/libpurple/plugins.c
@@ -1108,6 +1108,9 @@ void
 purple_plugins_init(void)
 {
 	void *handle = purple_plugins_get_handle();
+#ifdef PURPLE_PLUGINS
+	const gchar *search_path;
+#endif
 
 	purple_signal_register(handle, "plugin-load",
 	                       purple_marshal_VOID__POINTER,
@@ -1118,6 +1121,20 @@ purple_plugins_init(void)
 
 #ifdef PURPLE_PLUGINS
 	gplugin_init();
+
+	search_path = g_getenv("PURPLE_PLUGIN_PATH");
+	if (search_path) {
+		gchar **paths;
+		int i;
+
+		paths = g_strsplit(search_path, G_SEARCHPATH_SEPARATOR_S, 0);
+		for (i = 0; paths[i]; ++i) {
+			purple_plugins_add_search_path(paths[i]);
+		}
+
+		g_strfreev(paths);
+	}
+
 	gplugin_manager_add_default_paths();
 
 	purple_plugins_add_search_path(PURPLE_LIBDIR);



More information about the Commits mailing list