diff options
| author | Keith Packard <keithp@keithp.com> | 2009-05-17 23:05:23 -0700 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2009-05-17 23:05:23 -0700 | 
| commit | 26361686d6fc63dc22d22285f0543c5c2c756fb4 (patch) | |
| tree | f7fe8b9b3a857eb97a83da7b7f611e3dac0a4eec | |
| parent | 0f3233c49f43cd4e372e613303919ce4d50255b2 (diff) | |
Add About dialog to aoview.
Signed-off-by: Keith Packard <keithp@keithp.com>
| -rw-r--r-- | aoview/Makefile | 3 | ||||
| -rw-r--r-- | aoview/aoview.glade | 40 | ||||
| -rw-r--r-- | aoview/aoview_main.c | 7 | 
3 files changed, 49 insertions, 1 deletions
| 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 @@                          <property name="visible">True</property>                          <property name="use_underline">True</property>                          <property name="use_stock">True</property> +                        <signal name="activate" handler="gtk_widget_show" object="about_dialog" after="yes"/>                        </widget>                      </child>                    </widget> @@ -426,4 +427,43 @@        </widget>      </child>    </widget> +  <widget class="GtkAboutDialog" id="about_dialog"> +    <property name="border_width">5</property> +    <property name="title" translatable="yes">About AoView</property> +    <property name="resizable">False</property> +    <property name="type_hint">normal</property> +    <property name="transient_for">aoview</property> +    <property name="has_separator">False</property> +    <property name="program_name">AoView</property> +    <property name="copyright" translatable="yes">Copyright © 2009 Keith Packard</property> +    <property name="comments" translatable="yes">AltOS data capture and display.</property> +    <property name="website">http://altusmetrum.org</property> +    <property name="license" translatable="yes">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.</property> +    <property name="authors">Keith Packard <keithp@keithp.com></property> +    <property name="wrap_license">True</property> +    <signal name="close" handler="gtk_widget_hide" object="about_dialog" after="yes"/> +    <signal name="response" handler="gtk_widget_hide" object="about_dialog" after="yes"/> +    <child internal-child="vbox"> +      <widget class="GtkVBox" id="dialog-vbox7"> +        <property name="visible">True</property> +        <property name="orientation">vertical</property> +        <property name="spacing">2</property> +        <child internal-child="action_area"> +          <widget class="GtkHButtonBox" id="dialog-action_area7"> +            <property name="visible">True</property> +            <property name="layout_style">end</property> +          </widget> +          <packing> +            <property name="expand">False</property> +            <property name="pack_type">end</property> +            <property name="position">0</property> +          </packing> +        </child> +      </widget> +    </child> +  </widget>  </glade-interface> 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); | 
