summaryrefslogtreecommitdiff
path: root/src/gui/core/logs.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2025-04-16 08:48:35 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2025-04-16 08:48:35 (GMT)
commitd1665deb8929feeb3df4d8e1913063b8431a6d41 (patch)
tree852efa21c4a562d2b75e5d77c335b5d9b5638b88 /src/gui/core/logs.c
parent1b71ebecae1ff0102db5efd31eef14a180214dda (diff)
Restore the log panel.
Diffstat (limited to 'src/gui/core/logs.c')
-rw-r--r--src/gui/core/logs.c32
1 files changed, 17 insertions, 15 deletions
diff --git a/src/gui/core/logs.c b/src/gui/core/logs.c
index 59910f1..cdb2a0d 100644
--- a/src/gui/core/logs.c
+++ b/src/gui/core/logs.c
@@ -24,6 +24,14 @@
#include "logs.h"
+#include <assert.h>
+
+
+#include "panels.h"
+#include "../panels/logs.h"
+#include "../../glibext/log.h"
+
+
/******************************************************************************
* *
@@ -38,26 +46,20 @@
* *
******************************************************************************/
-void do_log_message_alt2(LogMessageType type, const char *msg)
+void do_log_message_alt(LogMessageType type, const char *msg)
{
-#if 0
-
-#ifdef INCLUDE_GTK_SUPPORT
-
- GEditorItem *item; /* Eventuel affichage présent */
+ GLogEntry *entry; /* Nouvel élément de journal */
+ GtkTiledPanel *panel; /* Panneau de journalisation */
- item = find_editor_item_by_type(G_TYPE_LOG_PANEL);
+ entry = g_log_entry_new(type, msg);
- if (item != NULL)
- {
- g_log_panel_add_message(G_LOG_PANEL(item), type, msg);
- g_object_unref(G_OBJECT(item));
- }
+ panel = get_framework_panel_singleton(GTK_TYPE_LOGS_PANEL);
+ assert(panel != NULL);
-#endif
+ g_log_panel_add_message(GTK_LOGS_PANEL(panel), entry);
-#endif
+ unref_object(panel);
- printf("[log GUI] [%u] %s\n", type, msg);
+ unref_object(entry);
}