More eye candy.
[pspp-builds.git] / src / ui / gui / about.c
1 /*
2     PSPPIRE --- A Graphical User Interface for PSPP
3     Copyright (C) 2006, 2007  Free Software Foundation
4
5     This program is free software; you can redistribute it and/or modify
6     it under the terms of the GNU General Public License as published by
7     the Free Software Foundation; either version 2 of the License, or
8     (at your option) any later version.
9
10     This program is distributed in the hope that it will be useful,
11     but WITHOUT ANY WARRANTY; without even the implied warranty of
12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13     GNU General Public License for more details.
14
15     You should have received a copy of the GNU General Public License
16     along with this program; if not, write to the Free Software
17     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18     02110-1301, USA. */
19
20
21 #include <config.h>
22
23 #include <gtk/gtk.h>
24 #include <glade/glade.h>
25
26 #include <libpspp/version.h>
27 #include "about.h"
28 #include "helper.h"
29
30 const static gchar *artists[] = { "Patrick Brunier", "Dondi Bogusky", NULL};
31
32 void
33 about_new (GtkMenuItem *m, GtkWindow *parent)
34 {
35   GladeXML *xml = XML_NEW ("psppire.glade");
36
37   GtkWidget *about =  get_widget_assert (xml, "aboutdialog1");
38
39   GdkPixbuf *pb =
40     gdk_pixbuf_new_from_file_at_size (relocate (PKGDATADIR "/pspplogo.png"),
41                                       64, 64, 0);
42
43   gtk_about_dialog_set_logo (GTK_ABOUT_DIALOG (about), pb);
44
45
46   gtk_window_set_icon_from_file (GTK_WINDOW (about),
47                                  relocate (PKGDATADIR "/psppicon.png"), 0);
48
49   gtk_about_dialog_set_website (GTK_ABOUT_DIALOG (about),
50                                 "http://www.gnu.org/software/pspp");
51
52   gtk_about_dialog_set_version (GTK_ABOUT_DIALOG (about),
53                                 bare_version);
54
55   gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (about),
56                                 (const gchar **) authors);
57
58   gtk_about_dialog_set_artists (GTK_ABOUT_DIALOG (about),
59                                 artists);
60
61   gtk_window_set_transient_for (GTK_WINDOW (about), parent);
62
63   gtk_window_set_modal (GTK_WINDOW (about), TRUE);
64
65   gtk_window_set_keep_above (GTK_WINDOW (about), TRUE);
66
67   gtk_dialog_run (GTK_DIALOG (about));
68
69   gtk_widget_hide (about);
70 }
71