]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
add a way to set radio ip address/port to skip discovery discovery-fixes
authorRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Fri, 1 Dec 2023 02:47:59 +0000 (08:17 +0530)
committerRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Fri, 1 Dec 2023 04:06:16 +0000 (09:36 +0530)
radio_menu.c

index 0a70f4c97edf4da9241f0445cb37c9af99a20414..4d33f43d6c084f3e76e089bcee16a5754c270b10 100644 (file)
@@ -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);