21 |
#include <sys/types.h> |
#include <sys/types.h> |
22 |
#include <sys/stat.h> |
#include <sys/stat.h> |
23 |
#include <unistd.h> |
#include <unistd.h> |
24 |
|
#include <stdlib.h> |
25 |
#include <string.h> |
#include <string.h> |
26 |
#include <stdio.h> |
#include <stdio.h> |
27 |
|
|
28 |
|
|
29 |
#if WANT_HAMLIB |
#if WANT_HAMLIB |
30 |
# include <hamlib/rig.h> |
# include <hamlib/rig.h> |
31 |
|
# include "hamlib-utils.h" |
32 |
#endif |
#endif |
33 |
|
|
34 |
#include "gui_utils.h" |
#include "gui_utils.h" |
39 |
#include "types.h" |
#include "types.h" |
40 |
#include "callbacks_preferencesdialog.h" |
#include "callbacks_preferencesdialog.h" |
41 |
#include "gui_preferencesdialog.h" |
#include "gui_preferencesdialog.h" |
42 |
|
#include "utils.h" |
43 |
|
|
44 |
GtkWidget *preferencesdialog; |
GtkWidget *preferencesdialog; |
45 |
extern preferencestype preferences; |
extern preferencestype preferences; |
46 |
extern GtkWidget *mainwindow; |
extern GtkWidget *mainwindow; |
47 |
|
extern statetype state; |
48 |
|
|
49 |
#if WANT_HAMLIB |
#if WANT_HAMLIB |
50 |
extern GList *riglist; |
extern GList *riglist; |
51 |
#endif |
#endif |
52 |
|
|
53 |
static GtkWidget* |
void |
54 |
create_preferencesdialog (void) |
on_menu_preferences_activate (GtkMenuItem * menuitem, gpointer user_data) |
55 |
{ |
{ |
56 |
GtkWidget *preferencesdialog; |
GtkWidget *preferencesnotebook, *preferenceslabel1, *preferenceslabel2, |
57 |
GdkPixbuf *preferencesdialog_icon_pixbuf; |
*preferenceslabel3, *preferenceslabel4, *preferenceslabel5, |
58 |
GtkWidget *dialog_vbox4; |
*preferenceslabel6; |
59 |
GtkWidget *preferencesnotebook; |
GtkWidget *vboxpage1, *clockframe, *themehbox, *themeframe, *themevbox, |
60 |
GtkWidget *vbox18; |
*themecolorlabel, *themebuttonvbox, *themebutton, *themefontlabel, |
61 |
GtkWidget *frame8; |
*themehbox2, *fontbutton, *themeseparator, *clockcheckbutton, |
62 |
GtkWidget *clockcheckbutton; |
*exampleframe, *examplelabel, *autosavecombo, *themecheckbutton, |
63 |
GtkWidget *alignment1; |
*fontentry; |
64 |
GtkWidget *hbox151; |
GtkWidget *vboxpage2, *modesloggingframe, *modesframevbox, *modesframe, |
65 |
GtkWidget *image181; |
*modeseditvbox, *bandsloggingframe, *bandsframevbox, *bandsframe, |
66 |
GtkWidget *label187; |
*bandseditvbox, *modesentry, *bandsentry, *modesradiobutton1, |
67 |
GtkWidget *label9; |
*modesradiobutton2, *bandsradiobutton1, *bandsradiobutton2, |
68 |
GtkWidget *frame10; |
*modeslabel, *bandslabel, *bandoptionmenu, *modeoptionmenu, *bandentry, |
69 |
GtkWidget *vbox23; |
*modeentry; |
70 |
GtkWidget *hbox35; |
GtkWidget *vboxpage3, *callsignframe, *callsignhbox, *callsignlabel, |
71 |
GtkWidget *label37; |
*locationframe, *locationvbox, *labelloc, *lathbox, *locatorhbox, |
72 |
GtkWidget *exampleframe; |
*locatorlabel, *unitsframe, *unitshbox, *labeldist, *latentry, |
73 |
GtkWidget *examplelabel; |
*longentry, *NScombo, *EWcombo, *unitscombo, *callsignentry, |
74 |
GtkWidget *label38; |
*qthlocatorentry; |
75 |
GtkWidget *vbox19; |
GtkWidget *vboxpage4, *hamlibvbox, *radiohbox, *radiolabel, *devicehbox, |
76 |
GtkWidget *themebutton; |
*devicelabel, *hamlibseparator1, *configurelabel, *hamlibseparator2, |
77 |
GtkWidget *image185; |
*pollingframe, *pollinghbox, *pollinglabel, *secondslabel, |
78 |
GtkWidget *hseparator4; |
*frequencyframe, *digitshbox, *digitslabel, *characterslabel; |
79 |
GtkWidget *hbox101; |
GtkWidget *vboxpage5, *logsframe, *logsvbox, *pathlabel, *pathhbox, |
80 |
GtkWidget *label106; |
*pathbutton, *logshseparator, *loadlabel, *savingframe, *savingvbox, |
81 |
GtkWidget *hbox100; |
*autosavehbox, *autosavelabel, *minuteslabel, *pathentry, *logsentry, |
82 |
GtkWidget *fontentry; |
*savecheckbutton, *autosavecheckbutton, *autosaveframe; |
83 |
GtkWidget *fontbutton; |
GtkWidget *vboxpage6, *remotedataframe, *remotedatavbox, *remotedatalabel, |
84 |
GtkWidget *image186; |
*remotedataseparator, *typeaheadfindcheckbutton, *remoteradiobutton1, |
85 |
GtkWidget *hseparator5; |
*remoteradiobutton2; |
86 |
GtkWidget *themecheckbutton; |
|
87 |
GtkWidget *label10; |
GSList *modesradiobutton_group = NULL, *bandsradiobutton_group = NULL, |
88 |
GtkWidget *preferenceslabel1; |
*remoteradiobutton_group = NULL; |
|
GtkWidget *vbox17; |
|
|
GtkWidget *modesloggingframe; |
|
|
GtkWidget *vbox3; |
|
|
GtkWidget *modesradiobutton1; |
|
|
GSList *modesradiobutton1_group = NULL; |
|
|
GtkWidget *modesradiobutton2; |
|
|
GtkWidget *modesframe; |
|
|
GtkWidget *vbox4; |
|
|
GtkWidget *modeslabel; |
|
|
GtkWidget *modesentry; |
|
|
GtkWidget *label107; |
|
|
GtkWidget *vbox14; |
|
|
GtkWidget *bandsloggingframe; |
|
|
GtkWidget *vbox2; |
|
|
GtkWidget *bandsradiobutton1; |
|
|
GSList *bandsradiobutton1_group = NULL; |
|
|
GtkWidget *bandsradiobutton2; |
|
|
GtkWidget *bandsframe; |
|
|
GtkWidget *vbox5; |
|
|
GtkWidget *bandslabel; |
|
|
GtkWidget *bandsentry; |
|
|
GtkWidget *label108; |
|
|
GtkWidget *preferenceslabel2; |
|
|
GtkWidget *vbox20; |
|
|
GtkWidget *frame17; |
|
|
GtkWidget *hbox95; |
|
|
GtkWidget *label104; |
|
|
GtkWidget *callsignentry; |
|
|
GtkWidget *label109; |
|
|
GtkWidget *frame11; |
|
|
GtkWidget *vbox1; |
|
|
GtkWidget *labelloc; |
|
|
GtkWidget *hbox148; |
|
|
GtkWidget *latentry; |
|
|
GtkWidget *NScombo; |
|
|
GtkWidget *longentry; |
|
|
GtkWidget *EWcombo; |
|
|
GtkWidget *hbox154; |
|
|
GtkWidget *label103; |
|
|
GtkWidget *qthlocatorentry; |
|
|
GtkWidget *label110; |
|
|
GtkWidget *frame12; |
|
|
GtkWidget *hbox10; |
|
|
GtkWidget *labeldist; |
|
|
GtkWidget *unitscombo; |
|
|
GtkWidget *label111; |
|
|
GtkWidget *preferenceslabel3; |
|
|
GtkWidget *vbox12; |
|
|
GtkWidget *hamlibcheckbutton; |
|
|
GtkWidget *hamlibframe; |
|
|
GtkWidget *vbox13; |
|
|
GtkWidget *hbox25; |
|
|
GtkWidget *radiolabel; |
|
|
GtkWidget *radiocombo; |
|
|
GtkWidget *hbox26; |
|
|
GtkWidget *devicelabel; |
|
|
GtkWidget *devicecombo; |
|
|
GtkWidget *hseparator10; |
|
|
GtkWidget *label202; |
|
|
GtkWidget *rigsetconfentry; |
|
|
GtkWidget *hseparator9; |
|
|
GtkWidget *pollingcheckbutton; |
|
|
GtkWidget *pollingframe; |
|
|
GtkWidget *hbox161; |
|
|
GtkWidget *label197; |
|
|
GtkWidget *pollcombo; |
|
|
GtkWidget *label198; |
|
|
GtkWidget *label200; |
|
|
GtkWidget *smetercheckbutton; |
|
|
GtkWidget *alignment2; |
|
|
GtkWidget *hbox152; |
|
|
GtkWidget *image182; |
|
|
GtkWidget *label188; |
|
|
GtkWidget *frequencycheckbutton; |
|
|
GtkWidget *alignment3; |
|
|
GtkWidget *hbox153; |
|
|
GtkWidget *image183; |
|
|
GtkWidget *label189; |
|
|
GtkWidget *frequencyframe; |
|
|
GtkWidget *hbox36; |
|
|
GtkWidget *label39; |
|
|
GtkWidget *digitscombo; |
|
|
GtkWidget *label40; |
|
|
GtkWidget *label201; |
|
|
GtkWidget *label112; |
|
|
GtkWidget *preferenceslabel4; |
|
|
GtkWidget *vbox26; |
|
|
GtkWidget *frame16; |
|
|
GtkWidget *vbox28; |
|
|
GtkWidget *pathlabel; |
|
|
GtkWidget *hbox71; |
|
|
GtkWidget *pathentry; |
|
|
GtkWidget *pathbutton; |
|
|
GtkWidget *alignment4; |
|
|
GtkWidget *hbox155; |
|
|
GtkWidget *image184; |
|
|
GtkWidget *label190; |
|
|
GtkWidget *hseparator3; |
|
|
GtkWidget *label91; |
|
|
GtkWidget *hbox72; |
|
|
GtkWidget *logsentry; |
|
|
GtkWidget *label113; |
|
|
GtkWidget *frame9; |
|
|
GtkWidget *vbox39; |
|
|
GtkWidget *savecheckbutton; |
|
|
GtkWidget *autosavecheckbutton; |
|
|
GtkWidget *autosaveframe; |
|
|
GtkWidget *hbox37; |
|
|
GtkWidget *label41; |
|
|
GtkWidget *autosavecombo; |
|
|
GtkWidget *label42; |
|
|
GtkWidget *label114; |
|
|
GtkWidget *label92; |
|
|
GtkWidget *vbox40; |
|
|
GtkWidget *typeaheadfindcheckbutton; |
|
|
GtkWidget *frame21; |
|
|
GtkWidget *vbox41; |
|
|
GtkWidget *label176; |
|
|
GtkWidget *hseparator6; |
|
|
GtkWidget *remoteradiobutton1; |
|
|
GSList *remoteradiobutton1_group = NULL; |
|
|
GtkWidget *remoteradiobutton2; |
|
|
GtkWidget *label115; |
|
|
GtkWidget *label175; |
|
|
GtkWidget *dialog_action_area4; |
|
|
GtkWidget *preferencescancelbutton; |
|
|
GtkWidget *preferencesokbutton; |
|
89 |
GtkTooltips *tooltips; |
GtkTooltips *tooltips; |
90 |
|
|
91 |
tooltips = gtk_tooltips_new (); |
gchar *temp, *font; |
92 |
|
gboolean toggletrue, logcoloryesno; |
93 |
|
gint autosavevalue, saving, response; |
94 |
|
|
95 |
preferencesdialog = gtk_dialog_new (); |
#if WANT_HAMLIB |
96 |
gtk_window_set_title (GTK_WINDOW (preferencesdialog), _("xlog - preferences")); |
GtkWidget *hamlibcheckbutton, *radiocombo, *hamlibframe, *devicecombo, |
97 |
gtk_window_set_position (GTK_WINDOW (preferencesdialog), GTK_WIN_POS_MOUSE); |
*frequencycheckbutton, *digitscombo, *smetercheckbutton, |
98 |
preferencesdialog_icon_pixbuf = create_pixbuf ("xlog.png"); |
*pollingcheckbutton, *rigsetconfentry, *pollcombo; |
99 |
if (preferencesdialog_icon_pixbuf) |
gchar *radio = NULL, *device = NULL, *digits = NULL, *pollstr = NULL, |
100 |
{ |
*rigconf = NULL; |
101 |
gtk_window_set_icon (GTK_WINDOW (preferencesdialog), preferencesdialog_icon_pixbuf); |
gboolean hamlibyes, frequencyyesno, smeteryesno, pollingyes, hamlibresult; |
102 |
g_object_unref (preferencesdialog_icon_pixbuf); |
gint i, indexradio = -1, numrigs, hamlibwidgets = 0; |
103 |
} |
struct rig_caps *rcaps; |
104 |
|
#endif |
105 |
|
|
106 |
dialog_vbox4 = GTK_DIALOG (preferencesdialog)->vbox; |
/**************************/ |
107 |
gtk_widget_show (dialog_vbox4); |
/* creation of the dialog */ |
108 |
|
/**************************/ |
109 |
|
|
110 |
|
tooltips = gtk_tooltips_new (); |
111 |
|
preferencesdialog = gtk_dialog_new_with_buttons (_("xlog - preferences"), |
112 |
|
GTK_WINDOW(mainwindow), GTK_DIALOG_DESTROY_WITH_PARENT, |
113 |
|
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, |
114 |
|
GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); |
115 |
preferencesnotebook = gtk_notebook_new (); |
preferencesnotebook = gtk_notebook_new (); |
116 |
gtk_widget_show (preferencesnotebook); |
gtk_container_add (GTK_CONTAINER |
117 |
gtk_box_pack_start (GTK_BOX (dialog_vbox4), preferencesnotebook, FALSE, FALSE, 0); |
(GTK_DIALOG (preferencesdialog)->vbox), preferencesnotebook); |
|
|
|
|
vbox18 = gtk_vbox_new (FALSE, 0); |
|
|
gtk_widget_show (vbox18); |
|
|
gtk_container_add (GTK_CONTAINER (preferencesnotebook), vbox18); |
|
|
gtk_notebook_set_tab_label_packing (GTK_NOTEBOOK (preferencesnotebook), vbox18, FALSE, FALSE, GTK_PACK_START); |
|
|
|
|
|
frame8 = gtk_frame_new (NULL); |
|
|
gtk_widget_show (frame8); |
|
|
gtk_box_pack_start (GTK_BOX (vbox18), frame8, FALSE, FALSE, 5); |
|
|
|
|
|
clockcheckbutton = gtk_check_button_new (); |
|
|
gtk_widget_show (clockcheckbutton); |
|
|
gtk_container_add (GTK_CONTAINER (frame8), clockcheckbutton); |
|
|
gtk_container_set_border_width (GTK_CONTAINER (clockcheckbutton), 5); |
|
|
|
|
|
alignment1 = gtk_alignment_new (0.5, 0.5, 0, 0); |
|
|
gtk_widget_show (alignment1); |
|
|
gtk_container_add (GTK_CONTAINER (clockcheckbutton), alignment1); |
|
|
|
|
|
hbox151 = gtk_hbox_new (FALSE, 2); |
|
|
gtk_widget_show (hbox151); |
|
|
gtk_container_add (GTK_CONTAINER (alignment1), hbox151); |
|
|
|
|
|
image181 = create_pixmap (preferencesdialog, "mini-clock.xpm"); |
|
|
gtk_widget_show (image181); |
|
|
gtk_box_pack_start (GTK_BOX (hbox151), image181, FALSE, FALSE, 0); |
|
|
gtk_misc_set_padding (GTK_MISC (image181), 5, 0); |
|
|
|
|
|
label187 = gtk_label_new_with_mnemonic (_("Enable clock on statusbar")); |
|
|
gtk_widget_show (label187); |
|
|
gtk_box_pack_start (GTK_BOX (hbox151), label187, FALSE, FALSE, 0); |
|
|
gtk_label_set_line_wrap (GTK_LABEL (label187), TRUE); |
|
|
|
|
|
label9 = gtk_label_new (_("Clock")); |
|
|
gtk_widget_show (label9); |
|
|
gtk_frame_set_label_widget (GTK_FRAME (frame8), label9); |
|
|
|
|
|
frame10 = gtk_frame_new (NULL); |
|
|
gtk_widget_show (frame10); |
|
|
gtk_box_pack_start (GTK_BOX (vbox18), frame10, FALSE, FALSE, 5); |
|
|
|
|
|
vbox23 = gtk_vbox_new (FALSE, 0); |
|
|
gtk_widget_show (vbox23); |
|
|
gtk_container_add (GTK_CONTAINER (frame10), vbox23); |
|
|
|
|
|
hbox35 = gtk_hbox_new (FALSE, 0); |
|
|
gtk_widget_show (hbox35); |
|
|
gtk_box_pack_start (GTK_BOX (vbox23), hbox35, TRUE, TRUE, 0); |
|
|
|
|
|
label37 = gtk_label_new (_("Theme color")); |
|
|
gtk_widget_show (label37); |
|
|
gtk_box_pack_start (GTK_BOX (hbox35), label37, FALSE, FALSE, 5); |
|
|
gtk_label_set_justify (GTK_LABEL (label37), GTK_JUSTIFY_CENTER); |
|
|
gtk_label_set_line_wrap (GTK_LABEL (label37), TRUE); |
|
|
gtk_misc_set_padding (GTK_MISC (label37), 5, 0); |
|
|
|
|
|
exampleframe = gtk_frame_new (NULL); |
|
|
gtk_widget_show (exampleframe); |
|
|
gtk_box_pack_start (GTK_BOX (hbox35), exampleframe, TRUE, TRUE, 5); |
|
|
gtk_container_set_border_width (GTK_CONTAINER (exampleframe), 5); |
|
118 |
|
|
119 |
|
/* page 1, clock and theme */ |
120 |
|
vboxpage1 = gtk_vbox_new (FALSE, 0); |
121 |
|
gtk_container_add (GTK_CONTAINER (preferencesnotebook), vboxpage1); |
122 |
|
clockframe = gtk_frame_new (_("Clock")); |
123 |
|
gtk_box_pack_start (GTK_BOX (vboxpage1), clockframe, FALSE, FALSE, 0); |
124 |
|
clockcheckbutton = gtk_check_button_new_with_label |
125 |
|
(_("Enable clock on statusbar")); |
126 |
|
gtk_container_add (GTK_CONTAINER (clockframe), clockcheckbutton); |
127 |
|
|
128 |
|
themeframe = gtk_frame_new (_("Theme")); |
129 |
|
gtk_box_pack_start (GTK_BOX (vboxpage1), themeframe, FALSE, FALSE, 0); |
130 |
|
themevbox = gtk_vbox_new (FALSE, 0); |
131 |
|
gtk_container_add (GTK_CONTAINER (themeframe), themevbox); |
132 |
|
|
133 |
|
themecolorlabel = gtk_label_new (_("Theme color")); |
134 |
|
gtk_box_pack_start (GTK_BOX (themevbox), themecolorlabel, FALSE, FALSE, 0); |
135 |
|
|
136 |
|
themehbox = gtk_hbox_new (FALSE, 0); |
137 |
|
gtk_box_pack_start (GTK_BOX (themevbox), themehbox, FALSE, FALSE, 0); |
138 |
|
exampleframe = gtk_frame_new (_("Example")); |
139 |
|
gtk_box_pack_start (GTK_BOX (themehbox), exampleframe, TRUE, TRUE, 10); |
140 |
examplelabel = gtk_label_new (_("Colored label")); |
examplelabel = gtk_label_new (_("Colored label")); |
|
gtk_widget_show (examplelabel); |
|
141 |
gtk_container_add (GTK_CONTAINER (exampleframe), examplelabel); |
gtk_container_add (GTK_CONTAINER (exampleframe), examplelabel); |
142 |
gtk_label_set_justify (GTK_LABEL (examplelabel), GTK_JUSTIFY_CENTER); |
themebuttonvbox = gtk_vbox_new (FALSE, 0); |
143 |
gtk_label_set_line_wrap (GTK_LABEL (examplelabel), TRUE); |
gtk_box_pack_start (GTK_BOX (themehbox), themebuttonvbox, FALSE, FALSE, 0); |
144 |
gtk_misc_set_padding (GTK_MISC (examplelabel), 30, 0); |
themebutton = gtk_button_new_from_stock (GTK_STOCK_SELECT_COLOR); |
145 |
|
gtk_widget_set_size_request (themebutton, 100, -1); |
146 |
label38 = gtk_label_new (_("Example")); |
gtk_box_pack_start (GTK_BOX (themebuttonvbox), themebutton, FALSE, FALSE, 0); |
|
gtk_widget_show (label38); |
|
|
gtk_frame_set_label_widget (GTK_FRAME (exampleframe), label38); |
|
|
|
|
|
vbox19 = gtk_vbox_new (TRUE, 0); |
|
|
gtk_widget_show (vbox19); |
|
|
gtk_box_pack_start (GTK_BOX (hbox35), vbox19, FALSE, FALSE, 5); |
|
|
gtk_container_set_border_width (GTK_CONTAINER (vbox19), 5); |
|
|
|
|
|
themebutton = gtk_button_new (); |
|
|
gtk_widget_show (themebutton); |
|
|
gtk_box_pack_start (GTK_BOX (vbox19), themebutton, FALSE, FALSE, 0); |
|
|
gtk_tooltips_set_tip (tooltips, themebutton, _("Click here to change the theme color"), NULL); |
|
|
|
|
|
image185 = gtk_image_new_from_stock ("gtk-select-color", GTK_ICON_SIZE_BUTTON); |
|
|
gtk_widget_show (image185); |
|
|
gtk_container_add (GTK_CONTAINER (themebutton), image185); |
|
|
|
|
|
hseparator4 = gtk_hseparator_new (); |
|
|
gtk_widget_show (hseparator4); |
|
|
gtk_box_pack_start (GTK_BOX (vbox23), hseparator4, FALSE, FALSE, 5); |
|
|
|
|
|
hbox101 = gtk_hbox_new (FALSE, 0); |
|
|
gtk_widget_show (hbox101); |
|
|
gtk_box_pack_start (GTK_BOX (vbox23), hbox101, FALSE, FALSE, 0); |
|
|
gtk_container_set_border_width (GTK_CONTAINER (hbox101), 5); |
|
|
|
|
|
label106 = gtk_label_new (_("Theme font")); |
|
|
gtk_widget_show (label106); |
|
|
gtk_box_pack_start (GTK_BOX (hbox101), label106, FALSE, FALSE, 0); |
|
|
gtk_label_set_justify (GTK_LABEL (label106), GTK_JUSTIFY_CENTER); |
|
|
gtk_label_set_line_wrap (GTK_LABEL (label106), TRUE); |
|
|
gtk_misc_set_padding (GTK_MISC (label106), 5, 0); |
|
|
|
|
|
hbox100 = gtk_hbox_new (FALSE, 5); |
|
|
gtk_widget_show (hbox100); |
|
|
gtk_box_pack_start (GTK_BOX (vbox23), hbox100, FALSE, FALSE, 0); |
|
|
gtk_container_set_border_width (GTK_CONTAINER (hbox100), 5); |
|
147 |
|
|
148 |
fontentry = gtk_entry_new (); |
themeseparator = gtk_hseparator_new (); |
149 |
gtk_widget_show (fontentry); |
gtk_box_pack_start (GTK_BOX (themevbox), themeseparator, FALSE, FALSE, 10); |
|
gtk_box_pack_start (GTK_BOX (hbox100), fontentry, TRUE, TRUE, 5); |
|
|
gtk_widget_set_size_request (fontentry, 150, 23); |
|
|
gtk_editable_set_editable (GTK_EDITABLE (fontentry), FALSE); |
|
150 |
|
|
151 |
fontbutton = gtk_button_new (); |
themefontlabel = gtk_label_new (_("Theme font")); |
152 |
gtk_widget_show (fontbutton); |
gtk_box_pack_start (GTK_BOX (themevbox), themefontlabel, FALSE, FALSE, 0); |
|
gtk_box_pack_start (GTK_BOX (hbox100), fontbutton, FALSE, FALSE, 5); |
|
|
gtk_tooltips_set_tip (tooltips, fontbutton, _("Click here to change the path"), NULL); |
|
|
|
|
|
image186 = gtk_image_new_from_stock ("gtk-select-font", GTK_ICON_SIZE_BUTTON); |
|
|
gtk_widget_show (image186); |
|
|
gtk_container_add (GTK_CONTAINER (fontbutton), image186); |
|
|
|
|
|
hseparator5 = gtk_hseparator_new (); |
|
|
gtk_widget_show (hseparator5); |
|
|
gtk_box_pack_start (GTK_BOX (vbox23), hseparator5, FALSE, FALSE, 0); |
|
|
|
|
|
themecheckbutton = gtk_check_button_new_with_mnemonic (_("Apply theme to the log (restart xlog if you change this)")); |
|
|
gtk_widget_show (themecheckbutton); |
|
|
gtk_box_pack_start (GTK_BOX (vbox23), themecheckbutton, FALSE, FALSE, 0); |
|
|
gtk_container_set_border_width (GTK_CONTAINER (themecheckbutton), 5); |
|
|
|
|
|
label10 = gtk_label_new (_("Theme")); |
|
|
gtk_widget_show (label10); |
|
|
gtk_frame_set_label_widget (GTK_FRAME (frame10), label10); |
|
153 |
|
|
154 |
|
themehbox2 = gtk_hbox_new (FALSE, 0); |
155 |
|
gtk_box_pack_start (GTK_BOX (themevbox), themehbox2, FALSE, FALSE, 0); |
156 |
|
fontentry = gtk_entry_new (); |
157 |
|
gtk_box_pack_start (GTK_BOX (themehbox2), fontentry, TRUE, TRUE, 10); |
158 |
|
gtk_editable_set_editable (GTK_EDITABLE (fontentry), FALSE); |
159 |
|
fontbutton = gtk_button_new_from_stock (GTK_STOCK_SELECT_FONT); |
160 |
|
gtk_widget_set_size_request (fontbutton, 100, -1); |
161 |
|
gtk_box_pack_start (GTK_BOX (themehbox2), fontbutton, FALSE, FALSE, 0); |
162 |
|
|
163 |
|
themeseparator = gtk_hseparator_new (); |
164 |
|
gtk_box_pack_start (GTK_BOX (themevbox), themeseparator, FALSE, FALSE, 10); |
165 |
|
|
166 |
|
themecheckbutton = gtk_check_button_new_with_label |
167 |
|
(_("Apply theme to the log (restart xlog if you change this)")); |
168 |
|
gtk_box_pack_start (GTK_BOX (themevbox), themecheckbutton, FALSE, FALSE, 0); |
169 |
|
gtk_label_set_line_wrap |
170 |
|
(GTK_LABEL (GTK_BIN (themecheckbutton)->child), TRUE); |
171 |
|
|
172 |
|
gtk_tooltips_set_tip (tooltips, themebutton, |
173 |
|
_("Click here to change the theme color"), NULL); |
174 |
|
gtk_tooltips_set_tip (tooltips, fontbutton, |
175 |
|
_("Click here to change the path"), NULL); |
176 |
preferenceslabel1 = gtk_label_new (_("General")); |
preferenceslabel1 = gtk_label_new (_("General")); |
177 |
gtk_widget_show (preferenceslabel1); |
gtk_notebook_set_tab_label (GTK_NOTEBOOK (preferencesnotebook), |
178 |
gtk_notebook_set_tab_label (GTK_NOTEBOOK (preferencesnotebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (preferencesnotebook), 0), preferenceslabel1); |
gtk_notebook_get_nth_page (GTK_NOTEBOOK (preferencesnotebook), 0), |
179 |
gtk_label_set_justify (GTK_LABEL (preferenceslabel1), GTK_JUSTIFY_CENTER); |
preferenceslabel1); |
180 |
|
|
181 |
vbox17 = gtk_vbox_new (FALSE, 0); |
/* page 2, band/modes */ |
182 |
gtk_widget_show (vbox17); |
vboxpage2 = gtk_vbox_new (FALSE, 0); |
183 |
gtk_container_add (GTK_CONTAINER (preferencesnotebook), vbox17); |
gtk_container_add (GTK_CONTAINER (preferencesnotebook), vboxpage2); |
184 |
gtk_notebook_set_tab_label_packing (GTK_NOTEBOOK (preferencesnotebook), vbox17, FALSE, FALSE, GTK_PACK_START); |
|
185 |
|
modesloggingframe = gtk_frame_new (_("Modes")); |
186 |
modesloggingframe = gtk_frame_new (NULL); |
gtk_box_pack_start |
187 |
gtk_widget_show (modesloggingframe); |
(GTK_BOX (vboxpage2), modesloggingframe, FALSE, FALSE, 0); |
188 |
gtk_box_pack_start (GTK_BOX (vbox17), modesloggingframe, FALSE, FALSE, 5); |
modesframevbox = gtk_vbox_new (FALSE, 0); |
189 |
|
gtk_container_add (GTK_CONTAINER (modesloggingframe), modesframevbox); |
190 |
vbox3 = gtk_vbox_new (FALSE, 0); |
modesradiobutton1 = gtk_radio_button_new_with_label |
191 |
gtk_widget_show (vbox3); |
(NULL, _("Use Editbox")); |
192 |
gtk_container_add (GTK_CONTAINER (modesloggingframe), vbox3); |
gtk_box_pack_start |
193 |
gtk_container_set_border_width (GTK_CONTAINER (vbox3), 5); |
(GTK_BOX (modesframevbox), modesradiobutton1, FALSE, FALSE, 0); |
194 |
|
modesradiobutton_group = gtk_radio_button_get_group |
195 |
modesradiobutton1 = gtk_radio_button_new_with_mnemonic (NULL, _("Use Editbox")); |
(GTK_RADIO_BUTTON (modesradiobutton1)); |
196 |
gtk_widget_show (modesradiobutton1); |
modesradiobutton2 = gtk_radio_button_new_with_label |
197 |
gtk_box_pack_start (GTK_BOX (vbox3), modesradiobutton1, FALSE, FALSE, 0); |
(modesradiobutton_group, _("Use Optionmenu")); |
198 |
gtk_radio_button_set_group (GTK_RADIO_BUTTON (modesradiobutton1), modesradiobutton1_group); |
gtk_box_pack_start |
199 |
modesradiobutton1_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (modesradiobutton1)); |
(GTK_BOX (modesframevbox), modesradiobutton2, FALSE, FALSE, 0); |
|
|
|
|
modesradiobutton2 = gtk_radio_button_new_with_mnemonic (NULL, _("Use Optionmenu")); |
|
|
gtk_widget_show (modesradiobutton2); |
|
|
gtk_box_pack_start (GTK_BOX (vbox3), modesradiobutton2, FALSE, FALSE, 0); |
|
|
gtk_radio_button_set_group (GTK_RADIO_BUTTON (modesradiobutton2), modesradiobutton1_group); |
|
|
modesradiobutton1_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (modesradiobutton2)); |
|
|
|
|
200 |
modesframe = gtk_frame_new (NULL); |
modesframe = gtk_frame_new (NULL); |
201 |
gtk_widget_show (modesframe); |
gtk_box_pack_start (GTK_BOX (modesframevbox), modesframe, FALSE, FALSE, 0); |
202 |
gtk_box_pack_start (GTK_BOX (vbox3), modesframe, FALSE, FALSE, 0); |
modeseditvbox = gtk_vbox_new (FALSE, 0); |
203 |
|
gtk_container_add (GTK_CONTAINER (modesframe), modeseditvbox); |
|
vbox4 = gtk_vbox_new (FALSE, 0); |
|
|
gtk_widget_show (vbox4); |
|
|
gtk_container_add (GTK_CONTAINER (modesframe), vbox4); |
|
|
|
|
204 |
modeslabel = gtk_label_new (_("Comma separated list of modes")); |
modeslabel = gtk_label_new (_("Comma separated list of modes")); |
205 |
gtk_widget_show (modeslabel); |
gtk_box_pack_start (GTK_BOX (modeseditvbox), modeslabel, FALSE, FALSE, 0); |
|
gtk_box_pack_start (GTK_BOX (vbox4), modeslabel, FALSE, FALSE, 0); |
|
206 |
gtk_label_set_justify (GTK_LABEL (modeslabel), GTK_JUSTIFY_CENTER); |
gtk_label_set_justify (GTK_LABEL (modeslabel), GTK_JUSTIFY_CENTER); |
|
gtk_label_set_line_wrap (GTK_LABEL (modeslabel), TRUE); |
|
|
|
|
207 |
modesentry = gtk_entry_new (); |
modesentry = gtk_entry_new (); |
208 |
gtk_widget_show (modesentry); |
gtk_box_pack_start (GTK_BOX (modeseditvbox), modesentry, FALSE, FALSE, 0); |
|
gtk_box_pack_start (GTK_BOX (vbox4), modesentry, FALSE, FALSE, 0); |
|
209 |
gtk_entry_set_max_length (GTK_ENTRY (modesentry), 90); |
gtk_entry_set_max_length (GTK_ENTRY (modesentry), 90); |
210 |
|
|
211 |
label107 = gtk_label_new (_("Modes")); |
bandsloggingframe = gtk_frame_new (_("Bands")); |
212 |
gtk_widget_show (label107); |
gtk_box_pack_start |
213 |
gtk_frame_set_label_widget (GTK_FRAME (modesloggingframe), label107); |
(GTK_BOX (vboxpage2), bandsloggingframe, FALSE, FALSE, 0); |
214 |
|
bandsframevbox = gtk_vbox_new (FALSE, 0); |
215 |
vbox14 = gtk_vbox_new (FALSE, 0); |
gtk_container_add (GTK_CONTAINER (bandsloggingframe), bandsframevbox); |
216 |
gtk_widget_show (vbox14); |
bandsradiobutton1 = gtk_radio_button_new_with_label |
217 |
gtk_box_pack_start (GTK_BOX (vbox17), vbox14, TRUE, TRUE, 0); |
(NULL, _("Use Editbox")); |
218 |
|
gtk_box_pack_start |
219 |
bandsloggingframe = gtk_frame_new (NULL); |
(GTK_BOX (bandsframevbox), bandsradiobutton1, FALSE, FALSE, 0); |
220 |
gtk_widget_show (bandsloggingframe); |
bandsradiobutton_group = gtk_radio_button_get_group |
221 |
gtk_box_pack_start (GTK_BOX (vbox14), bandsloggingframe, FALSE, FALSE, 5); |
(GTK_RADIO_BUTTON (bandsradiobutton1)); |
222 |
|
bandsradiobutton2 = gtk_radio_button_new_with_label |
223 |
vbox2 = gtk_vbox_new (FALSE, 0); |
(bandsradiobutton_group, _("Use Optionmenu")); |
224 |
gtk_widget_show (vbox2); |
gtk_box_pack_start |
225 |
gtk_container_add (GTK_CONTAINER (bandsloggingframe), vbox2); |
(GTK_BOX (bandsframevbox), bandsradiobutton2, FALSE, FALSE, 0); |
|
gtk_container_set_border_width (GTK_CONTAINER (vbox2), 5); |
|
|
|
|
|
bandsradiobutton1 = gtk_radio_button_new_with_mnemonic (NULL, _("Use Editbox")); |
|
|
gtk_widget_show (bandsradiobutton1); |
|
|
gtk_box_pack_start (GTK_BOX (vbox2), bandsradiobutton1, FALSE, FALSE, 0); |
|
|
gtk_radio_button_set_group (GTK_RADIO_BUTTON (bandsradiobutton1), bandsradiobutton1_group); |
|
|
bandsradiobutton1_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (bandsradiobutton1)); |
|
|
|
|
|
bandsradiobutton2 = gtk_radio_button_new_with_mnemonic (NULL, _("Use Optionmenu")); |
|
|
gtk_widget_show (bandsradiobutton2); |
|
|
gtk_box_pack_start (GTK_BOX (vbox2), bandsradiobutton2, FALSE, FALSE, 0); |
|
|
gtk_radio_button_set_group (GTK_RADIO_BUTTON (bandsradiobutton2), bandsradiobutton1_group); |
|
|
bandsradiobutton1_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (bandsradiobutton2)); |
|
|
|
|
226 |
bandsframe = gtk_frame_new (NULL); |
bandsframe = gtk_frame_new (NULL); |
227 |
gtk_widget_show (bandsframe); |
gtk_box_pack_start (GTK_BOX (bandsframevbox), bandsframe, FALSE, FALSE, 0); |
228 |
gtk_box_pack_start (GTK_BOX (vbox2), bandsframe, FALSE, FALSE, 0); |
bandseditvbox = gtk_vbox_new (FALSE, 0); |
229 |
|
gtk_container_add (GTK_CONTAINER (bandsframe), bandseditvbox); |
|
vbox5 = gtk_vbox_new (FALSE, 0); |
|
|
gtk_widget_show (vbox5); |
|
|
gtk_container_add (GTK_CONTAINER (bandsframe), vbox5); |
|
|
|
|
230 |
bandslabel = gtk_label_new (_("Comma separated list of bands")); |
bandslabel = gtk_label_new (_("Comma separated list of bands")); |
231 |
gtk_widget_show (bandslabel); |
gtk_box_pack_start (GTK_BOX (bandseditvbox), bandslabel, FALSE, FALSE, 0); |
|
gtk_box_pack_start (GTK_BOX (vbox5), bandslabel, FALSE, FALSE, 0); |
|
232 |
gtk_label_set_justify (GTK_LABEL (bandslabel), GTK_JUSTIFY_CENTER); |
gtk_label_set_justify (GTK_LABEL (bandslabel), GTK_JUSTIFY_CENTER); |
|
gtk_label_set_line_wrap (GTK_LABEL (bandslabel), TRUE); |
|
|
|
|
233 |
bandsentry = gtk_entry_new (); |
bandsentry = gtk_entry_new (); |
234 |
gtk_widget_show (bandsentry); |
gtk_box_pack_start (GTK_BOX (bandseditvbox), bandsentry, FALSE, FALSE, 0); |
|
gtk_box_pack_start (GTK_BOX (vbox5), bandsentry, FALSE, FALSE, 0); |
|
235 |
gtk_entry_set_max_length (GTK_ENTRY (bandsentry), 90); |
gtk_entry_set_max_length (GTK_ENTRY (bandsentry), 90); |
236 |
|
|
|
label108 = gtk_label_new (_("Bands")); |
|
|
gtk_widget_show (label108); |
|
|
gtk_frame_set_label_widget (GTK_FRAME (bandsloggingframe), label108); |
|
|
|
|
237 |
preferenceslabel2 = gtk_label_new (_("Modes/Bands")); |
preferenceslabel2 = gtk_label_new (_("Modes/Bands")); |
238 |
gtk_widget_show (preferenceslabel2); |
gtk_notebook_set_tab_label (GTK_NOTEBOOK (preferencesnotebook), |
239 |
gtk_notebook_set_tab_label (GTK_NOTEBOOK (preferencesnotebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (preferencesnotebook), 1), preferenceslabel2); |
gtk_notebook_get_nth_page (GTK_NOTEBOOK (preferencesnotebook), 1), |
240 |
gtk_label_set_justify (GTK_LABEL (preferenceslabel2), GTK_JUSTIFY_CENTER); |
preferenceslabel2); |
241 |
|
|
242 |
vbox20 = gtk_vbox_new (FALSE, 0); |
/* page 3, information */ |
243 |
gtk_widget_show (vbox20); |
vboxpage3 = gtk_vbox_new (FALSE, 0); |
244 |
gtk_container_add (GTK_CONTAINER (preferencesnotebook), vbox20); |
gtk_container_add (GTK_CONTAINER (preferencesnotebook), vboxpage3); |
245 |
gtk_notebook_set_tab_label_packing (GTK_NOTEBOOK (preferencesnotebook), vbox20, FALSE, FALSE, GTK_PACK_START); |
|
246 |
|
callsignframe = gtk_frame_new (_("Callsign")); |
247 |
frame17 = gtk_frame_new (NULL); |
gtk_box_pack_start (GTK_BOX (vboxpage3), callsignframe, FALSE, FALSE, 0); |
248 |
gtk_widget_show (frame17); |
callsignhbox = gtk_hbox_new (TRUE, 0); |
249 |
gtk_box_pack_start (GTK_BOX (vbox20), frame17, FALSE, FALSE, 5); |
gtk_container_add (GTK_CONTAINER (callsignframe), callsignhbox); |
250 |
|
callsignlabel = gtk_label_new (_("Your Callsign")); |
251 |
hbox95 = gtk_hbox_new (TRUE, 0); |
gtk_box_pack_start (GTK_BOX (callsignhbox), callsignlabel, FALSE, FALSE, 0); |
|
gtk_widget_show (hbox95); |
|
|
gtk_container_add (GTK_CONTAINER (frame17), hbox95); |
|
|
gtk_container_set_border_width (GTK_CONTAINER (hbox95), 5); |
|
|
|
|
|
label104 = gtk_label_new (_("Your Callsign")); |
|
|
gtk_widget_show (label104); |
|
|
gtk_box_pack_start (GTK_BOX (hbox95), label104, FALSE, FALSE, 0); |
|
|
gtk_label_set_justify (GTK_LABEL (label104), GTK_JUSTIFY_CENTER); |
|
|
gtk_label_set_line_wrap (GTK_LABEL (label104), TRUE); |
|
|
|
|
252 |
callsignentry = gtk_entry_new (); |
callsignentry = gtk_entry_new (); |
253 |
gtk_widget_show (callsignentry); |
gtk_box_pack_start (GTK_BOX (callsignhbox), callsignentry, TRUE, TRUE, 10); |
|
gtk_box_pack_start (GTK_BOX (hbox95), callsignentry, TRUE, TRUE, 0); |
|
|
gtk_widget_set_size_request (callsignentry, 50, 23); |
|
254 |
gtk_entry_set_max_length (GTK_ENTRY (callsignentry), 15); |
gtk_entry_set_max_length (GTK_ENTRY (callsignentry), 15); |
255 |
|
|
256 |
label109 = gtk_label_new (_("Callsign")); |
locationframe = gtk_frame_new (_("Location")); |
257 |
gtk_widget_show (label109); |
gtk_box_pack_start (GTK_BOX (vboxpage3), locationframe, FALSE, FALSE, 0); |
258 |
gtk_frame_set_label_widget (GTK_FRAME (frame17), label109); |
locationvbox = gtk_vbox_new (FALSE, 0); |
259 |
|
gtk_container_add (GTK_CONTAINER (locationframe), locationvbox); |
|
frame11 = gtk_frame_new (NULL); |
|
|
gtk_widget_show (frame11); |
|
|
gtk_box_pack_start (GTK_BOX (vbox20), frame11, FALSE, FALSE, 5); |
|
|
|
|
|
vbox1 = gtk_vbox_new (TRUE, 5); |
|
|
gtk_widget_show (vbox1); |
|
|
gtk_container_add (GTK_CONTAINER (frame11), vbox1); |
|
|
gtk_container_set_border_width (GTK_CONTAINER (vbox1), 5); |
|
|
|
|
260 |
labelloc = gtk_label_new (_("Your location (ddd.mm)")); |
labelloc = gtk_label_new (_("Your location (ddd.mm)")); |
261 |
gtk_widget_show (labelloc); |
gtk_box_pack_start (GTK_BOX (locationvbox), labelloc, FALSE, FALSE, 0); |
262 |
gtk_box_pack_start (GTK_BOX (vbox1), labelloc, FALSE, FALSE, 0); |
lathbox = gtk_hbox_new (FALSE, 0); |
263 |
gtk_label_set_justify (GTK_LABEL (labelloc), GTK_JUSTIFY_CENTER); |
gtk_box_pack_start (GTK_BOX (locationvbox), lathbox, FALSE, FALSE, 0); |
|
gtk_label_set_line_wrap (GTK_LABEL (labelloc), TRUE); |
|
|
gtk_misc_set_padding (GTK_MISC (labelloc), 5, 5); |
|
|
|
|
|
hbox148 = gtk_hbox_new (TRUE, 0); |
|
|
gtk_widget_show (hbox148); |
|
|
gtk_box_pack_start (GTK_BOX (vbox1), hbox148, FALSE, FALSE, 0); |
|
|
|
|
264 |
latentry = gtk_entry_new (); |
latentry = gtk_entry_new (); |
265 |
gtk_widget_show (latentry); |
gtk_box_pack_start (GTK_BOX (lathbox), latentry, FALSE, FALSE, 0); |
|
gtk_box_pack_start (GTK_BOX (hbox148), latentry, TRUE, TRUE, 0); |
|
|
gtk_widget_set_size_request (latentry, 50, 23); |
|
266 |
gtk_entry_set_max_length (GTK_ENTRY (latentry), 8); |
gtk_entry_set_max_length (GTK_ENTRY (latentry), 8); |
|
|
|
267 |
NScombo = gtk_combo_box_new_text (); |
NScombo = gtk_combo_box_new_text (); |
268 |
gtk_widget_show (NScombo); |
gtk_box_pack_start (GTK_BOX (lathbox), NScombo, FALSE, FALSE, 0); |
|
gtk_box_pack_start (GTK_BOX (hbox148), NScombo, TRUE, TRUE, 0); |
|
269 |
gtk_combo_box_append_text (GTK_COMBO_BOX (NScombo), _("N")); |
gtk_combo_box_append_text (GTK_COMBO_BOX (NScombo), _("N")); |
270 |
gtk_combo_box_append_text (GTK_COMBO_BOX (NScombo), _("S")); |
gtk_combo_box_append_text (GTK_COMBO_BOX (NScombo), _("S")); |
|
|
|
271 |
longentry = gtk_entry_new (); |
longentry = gtk_entry_new (); |
272 |
gtk_widget_show (longentry); |
gtk_box_pack_start (GTK_BOX (lathbox), longentry, FALSE, FALSE, 0); |
|
gtk_box_pack_start (GTK_BOX (hbox148), longentry, TRUE, TRUE, 0); |
|
|
gtk_widget_set_size_request (longentry, 50, 23); |
|
273 |
gtk_entry_set_max_length (GTK_ENTRY (longentry), 8); |
gtk_entry_set_max_length (GTK_ENTRY (longentry), 8); |
|
|
|
274 |
EWcombo = gtk_combo_box_new_text (); |
EWcombo = gtk_combo_box_new_text (); |
275 |
gtk_widget_show (EWcombo); |
gtk_box_pack_start (GTK_BOX (lathbox), EWcombo, FALSE, FALSE, 0); |
|
gtk_box_pack_start (GTK_BOX (hbox148), EWcombo, TRUE, TRUE, 0); |
|
276 |
gtk_combo_box_append_text (GTK_COMBO_BOX (EWcombo), _("E")); |
gtk_combo_box_append_text (GTK_COMBO_BOX (EWcombo), _("E")); |
277 |
gtk_combo_box_append_text (GTK_COMBO_BOX (EWcombo), _("W")); |
gtk_combo_box_append_text (GTK_COMBO_BOX (EWcombo), _("W")); |
278 |
|
locatorhbox = gtk_hbox_new (TRUE, 0); |
279 |
hbox154 = gtk_hbox_new (TRUE, 0); |
gtk_box_pack_start (GTK_BOX (locationvbox), locatorhbox, FALSE, FALSE, 0); |
280 |
gtk_widget_show (hbox154); |
locatorlabel = gtk_label_new (_("QTH locator")); |
281 |
gtk_box_pack_start (GTK_BOX (vbox1), hbox154, FALSE, FALSE, 0); |
gtk_box_pack_start (GTK_BOX (locatorhbox), locatorlabel, FALSE, FALSE, 0); |
|
|
|
|
label103 = gtk_label_new (_("QTH locator")); |
|
|
gtk_widget_show (label103); |
|
|
gtk_box_pack_start (GTK_BOX (hbox154), label103, FALSE, FALSE, 0); |
|
|
gtk_label_set_justify (GTK_LABEL (label103), GTK_JUSTIFY_CENTER); |
|
|
gtk_label_set_line_wrap (GTK_LABEL (label103), TRUE); |
|
|
|
|
282 |
qthlocatorentry = gtk_entry_new (); |
qthlocatorentry = gtk_entry_new (); |
283 |
gtk_widget_show (qthlocatorentry); |
gtk_box_pack_start (GTK_BOX (locatorhbox), qthlocatorentry, TRUE, TRUE, 10); |
|
gtk_box_pack_start (GTK_BOX (hbox154), qthlocatorentry, TRUE, TRUE, 0); |
|
|
gtk_widget_set_size_request (qthlocatorentry, 100, 23); |
|
284 |
gtk_entry_set_max_length (GTK_ENTRY (qthlocatorentry), 8); |
gtk_entry_set_max_length (GTK_ENTRY (qthlocatorentry), 8); |
285 |
|
|
286 |
label110 = gtk_label_new (_("Location")); |
unitsframe = gtk_frame_new (_("Units")); |
287 |
gtk_widget_show (label110); |
gtk_box_pack_start (GTK_BOX (vboxpage3), unitsframe, FALSE, FALSE, 0); |
288 |
gtk_frame_set_label_widget (GTK_FRAME (frame11), label110); |
unitshbox = gtk_hbox_new (TRUE, 0); |
289 |
|
gtk_container_add (GTK_CONTAINER (unitsframe), unitshbox); |
|
frame12 = gtk_frame_new (NULL); |
|
|
gtk_widget_show (frame12); |
|
|
gtk_box_pack_start (GTK_BOX (vbox20), frame12, FALSE, FALSE, 0); |
|
|
|
|
|
hbox10 = gtk_hbox_new (TRUE, 0); |
|
|
gtk_widget_show (hbox10); |
|
|
gtk_container_add (GTK_CONTAINER (frame12), hbox10); |
|
|
gtk_container_set_border_width (GTK_CONTAINER (hbox10), 5); |
|
|
|
|
290 |
labeldist = gtk_label_new (_("Display distance in")); |
labeldist = gtk_label_new (_("Display distance in")); |
291 |
gtk_widget_show (labeldist); |
gtk_box_pack_start (GTK_BOX (unitshbox), labeldist, FALSE, FALSE, 0); |
|
gtk_box_pack_start (GTK_BOX (hbox10), labeldist, FALSE, FALSE, 0); |
|
|
gtk_label_set_justify (GTK_LABEL (labeldist), GTK_JUSTIFY_CENTER); |
|
|
gtk_label_set_line_wrap (GTK_LABEL (labeldist), TRUE); |
|
|
|
|
292 |
unitscombo = gtk_combo_box_new_text (); |
unitscombo = gtk_combo_box_new_text (); |
293 |
gtk_widget_show (unitscombo); |
gtk_box_pack_start (GTK_BOX (unitshbox), unitscombo, TRUE, TRUE, 10); |
|
gtk_box_pack_start (GTK_BOX (hbox10), unitscombo, TRUE, TRUE, 0); |
|
294 |
gtk_combo_box_append_text (GTK_COMBO_BOX (unitscombo), _("Kilometers")); |
gtk_combo_box_append_text (GTK_COMBO_BOX (unitscombo), _("Kilometers")); |
295 |
gtk_combo_box_append_text (GTK_COMBO_BOX (unitscombo), _("Miles")); |
gtk_combo_box_append_text (GTK_COMBO_BOX (unitscombo), _("Miles")); |
296 |
|
|
|
label111 = gtk_label_new (_("Units")); |
|
|
gtk_widget_show (label111); |
|
|
gtk_frame_set_label_widget (GTK_FRAME (frame12), label111); |
|
|
|
|
297 |
preferenceslabel3 = gtk_label_new (_("Info")); |
preferenceslabel3 = gtk_label_new (_("Info")); |
298 |
gtk_widget_show (preferenceslabel3); |
gtk_notebook_set_tab_label (GTK_NOTEBOOK (preferencesnotebook), |
299 |
gtk_notebook_set_tab_label (GTK_NOTEBOOK (preferencesnotebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (preferencesnotebook), 2), preferenceslabel3); |
gtk_notebook_get_nth_page (GTK_NOTEBOOK (preferencesnotebook), 2), |
300 |
gtk_label_set_justify (GTK_LABEL (preferenceslabel3), GTK_JUSTIFY_CENTER); |
preferenceslabel3); |
301 |
|
|
302 |
vbox12 = gtk_vbox_new (FALSE, 0); |
/* page 4, hamlib */ |
303 |
gtk_widget_show (vbox12); |
vboxpage4 = gtk_vbox_new (FALSE, 0); |
304 |
gtk_container_add (GTK_CONTAINER (preferencesnotebook), vbox12); |
gtk_container_add (GTK_CONTAINER (preferencesnotebook), vboxpage4); |
|
gtk_notebook_set_tab_label_packing (GTK_NOTEBOOK (preferencesnotebook), vbox12, FALSE, FALSE, GTK_PACK_START); |
|
|
|
|
|
hamlibcheckbutton = gtk_check_button_new_with_mnemonic (_("Enable hamlib support")); |
|
|
gtk_widget_show (hamlibcheckbutton); |
|
|
gtk_box_pack_start (GTK_BOX (vbox12), hamlibcheckbutton, FALSE, FALSE, 5); |
|
|
|
|
|
hamlibframe = gtk_frame_new (NULL); |
|
|
gtk_widget_show (hamlibframe); |
|
|
gtk_box_pack_start (GTK_BOX (vbox12), hamlibframe, FALSE, FALSE, 5); |
|
|
|
|
|
vbox13 = gtk_vbox_new (FALSE, 0); |
|
|
gtk_widget_show (vbox13); |
|
|
gtk_container_add (GTK_CONTAINER (hamlibframe), vbox13); |
|
|
|
|
|
hbox25 = gtk_hbox_new (TRUE, 0); |
|
|
gtk_widget_show (hbox25); |
|
|
gtk_box_pack_start (GTK_BOX (vbox13), hbox25, TRUE, TRUE, 5); |
|
305 |
|
|
306 |
radiolabel = gtk_label_new (_("Select a Radio")); |
#if WANT_HAMLIB |
307 |
gtk_widget_show (radiolabel); |
hamlibcheckbutton = gtk_check_button_new_with_label |
308 |
gtk_box_pack_start (GTK_BOX (hbox25), radiolabel, FALSE, FALSE, 5); |
(_("Enable hamlib support")); |
309 |
gtk_label_set_line_wrap (GTK_LABEL (radiolabel), TRUE); |
gtk_box_pack_start |
310 |
gtk_misc_set_padding (GTK_MISC (radiolabel), 5, 0); |
(GTK_BOX (vboxpage4), hamlibcheckbutton, FALSE, FALSE, 0); |
311 |
|
|
312 |
|
hamlibframe = gtk_frame_new (_("Settings")); |
313 |
|
gtk_box_pack_start (GTK_BOX (vboxpage4), hamlibframe, FALSE, FALSE, 0); |
314 |
|
hamlibvbox = gtk_vbox_new (FALSE, 0); |
315 |
|
gtk_container_add (GTK_CONTAINER (hamlibframe), hamlibvbox); |
316 |
|
|
317 |
|
radiohbox = gtk_hbox_new (TRUE, 0); |
318 |
|
gtk_box_pack_start (GTK_BOX (hamlibvbox), radiohbox, FALSE, FALSE, 0); |
319 |
|
radiolabel = gtk_label_new (_("Select a Radio")); |
320 |
|
gtk_box_pack_start (GTK_BOX (radiohbox), radiolabel, FALSE, FALSE, 0); |
321 |
radiocombo = gtk_combo_box_entry_new_text (); |
radiocombo = gtk_combo_box_entry_new_text (); |
322 |
gtk_widget_show (radiocombo); |
gtk_box_pack_start (GTK_BOX (radiohbox), radiocombo, FALSE, FALSE, 0); |
323 |
gtk_box_pack_start (GTK_BOX (hbox25), radiocombo, TRUE, TRUE, 0); |
gtk_editable_set_editable |
324 |
gtk_editable_set_editable (GTK_EDITABLE (GTK_BIN(radiocombo)->child), FALSE); |
(GTK_EDITABLE (GTK_BIN(radiocombo)->child), FALSE); |
325 |
|
devicehbox = gtk_hbox_new (TRUE, 0); |
326 |
hbox26 = gtk_hbox_new (TRUE, 0); |
gtk_box_pack_start (GTK_BOX (hamlibvbox), devicehbox, FALSE, FALSE, 0); |
|
gtk_widget_show (hbox26); |
|
|
gtk_box_pack_start (GTK_BOX (vbox13), hbox26, TRUE, TRUE, 5); |
|
|
|
|
327 |
devicelabel = gtk_label_new (_("Attach to Device")); |
devicelabel = gtk_label_new (_("Attach to Device")); |
328 |
gtk_widget_show (devicelabel); |
gtk_box_pack_start (GTK_BOX (devicehbox), devicelabel, FALSE, FALSE, 0); |
|
gtk_box_pack_start (GTK_BOX (hbox26), devicelabel, FALSE, FALSE, 5); |
|
|
gtk_label_set_justify (GTK_LABEL (devicelabel), GTK_JUSTIFY_CENTER); |
|
|
gtk_label_set_line_wrap (GTK_LABEL (devicelabel), TRUE); |
|
|
gtk_misc_set_padding (GTK_MISC (devicelabel), 5, 0); |
|
|
|
|
329 |
devicecombo = gtk_combo_box_entry_new_text (); |
devicecombo = gtk_combo_box_entry_new_text (); |
330 |
gtk_widget_show (devicecombo); |
gtk_box_pack_start (GTK_BOX (devicehbox), devicecombo, FALSE, FALSE, 0); |
|
gtk_box_pack_start (GTK_BOX (hbox26), devicecombo, TRUE, TRUE, 0); |
|
331 |
gtk_combo_box_append_text (GTK_COMBO_BOX (devicecombo), "/dev/ttyS0"); |
gtk_combo_box_append_text (GTK_COMBO_BOX (devicecombo), "/dev/ttyS0"); |
332 |
gtk_combo_box_append_text (GTK_COMBO_BOX (devicecombo), "/dev/ttyS1"); |
gtk_combo_box_append_text (GTK_COMBO_BOX (devicecombo), "/dev/ttyS1"); |
333 |
gtk_combo_box_append_text (GTK_COMBO_BOX (devicecombo), "/dev/ttyS2"); |
gtk_combo_box_append_text (GTK_COMBO_BOX (devicecombo), "/dev/ttyS2"); |
335 |
gtk_combo_box_append_text (GTK_COMBO_BOX (devicecombo), "localhost"); |
gtk_combo_box_append_text (GTK_COMBO_BOX (devicecombo), "localhost"); |
336 |
gtk_entry_set_max_length (GTK_ENTRY (GTK_BIN(devicecombo)->child), 30); |
gtk_entry_set_max_length (GTK_ENTRY (GTK_BIN(devicecombo)->child), 30); |
337 |
|
|
338 |
hseparator10 = gtk_hseparator_new (); |
hamlibseparator1 = gtk_hseparator_new (); |
339 |
gtk_widget_show (hseparator10); |
gtk_box_pack_start |
340 |
gtk_box_pack_start (GTK_BOX (vbox13), hseparator10, FALSE, FALSE, 5); |
(GTK_BOX (hamlibvbox), hamlibseparator1, FALSE, FALSE, 10); |
341 |
|
configurelabel = gtk_label_new |
342 |
label202 = gtk_label_new (_("Comma separated list of commands for configuring your hamlib port")); |
(_("Comma separated list of commands for configuring your hamlib port")); |
343 |
gtk_widget_show (label202); |
gtk_box_pack_start (GTK_BOX (hamlibvbox), configurelabel, FALSE, FALSE, 0); |
344 |
gtk_box_pack_start (GTK_BOX (vbox13), label202, FALSE, FALSE, 0); |
gtk_label_set_line_wrap (GTK_LABEL (configurelabel), TRUE); |
|
gtk_label_set_line_wrap (GTK_LABEL (label202), TRUE); |
|
|
gtk_misc_set_padding (GTK_MISC (label202), 5, 0); |
|
345 |
|
|
346 |
rigsetconfentry = gtk_entry_new (); |
rigsetconfentry = gtk_entry_new (); |
347 |
gtk_widget_show (rigsetconfentry); |
gtk_box_pack_start (GTK_BOX (hamlibvbox), rigsetconfentry, FALSE, FALSE, 0); |
|
gtk_box_pack_start (GTK_BOX (vbox13), rigsetconfentry, FALSE, FALSE, 5); |
|
348 |
gtk_entry_set_max_length (GTK_ENTRY (rigsetconfentry), 80); |
gtk_entry_set_max_length (GTK_ENTRY (rigsetconfentry), 80); |
349 |
gtk_tooltips_set_tip (tooltips, rigsetconfentry, |
gtk_tooltips_set_tip (tooltips, rigsetconfentry, |
350 |
_("example: rts_state=ON,timeout=600,serial_speed=19200"), NULL); |
_("example: rts_state=ON,timeout=600,serial_speed=19200"), NULL); |
351 |
|
|
352 |
hseparator9 = gtk_hseparator_new (); |
hamlibseparator2 = gtk_hseparator_new (); |
353 |
gtk_widget_show (hseparator9); |
gtk_box_pack_start |
354 |
gtk_box_pack_start (GTK_BOX (vbox13), hseparator9, FALSE, FALSE, 0); |
(GTK_BOX (hamlibvbox), hamlibseparator2, FALSE, FALSE, 10); |
355 |
|
pollingcheckbutton = gtk_check_button_new_with_label |
356 |
pollingcheckbutton = gtk_check_button_new_with_mnemonic (_("Enable polling")); |
(_("Enable polling")); |
357 |
gtk_widget_show (pollingcheckbutton); |
gtk_box_pack_start |
358 |
gtk_box_pack_start (GTK_BOX (vbox13), pollingcheckbutton, FALSE, FALSE, 0); |
(GTK_BOX (hamlibvbox), pollingcheckbutton, FALSE, FALSE, 0); |
359 |
|
|
360 |
pollingframe = gtk_frame_new (NULL); |
pollingframe = gtk_frame_new (NULL); |
361 |
gtk_widget_show (pollingframe); |
gtk_box_pack_start (GTK_BOX (hamlibvbox), pollingframe, FALSE, FALSE, 0); |
362 |
gtk_box_pack_start (GTK_BOX (vbox13), pollingframe, FALSE, FALSE, 0); |
pollinghbox = gtk_hbox_new (TRUE, 0); |
363 |
|
gtk_container_add (GTK_CONTAINER (pollingframe), pollinghbox); |
364 |
hbox161 = gtk_hbox_new (FALSE, 0); |
pollinglabel = gtk_label_new (_("Poll rig every")); |
365 |
gtk_widget_show (hbox161); |
gtk_box_pack_start (GTK_BOX (pollinghbox), pollinglabel, FALSE, FALSE, 0); |
|
gtk_container_add (GTK_CONTAINER (pollingframe), hbox161); |
|
|
gtk_container_set_border_width (GTK_CONTAINER (hbox161), 5); |
|
|
|
|
|
label197 = gtk_label_new (_("Poll rig every")); |
|
|
gtk_widget_show (label197); |
|
|
gtk_box_pack_start (GTK_BOX (hbox161), label197, FALSE, FALSE, 5); |
|
|
gtk_label_set_justify (GTK_LABEL (label197), GTK_JUSTIFY_CENTER); |
|
|
gtk_label_set_line_wrap (GTK_LABEL (label197), TRUE); |
|
|
gtk_misc_set_padding (GTK_MISC (label197), 5, 0); |
|
|
|
|
366 |
pollcombo = gtk_combo_box_entry_new_text (); |
pollcombo = gtk_combo_box_entry_new_text (); |
367 |
gtk_widget_show (pollcombo); |
gtk_box_pack_start (GTK_BOX (pollinghbox), pollcombo, FALSE, FALSE, 0); |
|
gtk_box_pack_start (GTK_BOX (hbox161), pollcombo, FALSE, FALSE, 5); |
|
368 |
gtk_combo_box_append_text (GTK_COMBO_BOX (pollcombo), "300"); |
gtk_combo_box_append_text (GTK_COMBO_BOX (pollcombo), "300"); |
369 |
gtk_combo_box_append_text (GTK_COMBO_BOX (pollcombo), "400"); |
gtk_combo_box_append_text (GTK_COMBO_BOX (pollcombo), "400"); |
370 |
gtk_combo_box_append_text (GTK_COMBO_BOX (pollcombo), "500"); |
gtk_combo_box_append_text (GTK_COMBO_BOX (pollcombo), "500"); |
372 |
gtk_combo_box_append_text (GTK_COMBO_BOX (pollcombo), "1000"); |
gtk_combo_box_append_text (GTK_COMBO_BOX (pollcombo), "1000"); |
373 |
gtk_combo_box_append_text (GTK_COMBO_BOX (pollcombo), "2000"); |
gtk_combo_box_append_text (GTK_COMBO_BOX (pollcombo), "2000"); |
374 |
gtk_combo_box_append_text (GTK_COMBO_BOX (pollcombo), "3000"); |
gtk_combo_box_append_text (GTK_COMBO_BOX (pollcombo), "3000"); |
375 |
gtk_editable_set_editable (GTK_EDITABLE (GTK_BIN(pollcombo)->child), FALSE); |
gtk_editable_set_editable |
376 |
|
(GTK_EDITABLE (GTK_BIN(pollcombo)->child), FALSE); |
377 |
label198 = gtk_label_new (_("milliseconds")); |
gtk_widget_set_size_request (pollcombo, 100, -1); |
378 |
gtk_widget_show (label198); |
secondslabel = gtk_label_new (_("milliseconds")); |
379 |
gtk_box_pack_start (GTK_BOX (hbox161), label198, FALSE, FALSE, 5); |
gtk_box_pack_start (GTK_BOX (pollinghbox), secondslabel, FALSE, FALSE, 0); |
380 |
gtk_label_set_line_wrap (GTK_LABEL (label198), TRUE); |
|
381 |
gtk_misc_set_padding (GTK_MISC (label198), 5, 0); |
smetercheckbutton = gtk_check_button_new_with_label |
382 |
|
(_("Show S-meter on statusbar")); |
383 |
label200 = gtk_label_new (""); |
gtk_box_pack_start |
384 |
gtk_widget_show (label200); |
(GTK_BOX (hamlibvbox), smetercheckbutton, FALSE, FALSE, 0); |
385 |
gtk_frame_set_label_widget (GTK_FRAME (pollingframe), label200); |
frequencycheckbutton = gtk_check_button_new_with_label |
386 |
|
(_("Show frequency on statusbar")); |
387 |
smetercheckbutton = gtk_check_button_new (); |
gtk_box_pack_start |
388 |
gtk_widget_show (smetercheckbutton); |
(GTK_BOX (hamlibvbox), frequencycheckbutton, FALSE, FALSE, 0); |
|
gtk_box_pack_start (GTK_BOX (vbox13), smetercheckbutton, FALSE, FALSE, 0); |
|
|
|
|
|
alignment2 = gtk_alignment_new (0.5, 0.5, 0, 0); |
|
|
gtk_widget_show (alignment2); |
|
|
gtk_container_add (GTK_CONTAINER (smetercheckbutton), alignment2); |
|
|
|
|
|
hbox152 = gtk_hbox_new (FALSE, 2); |
|
|
gtk_widget_show (hbox152); |
|
|
gtk_container_add (GTK_CONTAINER (alignment2), hbox152); |
|
|
|
|
|
image182 = create_pixmap (preferencesdialog, "s-meter.xpm"); |
|
|
gtk_widget_show (image182); |
|
|
gtk_box_pack_start (GTK_BOX (hbox152), image182, FALSE, FALSE, 0); |
|
|
gtk_misc_set_padding (GTK_MISC (image182), 5, 0); |
|
|
|
|
|
label188 = gtk_label_new_with_mnemonic (_("Show S-meter on statusbar")); |
|
|
gtk_widget_show (label188); |
|
|
gtk_box_pack_start (GTK_BOX (hbox152), label188, FALSE, FALSE, 0); |
|
|
gtk_label_set_line_wrap (GTK_LABEL (label188), TRUE); |
|
|
gtk_misc_set_padding (GTK_MISC (label188), 5, 0); |
|
|
|
|
|
frequencycheckbutton = gtk_check_button_new (); |
|
|
gtk_widget_show (frequencycheckbutton); |
|
|
gtk_box_pack_start (GTK_BOX (vbox13), frequencycheckbutton, FALSE, FALSE, 0); |
|
|
|
|
|
alignment3 = gtk_alignment_new (0.5, 0.5, 0, 0); |
|
|
gtk_widget_show (alignment3); |
|
|
gtk_container_add (GTK_CONTAINER (frequencycheckbutton), alignment3); |
|
|
|
|
|
hbox153 = gtk_hbox_new (FALSE, 2); |
|
|
gtk_widget_show (hbox153); |
|
|
gtk_container_add (GTK_CONTAINER (alignment3), hbox153); |
|
|
|
|
|
image183 = create_pixmap (preferencesdialog, "mini-trx.xpm"); |
|
|
gtk_widget_show (image183); |
|
|
gtk_box_pack_start (GTK_BOX (hbox153), image183, FALSE, FALSE, 0); |
|
|
gtk_misc_set_padding (GTK_MISC (image183), 5, 0); |
|
|
|
|
|
label189 = gtk_label_new_with_mnemonic (_("Show frequency on statusbar")); |
|
|
gtk_widget_show (label189); |
|
|
gtk_box_pack_start (GTK_BOX (hbox153), label189, FALSE, FALSE, 0); |
|
|
gtk_label_set_line_wrap (GTK_LABEL (label189), TRUE); |
|
|
gtk_misc_set_padding (GTK_MISC (label189), 5, 0); |
|
389 |
|
|
390 |
frequencyframe = gtk_frame_new (NULL); |
frequencyframe = gtk_frame_new (NULL); |
391 |
gtk_widget_show (frequencyframe); |
gtk_box_pack_start (GTK_BOX (hamlibvbox), frequencyframe, FALSE, FALSE, 0); |
392 |
gtk_box_pack_start (GTK_BOX (vbox13), frequencyframe, TRUE, TRUE, 0); |
digitshbox = gtk_hbox_new (TRUE, 0); |
393 |
|
gtk_container_add (GTK_CONTAINER (frequencyframe), digitshbox); |
394 |
hbox36 = gtk_hbox_new (FALSE, 0); |
digitslabel = gtk_label_new (_("Round digits to")); |
395 |
gtk_widget_show (hbox36); |
gtk_box_pack_start (GTK_BOX (digitshbox), digitslabel, FALSE, FALSE, 0); |
|
gtk_container_add (GTK_CONTAINER (frequencyframe), hbox36); |
|
|
gtk_container_set_border_width (GTK_CONTAINER (hbox36), 5); |
|
|
|
|
|
label39 = gtk_label_new (_("Round digits to")); |
|
|
gtk_widget_show (label39); |
|
|
gtk_box_pack_start (GTK_BOX (hbox36), label39, FALSE, FALSE, 5); |
|
|
gtk_label_set_justify (GTK_LABEL (label39), GTK_JUSTIFY_CENTER); |
|
|
gtk_label_set_line_wrap (GTK_LABEL (label39), TRUE); |
|
|
gtk_misc_set_padding (GTK_MISC (label39), 5, 0); |
|
|
|
|
396 |
digitscombo = gtk_combo_box_entry_new_text (); |
digitscombo = gtk_combo_box_entry_new_text (); |
397 |
gtk_widget_show (digitscombo); |
gtk_box_pack_start (GTK_BOX (digitshbox), digitscombo, FALSE, FALSE, 0); |
|
gtk_box_pack_start (GTK_BOX (hbox36), digitscombo, FALSE, FALSE, 5); |
|
398 |
gtk_combo_box_append_text (GTK_COMBO_BOX (digitscombo), "0"); |
gtk_combo_box_append_text (GTK_COMBO_BOX (digitscombo), "0"); |
399 |
gtk_combo_box_append_text (GTK_COMBO_BOX (digitscombo), "1"); |
gtk_combo_box_append_text (GTK_COMBO_BOX (digitscombo), "1"); |
400 |
gtk_combo_box_append_text (GTK_COMBO_BOX (digitscombo), "2"); |
gtk_combo_box_append_text (GTK_COMBO_BOX (digitscombo), "2"); |
401 |
gtk_combo_box_append_text (GTK_COMBO_BOX (digitscombo), "3"); |
gtk_combo_box_append_text (GTK_COMBO_BOX (digitscombo), "3"); |
402 |
gtk_combo_box_append_text (GTK_COMBO_BOX (digitscombo), "4"); |
gtk_combo_box_append_text (GTK_COMBO_BOX (digitscombo), "4"); |
403 |
gtk_combo_box_append_text (GTK_COMBO_BOX (digitscombo), "5"); |
gtk_combo_box_append_text (GTK_COMBO_BOX (digitscombo), "5"); |
404 |
gtk_editable_set_editable (GTK_EDITABLE (GTK_BIN(digitscombo)->child), FALSE); |
gtk_editable_set_editable |
405 |
|
(GTK_EDITABLE (GTK_BIN(digitscombo)->child), FALSE); |
406 |
label40 = gtk_label_new (_("characters")); |
gtk_widget_set_size_request (digitscombo, 100, -1); |
407 |
gtk_widget_show (label40); |
characterslabel = gtk_label_new (_("characters")); |
408 |
gtk_box_pack_start (GTK_BOX (hbox36), label40, FALSE, FALSE, 5); |
gtk_box_pack_start (GTK_BOX (digitshbox), characterslabel, FALSE, FALSE, 0); |
409 |
gtk_label_set_justify (GTK_LABEL (label40), GTK_JUSTIFY_CENTER); |
#endif |
|
gtk_label_set_line_wrap (GTK_LABEL (label40), TRUE); |
|
|
gtk_misc_set_padding (GTK_MISC (label40), 5, 0); |
|
|
|
|
|
label201 = gtk_label_new (""); |
|
|
gtk_widget_show (label201); |
|
|
gtk_frame_set_label_widget (GTK_FRAME (frequencyframe), label201); |
|
|
|
|
|
label112 = gtk_label_new (_("Settings")); |
|
|
gtk_widget_show (label112); |
|
|
gtk_frame_set_label_widget (GTK_FRAME (hamlibframe), label112); |
|
410 |
|
|
411 |
preferenceslabel4 = gtk_label_new ("Hamlib"); |
preferenceslabel4 = gtk_label_new ("Hamlib"); |
412 |
gtk_widget_show (preferenceslabel4); |
gtk_notebook_set_tab_label (GTK_NOTEBOOK (preferencesnotebook), |
413 |
gtk_notebook_set_tab_label (GTK_NOTEBOOK (preferencesnotebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (preferencesnotebook), 3), preferenceslabel4); |
gtk_notebook_get_nth_page (GTK_NOTEBOOK (preferencesnotebook), 3), |
414 |
gtk_label_set_justify (GTK_LABEL (preferenceslabel4), GTK_JUSTIFY_CENTER); |
preferenceslabel4); |
415 |
|
|
416 |
vbox26 = gtk_vbox_new (FALSE, 0); |
/* page 5, logs */ |
417 |
gtk_widget_show (vbox26); |
vboxpage5 = gtk_vbox_new (FALSE, 0); |
418 |
gtk_container_add (GTK_CONTAINER (preferencesnotebook), vbox26); |
gtk_container_add (GTK_CONTAINER (preferencesnotebook), vboxpage5); |
419 |
gtk_notebook_set_tab_label_packing (GTK_NOTEBOOK (preferencesnotebook), vbox26, FALSE, FALSE, GTK_PACK_START); |
|
420 |
|
logsframe = gtk_frame_new (_("Logs")); |
421 |
frame16 = gtk_frame_new (NULL); |
gtk_box_pack_start (GTK_BOX (vboxpage5), logsframe, FALSE, FALSE, 0); |
422 |
gtk_widget_show (frame16); |
logsvbox = gtk_vbox_new (FALSE, 0); |
423 |
gtk_box_pack_start (GTK_BOX (vbox26), frame16, FALSE, FALSE, 5); |
gtk_container_add (GTK_CONTAINER (logsframe), logsvbox); |
|
|
|
|
vbox28 = gtk_vbox_new (FALSE, 0); |
|
|
gtk_widget_show (vbox28); |
|
|
gtk_container_add (GTK_CONTAINER (frame16), vbox28); |
|
|
|
|
424 |
pathlabel = gtk_label_new (_("Directory where the logs will be saved")); |
pathlabel = gtk_label_new (_("Directory where the logs will be saved")); |
425 |
gtk_widget_show (pathlabel); |
gtk_box_pack_start (GTK_BOX (logsvbox), pathlabel, FALSE, FALSE, 0); |
426 |
gtk_box_pack_start (GTK_BOX (vbox28), pathlabel, FALSE, FALSE, 0); |
pathhbox = gtk_hbox_new (FALSE, 0); |
427 |
gtk_label_set_justify (GTK_LABEL (pathlabel), GTK_JUSTIFY_CENTER); |
gtk_box_pack_start (GTK_BOX (logsvbox), pathhbox, FALSE, FALSE, 0); |
|
gtk_label_set_line_wrap (GTK_LABEL (pathlabel), TRUE); |
|
|
gtk_misc_set_padding (GTK_MISC (pathlabel), 2, 5); |
|
|
|
|
|
hbox71 = gtk_hbox_new (FALSE, 5); |
|
|
gtk_widget_show (hbox71); |
|
|
gtk_box_pack_start (GTK_BOX (vbox28), hbox71, TRUE, TRUE, 0); |
|
|
|
|
428 |
pathentry = gtk_entry_new (); |
pathentry = gtk_entry_new (); |
429 |
gtk_widget_show (pathentry); |
gtk_box_pack_start (GTK_BOX (pathhbox), pathentry, TRUE, TRUE, 0); |
|
gtk_box_pack_start (GTK_BOX (hbox71), pathentry, TRUE, TRUE, 5); |
|
430 |
gtk_editable_set_editable (GTK_EDITABLE (pathentry), FALSE); |
gtk_editable_set_editable (GTK_EDITABLE (pathentry), FALSE); |
431 |
|
pathbutton = gtk_button_new_from_stock (GTK_STOCK_OPEN); |
432 |
pathbutton = gtk_button_new (); |
gtk_widget_set_size_request (pathbutton, 100, -1); |
433 |
gtk_widget_show (pathbutton); |
gtk_box_pack_start (GTK_BOX (pathhbox), pathbutton, FALSE, FALSE, 0); |
434 |
gtk_box_pack_start (GTK_BOX (hbox71), pathbutton, FALSE, FALSE, 5); |
gtk_tooltips_set_tip |
435 |
gtk_tooltips_set_tip (tooltips, pathbutton, _("Click here to change the path"), NULL); |
(tooltips, pathbutton, _("Click here to change the path"), NULL); |
436 |
|
|
437 |
alignment4 = gtk_alignment_new (0.5, 0.5, 0, 0); |
logshseparator = gtk_hseparator_new (); |
438 |
gtk_widget_show (alignment4); |
gtk_box_pack_start (GTK_BOX (logsvbox), logshseparator, TRUE, TRUE, 10); |
439 |
gtk_container_add (GTK_CONTAINER (pathbutton), alignment4); |
|
440 |
|
loadlabel = gtk_label_new |
441 |
hbox155 = gtk_hbox_new (FALSE, 2); |
(_("Comma separated list of logs to load at startup")); |
442 |
gtk_widget_show (hbox155); |
gtk_box_pack_start (GTK_BOX (logsvbox), loadlabel, FALSE, FALSE, 0); |
443 |
gtk_container_add (GTK_CONTAINER (alignment4), hbox155); |
gtk_label_set_line_wrap (GTK_LABEL (loadlabel), TRUE); |
|
|
|
|
image184 = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_BUTTON); |
|
|
gtk_widget_show (image184); |
|
|
gtk_box_pack_start (GTK_BOX (hbox155), image184, FALSE, FALSE, 0); |
|
|
|
|
|
label190 = gtk_label_new_with_mnemonic (""); |
|
|
gtk_widget_show (label190); |
|
|
gtk_box_pack_start (GTK_BOX (hbox155), label190, FALSE, FALSE, 0); |
|
|
|
|
|
hseparator3 = gtk_hseparator_new (); |
|
|
gtk_widget_show (hseparator3); |
|
|
gtk_box_pack_start (GTK_BOX (vbox28), hseparator3, TRUE, TRUE, 8); |
|
|
|
|
|
label91 = gtk_label_new (_("Comma separated list of logs to load at startup")); |
|
|
gtk_widget_show (label91); |
|
|
gtk_box_pack_start (GTK_BOX (vbox28), label91, FALSE, FALSE, 0); |
|
|
gtk_label_set_justify (GTK_LABEL (label91), GTK_JUSTIFY_CENTER); |
|
|
gtk_label_set_line_wrap (GTK_LABEL (label91), TRUE); |
|
|
gtk_misc_set_padding (GTK_MISC (label91), 2, 5); |
|
|
|
|
|
hbox72 = gtk_hbox_new (FALSE, 0); |
|
|
gtk_widget_show (hbox72); |
|
|
gtk_box_pack_start (GTK_BOX (vbox28), hbox72, TRUE, TRUE, 7); |
|
|
|
|
444 |
logsentry = gtk_entry_new (); |
logsentry = gtk_entry_new (); |
445 |
gtk_widget_show (logsentry); |
gtk_box_pack_start (GTK_BOX (logsvbox), logsentry, FALSE, FALSE, 0); |
|
gtk_box_pack_start (GTK_BOX (hbox72), logsentry, TRUE, TRUE, 5); |
|
446 |
gtk_entry_set_max_length (GTK_ENTRY (logsentry), 90); |
gtk_entry_set_max_length (GTK_ENTRY (logsentry), 90); |
447 |
|
|
448 |
label113 = gtk_label_new ("Logs"); |
savingframe = gtk_frame_new (_("Saving")); |
449 |
gtk_widget_show (label113); |
gtk_box_pack_start (GTK_BOX (vboxpage5), savingframe, FALSE, FALSE, 0); |
450 |
gtk_frame_set_label_widget (GTK_FRAME (frame16), label113); |
savingvbox = gtk_vbox_new (FALSE, 0); |
451 |
|
gtk_container_add (GTK_CONTAINER (savingframe), savingvbox); |
452 |
frame9 = gtk_frame_new (NULL); |
savecheckbutton = gtk_check_button_new_with_label |
453 |
gtk_widget_show (frame9); |
(_("Save with every log change")); |
454 |
gtk_box_pack_start (GTK_BOX (vbox26), frame9, FALSE, FALSE, 5); |
gtk_box_pack_start |
455 |
|
(GTK_BOX (savingvbox), savecheckbutton, FALSE, FALSE, 0); |
456 |
vbox39 = gtk_vbox_new (FALSE, 0); |
autosavecheckbutton = gtk_check_button_new_with_label |
457 |
gtk_widget_show (vbox39); |
(_("Enable autosave")); |
458 |
gtk_container_add (GTK_CONTAINER (frame9), vbox39); |
gtk_box_pack_start |
459 |
gtk_container_set_border_width (GTK_CONTAINER (vbox39), 3); |
(GTK_BOX (savingvbox), autosavecheckbutton, FALSE, FALSE, 0); |
|
|
|
|
savecheckbutton = gtk_check_button_new_with_mnemonic (_("Save with every log change")); |
|
|
gtk_widget_show (savecheckbutton); |
|
|
gtk_box_pack_start (GTK_BOX (vbox39), savecheckbutton, FALSE, FALSE, 0); |
|
|
|
|
|
autosavecheckbutton = gtk_check_button_new_with_mnemonic (_("Enable autosave")); |
|
|
gtk_widget_show (autosavecheckbutton); |
|
|
gtk_box_pack_start (GTK_BOX (vbox39), autosavecheckbutton, FALSE, FALSE, 0); |
|
460 |
|
|
461 |
autosaveframe = gtk_frame_new (NULL); |
autosaveframe = gtk_frame_new (NULL); |
462 |
gtk_widget_show (autosaveframe); |
gtk_box_pack_start |
463 |
gtk_box_pack_start (GTK_BOX (vbox39), autosaveframe, FALSE, FALSE, 0); |
(GTK_BOX (savingvbox), autosaveframe, FALSE, FALSE, 0); |
464 |
|
autosavehbox = gtk_hbox_new (TRUE, 0); |
465 |
hbox37 = gtk_hbox_new (FALSE, 0); |
gtk_container_add (GTK_CONTAINER (autosaveframe), autosavehbox); |
466 |
gtk_widget_show (hbox37); |
autosavelabel = gtk_label_new (_("Autosave logs every")); |
467 |
gtk_container_add (GTK_CONTAINER (autosaveframe), hbox37); |
gtk_box_pack_start (GTK_BOX (autosavehbox), autosavelabel, FALSE, FALSE, 0); |
|
|
|
|
label41 = gtk_label_new (_("Autosave logs every")); |
|
|
gtk_widget_show (label41); |
|
|
gtk_box_pack_start (GTK_BOX (hbox37), label41, FALSE, FALSE, 0); |
|
|
gtk_label_set_justify (GTK_LABEL (label41), GTK_JUSTIFY_CENTER); |
|
|
gtk_label_set_line_wrap (GTK_LABEL (label41), TRUE); |
|
|
gtk_misc_set_padding (GTK_MISC (label41), 5, 0); |
|
|
|
|
468 |
autosavecombo = gtk_combo_box_entry_new_text (); |
autosavecombo = gtk_combo_box_entry_new_text (); |
469 |
gtk_widget_show (autosavecombo); |
gtk_box_pack_start (GTK_BOX (autosavehbox), autosavecombo, FALSE, FALSE, 0); |
470 |
gtk_box_pack_start (GTK_BOX (hbox37), autosavecombo, FALSE, FALSE, 5); |
gtk_widget_set_size_request (autosavecombo, 100, -1); |
|
gtk_widget_set_size_request (autosavecombo, 100, 23); |
|
471 |
gtk_combo_box_append_text (GTK_COMBO_BOX (autosavecombo), "5"); |
gtk_combo_box_append_text (GTK_COMBO_BOX (autosavecombo), "5"); |
472 |
gtk_combo_box_append_text (GTK_COMBO_BOX (autosavecombo), "10"); |
gtk_combo_box_append_text (GTK_COMBO_BOX (autosavecombo), "10"); |
473 |
gtk_combo_box_append_text (GTK_COMBO_BOX (autosavecombo), "20"); |
gtk_combo_box_append_text (GTK_COMBO_BOX (autosavecombo), "20"); |
477 |
gtk_combo_box_append_text (GTK_COMBO_BOX (autosavecombo), "60"); |
gtk_combo_box_append_text (GTK_COMBO_BOX (autosavecombo), "60"); |
478 |
gtk_combo_box_append_text (GTK_COMBO_BOX (autosavecombo), "90"); |
gtk_combo_box_append_text (GTK_COMBO_BOX (autosavecombo), "90"); |
479 |
gtk_combo_box_append_text (GTK_COMBO_BOX (autosavecombo), "120"); |
gtk_combo_box_append_text (GTK_COMBO_BOX (autosavecombo), "120"); |
480 |
gtk_editable_set_editable (GTK_EDITABLE (GTK_BIN(autosavecombo)->child), FALSE); |
gtk_editable_set_editable |
481 |
|
(GTK_EDITABLE (GTK_BIN(autosavecombo)->child), FALSE); |
482 |
label42 = gtk_label_new (_("minutes")); |
gtk_widget_set_size_request (autosavecombo, 100, -1); |
483 |
gtk_widget_show (label42); |
minuteslabel = gtk_label_new (_("minutes")); |
484 |
gtk_box_pack_start (GTK_BOX (hbox37), label42, FALSE, FALSE, 0); |
gtk_box_pack_start (GTK_BOX (autosavehbox), minuteslabel, FALSE, FALSE, 0); |
485 |
gtk_label_set_justify (GTK_LABEL (label42), GTK_JUSTIFY_CENTER); |
|
486 |
gtk_label_set_line_wrap (GTK_LABEL (label42), TRUE); |
preferenceslabel5 = gtk_label_new (_("Logs")); |
487 |
gtk_misc_set_padding (GTK_MISC (label42), 5, 0); |
gtk_notebook_set_tab_label (GTK_NOTEBOOK (preferencesnotebook), |
488 |
|
gtk_notebook_get_nth_page (GTK_NOTEBOOK (preferencesnotebook), 4), |
489 |
label114 = gtk_label_new (_("Saving")); |
preferenceslabel5); |
490 |
gtk_widget_show (label114); |
|
491 |
gtk_frame_set_label_widget (GTK_FRAME (frame9), label114); |
/* page 6, other */ |
492 |
|
vboxpage6 = gtk_vbox_new (FALSE, 0); |
493 |
label92 = gtk_label_new ("Logs"); |
gtk_container_add (GTK_CONTAINER (preferencesnotebook), vboxpage6); |
494 |
gtk_widget_show (label92); |
|
495 |
gtk_notebook_set_tab_label (GTK_NOTEBOOK (preferencesnotebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (preferencesnotebook), 4), label92); |
typeaheadfindcheckbutton = gtk_check_button_new_with_label |
496 |
gtk_label_set_justify (GTK_LABEL (label92), GTK_JUSTIFY_CENTER); |
(_("Enable type and find")); |
497 |
|
gtk_box_pack_start |
498 |
vbox40 = gtk_vbox_new (FALSE, 0); |
(GTK_BOX (vboxpage6), typeaheadfindcheckbutton, FALSE, FALSE, 0); |
499 |
gtk_widget_show (vbox40); |
gtk_tooltips_set_tip (tooltips, typeaheadfindcheckbutton, _( |
500 |
gtk_container_add (GTK_CONTAINER (preferencesnotebook), vbox40); |
"Search all the logs for a callsign match and when found, fill " |
501 |
gtk_notebook_set_tab_label_packing (GTK_NOTEBOOK (preferencesnotebook), vbox40, FALSE, FALSE, GTK_PACK_START); |
"in name, QTH, locator and remarks like in the previous QSO when " |
502 |
|
"these fields are empty"), NULL); |
503 |
typeaheadfindcheckbutton = gtk_check_button_new_with_mnemonic (_("Enable type and find")); |
|
504 |
gtk_widget_show (typeaheadfindcheckbutton); |
remotedataframe = gtk_frame_new (_("Remote data")); |
505 |
gtk_box_pack_start (GTK_BOX (vbox40), typeaheadfindcheckbutton, FALSE, FALSE, 5); |
gtk_box_pack_start (GTK_BOX (vboxpage6), remotedataframe, FALSE, FALSE, 0); |
506 |
gtk_tooltips_set_tip (tooltips, typeaheadfindcheckbutton, _("Search all the logs for a callsign match and when found, fill in name, QTH, locator and remarks like in the previous QSO when these fields are empty"), NULL); |
remotedatavbox = gtk_vbox_new (FALSE, 0); |
507 |
|
gtk_container_add (GTK_CONTAINER (remotedataframe), remotedatavbox); |
508 |
frame21 = gtk_frame_new (NULL); |
remotedatalabel = gtk_label_new |
509 |
gtk_widget_show (frame21); |
(_("When receiving data from another application (gmfsk, ktrack):")); |
510 |
gtk_box_pack_start (GTK_BOX (vbox40), frame21, FALSE, FALSE, 5); |
gtk_box_pack_start |
511 |
|
(GTK_BOX (remotedatavbox), remotedatalabel, FALSE, FALSE, 0); |
512 |
vbox41 = gtk_vbox_new (FALSE, 5); |
gtk_label_set_line_wrap (GTK_LABEL (remotedatalabel), TRUE); |
513 |
gtk_widget_show (vbox41); |
remotedataseparator = gtk_hseparator_new (); |
514 |
gtk_container_add (GTK_CONTAINER (frame21), vbox41); |
gtk_box_pack_start |
515 |
|
(GTK_BOX (remotedatavbox), remotedataseparator, FALSE, FALSE, 10); |
516 |
label176 = gtk_label_new (_("When receiving data from another application (gmfsk, ktrack):")); |
remoteradiobutton1 = gtk_radio_button_new_with_label |
517 |
gtk_widget_show (label176); |
(NULL, _("Add data directly to the log")); |
518 |
gtk_box_pack_start (GTK_BOX (vbox41), label176, FALSE, FALSE, 0); |
gtk_box_pack_start |
519 |
gtk_label_set_justify (GTK_LABEL (label176), GTK_JUSTIFY_CENTER); |
(GTK_BOX (remotedatavbox), remoteradiobutton1, FALSE, FALSE, 0); |
520 |
gtk_label_set_line_wrap (GTK_LABEL (label176), TRUE); |
remoteradiobutton_group = gtk_radio_button_get_group |
521 |
|
(GTK_RADIO_BUTTON (remoteradiobutton1)); |
522 |
hseparator6 = gtk_hseparator_new (); |
remoteradiobutton2 = gtk_radio_button_new_with_label |
523 |
gtk_widget_show (hseparator6); |
(remoteradiobutton_group, _("Add data to the QSO frame")); |
524 |
gtk_box_pack_start (GTK_BOX (vbox41), hseparator6, FALSE, FALSE, 0); |
gtk_box_pack_start |
525 |
|
(GTK_BOX (remotedatavbox), remoteradiobutton2, FALSE, FALSE, 0); |
526 |
remoteradiobutton1 = gtk_radio_button_new_with_mnemonic (NULL, _("Add data directly to the log")); |
|
527 |
gtk_widget_show (remoteradiobutton1); |
preferenceslabel6 = gtk_label_new (_("Other")); |
528 |
gtk_box_pack_start (GTK_BOX (vbox41), remoteradiobutton1, FALSE, FALSE, 0); |
gtk_notebook_set_tab_label (GTK_NOTEBOOK (preferencesnotebook), |
529 |
gtk_radio_button_set_group (GTK_RADIO_BUTTON (remoteradiobutton1), remoteradiobutton1_group); |
gtk_notebook_get_nth_page (GTK_NOTEBOOK (preferencesnotebook), 5), |
530 |
remoteradiobutton1_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (remoteradiobutton1)); |
preferenceslabel6); |
531 |
|
|
532 |
remoteradiobutton2 = gtk_radio_button_new_with_mnemonic (NULL, _("Add data to the QSO frame")); |
/**************************/ |
533 |
gtk_widget_show (remoteradiobutton2); |
/* settings of the dialog */ |
534 |
gtk_box_pack_start (GTK_BOX (vbox41), remoteradiobutton2, FALSE, FALSE, 0); |
/**************************/ |
|
gtk_radio_button_set_group (GTK_RADIO_BUTTON (remoteradiobutton2), remoteradiobutton1_group); |
|
|
remoteradiobutton1_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (remoteradiobutton2)); |
|
|
|
|
|
label115 = gtk_label_new (_("Remote data")); |
|
|
gtk_widget_show (label115); |
|
|
gtk_frame_set_label_widget (GTK_FRAME (frame21), label115); |
|
|
|
|
|
label175 = gtk_label_new (_("Other")); |
|
|
gtk_widget_show (label175); |
|
|
gtk_notebook_set_tab_label (GTK_NOTEBOOK (preferencesnotebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (preferencesnotebook), 5), label175); |
|
|
gtk_label_set_justify (GTK_LABEL (label175), GTK_JUSTIFY_CENTER); |
|
|
|
|
|
dialog_action_area4 = GTK_DIALOG (preferencesdialog)->action_area; |
|
|
gtk_widget_show (dialog_action_area4); |
|
|
gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area4), GTK_BUTTONBOX_SPREAD); |
|
|
|
|
|
preferencescancelbutton = gtk_button_new_from_stock ("gtk-cancel"); |
|
|
gtk_widget_show (preferencescancelbutton); |
|
|
gtk_dialog_add_action_widget (GTK_DIALOG (preferencesdialog), preferencescancelbutton, GTK_RESPONSE_CANCEL); |
|
|
GTK_WIDGET_SET_FLAGS (preferencescancelbutton, GTK_CAN_DEFAULT); |
|
|
|
|
|
preferencesokbutton = gtk_button_new_from_stock ("gtk-ok"); |
|
|
gtk_widget_show (preferencesokbutton); |
|
|
gtk_dialog_add_action_widget (GTK_DIALOG (preferencesdialog), preferencesokbutton, GTK_RESPONSE_OK); |
|
|
GTK_WIDGET_SET_FLAGS (preferencesokbutton, GTK_CAN_DEFAULT); |
|
|
|
|
|
g_signal_connect ((gpointer) preferencesdialog, "delete_event", G_CALLBACK (on_preferencesdialog_delete_event), NULL); |
|
|
g_signal_connect ((gpointer) themebutton, "clicked", G_CALLBACK (on_themebutton_clicked), NULL); |
|
|
g_signal_connect ((gpointer) fontbutton, "clicked", G_CALLBACK (on_fontbutton_clicked), NULL); |
|
|
g_signal_connect ((gpointer) hamlibcheckbutton, "toggled", G_CALLBACK (on_hamlibcheckbutton_toggled), NULL); |
|
|
g_signal_connect ((gpointer) pollingcheckbutton, "toggled", G_CALLBACK (on_pollingcheckbutton_toggled), NULL); |
|
|
g_signal_connect ((gpointer) frequencycheckbutton, "toggled", G_CALLBACK (on_frequencycheckbutton_toggled), NULL); |
|
|
g_signal_connect ((gpointer) pathbutton, "clicked", G_CALLBACK (on_pathbutton_clicked), NULL); |
|
|
g_signal_connect ((gpointer) savecheckbutton, "toggled", G_CALLBACK (on_savecheckbutton_toggled), NULL); |
|
|
g_signal_connect ((gpointer) autosavecheckbutton, "toggled", G_CALLBACK (on_autosavecheckbutton_toggled), NULL); |
|
|
g_signal_connect ((gpointer) preferencescancelbutton, "clicked", G_CALLBACK (on_preferencescancelbutton_clicked), NULL); |
|
|
g_signal_connect ((gpointer) preferencesokbutton, "clicked", G_CALLBACK (on_preferencesokbutton_clicked), NULL); |
|
|
|
|
|
/* Store pointers to all widgets, for use by lookup_widget(). */ |
|
|
GLADE_HOOKUP_OBJECT_NO_REF (preferencesdialog, preferencesdialog, "preferencesdialog"); |
|
|
GLADE_HOOKUP_OBJECT (preferencesdialog, preferencesnotebook, "preferencesnotebook"); |
|
|
GLADE_HOOKUP_OBJECT (preferencesdialog, clockcheckbutton, "clockcheckbutton"); |
|
|
GLADE_HOOKUP_OBJECT (preferencesdialog, exampleframe, "exampleframe"); |
|
|
GLADE_HOOKUP_OBJECT (preferencesdialog, examplelabel, "examplelabel"); |
|
|
GLADE_HOOKUP_OBJECT (preferencesdialog, fontentry, "fontentry"); |
|
|
GLADE_HOOKUP_OBJECT (preferencesdialog, themecheckbutton, "themecheckbutton"); |
|
|
GLADE_HOOKUP_OBJECT (preferencesdialog, modesradiobutton1, "modesradiobutton1"); |
|
|
GLADE_HOOKUP_OBJECT (preferencesdialog, modesradiobutton2, "modesradiobutton2"); |
|
|
GLADE_HOOKUP_OBJECT (preferencesdialog, modeslabel, "modeslabel"); |
|
|
GLADE_HOOKUP_OBJECT (preferencesdialog, modesentry, "modesentry"); |
|
|
GLADE_HOOKUP_OBJECT (preferencesdialog, bandsradiobutton1, "bandsradiobutton1"); |
|
|
GLADE_HOOKUP_OBJECT (preferencesdialog, bandsradiobutton2, "bandsradiobutton2"); |
|
|
GLADE_HOOKUP_OBJECT (preferencesdialog, bandslabel, "bandslabel"); |
|
|
GLADE_HOOKUP_OBJECT (preferencesdialog, bandsentry, "bandsentry"); |
|
|
GLADE_HOOKUP_OBJECT (preferencesdialog, callsignentry, "callsignentry"); |
|
|
GLADE_HOOKUP_OBJECT (preferencesdialog, latentry, "latentry"); |
|
|
GLADE_HOOKUP_OBJECT (preferencesdialog, NScombo, "NScombo"); |
|
|
GLADE_HOOKUP_OBJECT (preferencesdialog, longentry, "longentry"); |
|
|
GLADE_HOOKUP_OBJECT (preferencesdialog, EWcombo, "EWcombo"); |
|
|
GLADE_HOOKUP_OBJECT (preferencesdialog, qthlocatorentry, "qthlocatorentry"); |
|
|
GLADE_HOOKUP_OBJECT (preferencesdialog, unitscombo, "unitscombo"); |
|
|
GLADE_HOOKUP_OBJECT (preferencesdialog, hamlibcheckbutton, "hamlibcheckbutton"); |
|
|
GLADE_HOOKUP_OBJECT (preferencesdialog, radiocombo, "radiocombo"); |
|
|
GLADE_HOOKUP_OBJECT (preferencesdialog, devicecombo, "devicecombo"); |
|
|
GLADE_HOOKUP_OBJECT (preferencesdialog, rigsetconfentry, "rigsetconfentry"); |
|
|
GLADE_HOOKUP_OBJECT (preferencesdialog, pollingcheckbutton, "pollingcheckbutton"); |
|
|
GLADE_HOOKUP_OBJECT (preferencesdialog, pollcombo, "pollcombo"); |
|
|
GLADE_HOOKUP_OBJECT (preferencesdialog, smetercheckbutton, "smetercheckbutton"); |
|
|
GLADE_HOOKUP_OBJECT (preferencesdialog, frequencycheckbutton, "frequencycheckbutton"); |
|
|
GLADE_HOOKUP_OBJECT (preferencesdialog, digitscombo, "digitscombo"); |
|
|
GLADE_HOOKUP_OBJECT (preferencesdialog, pathentry, "pathentry"); |
|
|
GLADE_HOOKUP_OBJECT (preferencesdialog, pathbutton, "pathbutton"); |
|
|
GLADE_HOOKUP_OBJECT (preferencesdialog, logsentry, "logsentry"); |
|
|
GLADE_HOOKUP_OBJECT (preferencesdialog, savecheckbutton, "savecheckbutton"); |
|
|
GLADE_HOOKUP_OBJECT (preferencesdialog, autosavecheckbutton, "autosavecheckbutton"); |
|
|
GLADE_HOOKUP_OBJECT (preferencesdialog, autosavecombo, "autosavecombo"); |
|
|
GLADE_HOOKUP_OBJECT (preferencesdialog, typeaheadfindcheckbutton, "typeaheadfindcheckbutton"); |
|
|
GLADE_HOOKUP_OBJECT (preferencesdialog, remoteradiobutton1, "remoteradiobutton1"); |
|
|
GLADE_HOOKUP_OBJECT (preferencesdialog, remoteradiobutton2, "remoteradiobutton2"); |
|
|
|
|
|
GLADE_HOOKUP_OBJECT (preferencesdialog, autosaveframe, "autosaveframe"); |
|
|
GLADE_HOOKUP_OBJECT (preferencesdialog, hamlibframe, "hamlibframe"); |
|
|
GLADE_HOOKUP_OBJECT (preferencesdialog, frequencyframe, "frequencyframe"); |
|
|
GLADE_HOOKUP_OBJECT (preferencesdialog, pollingframe, "pollingframe"); |
|
|
|
|
|
return preferencesdialog; |
|
|
} |
|
|
|
|
|
void |
|
|
on_menu_preferences_activate (GtkMenuItem * menuitem, gpointer user_data) |
|
|
{ |
|
|
GtkWidget *latentry, *longentry, *NScombo, |
|
|
*EWcombo, *unitscombo, *modesentry, *bandsentry, |
|
|
*modesradiobutton1, *modesradiobutton2, *bandsradiobutton1, |
|
|
*bandsradiobutton2, *modeslabel, *bandslabel, *clockcheckbutton, |
|
|
*exampleframe, *examplelabel, *autosavecombo, |
|
|
*themecheckbutton, *pathentry, *logsentry, *qthlocatorentry, |
|
|
*callsignentry, *fontentry, *savecheckbutton, *autosavecheckbutton, |
|
|
*autosaveframe, *typeaheadfindcheckbutton, *remoteradiobutton1, |
|
|
*remoteradiobutton2; |
|
|
gchar *temp; |
|
|
#if WANT_HAMLIB |
|
|
GtkWidget *hamlibcheckbutton, *radiocombo, *hamlibframe, |
|
|
*devicecombo, *frequencycheckbutton, *digitscombo, |
|
|
*smetercheckbutton, *pollingcheckbutton, *rigsetconfentry, *pollcombo; |
|
|
gint i, indexradio = -1, numrigs; |
|
|
struct rig_caps *rcaps; |
|
|
#else |
|
|
GtkWidget *notebook; |
|
|
#endif |
|
|
|
|
|
preferencesdialog = create_preferencesdialog (); |
|
535 |
|
|
536 |
/* remote logging */ |
/* remote logging */ |
|
remoteradiobutton1 = lookup_widget (preferencesdialog, "remoteradiobutton1"); |
|
|
remoteradiobutton2 = lookup_widget (preferencesdialog, "remoteradiobutton2"); |
|
537 |
if (preferences.remoteadding == 1) |
if (preferences.remoteadding == 1) |
538 |
{ |
{ |
539 |
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (remoteradiobutton1), TRUE); |
gtk_toggle_button_set_active |
540 |
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (remoteradiobutton2), FALSE); |
(GTK_TOGGLE_BUTTON (remoteradiobutton1), TRUE); |
541 |
|
gtk_toggle_button_set_active |
542 |
|
(GTK_TOGGLE_BUTTON (remoteradiobutton2), FALSE); |
543 |
} |
} |
544 |
else |
else |
545 |
{ |
{ |
546 |
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (remoteradiobutton1), FALSE); |
gtk_toggle_button_set_active |
547 |
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (remoteradiobutton2), TRUE); |
(GTK_TOGGLE_BUTTON (remoteradiobutton1), FALSE); |
548 |
|
gtk_toggle_button_set_active |
549 |
|
(GTK_TOGGLE_BUTTON (remoteradiobutton2), TRUE); |
550 |
} |
} |
551 |
|
|
552 |
/* type ahead find */ |
/* type ahead find */ |
|
typeaheadfindcheckbutton = lookup_widget |
|
|
(preferencesdialog, "typeaheadfindcheckbutton"); |
|
553 |
if (preferences.typeaheadfind == 1) |
if (preferences.typeaheadfind == 1) |
554 |
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON |
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON |
555 |
(typeaheadfindcheckbutton), TRUE); |
(typeaheadfindcheckbutton), TRUE); |
558 |
(typeaheadfindcheckbutton), FALSE); |
(typeaheadfindcheckbutton), FALSE); |
559 |
|
|
560 |
/* path for the logs */ |
/* path for the logs */ |
|
pathentry = lookup_widget (preferencesdialog, "pathentry"); |
|
561 |
gtk_entry_set_text (GTK_ENTRY (pathentry), preferences.savedir); |
gtk_entry_set_text (GTK_ENTRY (pathentry), preferences.savedir); |
562 |
|
|
563 |
/* logs to load at startup */ |
/* logs to load at startup */ |
|
logsentry = lookup_widget (preferencesdialog, "logsentry"); |
|
564 |
gtk_entry_set_text (GTK_ENTRY (logsentry), preferences.logstoload); |
gtk_entry_set_text (GTK_ENTRY (logsentry), preferences.logstoload); |
565 |
|
|
566 |
/* callsign */ |
/* callsign */ |
|
callsignentry = lookup_widget (preferencesdialog, "callsignentry"); |
|
567 |
gtk_entry_set_text (GTK_ENTRY (callsignentry), preferences.callsign); |
gtk_entry_set_text (GTK_ENTRY (callsignentry), preferences.callsign); |
568 |
|
|
569 |
/* saving */ |
/* saving */ |
570 |
temp = g_strdup_printf ("%d", preferences.autosave); |
temp = g_strdup_printf ("%d", preferences.autosave); |
|
autosavecombo = lookup_widget (preferencesdialog, "autosavecombo"); |
|
571 |
gtk_entry_set_text (GTK_ENTRY (GTK_BIN(autosavecombo)->child), temp); |
gtk_entry_set_text (GTK_ENTRY (GTK_BIN(autosavecombo)->child), temp); |
|
autosavecheckbutton = lookup_widget (preferencesdialog, "autosavecheckbutton"); |
|
|
autosaveframe = lookup_widget (preferencesdialog, "autosaveframe"); |
|
|
savecheckbutton = lookup_widget (preferencesdialog, "savecheckbutton"); |
|
572 |
if (preferences.saving == 1) |
if (preferences.saving == 1) |
573 |
{ |
{ |
574 |
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(autosavecheckbutton), TRUE); |
gtk_toggle_button_set_active |
575 |
|
(GTK_TOGGLE_BUTTON(autosavecheckbutton), TRUE); |
576 |
} |
} |
577 |
else if (preferences.saving == 2) |
else if (preferences.saving == 2) |
578 |
{ |
{ |
579 |
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(savecheckbutton), TRUE); |
gtk_toggle_button_set_active |
580 |
|
(GTK_TOGGLE_BUTTON(savecheckbutton), TRUE); |
581 |
gtk_widget_set_sensitive(autosaveframe, FALSE); |
gtk_widget_set_sensitive(autosaveframe, FALSE); |
582 |
} |
} |
583 |
|
|
584 |
/* theme */ |
/* theme */ |
|
fontentry = lookup_widget (preferencesdialog, "fontentry"); |
|
585 |
gtk_entry_set_text (GTK_ENTRY (fontentry), preferences.themefont); |
gtk_entry_set_text (GTK_ENTRY (fontentry), preferences.themefont); |
|
exampleframe = lookup_widget (preferencesdialog, "exampleframe"); |
|
586 |
setframestyle (exampleframe, preferences.themecolor, preferences.themefont); |
setframestyle (exampleframe, preferences.themecolor, preferences.themefont); |
|
examplelabel = lookup_widget (preferencesdialog, "examplelabel"); |
|
587 |
setlabelstyle (examplelabel, preferences.themecolor, preferences.themefont); |
setlabelstyle (examplelabel, preferences.themecolor, preferences.themefont); |
|
themecheckbutton = lookup_widget (preferencesdialog, "themecheckbutton"); |
|
588 |
if (preferences.logcolor == 0) |
if (preferences.logcolor == 0) |
589 |
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (themecheckbutton), |
gtk_toggle_button_set_active |
590 |
FALSE); |
(GTK_TOGGLE_BUTTON (themecheckbutton), FALSE); |
591 |
else |
else |
592 |
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (themecheckbutton), TRUE); |
gtk_toggle_button_set_active |
593 |
|
(GTK_TOGGLE_BUTTON (themecheckbutton), TRUE); |
594 |
|
|
595 |
/* clock */ |
/* clock */ |
|
clockcheckbutton = lookup_widget (preferencesdialog, "clockcheckbutton"); |
|
596 |
if (preferences.clock == 0) |
if (preferences.clock == 0) |
597 |
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (clockcheckbutton), |
gtk_toggle_button_set_active |
598 |
FALSE); |
(GTK_TOGGLE_BUTTON (clockcheckbutton), FALSE); |
599 |
else |
else |
600 |
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (clockcheckbutton), TRUE); |
gtk_toggle_button_set_active |
601 |
|
(GTK_TOGGLE_BUTTON (clockcheckbutton), TRUE); |
602 |
|
|
603 |
#if WANT_HAMLIB |
#if WANT_HAMLIB |
|
hamlibcheckbutton = lookup_widget (preferencesdialog, "hamlibcheckbutton"); |
|
|
hamlibframe = lookup_widget (preferencesdialog, "hamlibframe"); |
|
|
frequencycheckbutton = |
|
|
lookup_widget (preferencesdialog, "frequencycheckbutton"); |
|
|
smetercheckbutton = lookup_widget (preferencesdialog, "smetercheckbutton"); |
|
604 |
if (preferences.hamlib == 0) |
if (preferences.hamlib == 0) |
605 |
{ |
{ |
606 |
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (hamlibcheckbutton), |
gtk_toggle_button_set_active |
607 |
FALSE); |
(GTK_TOGGLE_BUTTON (hamlibcheckbutton), FALSE); |
608 |
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (frequencycheckbutton), |
gtk_toggle_button_set_active |
609 |
FALSE); |
(GTK_TOGGLE_BUTTON (frequencycheckbutton), FALSE); |
610 |
gtk_widget_set_sensitive (hamlibframe, 0); |
gtk_widget_set_sensitive (hamlibframe, 0); |
611 |
} |
} |
612 |
else |
else |
613 |
{ |
{ |
614 |
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (hamlibcheckbutton), |
gtk_toggle_button_set_active |
615 |
TRUE); |
(GTK_TOGGLE_BUTTON (hamlibcheckbutton), TRUE); |
616 |
if (preferences.hamlib == 2) |
gtk_widget_set_sensitive (hamlibframe, 1); |
617 |
|
if (preferences.hamlib == 1) |
618 |
|
{ |
619 |
|
gtk_widget_set_sensitive (frequencyframe, FALSE); |
620 |
|
} |
621 |
|
else if (preferences.hamlib == 2) |
622 |
{ |
{ |
623 |
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON |
gtk_toggle_button_set_active |
624 |
(frequencycheckbutton), TRUE); |
(GTK_TOGGLE_BUTTON (frequencycheckbutton), TRUE); |
625 |
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (smetercheckbutton), |
gtk_toggle_button_set_active |
626 |
FALSE); |
(GTK_TOGGLE_BUTTON (smetercheckbutton), FALSE); |
627 |
} |
} |
628 |
else if (preferences.hamlib == 3) |
else if (preferences.hamlib == 3) |
629 |
{ |
{ |
630 |
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON |
gtk_toggle_button_set_active |
631 |
(frequencycheckbutton), FALSE); |
(GTK_TOGGLE_BUTTON (frequencycheckbutton), FALSE); |
632 |
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (smetercheckbutton), |
gtk_toggle_button_set_active |
633 |
TRUE); |
(GTK_TOGGLE_BUTTON (smetercheckbutton), TRUE); |
634 |
|
gtk_widget_set_sensitive (frequencyframe, FALSE); |
635 |
} |
} |
636 |
else if (preferences.hamlib == 4) |
else if (preferences.hamlib == 4) |
637 |
{ |
{ |
638 |
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON |
gtk_toggle_button_set_active |
639 |
(frequencycheckbutton), TRUE); |
(GTK_TOGGLE_BUTTON (frequencycheckbutton), TRUE); |
640 |
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (smetercheckbutton), |
gtk_toggle_button_set_active |
641 |
TRUE); |
(GTK_TOGGLE_BUTTON (smetercheckbutton), TRUE); |
642 |
} |
} |
|
gtk_widget_set_sensitive (hamlibframe, 1); |
|
643 |
} |
} |
644 |
|
|
645 |
numrigs = g_list_length (riglist); |
numrigs = g_list_length (riglist); |
|
radiocombo = lookup_widget (preferencesdialog, "radiocombo"); |
|
646 |
if (numrigs > 0) |
if (numrigs > 0) |
647 |
{ |
{ |
648 |
for (i = 0; i < numrigs; i++) |
for (i = 0; i < numrigs; i++) |
649 |
{ |
{ |
650 |
rcaps = (struct rig_caps *) g_list_nth_data (riglist, i); |
rcaps = (struct rig_caps *) g_list_nth_data (riglist, i); |
651 |
gtk_combo_box_append_text (GTK_COMBO_BOX (radiocombo), |
gtk_combo_box_append_text |
652 |
(gchar *) rcaps->model_name); |
(GTK_COMBO_BOX (radiocombo), (gchar *) rcaps->model_name); |
653 |
if (g_ascii_strcasecmp (rcaps->model_name, preferences.radio) == 0) |
if (g_ascii_strcasecmp (rcaps->model_name, preferences.radio) == 0) |
654 |
indexradio = i; |
indexradio = i; |
655 |
} |
} |
656 |
if (indexradio != -1) |
if (indexradio != -1) |
657 |
gtk_combo_box_set_active (GTK_COMBO_BOX (radiocombo), indexradio); |
gtk_combo_box_set_active (GTK_COMBO_BOX (radiocombo), indexradio); |
658 |
} |
} |
|
|
|
|
devicecombo = lookup_widget (preferencesdialog, "devicecombo"); |
|
659 |
gtk_entry_set_text (GTK_ENTRY (GTK_BIN(devicecombo)->child), |
gtk_entry_set_text (GTK_ENTRY (GTK_BIN(devicecombo)->child), |
660 |
preferences.device); |
preferences.device); |
661 |
|
|
662 |
temp = g_strdup_printf ("%d", preferences.round); |
temp = g_strdup_printf ("%d", preferences.round); |
|
digitscombo = lookup_widget (preferencesdialog, "digitscombo"); |
|
663 |
gtk_entry_set_text (GTK_ENTRY (GTK_BIN(digitscombo)->child), temp); |
gtk_entry_set_text (GTK_ENTRY (GTK_BIN(digitscombo)->child), temp); |
|
rigsetconfentry = lookup_widget (preferencesdialog, "rigsetconfentry"); |
|
664 |
if (g_ascii_strcasecmp (preferences.rigconf, "?")) |
if (g_ascii_strcasecmp (preferences.rigconf, "?")) |
665 |
gtk_entry_set_text (GTK_ENTRY (rigsetconfentry), preferences.rigconf); |
gtk_entry_set_text (GTK_ENTRY (rigsetconfentry), preferences.rigconf); |
666 |
|
|
667 |
/* polling */ |
/* polling */ |
|
pollingcheckbutton = |
|
|
lookup_widget (preferencesdialog, "pollingcheckbutton"); |
|
|
pollcombo = lookup_widget (preferencesdialog, "pollcombo"); |
|
|
|
|
668 |
if (preferences.polltime == 0) |
if (preferences.polltime == 0) |
669 |
{ |
{ |
670 |
gtk_entry_set_text (GTK_ENTRY (GTK_BIN(pollcombo)->child), "300"); |
gtk_entry_set_text (GTK_ENTRY (GTK_BIN(pollcombo)->child), "300"); |
671 |
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (pollingcheckbutton), |
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (pollingcheckbutton), |
672 |
FALSE); |
FALSE); |
673 |
|
gtk_widget_set_sensitive (pollingframe, FALSE); |
674 |
} |
} |
675 |
else |
else |
676 |
{ |
{ |
681 |
} |
} |
682 |
|
|
683 |
#else /* hide hamlib page in notebook if no hamlib support */ |
#else /* hide hamlib page in notebook if no hamlib support */ |
|
notebook = lookup_widget (preferencesdialog, "preferencesnotebook"); |
|
684 |
gtk_notebook_remove_page (GTK_NOTEBOOK (notebook), 3); |
gtk_notebook_remove_page (GTK_NOTEBOOK (notebook), 3); |
685 |
#endif |
#endif |
686 |
|
|
687 |
/* location */ |
/* location */ |
688 |
temp = g_strdup_printf ("%3.2f", preferences.latitude); |
temp = g_strdup_printf ("%3.2f", preferences.latitude); |
|
latentry = lookup_widget (preferencesdialog, "latentry"); |
|
689 |
gtk_entry_set_text (GTK_ENTRY (latentry), temp); |
gtk_entry_set_text (GTK_ENTRY (latentry), temp); |
|
NScombo = lookup_widget (preferencesdialog, "NScombo"); |
|
690 |
if (preferences.NS == 1) |
if (preferences.NS == 1) |
691 |
gtk_combo_box_set_active (GTK_COMBO_BOX (NScombo), 0); |
gtk_combo_box_set_active (GTK_COMBO_BOX (NScombo), 0); |
692 |
else |
else |
693 |
gtk_combo_box_set_active (GTK_COMBO_BOX (NScombo), 1); |
gtk_combo_box_set_active (GTK_COMBO_BOX (NScombo), 1); |
694 |
temp = g_strdup_printf ("%3.2f", preferences.longitude); |
temp = g_strdup_printf ("%3.2f", preferences.longitude); |
|
longentry = lookup_widget (preferencesdialog, "longentry"); |
|
695 |
gtk_entry_set_text (GTK_ENTRY (longentry), temp); |
gtk_entry_set_text (GTK_ENTRY (longentry), temp); |
|
EWcombo = lookup_widget (preferencesdialog, "EWcombo"); |
|
696 |
if (preferences.EW == 1) |
if (preferences.EW == 1) |
697 |
gtk_combo_box_set_active (GTK_COMBO_BOX (EWcombo), 0); |
gtk_combo_box_set_active (GTK_COMBO_BOX (EWcombo), 0); |
698 |
else |
else |
699 |
gtk_combo_box_set_active (GTK_COMBO_BOX (EWcombo), 1); |
gtk_combo_box_set_active (GTK_COMBO_BOX (EWcombo), 1); |
|
unitscombo = lookup_widget (preferencesdialog, "unitscombo"); |
|
700 |
if (preferences.units == 1) |
if (preferences.units == 1) |
701 |
gtk_combo_box_set_active (GTK_COMBO_BOX (unitscombo), 0); |
gtk_combo_box_set_active (GTK_COMBO_BOX (unitscombo), 0); |
702 |
else |
else |
704 |
g_free (temp); |
g_free (temp); |
705 |
|
|
706 |
/* locator */ |
/* locator */ |
|
qthlocatorentry = lookup_widget (preferencesdialog, "qthlocatorentry"); |
|
707 |
gtk_entry_set_text (GTK_ENTRY (qthlocatorentry), preferences.locator); |
gtk_entry_set_text (GTK_ENTRY (qthlocatorentry), preferences.locator); |
708 |
|
|
709 |
/* modes and bands */ |
/* modes and bands */ |
|
modesentry = lookup_widget (preferencesdialog, "modesentry"); |
|
710 |
gtk_entry_set_text (GTK_ENTRY (modesentry), preferences.modes); |
gtk_entry_set_text (GTK_ENTRY (modesentry), preferences.modes); |
|
bandsentry = lookup_widget (preferencesdialog, "bandsentry"); |
|
711 |
gtk_entry_set_text (GTK_ENTRY (bandsentry), preferences.bands); |
gtk_entry_set_text (GTK_ENTRY (bandsentry), preferences.bands); |
712 |
/* set state of radio buttons and sensitivity of associated widgets */ |
/* set state of radio buttons and sensitivity of associated widgets */ |
|
modesradiobutton1 = lookup_widget (preferencesdialog, "modesradiobutton1"); |
|
|
modesradiobutton2 = lookup_widget (preferencesdialog, "modesradiobutton2"); |
|
|
modeslabel = lookup_widget (preferencesdialog, "modeslabel"); |
|
|
|
|
713 |
if (preferences.modeseditbox == 0) |
if (preferences.modeseditbox == 0) |
714 |
|
{ |
715 |
|
gtk_toggle_button_set_active |
716 |
|
(GTK_TOGGLE_BUTTON (modesradiobutton1), FALSE); |
717 |
|
gtk_toggle_button_set_active |
718 |
|
(GTK_TOGGLE_BUTTON (modesradiobutton2), TRUE); |
719 |
|
gtk_widget_set_sensitive (modeslabel, 1); |
720 |
|
gtk_widget_set_sensitive (modesentry, 1); |
721 |
|
} |
722 |
|
else |
723 |
|
{ |
724 |
|
gtk_toggle_button_set_active |
725 |
|
(GTK_TOGGLE_BUTTON (modesradiobutton1), TRUE); |
726 |
|
gtk_toggle_button_set_active |
727 |
|
(GTK_TOGGLE_BUTTON (modesradiobutton2), FALSE); |
728 |
|
gtk_widget_set_sensitive (modeslabel, 0); |
729 |
|
gtk_widget_set_sensitive (modesentry, 0); |
730 |
|
} |
731 |
|
if (preferences.bandseditbox == 0) |
732 |
|
{ |
733 |
|
gtk_toggle_button_set_active |
734 |
|
(GTK_TOGGLE_BUTTON (bandsradiobutton1), FALSE); |
735 |
|
gtk_toggle_button_set_active |
736 |
|
(GTK_TOGGLE_BUTTON (bandsradiobutton2), TRUE); |
737 |
|
gtk_widget_set_sensitive (bandslabel, 1); |
738 |
|
gtk_widget_set_sensitive (bandsentry, 1); |
739 |
|
} |
740 |
|
else |
741 |
|
{ |
742 |
|
gtk_toggle_button_set_active |
743 |
|
(GTK_TOGGLE_BUTTON (bandsradiobutton1), TRUE); |
744 |
|
gtk_toggle_button_set_active |
745 |
|
(GTK_TOGGLE_BUTTON (bandsradiobutton2), FALSE); |
746 |
|
gtk_widget_set_sensitive (bandslabel, 0); |
747 |
|
gtk_widget_set_sensitive (bandsentry, 0); |
748 |
|
} |
749 |
|
|
750 |
|
/************************/ |
751 |
|
/* signals and pointers */ |
752 |
|
/************************/ |
753 |
|
|
754 |
|
/* page 1 */ |
755 |
|
GLADE_HOOKUP_OBJECT (preferencesdialog, exampleframe, "exampleframe"); |
756 |
|
GLADE_HOOKUP_OBJECT (preferencesdialog, examplelabel, "examplelabel"); |
757 |
|
GLADE_HOOKUP_OBJECT (preferencesdialog, fontentry, "fontentry"); |
758 |
|
g_signal_connect ((gpointer) themebutton, "clicked", |
759 |
|
G_CALLBACK (on_themebutton_clicked), NULL); |
760 |
|
g_signal_connect ((gpointer) fontbutton, "clicked", |
761 |
|
G_CALLBACK (on_fontbutton_clicked), NULL); |
762 |
|
|
763 |
|
/* page 2 */ |
764 |
|
GLADE_HOOKUP_OBJECT (preferencesdialog, modeslabel, "modeslabel"); |
765 |
|
GLADE_HOOKUP_OBJECT (preferencesdialog, modesentry, "modesentry"); |
766 |
|
GLADE_HOOKUP_OBJECT (preferencesdialog, bandslabel, "bandslabel"); |
767 |
|
GLADE_HOOKUP_OBJECT (preferencesdialog, bandsentry, "bandsentry"); |
768 |
|
g_signal_connect ((gpointer) modesradiobutton1, "toggled", |
769 |
|
G_CALLBACK (on_modesradiobutton_toggled), "1"); |
770 |
|
g_signal_connect ((gpointer) modesradiobutton2, "toggled", |
771 |
|
G_CALLBACK (on_modesradiobutton_toggled), "2"); |
772 |
|
g_signal_connect ((gpointer) bandsradiobutton1, "toggled", |
773 |
|
G_CALLBACK (on_bandsradiobutton_toggled), "1"); |
774 |
|
g_signal_connect ((gpointer) bandsradiobutton2, "toggled", |
775 |
|
G_CALLBACK (on_bandsradiobutton_toggled), "2"); |
776 |
|
|
777 |
|
/* page 4, hamlib */ |
778 |
|
#if WANT_HAMLIB |
779 |
|
GLADE_HOOKUP_OBJECT (preferencesdialog, hamlibframe, "hamlibframe"); |
780 |
|
GLADE_HOOKUP_OBJECT (preferencesdialog, frequencyframe, "frequencyframe"); |
781 |
|
GLADE_HOOKUP_OBJECT (preferencesdialog, pollingframe, "pollingframe"); |
782 |
|
GLADE_HOOKUP_OBJECT (preferencesdialog, pollingcheckbutton, |
783 |
|
"pollingcheckbutton"); |
784 |
|
GLADE_HOOKUP_OBJECT (preferencesdialog, frequencycheckbutton, |
785 |
|
"frequencycheckbutton"); |
786 |
|
g_signal_connect ((gpointer) hamlibcheckbutton, "toggled", |
787 |
|
G_CALLBACK (on_hamlibcheckbutton_toggled), NULL); |
788 |
|
g_signal_connect ((gpointer) pollingcheckbutton, "toggled", |
789 |
|
G_CALLBACK (on_pollingcheckbutton_toggled), NULL); |
790 |
|
g_signal_connect ((gpointer) frequencycheckbutton, "toggled", |
791 |
|
G_CALLBACK (on_frequencycheckbutton_toggled), NULL); |
792 |
|
#endif |
793 |
|
|
794 |
|
/* page 5 */ |
795 |
|
GLADE_HOOKUP_OBJECT (preferencesdialog, pathentry, "pathentry"); |
796 |
|
GLADE_HOOKUP_OBJECT (preferencesdialog, autosavecheckbutton, |
797 |
|
"autosavecheckbutton"); |
798 |
|
GLADE_HOOKUP_OBJECT (preferencesdialog, savecheckbutton, "savecheckbutton"); |
799 |
|
GLADE_HOOKUP_OBJECT (preferencesdialog, autosaveframe, "autosaveframe"); |
800 |
|
g_signal_connect ((gpointer) pathbutton, "clicked", |
801 |
|
G_CALLBACK (on_pathbutton_clicked), NULL); |
802 |
|
g_signal_connect ((gpointer) savecheckbutton, "toggled", |
803 |
|
G_CALLBACK (on_savecheckbutton_toggled), NULL); |
804 |
|
g_signal_connect ((gpointer) autosavecheckbutton, "toggled", |
805 |
|
G_CALLBACK (on_autosavecheckbutton_toggled), NULL); |
806 |
|
|
807 |
|
/******************/ |
808 |
|
/* run the dialog */ |
809 |
|
/******************/ |
810 |
|
|
811 |
|
gtk_widget_show_all (preferencesdialog); |
812 |
|
response = gtk_dialog_run (GTK_DIALOG(preferencesdialog)); |
813 |
|
|
814 |
|
if (response == GTK_RESPONSE_OK) |
815 |
|
{ |
816 |
|
/* check autosave value */ |
817 |
|
if (gtk_toggle_button_get_active |
818 |
|
(GTK_TOGGLE_BUTTON (autosavecheckbutton))) |
819 |
|
saving = 1; |
820 |
|
else if (gtk_toggle_button_get_active |
821 |
|
(GTK_TOGGLE_BUTTON (savecheckbutton))) |
822 |
|
saving = 2; |
823 |
|
else |
824 |
|
saving = 0; |
825 |
|
temp = gtk_editable_get_chars |
826 |
|
(GTK_EDITABLE (GTK_BIN(autosavecombo)->child), 0, -1); |
827 |
|
autosavevalue = atoi (temp); |
828 |
|
set_autosave (autosavevalue, saving); |
829 |
|
|
830 |
|
/* check type ahead find */ |
831 |
|
if (gtk_toggle_button_get_active |
832 |
|
(GTK_TOGGLE_BUTTON (typeaheadfindcheckbutton))) |
833 |
|
preferences.typeaheadfind = 1; |
834 |
|
else |
835 |
|
preferences.typeaheadfind = 0; |
836 |
|
|
837 |
|
/* remote logging */ |
838 |
|
if (gtk_toggle_button_get_active |
839 |
|
(GTK_TOGGLE_BUTTON (remoteradiobutton1))) |
840 |
|
preferences.remoteadding = 1; |
841 |
|
else |
842 |
|
preferences.remoteadding = 2; |
843 |
|
|
844 |
|
/* apply theme color */ |
845 |
|
logcoloryesno = gtk_toggle_button_get_active |
846 |
|
(GTK_TOGGLE_BUTTON(themecheckbutton)); |
847 |
|
temp = getlabelcolor (examplelabel); |
848 |
|
font = gtk_editable_get_chars (GTK_EDITABLE (fontentry), 0, -1); |
849 |
|
set_theme (temp, font, logcoloryesno); |
850 |
|
g_free (font); |
851 |
|
|
852 |
|
/* get path for the logs */ |
853 |
|
temp = gtk_editable_get_chars (GTK_EDITABLE (pathentry), 0, -1); |
854 |
|
set_path (temp); |
855 |
|
|
856 |
|
/* get logs to load */ |
857 |
|
temp = gtk_editable_get_chars (GTK_EDITABLE (logsentry), 0, -1); |
858 |
|
set_logstoload (temp); |
859 |
|
|
860 |
|
/* locator */ |
861 |
|
temp = gtk_editable_get_chars (GTK_EDITABLE (qthlocatorentry), 0, -1); |
862 |
|
set_qthlocator (temp); |
863 |
|
|
864 |
|
/* callsign */ |
865 |
|
temp = gtk_editable_get_chars (GTK_EDITABLE (callsignentry), 0, -1); |
866 |
|
set_callsign (temp); |
867 |
|
|
868 |
|
/* set latitude, longitude and units */ |
869 |
|
temp = gtk_editable_get_chars (GTK_EDITABLE (latentry), 0, -1); |
870 |
|
g_strstrip (temp); |
871 |
|
if (strlen (temp) == 0) |
872 |
|
preferences.latitude = 0.0; |
873 |
|
else |
874 |
|
preferences.latitude = atof (temp); |
875 |
|
temp = gtk_editable_get_chars (GTK_EDITABLE (longentry), 0, -1); |
876 |
|
g_strstrip (temp); |
877 |
|
if (strlen (temp) == 0) |
878 |
|
preferences.longitude = 0.0; |
879 |
|
else |
880 |
|
preferences.longitude = atof (temp); |
881 |
|
|
882 |
|
preferences.NS = gtk_combo_box_get_active (GTK_COMBO_BOX (NScombo)) + 1; |
883 |
|
preferences.EW = gtk_combo_box_get_active (GTK_COMBO_BOX (EWcombo)) + 1; |
884 |
|
preferences.units = gtk_combo_box_get_active |
885 |
|
(GTK_COMBO_BOX (unitscombo)) == 1 ? 0 : 1; |
886 |
|
|
887 |
|
state.mylocation = setlocation (preferences.latitude, preferences.NS, |
888 |
|
preferences.longitude, preferences.EW); |
889 |
|
|
890 |
|
/* get the comma seperated list of modes and assign |
891 |
|
* to the optionmenu */ |
892 |
|
temp = gtk_editable_get_chars (GTK_EDITABLE (modesentry), 0, -1); |
893 |
|
makemodeoptionmenu (temp); |
894 |
|
preferences.modes = g_strdup (temp); |
895 |
|
|
896 |
|
/* get the comma seperated list of bands and assign to the optionmenu */ |
897 |
|
temp = gtk_editable_get_chars (GTK_EDITABLE (bandsentry), 0, -1); |
898 |
|
makebandoptionmenu (temp); |
899 |
|
preferences.bands = g_strdup (temp); |
900 |
|
|
901 |
|
/* set visibility of widgets in QSO frame depending on |
902 |
|
* state of toggle buttons */ |
903 |
|
bandoptionmenu = lookup_widget (mainwindow, "bandoptionmenu"); |
904 |
|
bandentry = lookup_widget (mainwindow, "bandentry"); |
905 |
|
toggletrue = gtk_toggle_button_get_active |
906 |
|
(GTK_TOGGLE_BUTTON(bandsradiobutton1)); |
907 |
|
if (toggletrue) |
908 |
{ |
{ |
909 |
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (modesradiobutton1), |
preferences.bandseditbox = 1; |
910 |
FALSE); |
gtk_widget_hide (bandoptionmenu); |
911 |
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (modesradiobutton2), |
gtk_widget_show (bandentry); |
|
TRUE); |
|
|
gtk_widget_set_sensitive (modeslabel, 1); |
|
|
gtk_widget_set_sensitive (modesentry, 1); |
|
912 |
} |
} |
913 |
else |
else |
914 |
|
{ |
915 |
|
preferences.bandseditbox = 0; |
916 |
|
gtk_widget_hide (bandentry); |
917 |
|
gtk_widget_show (bandoptionmenu); |
918 |
|
} |
919 |
|
modeoptionmenu = lookup_widget (mainwindow, "modeoptionmenu"); |
920 |
|
modeentry = lookup_widget (mainwindow, "modeentry"); |
921 |
|
toggletrue = gtk_toggle_button_get_active |
922 |
|
(GTK_TOGGLE_BUTTON(modesradiobutton1)); |
923 |
|
if (toggletrue) |
924 |
{ |
{ |
925 |
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (modesradiobutton1), |
preferences.modeseditbox = 1; |
926 |
TRUE); |
gtk_widget_hide (modeoptionmenu); |
927 |
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (modesradiobutton2), |
gtk_widget_show (modeentry); |
928 |
FALSE); |
} |
929 |
gtk_widget_set_sensitive (modeslabel, 0); |
else |
930 |
gtk_widget_set_sensitive (modesentry, 0); |
{ |
931 |
|
preferences.modeseditbox = 0; |
932 |
|
gtk_widget_hide (modeentry); |
933 |
|
gtk_widget_show (modeoptionmenu); |
934 |
} |
} |
|
g_signal_connect ((gpointer) modesradiobutton1, "toggled", G_CALLBACK (on_modesradiobutton_toggled), "1"); |
|
|
g_signal_connect ((gpointer) modesradiobutton2, "toggled", G_CALLBACK (on_modesradiobutton_toggled), "2"); |
|
935 |
|
|
936 |
bandsradiobutton1 = lookup_widget (preferencesdialog, "bandsradiobutton1"); |
/* hamlib */ |
937 |
bandsradiobutton2 = lookup_widget (preferencesdialog, "bandsradiobutton2"); |
#if WANT_HAMLIB |
938 |
bandslabel = lookup_widget (preferencesdialog, "bandslabel"); |
hamlibyes = gtk_toggle_button_get_active |
939 |
if (preferences.bandseditbox == 0) |
(GTK_TOGGLE_BUTTON (hamlibcheckbutton)); |
940 |
|
frequencyyesno = gtk_toggle_button_get_active |
941 |
|
(GTK_TOGGLE_BUTTON (frequencycheckbutton)); |
942 |
|
smeteryesno = gtk_toggle_button_get_active |
943 |
|
(GTK_TOGGLE_BUTTON (smetercheckbutton)); |
944 |
|
pollingyes = gtk_toggle_button_get_active |
945 |
|
(GTK_TOGGLE_BUTTON (pollingcheckbutton)); |
946 |
|
radio = gtk_editable_get_chars |
947 |
|
(GTK_EDITABLE (GTK_BIN(radiocombo)->child), 0, -1); |
948 |
|
device = gtk_editable_get_chars |
949 |
|
(GTK_EDITABLE (GTK_BIN(devicecombo)->child), 0, -1); |
950 |
|
digits = gtk_editable_get_chars |
951 |
|
(GTK_EDITABLE (GTK_BIN(digitscombo)->child), 0, -1); |
952 |
|
if (pollingyes) |
953 |
|
pollstr = gtk_editable_get_chars |
954 |
|
(GTK_EDITABLE (GTK_BIN(pollcombo)->child), 0, -1); |
955 |
|
else |
956 |
|
pollstr = g_strdup ("0"); |
957 |
|
rigconf = gtk_editable_get_chars |
958 |
|
(GTK_EDITABLE (rigsetconfentry), 0, -1); |
959 |
|
if (strlen(rigconf) == 0) rigconf = g_strdup ("?"); |
960 |
|
|
961 |
|
if (hamlibyes) |
962 |
|
hamlibwidgets = whichhamlibwidgets (frequencyyesno, smeteryesno); |
963 |
|
else |
964 |
|
hamlibwidgets = 0; |
965 |
|
|
966 |
|
if (smeteryesno) |
967 |
|
sethamlibwidgets (hamlibwidgets, TRUE); |
968 |
|
else |
969 |
|
sethamlibwidgets (hamlibwidgets, FALSE); |
970 |
|
|
971 |
|
/* hamlib should be started or restarted because settings have changed */ |
972 |
|
if (hamlib_changed |
973 |
|
(hamlibwidgets, radio, device, atoi(pollstr), rigconf)) |
974 |
{ |
{ |
975 |
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (bandsradiobutton1), |
if (preferences.hamlib > 0) stop_hamlib (); |
976 |
FALSE); |
preferences.rigconf = g_strdup (rigconf); |
977 |
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (bandsradiobutton2), |
hamlibresult = start_hamlib |
978 |
TRUE); |
(radio, device, RIG_DEBUG_NONE, atoi (pollstr)); |
979 |
gtk_widget_set_sensitive (bandslabel, 1); |
preferences.radio = g_strdup (radio); |
980 |
gtk_widget_set_sensitive (bandsentry, 1); |
preferences.device = g_strdup (device); |
981 |
|
preferences.polltime = atoi (pollstr); |
982 |
|
preferences.round = atoi (digits); |
983 |
} |
} |
984 |
else |
else |
985 |
{ |
{ |
986 |
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (bandsradiobutton1), |
if (hamlibwidgets == 0) |
987 |
TRUE); |
{ |
988 |
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (bandsradiobutton2), |
/* hamlib disabled, close rig */ |
989 |
FALSE); |
stop_hamlib (); |
990 |
gtk_widget_set_sensitive (bandslabel, 0); |
preferences.radio = g_strdup ("Dummy"); |
991 |
gtk_widget_set_sensitive (bandsentry, 0); |
preferences.device = g_strdup ("/dev/ttyS1"); |
992 |
|
preferences.rigconf = g_strdup ("?"); |
993 |
|
preferences.round = 0; |
994 |
|
preferences.polltime = 0; |
995 |
|
} |
996 |
} |
} |
997 |
g_signal_connect ((gpointer) bandsradiobutton1, "toggled", G_CALLBACK (on_bandsradiobutton_toggled), "1"); |
preferences.hamlib = hamlibwidgets; |
998 |
g_signal_connect ((gpointer) bandsradiobutton2, "toggled", G_CALLBACK (on_bandsradiobutton_toggled), "2"); |
|
999 |
|
g_free (digits); |
1000 |
|
g_free (pollstr); |
1001 |
|
g_free (radio); |
1002 |
|
g_free (device); |
1003 |
|
g_free (rigconf); |
1004 |
|
#endif |
1005 |
|
/* clock */ |
1006 |
|
toggletrue = gtk_toggle_button_get_active |
1007 |
|
(GTK_TOGGLE_BUTTON (clockcheckbutton)); |
1008 |
|
set_clock (toggletrue); |
1009 |
|
|
1010 |
gtk_widget_set_sensitive (mainwindow, 0); |
g_free (temp); |
1011 |
gtk_widget_show (preferencesdialog); |
} |
1012 |
|
gtk_widget_destroy (preferencesdialog); |
1013 |
} |
} |