2 * about.c - this file is part of Geany, a fast and lightweight IDE
4 * Copyright 2005-2012 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
5 * Copyright 2006-2012 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
6 * Copyright 2006-2012 Frank Lanitz <frank@frank.uvena.de>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 * About dialog and credits.
32 #include "geanywraplabel.h"
34 #include "templates.h"
39 #define HEADER "<span size=\"larger\" weight=\"bold\">Geany %s</span>"
40 #define INFO "<span size=\"larger\" weight=\"bold\">%s</span>"
41 #define CODENAME "<span weight=\"bold\">\"" GEANY_CODENAME "\"</span>"
42 #define BUILDDATE "<span size=\"smaller\">%s</span>"
43 #define COPYRIGHT _("Copyright (c) 2005-2014\nColomban Wendling\nNick Treleaven\nMatthew Brush\nEnrico Tröger\nFrank Lanitz\nAll rights reserved.")
45 const gchar
*translators
[][2] = {
46 { "ar", "Fayssal Chamekh <chamfay@gmail.com>"},
47 { "ast", "Marcos Costales <marcoscostales@gmail.com>"},
48 { "be_BY", "Yura Siamashka <yurand2@gmail.com>" },
49 { "bg", "Dilyan Rusev <dilyanrusev@gmail.com>" },
50 { "ca_ES", "Toni Garcia-Navarro <topi@elpiset.net>" },
51 { "cs_CZ", "Petr Messner <messa@messa.cz>\nAnna Talianova <anickat1@gmail.com>" },
52 { "de_DE", "Frank Lanitz <frank@frank.uvena.de>\nDominic Hopf <dmaphy@googlemail.com>" },
53 { "el", "Stavros Temertzidis <bullgr@gmail.com>" },
54 { "en_GB", "Jeff Bailes <thepizzaking@gmail.com>" },
55 { "es", "Antonio Jiménez González <tonificante@hotmail.com>\nLucas Vieites <lucasvieites@gmail.com>" },
56 { "eu", "Asier Iturralde Sarasola <asier.iturralde@gmail.com>"},
57 { "fa", "Moein Owhadi Kareshk <moein.owhadi@gmail.com>"},
58 { "fi", "Harri Koskinen <harri@fastmonkey.org>\nJari Rahkonen <jari.rahkonen@pp1.inet.fi>" },
59 { "fr", "Jean-Philippe Moal <skateinmars@skateinmars.net>" },
60 { "gl", "José Manuel Castroagudín Silva <chavescesures@gmail.com>"},
61 { "hi", "Asheesh Ranjan <asheeshranjan1@gmail.com>"},
62 { "he", "Yosef Or Boczko <yoseforb@gmail.com>"},
63 { "hu", "Gabor Kmetyko <kg_kilo@freemail.hu>" },
64 { "it", "Max Baldinelli <m.baldinelli@agora.it>,\nDario Santomarco <dariello@yahoo.it>" },
65 { "ja", "Tarot Osuji <tarot@sdf.lonestar.org>\nChikahiro Masami <cmasa.z321@gmail.com>" },
66 { "ko", "Park Jang-heon <dotkabi@gmail.com>" },
67 { "kk", "Baurzhan Muftakhidinov <baurthefirst@gmail.com>"},
68 { "lt", "Algimantas Margevičius <margevicius.algimantas@gmail.com>"},
69 { "lb", "Laurent Hoeltgen <hoeltgman@gmail.com>" },
70 { "mn", "tsetsee <tsetsee.yugi@gmail.com>"},
71 { "nl", "Peter Scholtens <peter.scholtens@xs4all.nl>\nAyke van Laethem <aykevanlaethem@gmail.com>" },
72 { "pl", "Wojciech Świderski <woj.swiderski@gmail.com>"},
73 { "pt_BR", "Alexandra Moreire <alexandream@gmail.com>\n"
74 "Adrovane Marques Kade <adrovane@gmail.com>\n"
75 "Rafael Peregrino da Silva <rperegrino@linuxnewmedia.com.br>"},
76 { "ro", "Alex Eftimie <alex@rosedu.org>" },
77 { "ru", "brahmann_ <brahmann@pisem.net>,\nNikita E. Shalaev <nshalaev@eu.spb.ru>" },
78 { "sk", "Tomáš Vadina <kyberdev@gmail.com>" },
79 { "sl", "Jože Klepec <joze.klepec@siol.net>"},
80 { "sv", "Tony Mattsson <superxorn@gmail.com>" },
81 { "sr", "Nikola Radovanovic <cobisimo@gmail.com>"},
82 { "tr", "Gürkan Gür <seqizz@gmail.com>"},
83 { "uk", "Boris Dibrov <dibrov.bor@gmail.com>" },
84 { "vi_VN", "Clytie Siddall <clytie@riverland.net.au>" },
85 { "zh_CN", "Dormouse Young <mouselinux@163.com>,\nXhacker Liu <liu.dongyuan@gmail.com>" },
86 { "zh_TW", "KoViCH <kovich.ian@gmail.com>\nWei-Lun Chao <chaoweilun@gmail.com>" }
88 static const guint translators_len
= G_N_ELEMENTS(translators
);
90 const gchar
*prev_translators
[][2] = {
91 { "es", "Damián Viano <debian@damianv.com.ar>\nNacho Cabanes <ncabanes@gmail.com>" },
92 { "pl", "Jacek Wolszczak <shutdownrunner@o2.pl>\nJarosław Foksa <jfoksa@gmail.com>" },
93 { "nl", "Kurt De Bree <kdebree@telenet.be>" }
95 static const guint prev_translators_len
= G_N_ELEMENTS(prev_translators
);
97 static const gchar
*contributors
=
99 "Alexander Rodin, Alexey Antipov, Andrew Rowland, Anh Phạm, blackdog, Bo Lorentsen, Bob Doan, "
100 "Bronisław Białek, Can Koy, Catalin Marinas, "
101 "Chris Macksey, Christoph Berg, Colomban Wendling, Conrad Steenberg, Daniel Richard G., "
102 "Daniel Marjamaki, Dave Moore, "
103 "Dimitar Zhekov, Dirk Weber, Elias Pschernig, Eric Forgeot, "
104 "Erik de Castro Lopo, Eugene Arshinov, Felipe Pena, François Cami, "
105 "Giuseppe Torelli, Guillaume de Rorthais, Guillaume Hoffmann, Herbert Voss, Jason Oster, "
106 "Jean-François Wauthy, Jeff Pohlmeyer, Jesse Mayes, Jiří Techet, "
107 "John Gabriele, Jon Senior, Jon Strait, Josef Whiter, "
108 "Jörn Reder, Kelvin Gardiner, Kevin Ellwood, Kristoffer A. Tjernås, Lex Trotman, "
109 "Manuel Bua, Mário Silva, Marko Peric, Matthew Brush, Matti Mårds, "
110 "Moritz Barsnick, Nicolas Sierro, Ondrej Donek, Peter Strand, Philipp Gildein, "
111 "Pierre Joye, Rob van der Linde, "
112 "Robert McGinley, Roland Baudin, Ross McKay, S Jagannathan, Saleem Abdulrasool, "
113 "Sebastian Kraft, Shiv, Slava Semushin, Stefan Oltmanns, Tamim, Taylor Venable, "
114 "Thomas Huth, Thomas Martitz, Tomás Vírseda, "
115 "Tyler Mulligan, Walery Studennikov, Yura Siamashka";
118 static void header_eventbox_style_set(GtkWidget
*widget
);
119 static void header_label_style_set(GtkWidget
*widget
);
120 static void homepage_clicked(GtkButton
*button
, gpointer data
);
123 #define ROW(text, row, col, x_align, y_padding, col_span) \
124 label = gtk_label_new((text)); \
125 gtk_table_attach(GTK_TABLE(table), label, (col), (col) + (col_span) + 1, (row), (row) + 1, \
126 (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_FILL), 0, (y_padding)); \
127 gtk_label_set_use_markup(GTK_LABEL(label), TRUE); \
128 gtk_misc_set_alignment(GTK_MISC(label), (x_align), 0);
131 static GtkWidget
*create_dialog(void)
134 GtkWidget
*header_image
;
135 GtkWidget
*header_label
;
136 GtkWidget
*label_info
;
137 GtkWidget
*codename_label
;
138 GtkWidget
*builddate_label
;
139 GtkWidget
*url_button
;
140 GtkWidget
*cop_label
;
142 GtkWidget
*license_textview
;
145 GtkWidget
*credits_scrollwin
;
147 GtkWidget
*license_scrollwin
;
149 GtkWidget
*header_hbox
;
150 GtkWidget
*header_eventbox
;
152 gchar
*license_text
= NULL
;
158 dialog
= gtk_dialog_new();
160 /* configure dialog */
161 gtk_window_set_transient_for(GTK_WINDOW(dialog
), GTK_WINDOW(main_widgets
.window
));
162 gtk_window_set_position(GTK_WINDOW(dialog
), GTK_WIN_POS_CENTER_ON_PARENT
);
163 gtk_window_set_title(GTK_WINDOW(dialog
), _("About Geany"));
164 gtk_window_set_icon_name(GTK_WINDOW(dialog
), "geany");
165 gtk_widget_set_name(dialog
, "GeanyDialog");
166 gtk_dialog_add_button(GTK_DIALOG(dialog
), GTK_STOCK_CLOSE
, GTK_RESPONSE_CLOSE
);
167 gtk_dialog_set_default_response(GTK_DIALOG(dialog
), GTK_RESPONSE_CLOSE
);
168 gtk_dialog_set_has_separator(GTK_DIALOG(dialog
), FALSE
);
169 g_signal_connect(dialog
, "key-press-event", G_CALLBACK(gb_on_key_pressed
), NULL
);
172 header_eventbox
= gtk_event_box_new();
173 gtk_widget_show(header_eventbox
);
174 header_hbox
= gtk_hbox_new(FALSE
, 12);
175 gtk_container_set_border_width(GTK_CONTAINER(header_hbox
), 4);
176 gtk_widget_show(header_hbox
);
177 gtk_container_add(GTK_CONTAINER(header_eventbox
), header_hbox
);
178 header_image
= gtk_image_new_from_icon_name("geany", GTK_ICON_SIZE_DIALOG
);
179 gtk_box_pack_start(GTK_BOX(header_hbox
), header_image
, FALSE
, FALSE
, 0);
180 header_label
= gtk_label_new(NULL
);
181 gtk_label_set_use_markup(GTK_LABEL(header_label
), TRUE
);
182 /* print the subversion revision generated by ./configure if it is available */
183 g_snprintf(buffer
, sizeof(buffer
), HEADER
, main_get_version_string());
184 gtk_label_set_markup(GTK_LABEL(header_label
), buffer
);
185 gtk_widget_show(header_label
);
186 gtk_box_pack_start(GTK_BOX(header_hbox
), header_label
, FALSE
, FALSE
, 0);
187 header_eventbox_style_set(header_eventbox
);
188 header_label_style_set(header_label
);
189 g_signal_connect_after(header_eventbox
, "style-set", G_CALLBACK(header_eventbox_style_set
), NULL
);
190 g_signal_connect_after(header_label
, "style-set", G_CALLBACK(header_label_style_set
), NULL
);
191 gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog
))), header_eventbox
, FALSE
, FALSE
, 0);
193 /* create notebook */
194 notebook
= gtk_notebook_new();
195 gtk_widget_show(notebook
);
196 gtk_container_set_border_width(GTK_CONTAINER(notebook
), 2);
197 gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog
))), notebook
, TRUE
, TRUE
, 0);
199 /* create "Info" tab */
200 info_box
= gtk_vbox_new(FALSE
, 0);
201 gtk_container_set_border_width(GTK_CONTAINER(info_box
), 6);
202 gtk_widget_show(info_box
);
204 label_info
= gtk_label_new(NULL
);
205 gtk_label_set_justify(GTK_LABEL(label_info
), GTK_JUSTIFY_CENTER
);
206 gtk_label_set_selectable(GTK_LABEL(label_info
), TRUE
);
207 gtk_label_set_use_markup(GTK_LABEL(label_info
), TRUE
);
208 g_snprintf(buffer
, sizeof(buffer
), INFO
, _("A fast and lightweight IDE"));
209 gtk_label_set_markup(GTK_LABEL(label_info
), buffer
);
210 gtk_misc_set_padding(GTK_MISC(label_info
), 2, 11);
211 gtk_widget_show(label_info
);
212 gtk_box_pack_start(GTK_BOX(info_box
), label_info
, FALSE
, FALSE
, 0);
215 codename_label
= gtk_label_new(NULL
);
216 gtk_label_set_justify(GTK_LABEL(codename_label
), GTK_JUSTIFY_CENTER
);
217 gtk_label_set_selectable(GTK_LABEL(codename_label
), TRUE
);
218 gtk_label_set_use_markup(GTK_LABEL(codename_label
), TRUE
);
219 gtk_label_set_markup(GTK_LABEL(codename_label
), CODENAME
);
220 gtk_misc_set_padding(GTK_MISC(codename_label
), 2, 8);
221 gtk_widget_show(codename_label
);
222 gtk_box_pack_start(GTK_BOX(info_box
), codename_label
, FALSE
, FALSE
, 0);
224 /* build date label */
225 builddate_label
= gtk_label_new(NULL
);
226 gtk_label_set_justify(GTK_LABEL(builddate_label
), GTK_JUSTIFY_CENTER
);
227 gtk_label_set_selectable(GTK_LABEL(builddate_label
), TRUE
);
228 gtk_label_set_use_markup(GTK_LABEL(builddate_label
), TRUE
);
229 build_date
= utils_parse_and_format_build_date(__DATE__
);
230 g_snprintf(buffer2
, sizeof(buffer2
), _("(built on or after %s)"), build_date
);
232 g_snprintf(buffer
, sizeof(buffer
), BUILDDATE
, buffer2
);
233 gtk_label_set_markup(GTK_LABEL(builddate_label
), buffer
);
234 gtk_misc_set_padding(GTK_MISC(builddate_label
), 2, 2);
235 gtk_widget_show(builddate_label
);
236 gtk_box_pack_start(GTK_BOX(info_box
), builddate_label
, FALSE
, FALSE
, 0);
238 box
= gtk_hbutton_box_new();
239 url_button
= gtk_button_new();
240 gtk_button_set_relief(GTK_BUTTON(url_button
), GTK_RELIEF_NONE
);
241 g_signal_connect(url_button
, "clicked", G_CALLBACK(homepage_clicked
), (gpointer
)GEANY_HOMEPAGE
);
242 label
= gtk_label_new(NULL
);
243 gtk_label_set_text(GTK_LABEL(label
), GEANY_HOMEPAGE
);
244 gtk_widget_show(label
);
245 gtk_container_add(GTK_CONTAINER(url_button
), label
);
246 gtk_widget_show(url_button
);
247 gtk_box_pack_start(GTK_BOX(box
), url_button
, FALSE
, FALSE
, 0);
248 gtk_widget_show(box
);
249 gtk_box_pack_start(GTK_BOX(info_box
), box
, FALSE
, FALSE
, 10);
251 /* copyright label */
252 cop_label
= gtk_label_new(NULL
);
253 gtk_label_set_justify(GTK_LABEL(cop_label
), GTK_JUSTIFY_CENTER
);
254 gtk_label_set_selectable(GTK_LABEL(cop_label
), FALSE
);
255 gtk_label_set_use_markup(GTK_LABEL(cop_label
), TRUE
);
256 gtk_label_set_markup(GTK_LABEL(cop_label
), COPYRIGHT
);
257 gtk_misc_set_padding(GTK_MISC(cop_label
), 2, 10);
258 gtk_widget_show(cop_label
);
259 gtk_box_pack_start(GTK_BOX(info_box
), cop_label
, FALSE
, FALSE
, 0);
260 /*gtk_container_add(GTK_CONTAINER(info_box), cop_label); */
262 label
= gtk_label_new(_("Info"));
263 gtk_widget_show(label
);
264 gtk_widget_show_all(info_box
);
265 gtk_notebook_append_page(GTK_NOTEBOOK(notebook
), info_box
, label
);
267 /* create "Credits" tab */
268 credits_scrollwin
= gtk_scrolled_window_new(NULL
, NULL
);
269 gtk_container_set_border_width(GTK_CONTAINER(credits_scrollwin
), 6);
270 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(credits_scrollwin
),
271 GTK_POLICY_NEVER
, GTK_POLICY_AUTOMATIC
);
273 table
= gtk_table_new(23 + translators_len
+ prev_translators_len
, 3, FALSE
);
274 gtk_table_set_col_spacings(GTK_TABLE(table
), 10);
277 g_snprintf(buffer
, sizeof(buffer
),
278 "<span size=\"larger\" weight=\"bold\">%s</span>", _("Developers"));
279 label
= gtk_label_new(buffer
);
280 gtk_table_attach(GTK_TABLE(table
), label
, 0, 2, row
, row
+ 1, GTK_FILL
, 0, 0, 5);
281 gtk_label_set_use_markup(GTK_LABEL(label
), TRUE
);
282 gtk_misc_set_alignment(GTK_MISC(label
), 0, 0);
285 g_snprintf(buffer
, sizeof(buffer
), "Colomban Wendling - %s", _("maintainer"));
286 ROW(buffer
, row
, 0, 0, 0, 1);
288 ROW("<lists.ban@herbesfolles.org>", row
, 0, 0, 0, 1);
290 ROW("", row
, 0, 0, 0, 0);
293 g_snprintf(buffer
, sizeof(buffer
), "Nick Treleaven - %s", _("developer"));
294 ROW(buffer
, row
, 0, 0, 0, 1);
296 ROW("<nick.treleaven@btinternet.com>", row
, 0, 0, 0, 1);
298 ROW("", row
, 0, 0, 0, 0);
301 g_snprintf(buffer
, sizeof(buffer
), "Enrico Tröger - %s", _("developer"));
302 ROW(buffer
, row
, 0, 0, 0, 1);
304 ROW("<enrico.troeger@uvena.de>", row
, 0, 0, 0, 1);
306 ROW("", row
, 0, 0, 0, 0);
309 g_snprintf(buffer
, sizeof(buffer
), "Matthew Brush - %s", _("developer"));
310 ROW(buffer
, row
, 0, 0, 0, 1);
312 ROW("<mbrush@codebrainz.ca>", row
, 0, 0, 0, 1);
314 ROW("", row
, 0, 0, 0, 0);
317 g_snprintf(buffer
, sizeof(buffer
), "Frank Lanitz - %s", _("translation maintainer"));
318 ROW(buffer
, row
, 0, 0, 0, 1);
320 ROW("<frank@frank.uvena.de>", row
, 0, 0, 0, 1);
322 ROW("", row
, 0, 0, 0, 0);
325 g_snprintf(buffer
, sizeof(buffer
),
326 "<span size=\"larger\" weight=\"bold\">%s</span>", _("Translators"));
327 label
= gtk_label_new(buffer
);
328 gtk_table_attach(GTK_TABLE(table
), label
, 0, 2, row
, row
+ 1,
329 (GtkAttachOptions
) (GTK_FILL
),
330 (GtkAttachOptions
) (0), 0, 5);
331 gtk_label_set_use_markup(GTK_LABEL(label
), TRUE
);
332 gtk_misc_set_alignment(GTK_MISC(label
), 0, 0.5);
335 for (i
= 0; i
< translators_len
; i
++)
337 ROW(translators
[i
][0], row
, 0, 1, 4, 0);
338 ROW(translators
[i
][1], row
, 1, 0, 4, 0);
342 ROW("", row
, 0, 0, 0, 0);
345 g_snprintf(buffer
, sizeof(buffer
),
346 "<span size=\"larger\" weight=\"bold\">%s</span>", _("Previous Translators"));
347 label
= gtk_label_new(buffer
);
348 gtk_table_attach(GTK_TABLE(table
), label
, 0, 2, row
, row
+ 1,
349 (GtkAttachOptions
) (GTK_FILL
),
350 (GtkAttachOptions
) (0), 0, 5);
351 gtk_label_set_use_markup(GTK_LABEL(label
), TRUE
);
352 gtk_misc_set_alignment(GTK_MISC(label
), 0, 0.5);
355 for (i
= 0; i
< prev_translators_len
; i
++)
357 ROW(prev_translators
[i
][0], row
, 0, 1, 4, 0);
358 ROW(prev_translators
[i
][1], row
, 1, 0, 4, 0);
363 ROW("", row
, 0, 0, 0, 0);
366 g_snprintf(buffer
, sizeof(buffer
),
367 "<span size=\"larger\" weight=\"bold\">%s</span>", _("Contributors"));
368 label
= gtk_label_new(buffer
);
369 gtk_table_attach(GTK_TABLE(table
), label
, 0, 2, row
, row
+ 1,
370 (GtkAttachOptions
) (GTK_FILL
),
371 (GtkAttachOptions
) (0), 0, 5);
372 gtk_label_set_use_markup(GTK_LABEL(label
), TRUE
);
373 gtk_misc_set_alignment(GTK_MISC(label
), 0, 0.5);
376 g_snprintf(buffer
, sizeof(buffer
),
377 _("Some of the many contributors (for a more detailed list, see the file %s):"),
384 label
= geany_wrap_label_new(buffer
);
385 gtk_table_attach(GTK_TABLE(table
), label
, 0, 2, row
, row
+ 1,
386 (GtkAttachOptions
) (GTK_FILL
),
387 (GtkAttachOptions
) (0), 0, 5);
388 gtk_label_set_use_markup(GTK_LABEL(label
), TRUE
);
389 gtk_misc_set_alignment(GTK_MISC(label
), 0, 0.5);
392 label
= geany_wrap_label_new(contributors
);
393 gtk_table_attach(GTK_TABLE(table
), label
, 0, 2, row
, row
+ 1,
394 (GtkAttachOptions
) (GTK_FILL
| GTK_EXPAND
),
395 (GtkAttachOptions
) (0), 0, 5);
396 gtk_label_set_use_markup(GTK_LABEL(label
), TRUE
);
397 gtk_misc_set_alignment(GTK_MISC(label
), 0, 0.5);
400 gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(credits_scrollwin
), table
);
401 gtk_viewport_set_shadow_type(GTK_VIEWPORT(gtk_widget_get_parent(table
)), GTK_SHADOW_NONE
);
402 gtk_widget_show_all(table
);
403 label
= gtk_label_new(_("Credits"));
404 gtk_widget_show(label
);
405 gtk_notebook_append_page(GTK_NOTEBOOK(notebook
), credits_scrollwin
, label
);
407 /* create "License" tab */
408 license_scrollwin
= gtk_scrolled_window_new(NULL
, NULL
);
409 gtk_container_set_border_width(GTK_CONTAINER(license_scrollwin
), 6);
410 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(license_scrollwin
),
411 GTK_POLICY_AUTOMATIC
, GTK_POLICY_AUTOMATIC
);
412 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(license_scrollwin
), GTK_SHADOW_IN
);
413 license_textview
= gtk_text_view_new();
414 gtk_text_view_set_left_margin(GTK_TEXT_VIEW(license_textview
), 2);
415 gtk_text_view_set_right_margin(GTK_TEXT_VIEW(license_textview
), 2);
416 gtk_text_view_set_editable(GTK_TEXT_VIEW(license_textview
), FALSE
);
417 gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(license_textview
), FALSE
);
418 gtk_widget_show(license_textview
);
419 gtk_container_add(GTK_CONTAINER(license_scrollwin
), license_textview
);
420 label
= gtk_label_new(_("License"));
421 gtk_widget_show(label
);
423 g_snprintf(buffer
, sizeof(buffer
), "%s" G_DIR_SEPARATOR_S
"GPL-2", app
->datadir
);
425 g_file_get_contents(buffer
, &license_text
, NULL
, NULL
);
426 if (license_text
== NULL
)
428 license_text
= g_strdup(
429 _("License text could not be found, please visit http://www.gnu.org/licenses/gpl-2.0.txt to view it online."));
431 tb
= gtk_text_view_get_buffer(GTK_TEXT_VIEW(license_textview
));
432 gtk_text_buffer_set_text(tb
, license_text
, -1);
434 g_free(license_text
);
436 gtk_notebook_append_page(GTK_NOTEBOOK(notebook
), license_scrollwin
, label
);
438 gtk_widget_show_all(dialog
);
443 void about_dialog_show(void)
447 dialog
= create_dialog();
449 gtk_dialog_run(GTK_DIALOG(dialog
));
450 gtk_widget_destroy(dialog
);
454 static void header_eventbox_style_set(GtkWidget
*widget
)
456 static gint recursive
= 0;
463 style
= gtk_widget_get_style(widget
);
464 gtk_widget_modify_bg(widget
, GTK_STATE_NORMAL
, &style
->bg
[GTK_STATE_SELECTED
]);
469 static void header_label_style_set(GtkWidget
*widget
)
471 static gint recursive
= 0;
478 style
= gtk_widget_get_style(widget
);
479 gtk_widget_modify_fg(widget
, GTK_STATE_NORMAL
, &style
->fg
[GTK_STATE_SELECTED
]);
484 static void homepage_clicked(GtkButton
*button
, gpointer data
)
486 utils_open_browser(data
);