From: Ramakrishnan Muthukrishnan <ram@rkrishnan.org>
Date: Fri, 1 Dec 2023 02:47:59 +0000 (+0530)
Subject: add a way to set radio ip address/port to skip discovery
X-Git-Url: https://git.rkrishnan.org/vdrive/components/com_hotproperty/css/running.html?a=commitdiff_plain;h=refs%2Fheads%2Fdiscovery-fixes;p=pihpsdr.git

add a way to set radio ip address/port to skip discovery
---

diff --git a/radio_menu.c b/radio_menu.c
index 0a70f4c..4d33f43 100644
--- a/radio_menu.c
+++ b/radio_menu.c
@@ -316,7 +316,6 @@ void radio_menu(GtkWidget *parent) {
 
   dialog=gtk_dialog_new();
   gtk_window_set_transient_for(GTK_WINDOW(dialog),GTK_WINDOW(parent_window));
-  //gtk_window_set_decorated(GTK_WINDOW(dialog),FALSE);
   gtk_window_set_title(GTK_WINDOW(dialog),"piHPSDR - Radio");
   g_signal_connect (dialog, "delete_event", G_CALLBACK (delete_event), NULL);
 
@@ -326,7 +325,6 @@ void radio_menu(GtkWidget *parent) {
   color.blue = 1.0;
   color.alpha = 1.0;
   gtk_widget_override_background_color(dialog,GTK_STATE_FLAG_NORMAL,&color);
-
   GtkWidget *content=gtk_dialog_get_content_area(GTK_DIALOG(dialog));
 
   GtkWidget *grid=gtk_grid_new();
@@ -675,7 +673,22 @@ void radio_menu(GtkWidget *parent) {
 
   row++;
   col=0;
- 
+
+  // next row
+  // add a label and an entry box to specify a static ip address and port of the radio
+  GtkWidget *radio_address_label = gtk_label_new(NULL);
+  gtk_label_set_markup(GTK_LABEL(radio_address_label), "<b>IP Address/Port:</b>");
+  gtk_grid_attach(GTK_GRID(grid),radio_address_label,col,row,1,1);
+  col++;
+
+  GtkWidget *ip_address_entry = gtk_entry_new();
+  gtk_entry_set_width_chars(GTK_ENTRY(ip_address_entry), 20); // xxx.xxx.xxx.xxx:xxxx
+  gtk_entry_set_text(GTK_ENTRY(ip_address_entry), "127.0.0.1:1024");
+  gtk_grid_attach(GTK_GRID(grid),ip_address_entry,col,row,1,1);
+
+  // next row
+  row++;
+  col=0;
   GtkWidget *calibration_label=gtk_label_new(NULL);
   gtk_label_set_markup(GTK_LABEL(calibration_label), "<b>Frequency\nCalibration(Hz):</b>");
   gtk_grid_attach(GTK_GRID(grid),calibration_label,col,row,1,1);