From 26361686d6fc63dc22d22285f0543c5c2c756fb4 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 17 May 2009 23:05:23 -0700 Subject: [PATCH] Add About dialog to aoview. Signed-off-by: Keith Packard --- aoview/Makefile | 3 ++- aoview/aoview.glade | 40 ++++++++++++++++++++++++++++++++++++++++ aoview/aoview_main.c | 7 +++++++ 3 files changed, 49 insertions(+), 1 deletion(-) diff --git a/aoview/Makefile b/aoview/Makefile index 253a160e..8f9c08df 100644 --- a/aoview/Makefile +++ b/aoview/Makefile @@ -1,7 +1,8 @@ +VERSION=$(shell git describe) MODULES=gtk+-2.0 libglade-2.0 gconf-2.0 INCLUDES=$(shell pkg-config --cflags $(MODULES)) -I.. WARN= -Wall -Wpointer-arith -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fno-strict-aliasing -CFLAGS=$(INCLUDES) -O0 -g $(WARN) +CFLAGS=$(INCLUDES) -O0 -g $(WARN) -DAOVIEW_VERSION='"$(VERSION)"' LIBS=$(shell pkg-config --libs $(MODULES)) -lm SRC = \ diff --git a/aoview/aoview.glade b/aoview/aoview.glade index 92580472..74485ec5 100644 --- a/aoview/aoview.glade +++ b/aoview/aoview.glade @@ -213,6 +213,7 @@ True True True + @@ -426,4 +427,43 @@ + + 5 + About AoView + False + normal + aoview + False + AoView + Copyright © 2009 Keith Packard + AltOS data capture and display. + http://altusmetrum.org + AoView is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. + +AoView is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along with AoView; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + Keith Packard <keithp@keithp.com> + True + + + + + True + vertical + 2 + + + True + end + + + False + end + 0 + + + + + diff --git a/aoview/aoview_main.c b/aoview/aoview_main.c index 9e32e639..e2164e05 100644 --- a/aoview/aoview_main.c +++ b/aoview/aoview_main.c @@ -32,6 +32,7 @@ int main(int argc, char **argv) GladeXML *xml = NULL; GtkWidget *mainwindow; char *device = NULL; + GtkAboutDialog *about_dialog; static struct option long_options[] = { { "device", 1, 0, 'd'}, @@ -62,9 +63,15 @@ int main(int argc, char **argv) /* Hook up the close button. */ mainwindow = glade_xml_get_widget(xml, "aoview"); + assert(mainwindow); + g_signal_connect (G_OBJECT(mainwindow), "destroy", G_CALLBACK(destroy_event), NULL); + about_dialog = GTK_ABOUT_DIALOG(glade_xml_get_widget(xml, "about_dialog")); + assert(about_dialog); + gtk_about_dialog_set_version(about_dialog, AOVIEW_VERSION); + aoview_dev_dialog_init(xml); aoview_state_init(xml); -- 2.30.2