From fe59efc8e372c21d9c7a68b075444a2d01db1f10 Mon Sep 17 00:00:00 2001
From: Cyrille Bagard <nocbos@gmail.com>
Date: Mon, 11 Sep 2023 02:27:44 +0200
Subject: Disable status update display without GUI.

---
 src/glibext/gbinarycursor.c | 7 ++++++-
 src/glibext/notifier.h      | 2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/glibext/gbinarycursor.c b/src/glibext/gbinarycursor.c
index d42b5a5..d62abfb 100644
--- a/src/glibext/gbinarycursor.c
+++ b/src/glibext/gbinarycursor.c
@@ -83,7 +83,9 @@ static bool g_binary_cursor_is_valid(const GBinaryCursor *);
 static char *g_binary_cursor_build_label(const GBinaryCursor *);
 
 /* Extrait des détails complémentaires et actualise le statut. */
+#ifdef INCLUDE_GTK_SUPPORT
 static void prepare_and_show_status_from_binary_cursor(const mrange_t *, const char *, const GLoadedBinary *, GtkStatusStack *);
+#endif
 
 /* Affiche une position dans une barre de statut. */
 static void g_binary_cursor_show_status(const GBinaryCursor *, GtkStatusStack *, GLoadedContent *);
@@ -355,6 +357,7 @@ static char *g_binary_cursor_build_label(const GBinaryCursor *cursor)
 *                                                                             *
 ******************************************************************************/
 
+#ifdef INCLUDE_GTK_SUPPORT
 static void prepare_and_show_status_from_binary_cursor(const mrange_t *range, const char *encoding, const GLoadedBinary *binary, GtkStatusStack *stack)
 {
     GExeFormat *format;                     /* Format de binaire à traiter */
@@ -423,6 +426,7 @@ static void prepare_and_show_status_from_binary_cursor(const mrange_t *range, co
         free(sym_name);
 
 }
+#endif
 
 
 /******************************************************************************
@@ -441,6 +445,7 @@ static void prepare_and_show_status_from_binary_cursor(const mrange_t *range, co
 
 static void g_binary_cursor_show_status(const GBinaryCursor *cursor, GtkStatusStack *stack, GLoadedContent *content)
 {
+#ifdef INCLUDE_GTK_SUPPORT
     GLoadedBinary *binary;                  /* Binaire chargé et analysé   */
     GArchProcessor *proc;                   /* Architecture du binaire     */
     mrange_t tmp;                           /* Emplacement réduit          */
@@ -484,7 +489,7 @@ static void g_binary_cursor_show_status(const GBinaryCursor *cursor, GtkStatusSt
 
     else
         gtk_status_stack_reset_current_location(stack);
-
+#endif
 }
 
 
diff --git a/src/glibext/notifier.h b/src/glibext/notifier.h
index bfb626e..db19e10 100644
--- a/src/glibext/notifier.h
+++ b/src/glibext/notifier.h
@@ -54,7 +54,7 @@ typedef unsigned long activity_id_t;
 #define NO_ACTIVITY_ID 0
 
 
-#define gtk_status_stack_update_current_location(a0, a1, a2, a3)
+#define gtk_status_stack_update_current_location(a0, a1, a2, a3, a4)
 #define gtk_status_stack_reset_current_location(a0)
 
 #define gtk_status_stack_add_activity(a0, a1, a2) 0
-- 
cgit v0.11.2-87-g4458