From: Ramakrishnan Muthukrishnan <ram@rkrishnan.org>
Date: Sat, 7 Dec 2024 16:59:52 +0000 (+0530)
Subject: get rid of status_text()
X-Git-Url: https://git.rkrishnan.org/%5B/listings/listings/nxhtml.html?a=commitdiff_plain;h=d14ddbfdc19aed969501865037bee1470e656a09;p=pihpsdr.git

get rid of status_text()
---

diff --git a/main.c b/main.c
index 68ebbbd..efe2c8d 100644
--- a/main.c
+++ b/main.c
@@ -77,13 +77,6 @@ GtkWidget *grid;
 
 static GtkWidget *status;
 
-void status_text(char *text) {
-  gtk_label_set_text(GTK_LABEL(status), text);
-  usleep(100000);
-  while (gtk_events_pending())
-    gtk_main_iteration();
-}
-
 static pthread_t wisdom_thread_id;
 static int wisdom_running = 0;
 
@@ -180,7 +173,7 @@ static int init(void *data) {
   }
   strcpy(&wisdom_directory[strlen(wisdom_directory)], "/");
   g_info("Securing wisdom file in directory: %s\n", wisdom_directory);
-  status_text("Checking FFTW Wisdom file ...");
+  log_info("Checking FFTW Wisdom file ...");
   wisdom_running = 1;
   pthread_create(&wisdom_thread_id, NULL, wisdom_thread, wisdom_directory);
   while (wisdom_running) {
@@ -190,7 +183,7 @@ static int init(void *data) {
     while (gtk_events_pending()) {
       gtk_main_iteration();
     }
-    status_text(wisdom_get_status());
+    log_info(wisdom_get_status());
   }
 
   g_idle_add(ext_discovery, NULL);
diff --git a/main.h b/main.h
index 5b540dd..accffb2 100644
--- a/main.h
+++ b/main.h
@@ -36,7 +36,6 @@ extern int display_height;
 extern int full_screen;
 extern GtkWidget *top_window;
 extern GtkWidget *grid;
-extern void status_text(char *text);
 
 extern bool keypress_cb(GtkWidget *widget, GdkEventKey *event, gpointer data);
 #endif
diff --git a/radio.c b/radio.c
index 9bbb98a..6fcb8f3 100644
--- a/radio.c
+++ b/radio.c
@@ -940,7 +940,7 @@ void start_radio() {
         break;
     }
 
-    status_text(text);
+    log_info(text);
 
     sprintf(text, "piHPSDR: %s (%s %s) %s (%s) on %s", radio->name, p, version,
             ip, mac, iface);