From: c vw <dl1ycf@darc.de>
Date: Tue, 20 Jul 2021 15:38:32 +0000 (+0200)
Subject: Show restart button, but not with SOAPY
X-Git-Url: https://git.rkrishnan.org/pf/content/en/seg/simplejson//%22%3C?a=commitdiff_plain;h=5357bf8d1aa3739cd09d1ed5809c3910e8b70b26;p=pihpsdr.git

Show restart button, but not with SOAPY
---

diff --git a/new_menu.c b/new_menu.c
index ae12557..4da1fbf 100644
--- a/new_menu.c
+++ b/new_menu.c
@@ -108,7 +108,6 @@ static gboolean close_cb (GtkWidget *widget, GdkEventButton *event, gpointer dat
   return TRUE;
 }
 
-#ifdef RESTART_BUTTON
 //
 // The "Restart" button restarts the protocol
 // This may help to recover from certain error conditions
@@ -133,7 +132,6 @@ static gboolean restart_cb (GtkWidget *widget, GdkEventButton *event, gpointer d
   }
   return TRUE;
 }
-#endif
 
 static gboolean about_b_cb (GtkWidget *widget, GdkEventButton *event, gpointer data) {
   cleanup();
@@ -492,15 +490,16 @@ void new_menu()
     g_signal_connect (close_b, "button-press-event", G_CALLBACK(close_cb), NULL);
     gtk_grid_attach(GTK_GRID(grid),close_b,0,0,2,1);
 
-#ifdef RESTART_BUTTON
     //
     // The "Restart" restarts the protocol
     // This may help to recover from certain error conditions
+    // At the moment I do not know how to do this for SOAPY
     //
-    GtkWidget *restart_b=gtk_button_new_with_label("Restart");
-    g_signal_connect (restart_b, "button-press-event", G_CALLBACK(restart_cb), NULL);
-    gtk_grid_attach(GTK_GRID(grid),restart_b,2,0,2,1);
-#endif
+    if (protocol != SOAPYSDR_PROTOCOL) {
+      GtkWidget *restart_b=gtk_button_new_with_label("Restart");
+      g_signal_connect (restart_b, "button-press-event", G_CALLBACK(restart_cb), NULL);
+      gtk_grid_attach(GTK_GRID(grid),restart_b,2,0,2,1);
+    }
 
     GtkWidget *exit_b=gtk_button_new_with_label("Exit piHPSDR");
     g_signal_connect (exit_b, "button-press-event", G_CALLBACK(exit_cb), NULL);