1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-11-17 16:05:36 +00:00

manager: Don't use peas_engine_prepend_search_path

as it does not really "prepend" the search path.
See https://gitlab.gnome.org/GNOME/libpeas/-/issues/19

Closes #300
This commit is contained in:
Evangelos Ribeiro Tzaras 2021-06-29 14:43:16 +02:00
parent e00b90d64e
commit 23e7fd3a60

View file

@ -703,17 +703,19 @@ calls_manager_init (CallsManager *self)
self->contacts_provider, "country-code", self->contacts_provider, "country-code",
G_BINDING_DEFAULT); G_BINDING_DEFAULT);
// Prepend peas plugin search path
peas = peas_engine_get_default (); peas = peas_engine_get_default ();
peas_engine_add_search_path (peas, PLUGIN_LIBDIR, NULL);
g_debug ("Scanning for plugins in `%s'", PLUGIN_LIBDIR);
dir = g_getenv ("CALLS_PLUGIN_DIR"); dir = g_getenv ("CALLS_PLUGIN_DIR");
if (dir && dir[0] != '\0') { if (dir && dir[0] != '\0') {
/** Add the directory to the search path. prepend_search_path() does not work
* as expected. see https://gitlab.gnome.org/GNOME/libpeas/-/issues/19
*/
g_debug ("Adding %s to plugin search path", dir); g_debug ("Adding %s to plugin search path", dir);
peas_engine_prepend_search_path (peas, dir, NULL); peas_engine_add_search_path (peas, dir, NULL);
} }
peas_engine_add_search_path (peas, PLUGIN_LIBDIR, NULL);
g_debug ("Scanning for plugins in `%s'", PLUGIN_LIBDIR);
} }