diff options
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/pglist.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/plugins/pglist.c b/src/plugins/pglist.c index 6b36d2f..e4cb825 100644 --- a/src/plugins/pglist.c +++ b/src/plugins/pglist.c @@ -39,6 +39,7 @@ #include "plugin-int.h" #include "../common/extstr.h" #include "../core/logs.h" +#include "../core/nox.h" #include "../core/paths.h" @@ -255,6 +256,7 @@ static void browse_directory_for_plugins(const char *dir) { struct dirent **namelist; /* Eléments trouvés */ int ret; /* Bilan du parcours */ + bool nox; /* Absence de support graphique*/ char *filename; /* Elément à ausculter */ GPluginModule *plugin; /* Greffon à intégrer ou pas */ @@ -265,8 +267,27 @@ static void browse_directory_for_plugins(const char *dir) return; } + nox = run_in_nox_mode(); + while (ret--) { + + if (nox) + { +#ifdef _WIN32 +# define UI_SHARED_SUFFIX "-ui.dll" +#else +# define UI_SHARED_SUFFIX "-ui.so" +#endif + + if (strstr(namelist[ret]->d_name, UI_SHARED_SUFFIX) != NULL) + { + log_variadic_message(LMT_ERROR, _("Skipping unsuitable file: %s"), namelist[ret]->d_name); + continue; + } + + } + filename = (char *)calloc(strlen(dir) + 1 + strlen(namelist[ret]->d_name) + 1, sizeof(char)); strcpy(filename, dir); |