Debian Codegraph @

src/about.c

raw symbols SCIP
1 /* about.c - display dialog box with information about program
2 *
3 * This program is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU General Public
5 * License as published by the Free Software Foundation; either
6 * version 2 of the License, or (at your option) any later version.
7 */
8 #include <gtk/gtk.h>
9 #include "gtkballs.h" /* _(), VERSION from config.h */
10
11 /* Show about dialog box */
12 void about (GtkWidget *widget, gpointer data)
13 {
14 GtkWidget * w;
15 GdkPixbuf * logo;
16 const gchar * authors[] =
17 {
18 "Eugene Morozov <[email protected]>",
19 "drF_ckoff <[email protected]>",
20 NULL
21 };
22 /* TRANSLATORS: Replace this string with your names, one name per line. */
23 gchar * translators = _("Translated by");
24
25 logo = gdk_pixbuf_new_from_file (DATADIR "/gtkballs/gtkballs-logo.png", NULL);
26
27 w = g_object_new (GTK_TYPE_ABOUT_DIALOG,
28 "version", VERSION,
29 "program-name", "GtkBalls",
30 "copyright", "Copyright (C) 1998-2021",
31 "comments", "Clone of Lines - logic game about balls",
32 "license", "This program is free software; you can redistribute it and/or\nmodify it under the terms of the GNU General Public License\nas published by the Free Software Foundation; either version 2\nof the License, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program; if not, write to the Free Software\nFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.",
33 "website", "https://github.com/emorozov/gtkballs",
34 "authors", authors,
35 "logo", logo,
36 "translator-credits", translators,
37 NULL);
38 if (logo) {
39 g_object_unref (logo);
40 }
41 gtk_container_set_border_width (GTK_CONTAINER (w), 2);
42 gtk_window_set_transient_for (GTK_WINDOW (w), GTK_WINDOW (main_window));
43 gtk_window_set_modal (GTK_WINDOW (w), TRUE);
44 gtk_window_set_position (GTK_WINDOW (w), GTK_WIN_POS_CENTER_ON_PARENT);
45
46 g_signal_connect_swapped (w, "response",
47 G_CALLBACK (gtk_widget_destroy), w);
48 gtk_widget_show_all (GTK_WIDGET (w));
49 }