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; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
21 static const char aoview_glade[] = {
22 #include "aoview_glade.h"
25 static void usage(void) {
26 printf("aoview [--device|-d device_file]");
30 static void destroy_event(GtkWidget *widget, gpointer data)
35 char *aoview_tty = NULL;
37 int main(int argc, char **argv)
40 GtkWidget *mainwindow;
41 GtkAboutDialog *about_dialog;
43 static struct option long_options[] = {
50 c = getopt_long_only(argc, argv, "T:", long_options, &temp);
64 gtk_init(&argc, &argv);
67 xml = glade_xml_new_from_buffer(aoview_glade, sizeof (aoview_glade), NULL, NULL);
69 /* connect the signals in the interface */
70 glade_xml_signal_autoconnect(xml);
72 /* Hook up the close button. */
73 mainwindow = glade_xml_get_widget(xml, "aoview");
76 g_signal_connect (G_OBJECT(mainwindow), "destroy",
77 G_CALLBACK(destroy_event), NULL);
79 about_dialog = GTK_ABOUT_DIALOG(glade_xml_get_widget(xml, "about_dialog"));
81 gtk_about_dialog_set_version(about_dialog, AOVIEW_VERSION);
83 aoview_voice_init(xml);
85 aoview_channel_init(xml);
87 aoview_dev_dialog_init(xml);
89 aoview_state_init(xml);
91 aoview_file_init(xml);
95 aoview_table_init(xml);
97 aoview_eeprom_init(xml);
99 aoview_replay_init(xml);
101 aoview_label_init(xml);
104 if (!aoview_monitor_connect(aoview_tty)) {
109 aoview_voice_speak("rocket flight monitor ready\n");