94 |
case ':': |
case ':': |
95 |
case '?': |
case '?': |
96 |
case 'h': |
case 'h': |
97 |
g_print ("Usage: %s [option] <log1.xlog> <log2.xlog>... \n", PACKAGE); |
g_print ("Usage: %s [option] <log1.xlog> <log2.xlog>... \n", |
98 |
|
PACKAGE); |
99 |
g_print (" -h Display this help and exit\n"); |
g_print (" -h Display this help and exit\n"); |
100 |
g_print (" -v Output version information and exit\n"); |
g_print (" -v Output version information and exit\n"); |
101 |
exit (0); |
exit (0); |
173 |
state.notdupecheckband = FALSE; |
state.notdupecheckband = FALSE; |
174 |
} |
} |
175 |
|
|
176 |
|
static gboolean |
177 |
|
check_gtk_version (void) |
178 |
|
{ |
179 |
|
if ((gtk_major_version >= 2) && (gtk_minor_version >= 4)) |
180 |
|
return FALSE; |
181 |
|
return TRUE; |
182 |
|
} |
183 |
|
|
184 |
/* the fun starts here */ |
/* the fun starts here */ |
185 |
gint |
gint |
186 |
main (int argc, char *argv[]) |
main (int argc, char *argv[]) |
188 |
GtkWidget *bandoptionmenu, *modeoptionmenu, *dateentry, *qsoframe, |
GtkWidget *bandoptionmenu, *modeoptionmenu, *dateentry, *qsoframe, |
189 |
*dxccframe, *bandentry, *modeentry, *clocklabel, |
*dxccframe, *bandentry, *modeentry, *clocklabel, |
190 |
*clockhandlebox, *mhzlabel, *mhzbutton, |
*clockhandlebox, *mhzlabel, *mhzbutton, |
191 |
*frequencylabel, *frequencyhandlebox, *modelabel, *modebutton, *rstlabel, |
*frequencylabel, *frequencyhandlebox, *modelabel, *modebutton, |
192 |
*rstbutton, *smeterhandlebox, *smeterdrawingarea, |
*rstlabel, *rstbutton, *smeterhandlebox, *smeterdrawingarea, |
193 |
*hpaned, *powerlabel, *powerbutton, *locatorframe, *unknownlabel1, |
*hpaned, *powerlabel, *powerbutton, *locatorframe, *unknownlabel1, |
194 |
*unknownlabel2, *handlebox; |
*unknownlabel2, *handlebox; |
195 |
gchar *xlogfile, *xlogbackupfile, *temp, *logstoload, **loglist = NULL; |
gchar *xlogfile, *xlogbackupfile, *temp, *logstoload, **loglist = NULL; |
196 |
gint i, ctyresult; |
gint i, ctyresult; |
197 |
gboolean showmainwindow = TRUE, logsfromprefs = FALSE; |
gboolean showmainwindow = TRUE, logsfromprefs = FALSE, gtk_mismatch = FALSE; |
198 |
logtype *logwindow = NULL; |
logtype *logwindow = NULL; |
199 |
LOGDB *lp = NULL; |
LOGDB *lp = NULL; |
200 |
|
|
212 |
|
|
213 |
gtk_set_locale (); |
gtk_set_locale (); |
214 |
gtk_init (&argc, &argv); |
gtk_init (&argc, &argv); |
215 |
|
gtk_mismatch = check_gtk_version (); |
216 |
|
if (gtk_mismatch) |
217 |
|
{ |
218 |
|
warningdialog (_("xlog - startup"), |
219 |
|
_("xlog needs at least version 2.4 of the GTK+ libraries")); |
220 |
|
exit (1); |
221 |
|
} |
222 |
setlocale(LC_NUMERIC, "C"); |
setlocale(LC_NUMERIC, "C"); |
223 |
|
|
224 |
add_pixmap_directory (DATADIR G_DIR_SEPARATOR_S "pixmaps" G_DIR_SEPARATOR_S "xlog"); |
add_pixmap_directory |
225 |
|
(DATADIR G_DIR_SEPARATOR_S "pixmaps" G_DIR_SEPARATOR_S "xlog"); |
226 |
|
|
227 |
showmainwindow = xlogdircheck(); |
showmainwindow = xlogdircheck(); |
228 |
loadpreferences (); |
loadpreferences (); |
328 |
logwindow = g_list_nth_data (logwindowlist, 0); |
logwindow = g_list_nth_data (logwindowlist, 0); |
329 |
set_qsoframe (logwindow); |
set_qsoframe (logwindow); |
330 |
|
|
331 |
/* we have to set the labels of the unknown fields, wether they are visible or not */ |
/* we have to set the labels of the unknown fields, |
332 |
|
wether they are visible or not */ |
333 |
unknownlabel1 = lookup_widget (mainwindow, "unknownlabel1"); |
unknownlabel1 = lookup_widget (mainwindow, "unknownlabel1"); |
334 |
gtk_label_set_text (GTK_LABEL (unknownlabel1), preferences.freefield1); |
gtk_label_set_text (GTK_LABEL (unknownlabel1), preferences.freefield1); |
335 |
unknownlabel2 = lookup_widget (mainwindow, "unknownlabel2"); |
unknownlabel2 = lookup_widget (mainwindow, "unknownlabel2"); |
436 |
|
|
437 |
|
|
438 |
g_signal_connect (G_OBJECT (smeterdrawingarea), "configure_event", |
g_signal_connect (G_OBJECT (smeterdrawingarea), "configure_event", |
439 |
G_CALLBACK (on_smeterdrawingarea_configure_event), |
G_CALLBACK (on_smeterdrawingarea_configure_event), NULL); |
|
NULL); |
|
440 |
g_signal_connect (G_OBJECT (smeterdrawingarea), "expose_event", |
g_signal_connect (G_OBJECT (smeterdrawingarea), "expose_event", |
441 |
G_CALLBACK (on_smeterdrawingarea_expose_event), |
G_CALLBACK (on_smeterdrawingarea_expose_event), NULL); |
|
NULL); |
|
442 |
g_signal_connect (G_OBJECT (mainwindow), "show", |
g_signal_connect (G_OBJECT (mainwindow), "show", |
443 |
G_CALLBACK (on_mainwindow_show), NULL); |
G_CALLBACK (on_mainwindow_show), NULL); |
|
|
|
444 |
sethamlibwidgets (preferences.hamlib, FALSE); |
sethamlibwidgets (preferences.hamlib, FALSE); |
445 |
|
|
446 |
#else /* hide some hamlib widgets, |
#else /* hide some hamlib widgets, |