/pidgin/main: f28a27411235: Add PURPLE_PLUGIN_PATH environment v...

Mike Ruprecht <[email protected]>
Newsgroups gmane.comp.gnome.gaim.cvs
Message-ID <[email protected]>
Changeset: f28a2741123558d86d46e3df8a3c4288ffe90cfb
Author:	 Mike Ruprecht <[email protected]>
Date:	 2015-12-31 02:33 -0600
Branch:	 purple-plugin-path
URL: https://hg.pidgin.im/pidgin/main/rev/f28a27411235

Description:

Add PURPLE_PLUGIN_PATH environment variable
This allows plugins in arbitrary paths to be loaded.

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

_______________________________________________
Commits mailing list
[email protected]
https://pidgin.im/cgi-bin/mailman/listinfo/commits
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.