46 |
extern GtkWidget *mainwindow; |
extern GtkWidget *mainwindow; |
47 |
extern statetype state; |
extern statetype state; |
48 |
|
|
|
#if WANT_HAMLIB |
|
|
extern GList *riglist; |
|
|
#endif |
|
|
|
|
49 |
void |
void |
50 |
on_menu_preferences_activate (GtkMenuItem * menuitem, gpointer user_data) |
on_menu_preferences_activate (GtkMenuItem * menuitem, gpointer user_data) |
51 |
{ |
{ |
73 |
GtkWidget *hamlibvbox, *radiohbox, *radiolabel, *devicehbox, *devicelabel, |
GtkWidget *hamlibvbox, *radiohbox, *radiolabel, *devicehbox, *devicelabel, |
74 |
*hamlibseparator, *configurelabel, *pollingframe, *pollinghbox, *pollinglabel, |
*hamlibseparator, *configurelabel, *pollingframe, *pollinghbox, *pollinglabel, |
75 |
*secondslabel, *digitshbox, *digitslabel, *characterslabel; |
*secondslabel, *digitshbox, *digitslabel, *characterslabel; |
76 |
|
GList *riglist; |
77 |
#endif |
#endif |
78 |
GtkWidget *vboxpage5, *logsframe, *logsvbox, *pathlabel, *pathhbox, |
GtkWidget *vboxpage5, *logsframe, *logsvbox, *pathlabel, *pathhbox, |
79 |
*pathbutton, *logshseparator, *loadlabel, *savingframe, *savingvbox, |
*pathbutton, *logshseparator, *loadlabel, *savingframe, *savingvbox, |
101 |
*rigconf = NULL; |
*rigconf = NULL; |
102 |
gboolean hamlibyes, frequencyyesno, smeteryesno, pollingyes, hamlibresult; |
gboolean hamlibyes, frequencyyesno, smeteryesno, pollingyes, hamlibresult; |
103 |
gint i, indexradio = -1, numrigs, hamlibwidgets = 0; |
gint i, indexradio = -1, numrigs, hamlibwidgets = 0; |
|
struct rig_caps *rcaps; |
|
104 |
#endif |
#endif |
105 |
|
|
106 |
/**************************/ |
/**************************/ |
692 |
} |
} |
693 |
} |
} |
694 |
|
|
695 |
|
riglist = riglist_get_list (); |
696 |
numrigs = g_list_length (riglist); |
numrigs = g_list_length (riglist); |
697 |
if (numrigs > 0) |
if (numrigs > 0) |
698 |
{ |
{ |
699 |
for (i = 0; i < numrigs; i++) |
for (i = 0; i < numrigs; i++) |
700 |
{ |
{ |
701 |
rcaps = (struct rig_caps *) g_list_nth_data (riglist, i); |
temp = g_list_nth_data (riglist, i); |
702 |
gtk_combo_box_append_text |
gtk_combo_box_append_text |
703 |
(GTK_COMBO_BOX (radiocombo), (gchar *) rcaps->model_name); |
(GTK_COMBO_BOX (radiocombo), (gchar *) temp); |
704 |
if (g_ascii_strcasecmp (rcaps->model_name, preferences.radio) == 0) |
if (g_ascii_strcasecmp (temp, preferences.radio) == 0) |
705 |
indexradio = i; |
indexradio = i; |
706 |
} |
} |
707 |
if (indexradio != -1) |
if (indexradio != -1) |
708 |
gtk_combo_box_set_active (GTK_COMBO_BOX (radiocombo), indexradio); |
gtk_combo_box_set_active (GTK_COMBO_BOX (radiocombo), indexradio); |
709 |
} |
} |
710 |
|
g_list_free (riglist); |
711 |
gtk_entry_set_text (GTK_ENTRY (GTK_BIN(devicecombo)->child), |
gtk_entry_set_text (GTK_ENTRY (GTK_BIN(devicecombo)->child), |
712 |
preferences.device); |
preferences.device); |
713 |
|
|