diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2023-10-16 21:55:06 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2023-10-16 21:58:00 (GMT) |
commit | 2f11bd5ab90436bf148428aebecca461cb5d095b (patch) | |
tree | 5318057f4def4116da781e270808f3d7062f13ed /plugins/pychrysalide | |
parent | 962a955dfd6788f619c492d8f954ff6f4322947a (diff) |
Do not ask Python GI to look for GTK in batch mode.
Diffstat (limited to 'plugins/pychrysalide')
-rw-r--r-- | plugins/pychrysalide/core.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/plugins/pychrysalide/core.c b/plugins/pychrysalide/core.c index 597ad81..5da1447 100644 --- a/plugins/pychrysalide/core.c +++ b/plugins/pychrysalide/core.c @@ -64,8 +64,10 @@ #include "debug/module.h" #include "format/module.h" #include "glibext/module.h" -#include "gtkext/module.h" -#include "gui/module.h" +#ifdef INCLUDE_GTK_SUPPORT +# include "gtkext/module.h" +# include "gui/module.h" +#endif #include "mangling/module.h" #include "plugins/module.h" #include "plugins/plugin.h" @@ -101,7 +103,9 @@ static bool is_current_abi_suitable(void); static bool install_metaclass_for_python_gobjects(void); /* Définit la version attendue de GTK à charger dans Python. */ +#ifdef INCLUDE_GTK_SUPPORT static bool set_version_for_gtk_namespace(const char *); +#endif /* Point de sortie pour l'initialisation de Python. */ static void PyExit_pychrysalide(void); @@ -423,7 +427,7 @@ static bool install_metaclass_for_python_gobjects(void) * Remarques : - * * * ******************************************************************************/ - +#ifdef INCLUDE_GTK_SUPPORT static bool set_version_for_gtk_namespace(const char *version) { bool result; /* Bilan à retourner */ @@ -459,6 +463,7 @@ static bool set_version_for_gtk_namespace(const char *version) return result; } +#endif /****************************************************************************** @@ -584,8 +589,10 @@ PyMODINIT_FUNC PyInit_pychrysalide(void) if (!install_metaclass_for_python_gobjects()) goto exit; +#ifdef INCLUDE_GTK_SUPPORT if (!set_version_for_gtk_namespace("3.0")) goto exit; +#endif if (!load_all_core_components(true)) { |