1 /*
2 * Xiphos Bible Study Tool
3 * about_sword.c - Xiphos "About Sword" 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_sword.h"
30 #include "gui/utilities.h"
31 #include "main/settings.h"
32 #include "main/sword.h"
33
34 #include "biblesync/biblesync-version.hh"
35
36 /******************************************************************************
37 * Name
38 * on_dialog_response
39 *
40 * Synopsis
41 * #include "gui/.h"
42 *
43 * void on_dialog_response(GtkDialog * dialog, gint response_id,
44 gpointer user_data)
45 *
46 * Description
47 *
48 *
49 * Return value
50 * void
51 */
52
53 static void
on_dialog_response(GtkDialog * dialog,gint response_id,gpointer user_data)54 on_dialog_response(GtkDialog *dialog, gint response_id,
55 gpointer user_data)
56 {
57 gtk_widget_destroy(GTK_WIDGET(dialog));
58 }
59
60 /******************************************************************************
61 * Name
62 * gui_create_about_sword
63 *
64 * Synopsis
65 * #include "gui/about_sword.h"
66 *
67 * void gui_create_about_sword(void);
68 *
69 * Description
70 * Create Sword about dialog and return pointer on it.
71 *
72 * Return value
73 * GtkWidget *
74 */
75
gui_create_about_sword(void)76 GtkWidget *gui_create_about_sword(void)
77 {
78 GdkPixbuf *about1_logo_pixbuf;
79 GtkWidget *about1;
80 gchar *about =
81 _("The SWORD Project is an effort to create an ever-expanding \
82 software package for research and study of God and His Word. \
83 The SWORD Project framework allows easy use and study of Bible \
84 texts, commentaries, lexicons, dictionaries, and other books. \
85 Many frontends are built using this framework. An installed \
86 set of books may be shared among all frontends using the \
87 framework.\n\n \
88 Books can be downloaded from the SWORD Project.");
89
90 about1_logo_pixbuf = pixbuf_finder("sword-big.png", 0, NULL);
91
92 about1 = gtk_about_dialog_new();
93 g_signal_connect(about1, "response",
94 G_CALLBACK(on_dialog_response), NULL);
95 gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(about1), "The SWORD Project");
96 gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(about1), (gchar *)main_get_sword_version());
97 gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(about1), about);
98
99 gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(about1), "http://www.crosswire.org/");
100 gtk_about_dialog_set_website_label(GTK_ABOUT_DIALOG(about1), _("The SWORD Project"));
101
102 gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(about1), about1_logo_pixbuf);
103
104 set_window_icon(GTK_WINDOW(about1));
105
106 return about1;
107 }
108
109 /******************************************************************************
110 * Name
111 * gui_create_about_biblesync
112 *
113 * Synopsis
114 * #include "gui/about_sword.h"
115 *
116 * void gui_create_about_biblesync(void);
117 *
118 * Description
119 * Create BibleSync about dialog and return pointer on it.
120 *
121 * Return value
122 * GtkWidget *
123 */
124
gui_create_about_biblesync(void)125 GtkWidget *gui_create_about_biblesync(void)
126 {
127 GdkPixbuf *about1_logo_pixbuf;
128 GtkWidget *about1;
129 gchar *about =
130 _("BibleSync is a network protocol providing the ability to share \
131 navigation within your Bible study program with cooperating programs \
132 on the local network.\n\n\
133 Enable BibleSync from Preferences:\n\
134 in personal mode, to share within a small group;\n\
135 or as either speaker or audience in a formal lecture setting.\n\n\
136 There are options for how BibleSync behaves in Xiphos:\n\
137 - To follow others' navigation directly or indirectly.\n\
138 - To send your navigation every time or only via keyboard.\n\
139 - To select speakers to whom Xiphos should listen.\n\n\
140 A simple chat capability provides brief messages to be shared as well.\n\n\
141 See the manual for details.\n\
142 (Preferences -> BibleSync Settings and Interface -> Keyboard Shortcuts.)");
143
144 about1_logo_pixbuf = pixbuf_finder("biblesync-v1-50.png", 0, NULL);
145
146 about1 = gtk_about_dialog_new();
147 g_signal_connect(about1, "response",
148 G_CALLBACK(on_dialog_response), NULL);
149 gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(about1),
150 "BibleSync Protocol");
151 gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(about1), BIBLESYNC_VERSION_STR);
152 gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(about1), about);
153
154 gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(about1),
155 "https://github.com/karlkleinpaste/biblesync/tree/master/man");
156 gtk_about_dialog_set_website_label(GTK_ABOUT_DIALOG(about1),
157 _("BibleSync technical details"));
158
159 gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(about1), about1_logo_pixbuf);
160
161 set_window_icon(GTK_WINDOW(about1));
162
163 return about1;
164 }
165