2 * Copyright © 2009 Keith Packard <keithp@keithp.com>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 2 of the License.
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * General Public License for more details.
13 * You should have received a copy of the GNU General Public License along
14 * with this program; if not, write to the Free Software Foundation, Inc.,
15 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
20 static const char aoview_glade[] = {
21 #include "aoview_glade.h"
24 static void usage(void) {
25 printf("aoview [--device|-d device_file]");
29 static void destroy_event(GtkWidget *widget, gpointer data)
34 char *aoview_tty = NULL;
36 int main(int argc, char **argv)
39 GtkWidget *mainwindow;
40 GtkAboutDialog *about_dialog;
42 static struct option long_options[] = {
49 c = getopt_long_only(argc, argv, "T:", long_options, &temp);
63 gtk_init(&argc, &argv);
66 xml = glade_xml_new_from_buffer(aoview_glade, sizeof (aoview_glade), NULL, NULL);
68 /* connect the signals in the interface */
69 glade_xml_signal_autoconnect(xml);
71 /* Hook up the close button. */
72 mainwindow = glade_xml_get_widget(xml, "aoview");
75 g_signal_connect (G_OBJECT(mainwindow), "destroy",
76 G_CALLBACK(destroy_event), NULL);
78 about_dialog = GTK_ABOUT_DIALOG(glade_xml_get_widget(xml, "about_dialog"));
80 gtk_about_dialog_set_version(about_dialog, AOVIEW_VERSION);
82 aoview_voice_init(xml);
84 aoview_channel_init(xml);
86 aoview_dev_dialog_init(xml);
88 aoview_state_init(xml);
90 aoview_file_init(xml);
94 aoview_table_init(xml);
96 aoview_eeprom_init(xml);
98 aoview_replay_init(xml);
100 aoview_label_init(xml);
103 if (!aoview_monitor_connect(aoview_tty)) {
108 aoview_voice_speak("rocket flight monitor ready\n");