1 /* Pioneers - Implementation of the excellent Settlers of Catan board game.
2  *   Go buy a copy.
3  *
4  * Copyright (C) 2015 Roland Clobus <rclobus@rclobus.nl>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19  */
20 
21 /*
22  * Common code for displaying an about box.
23  *
24  */
25 
26 #include "config.h"
27 
28 #include <gtk/gtk.h>
29 #include <glib/gi18n.h>
30 
31 #include "aboutbox.h"
32 #include "authors.h"		/* defines AUTHORLIST, as a char **, NULL-ended */
33 #include "version.h"
34 
aboutbox_display(GtkWindow * parent,const gchar * title)35 void aboutbox_display(GtkWindow * parent, const gchar * title)
36 {
37 	GdkPixbuf *logo;
38 	gchar *filename;
39 	const gchar *authors[] = {
40 		AUTHORLIST
41 	};
42 
43 	filename = g_build_filename(DATADIR, "pixmaps", "pioneers",
44 				    "splash.png", NULL);
45 	logo = gdk_pixbuf_new_from_file(filename, NULL);
46 	g_free(filename);
47 
48 	/* *INDENT-OFF* */
49 	gtk_show_about_dialog(
50 		parent,
51 		"authors", authors,
52 		"comments",
53 		      _("Pioneers is based upon the excellent\n"
54 			"Settlers of Catan board game.\n"),
55 		//  "copyright", _("Copyright \xc2\xa9 2002 the Free Software Foundation"),
56 		"license-type", GTK_LICENSE_GPL_2_0,
57 		"logo", logo,
58 		"title", title,
59 		/* Translators: add your name here. Keep the list
60                  * alphabetically, do not remove any names, and add
61                  * \n after your name (except the last name).
62 		 */
63 		"translator-credits", _("translator-credits"),
64 		"version", FULL_VERSION,
65 		"website", "http://pio.sourceforge.net",
66 		"website-label", "pio.sourceforge.net",
67 		NULL);
68 	/* *INDENT-ON* */
69 
70 	if (logo)
71 		g_object_unref(logo);
72 }
73