1 /*
2 
3    xlog - GTK+ logging program for amateur radio operators
4    Copyright (C) 2012 - 2013 Andy Stewart <kb1oiq@arrl.net>
5    Copyright (C) 2001 - 2010 Joop Stakenborg <pg4i@amsat.org>
6 
7    This file is part of xlog.
8 
9    Xlog is free software: you can redistribute it and/or modify
10    it under the terms of the GNU General Public License as published by
11    the Free Software Foundation, either version 3 of the License, or
12    (at your option) any later version.
13 
14    Xlog is distributed in the hope that it will be useful,
15    but WITHOUT ANY WARRANTY; without even the implied warranty of
16    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17    GNU General Public License for more details.
18 
19    You should have received a copy of the GNU General Public License
20    along with xlog.  If not, see <http://www.gnu.org/licenses/>.
21 
22 */
23 
24 /*
25  * cfg.h
26  */
27 
28 #ifndef PREFERENCES_H
29 #define PREFERENCES_H
30 
31 #include "xlog_enum.h"
32 
33 /* preferences saved to ~/.xlog/xlog.cfg */
34 typedef struct
35 {
36 	gint x;
37 	gint y;
38 	gint width;
39 	gint height;
40 	gdouble latitude;
41 	gint NS;
42 	gdouble longitude;
43 	gint EW;
44 	gint units;           /* kilometers or nautical miles */
45 	gchar *modes;
46 	gchar *bands;
47 	gint bandseditbox;    /* optionmenu or entry for bands? */
48 	gint modeseditbox;    /* optionmenu or entry modes? */
49 	gint bandoptionmenu;  /* position of optionmenu */
50 	gint modeoptionmenu;  /* position of optionmenu */
51 	gint hamlib;  /* hamlib enabled? 0=no, 1=yes, 2=display freq on statusbar */
52 	gint rigid;      /* what type of radio do you use? */
53 	gchar *device;   /* which serial port does it use? */
54 	gchar *rigconf;  /* string for rig_set_conf */
55 	gint round;      /* how many digits to round to */
56 	gint polltime;   /* poll every 'polltime' milliseconds, 0 = no polling */
57 	gint clock;      /* clock on the statusbar? */
58 	gchar *logfont;
59 	gint autosave;
60 	gchar *savedir;
61 	gchar *backupdir;
62 	gint saving;    /* 1= autosave, 2=save with click on toolbar */
63 	gint backup;    /* 1= standard, 2=safe */
64 	gchar *logstoload;
65 	gint logorder;  /* 0=by last modification data, 1=alphabetically */
66 	gchar *locator;
67 	gchar *freefield1;
68 	gchar *freefield2;
69 	gchar *callsign;
70 	gchar *defaultmhz;
71 	gchar *defaultmode;
72 	gchar *defaulttxrst;
73 	gchar *defaultrxrst;
74 	gchar *defaultawards;
75 	gchar *defaultpower;
76 	gchar *defaultfreefield1;
77 	gchar *defaultfreefield2;
78 	gchar *defaultremarks;
79 	gint *b4columns2;
80 	gint *logcwidths2;
81 	gint typeaheadfind;  /* do we want type ahead find */
82 	gint remoteadding;   /* add remote data to log or qso frame */
83 	gint viewtoolbar;    /* do we want to see the toolbar button */
84 	gint viewb4;         /* do we want to see the worked before dialog */
85 	gint b4x;
86 	gint b4y;
87 	gint b4width;
88 	gint b4height;
89 	gint saveasadif;
90 	gint saveascabrillo;
91 	gint *saveastsv2;
92 	gint tsvcalc;
93 	gint tsvsortbydxcc;
94 	gint tsvgroupbycallsign;
95 	gint handlebarpos;
96 	gchar *cwf1;
97 	gchar *cwf2;
98 	gchar *cwf3;
99 	gchar *cwf4;
100 	gchar *cwf5;
101 	gchar *cwf6;
102 	gchar *cwf7;
103 	gchar *cwf8;
104 	gchar *cwf9;
105 	gchar *cwf10;
106 	gchar *cwf11;
107 	gchar *cwf12;
108 	gchar *cwcq;
109 	gchar *cwsp;
110 	gint cwspeed;
111 	gint fcc;
112 	gint viewscoring;
113 	gint scorex;
114 	gint scorey;
115 	gint scorewidth;
116 	gint scoreheight;
117 	gint *scoringbands;
118 	gint distqrb;
119 	gint awardswac;  /* WAC visible in the scoring window */
120 	gint awardswas;  /* WAS visible in the scoring window */
121 	gint awardswaz;  /* WAZ visible in the scoring window */
122 	gint awardsiota; /* IOTA visible in the scoring window */
123 	gint awardsloc;  /* Locator visible in the scoring window */
124 	gchar *openurl;
125 	gchar *initlastmsg;
126 	gint areyousure;      /* Display "Are You Sure" dialog on exit */
127 	gint adif3_ok;        /* modes and bands in xlog.cfg updated to ADIF3 */
128 }
129 preferencestype;
130 
131 void loadpreferences (void);
132 void savepreferences (void);
133 
134 #endif	/* PREFERENCES_H */
135