pidgin/pidgin

Add an envionment variable for Pidgin plugin search path

2021-10-01, Elliott Sales de Andrade
c5ef99d267c3
Parents 8c240e88aef6
Children b46de1b53654
Add an envionment variable for Pidgin plugin search path

Testing Done:
Ran Pidgin with `PIDGIN_PLUGIN_PATH` set to somewhere not in the default.

Reviewed at https://reviews.imfreedom.org/r/970/
--- a/pidgin/pidginapplication.c Fri Oct 01 01:01:30 2021 -0500
+++ b/pidgin/pidginapplication.c Fri Oct 01 01:02:39 2021 -0500
@@ -480,6 +480,7 @@
GError *error = NULL;
GList *active_accounts = NULL;
gchar *search_path = NULL;
+ const gchar *plugin_path = NULL;
gpointer handle = NULL;
G_APPLICATION_CLASS(pidgin_application_parent_class)->startup(application);
@@ -531,6 +532,19 @@
g_abort();
}
+ plugin_path = g_getenv("PIDGIN_PLUGIN_PATH");
+ if (plugin_path) {
+ gchar **paths;
+ gint i;
+
+ paths = g_strsplit(plugin_path, G_SEARCHPATH_SEPARATOR_S, 0);
+ for (i = 0; paths[i]; ++i) {
+ purple_plugins_add_search_path(paths[i]);
+ }
+
+ g_strfreev(paths);
+ }
+
if(g_getenv("PURPLE_PLUGINS_SKIP")) {
purple_debug_info("gtk",
"PURPLE_PLUGINS_SKIP environment variable "