1 /*
2 * Xiphos Bible Study Tool
3 * about_xiphos.c - Xiphos about dialog
4 *
5 * Copyright (C) 2000-2020 Xiphos Developer Team
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Library General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
20 */
21
22 #ifdef HAVE_CONFIG_H
23 #include <config.h>
24 #endif
25
26 #include <gtk/gtk.h>
27 #include <glib/gi18n.h>
28
29 #include "gui/about_xiphos.h"
30 #include "gui/utilities.h"
31 #include "main/settings.h"
32
33 static const gchar *authors[] = {
34 "Terry Biggs",
35 "Moses McKnight",
36 "Jan Paul Schmidt",
37 "Victor Porton",
38 "Stephen Binks",
39 "Carl Constantine",
40 "Jp Robinson",
41 "Andy Piper",
42 "Karl Kleinpaste",
43 "Matthew Talbert",
44 "Peter von Kaehne",
45 "Simon Meers",
46 "Martin Zibricky",
47 "Dmitrijs Ledkovs",
48 "Christopher Bayliss",
49 NULL};
50
51 static const gchar *documenters[] = {
52 "Pierre Benz",
53 "Andy Piper",
54 "Peter von Kaehne",
55 "Karl Kleinpaste",
56 "Matthew Talbert",
57 "Simon Meers",
58 NULL};
59
60 static gchar *translators =
61 "Jan Paul Schmidt\nJorge Chacon\nDominique Corbex\nZdenko Podobn\nPavlo Bohmat\nMartin Zibricky\nAri Constancio\nGertjan Francke\nEicke Godehardt\nAndy Piper\nThomas Abthorpe\nEeli Kaikkonen";
62
63 /******************************************************************************
64 * Name
65 * on_dialog_response
66 *
67 * Synopsis
68 * #include "gui/.h"
69 *
70 * void on_dialog_response(GtkDialog * dialog, gint response_id,
71 gpointer user_data)
72 *
73 * Description
74 *
75 *
76 * Return value
77 * void
78 */
79
80 static void
on_dialog_response(GtkDialog * dialog,gint response_id,gpointer user_data)81 on_dialog_response(GtkDialog *dialog, gint response_id,
82 gpointer user_data)
83 {
84 gtk_widget_destroy(GTK_WIDGET(dialog));
85 }
86
87 /******************************************************************************
88 * Name
89 * gui_create_about_xiphos
90 *
91 * Synopsis
92 * #include "gui/about_xiphos.h"
93 *
94 * void gui_create_about_xiphos(void);
95 *
96 * Description
97 * Create Xiphos about dialog and return pointer on it.
98 *
99 * Return value
100 * GtkWidget *
101 */
102
103 #ifdef USE_GTK_3
104 # ifdef USE_WEBKIT2
105 # define BUILD_TYPE "gtk3 webkit2"
106 # else
107 # define BUILD_TYPE "gtk3 webkit1"
108 # endif
109 #else
110 # define BUILD_TYPE "gtk2 webkit1"
111 #endif
112
gui_create_about_xiphos(void)113 GtkWidget *gui_create_about_xiphos(void)
114 {
115 GdkPixbuf *about1_logo_pixbuf;
116 GtkWidget *about1;
117 gchar versionbuild[128];
118
119 snprintf(versionbuild, 120, "%s (%s)", VERSION, BUILD_TYPE);
120
121 about1_logo_pixbuf = pixbuf_finder("about.png", 0, NULL);
122
123 about1 = gtk_about_dialog_new();
124 g_signal_connect(about1, "response",
125 G_CALLBACK(on_dialog_response), NULL);
126
127 gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(about1), versionbuild);
128 gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(about1),
129 _("Copyright © 2000-2020 Xiphos Development Team"));
130 gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(about1),
131 _("\nPowered by The SWORD Project.\nWe would like to thank Troy Griffitts and all the other folks who have given us The SWORD Project."));
132 gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(about1),
133 "http://xiphos.org/");
134 gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(about1), authors);
135 gtk_about_dialog_set_documenters(GTK_ABOUT_DIALOG(about1), documenters);
136 gtk_about_dialog_set_translator_credits(GTK_ABOUT_DIALOG(about1), translators);
137 gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(about1), about1_logo_pixbuf);
138
139 set_window_icon(GTK_WINDOW(about1));
140
141 return about1;
142 }
143