1
/* Bluefish HTML Editor
4
*Copyright (C) 2004 Eugene Morenko(More) more@irpin.com
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.
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.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26
#include <unistd.h> /* getopt() */
32
static GtkWidget *info;
34
static GtkWidget *create_header(GdkPixbuf * icon, const char *text)
36
GtkWidget *eventbox, *label, *hbox, *image;
42
eventbox = gtk_event_box_new();
44
hbox = gtk_hbox_new(FALSE, 12);
45
gtk_container_set_border_width(GTK_CONTAINER(hbox), 4);
46
gtk_container_add(GTK_CONTAINER(eventbox), hbox);
49
image = gtk_image_new_from_pixbuf(icon);
50
gtk_box_pack_start(GTK_BOX(hbox), image, FALSE, FALSE, 0);
53
style = gtk_widget_get_style(eventbox);
54
cmap = gdk_colormap_get_system();
58
if (!gdk_color_alloc(cmap, &color)) {
59
g_print("couldn't allocate color");
61
gtk_widget_modify_bg(eventbox, GTK_STATE_NORMAL, &color);
63
markup = g_strconcat("<span size=\"larger\" weight=\"bold\">", text, "</span>", NULL);
64
label = gtk_label_new(markup);
66
gtk_label_set_use_markup(GTK_LABEL(label), TRUE);
68
gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
70
style = gtk_widget_get_style(label);
71
gtk_widget_modify_fg(label, GTK_STATE_NORMAL, &style->fg[GTK_STATE_SELECTED]);
73
gtk_widget_show_all(eventbox);
78
static GdkPixbuf *inline_icon_at_size(const guint8 * data, int width, int height)
82
base = gdk_pixbuf_new_from_inline(-1, data, FALSE, NULL);
86
if ((width < 0 && height < 0)
87
|| (gdk_pixbuf_get_width(base) == width && gdk_pixbuf_get_height(base) == height)) {
93
gdk_pixbuf_scale_simple(base, width > 0 ? width : gdk_pixbuf_get_width(base),
94
height > 0 ? height : gdk_pixbuf_get_height(base),
97
g_object_unref(G_OBJECT(base));
103
static void add_page(GtkNotebook * notebook, const gchar * name, const gchar * buf,
104
gboolean hscrolling) {
105
GtkWidget *textview, *label, *sw;
106
label = gtk_label_new(name);
107
sw = textview_buffer_in_scrolwin(&textview, -1, 200, buf, GTK_WRAP_WORD);
108
gtk_text_view_set_editable(GTK_TEXT_VIEW(textview), FALSE);
109
gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (textview), FALSE);
110
gtk_notebook_append_page(notebook, sw, label);
113
static void about_dialog_close_lcb(GtkObject *object,GtkWidget *win) {
117
void about_dialog_create(gpointer * data, guint * callback_action, GtkWidget * widget) {
118
GtkWidget *vbox, *vbox2, *hbox;
120
GtkWidget *info_ok_button;
123
gchar *INFO = _("Bluefish is an editor for experienced web designers and programmers. It supports many programming and markup languages, but focuses on editing dynamic and interactive websites. Bluefish is an open source development project, released under the GPL license.\n\nFor more information, visit the Bluefish Website at http://bluefish.openoffice.nl/\n\nThis version of bluefish was compiled with the following options:\n");
124
gchar *AUTHORS = _("Project leader:\n\
125
Olivier Sessink <olivier@bluefish.openoffice.nl>\n\
127
Developers for this release:\n\
129
<olivier@bluefish.openoffice.nl>\n\
131
<jimhayward@linuxexperience.net>\n\
133
<swida@aragorn.pb.bialystok.pl>\n\
134
Eugene Morenko(More)\n\
137
<alastair@linuxexperience.com>\n\
139
Developers for previous releases:\n\
146
Santiago Capel Torres\n\
147
Rasmus Toftdahl Olesen\n\
150
<roland@netzblick.de>\n\
151
Christian Tellefsen\n\
152
<chris@tellefsen.net>\n\
153
Antti-Juhani Kaijanaho\n\
157
<wwsw3@earthlink.net>\n\
159
<michele.garoche@easyconnect.fr>\n\
161
<ajreiki@highstream.net>\n\
163
<alastair@linuxexperience.com>\n\
165
<joecamel@realcoders.org>\n\
167
<olivier@bluefish.openoffice.nl>\n\
170
Package Maintainers:\n\
171
Debian: Davide Puricelli\n\
173
Redhat: Matthias Haase\n\
174
<matthias_haase@bennewitz.com>\n\
175
Mandrake: Todd Lyons\n\
177
Fink: Michèle Garoche\n\
178
<michele.garoche@easyconnect.fr>\n\
180
If you know of anyone missing from this list, please let us know\n\
181
<bluefish@bluefish.openoffice.nl>\n\
183
Thanks to all who helped making this software available.\n\
185
gchar *TRANSLATORS = _("Current translators:\n\n\
186
Brazilian Portuguese - Anderson Rocha\n\
187
<anderson@maxlinux.com.br>\n\n\
188
Bulgarian - Peio Popov\n\
190
Chinese - Ting Yang (Dormouse)\n\
191
<mouselinux@163.com>\n\n\
192
Danish - Rasmus Toftdahl Olesen\n\
193
<rto@pohldata.dk>\n\n\
194
Finnish - Juho Roukala\n\
195
<j.mr@luukku.com>\n\n\
196
French - Michèle Garoche\n\
197
<michele.garoche@easyconnect.fr>\n\n\
198
German - Roland Steinbach\n\
199
<roland@netzblick.de>\n\n\
200
Hungarian - Péter Sáska\n\
201
<sasek@ccsystem.hu>\n\n\
202
Italian - Stefano Canepa\n\
204
Norwegian - Christian Tellefsen\n\
205
<chris@tellefsen.net>\n\n\
206
Polish - Oskar Swida\n\
207
<swida@aragorn.pb.bialystok.pl>\n\n\
208
Portuguese - Lopo Pizarro\n\
209
<lopopizarro@netcabo.pt>\n\n\
210
Russian - Eugene Rupakov\n\
211
<rupakov@jet.msk.su>\n\n\
212
Serbian - Marko Milenović\n\
213
<raven@sbb.co.yu>\n\n\
214
Spanish - Walter Oscar Echarri\n\
215
<wecharri@arnet.com.ar>\n\n\
216
Swedish - David Smeringe\n\
217
<david.smeringe@telia.com>\n\n\
218
Tamil - Murugapandian Barathee\n\
219
<barathee@yahoo.com>\n\n\
222
info = window_full2(_("About Bluefish"), GTK_WIN_POS_CENTER, 6
223
,G_CALLBACK(about_dialog_close_lcb),NULL, TRUE, NULL);
224
gtk_window_set_resizable(GTK_WINDOW(info), FALSE);
228
gtk_widget_modify_bg(info, GTK_STATE_NORMAL,&color);
230
vbox2 = gtk_vbox_new(FALSE, 0);
231
gtk_container_add(GTK_CONTAINER(info), vbox2);
235
GdkPixbuf* pixbuf= gdk_pixbuf_new_from_file(BLUEFISH_SPLASH_FILENAME,&error);
237
g_print("ERROR while loading splash screen: %s\n", error->message);
240
image = gtk_image_new_from_pixbuf(pixbuf);
241
gtk_box_pack_start(GTK_BOX(vbox2), image, FALSE, FALSE, 0);
242
g_object_unref(pixbuf);
246
vbox = gtk_vbox_new(FALSE, 0);
247
gtk_box_pack_start(GTK_BOX(vbox2), vbox, TRUE, TRUE, 0);
250
notebook = gtk_notebook_new();
253
I1 = g_strconcat(INFO, CONFIGURE_OPTIONS, NULL);
254
add_page(GTK_NOTEBOOK(notebook), _("Info"), I1, TRUE);
256
add_page(GTK_NOTEBOOK(notebook), _("Authors"), AUTHORS, TRUE);
257
add_page(GTK_NOTEBOOK(notebook), _("Translators"), TRANSLATORS, TRUE);
259
gtk_box_pack_start(GTK_BOX(vbox), notebook, TRUE, TRUE, 0);
261
hbox = gtk_hbutton_box_new ();
262
gtk_button_box_set_layout (GTK_BUTTON_BOX (hbox), GTK_BUTTONBOX_END);
263
gtk_box_pack_start( GTK_BOX (vbox), hbox, FALSE, FALSE, 4);
264
info_ok_button = gtk_button_new_from_stock(GTK_STOCK_CLOSE);
265
GTK_WIDGET_SET_FLAGS(info_ok_button, GTK_CAN_DEFAULT);
266
gtk_box_pack_start(GTK_BOX(hbox), info_ok_button, FALSE, FALSE, 0);
267
gtk_widget_grab_default(info_ok_button);
269
g_signal_connect(info_ok_button, "clicked", G_CALLBACK(about_dialog_close_lcb), info);
271
gtk_widget_show_all(info);