summaryrefslogtreecommitdiff
path: root/src/core/logs.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2022-12-29 11:02:46 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2022-12-29 11:02:46 (GMT)
commit41db261acccf3494aa93b71a181cde9e8605a841 (patch)
tree07a00f88920a8e601268d415131630052ef85988 /src/core/logs.c
parentc27f884ec1d18d9cff0d19d6ba8de1dd54d991c4 (diff)
Refactor Makefiles to exclude GTK on demand.
Diffstat (limited to 'src/core/logs.c')
-rw-r--r--src/core/logs.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/core/logs.c b/src/core/logs.c
index 2769bd5..9385020 100644
--- a/src/core/logs.c
+++ b/src/core/logs.c
@@ -29,8 +29,10 @@
#include "../common/extstr.h"
-#include "../gui/core/items.h"
-#include "../gui/panels/log.h"
+#ifdef HAVE_GTK_SUPPORT
+# include "../gui/core/items.h"
+# include "../gui/panels/log.h"
+#endif
@@ -107,10 +109,14 @@ void set_log_verbosity(LogMessageType level)
void log_simple_message(LogMessageType type, const char *msg)
{
+#ifdef HAVE_GTK_SUPPORT
GEditorItem *item; /* Eventuel affichage présent */
+#endif
if (type >= _verbosity)
{
+#ifdef HAVE_GTK_SUPPORT
+
item = find_editor_item_by_type(G_TYPE_LOG_PANEL);
if (item != NULL)
@@ -120,6 +126,9 @@ void log_simple_message(LogMessageType type, const char *msg)
}
else
+
+#endif
+
print_message_without_gui(type, msg);
}