Revision: 1762 http://geany.svn.sourceforge.net/geany/?rev=1762&view=rev Author: eht16 Date: 2007-07-29 10:56:40 -0700 (Sun, 29 Jul 2007)
Log Message: ----------- Rework credits page to fix some display issues.
Modified Paths: -------------- trunk/ChangeLog trunk/THANKS trunk/src/about.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2007-07-29 14:06:35 UTC (rev 1761) +++ trunk/ChangeLog 2007-07-29 17:56:40 UTC (rev 1762) @@ -3,6 +3,7 @@ * scintilla/LexHTML.cxx, scintilla/Makefile.am: Backport of LexHTML from Scintilla CVS to fix #1759166. Disable debug build of Scintilla and use -Os. + * src/about.c: Rework credits page to fix some display issues.
2007-07-28 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/THANKS =================================================================== --- trunk/THANKS 2007-07-29 14:06:35 UTC (rev 1761) +++ trunk/THANKS 2007-07-29 17:56:40 UTC (rev 1762) @@ -55,7 +55,7 @@ Dario Santomarco <dariello(at)yahoo(dot)it> - it Kurt De Bree <kdebree(at)telenet(dot)be> - nl Jacek Wolszczak <shutdownrunner(at)o2(dot)pl> - pl_PL -Jarosław Foksa" <jfoksa(at)gmail(dot)com> - pl_PL +Jarosław Foksa <jfoksa(at)gmail(dot)com> - pl_PL Alexandre Moreira <alexandream(at)gmail(dot)com> - pt_BR Adrovane Marques Kade <adrovane(at)gmail(dot)com> - pt_BR brahmann_ <brahmann(at)lifec0re(dot)org(dot)ru> - ru_RU
Modified: trunk/src/about.c =================================================================== --- trunk/src/about.c 2007-07-29 14:06:35 UTC (rev 1761) +++ trunk/src/about.c 2007-07-29 17:56:40 UTC (rev 1762) @@ -40,44 +40,47 @@ #define CODENAME "<span weight="bold">"" GEANY_CODENAME ""</span>" #define BUILDDATE "<span size="smaller">%s</span>" #define COPYRIGHT "Copyright (c) 2005-2007\nEnrico Tröger\nNick Treleaven\nFrank Lanitz\nAll rights reserved." -#define CREDITS \ -"<span size="larger" weight="bold">%s</span>\n\t\ -\ -Enrico Tröger - %s\n\t\ -<enrico.troeger@uvena.de>\n\n\t\ -Nick Treleaven - %s\n\t\ -<nick.treleaven@btinternet.com>\n\n\t\ -Frank Lanitz - %s\n\t\ -<frank@frank.uvena.de>\n\n\t\ -\n<span size="larger" weight="bold">%s</span>\n\t\ -\ -be_BY\t Yura Semashko <yurand2@gmail.com>\n\n\t\ -bg\t Dilyan Rusev <dilyanrusev@gmail.com>\n\n\t\ -ca_ES\t Toni Garcia-Navarro <topi@elpiset.net>\n\n\t\ -cs_CZ\t Petr Messner <messa@messa.cz>\n\n\t\ -de_DE\t Enrico Tröger <enrico.troeger@uvena.de>\n\t\ -\t Frank Lanitz <frank@frank.uvena.de>\n\n\t\ -es\t Damián Viano <debian@damianv.com.ar>\n\t\ -\t Nacho Cabanes <ncabanes@gmail.com>\n\n\t\ -fi_FI\t Harri Koskinen <harri@fastmonkey.org>\n\n\t\ -fr\t Jean-Philippe Moal <skateinmars@skateinmars.net>\n\n\t\ -hu\t Gabor Kmetyko <kg_kilo@freemail.hu>\n\n\t\ -it\t Max Baldinelli <m.baldinelli@agora.it>\n\t\ -\t Dario Santomarco <dariello@yahoo.it>\n\n\t\ -nl\t Kurt De Bree <kdebree@telenet.be>\n\n\t\ -pl_PL\t Jacek Wolszczak <shutdownrunnter@02.pl>\n\n\t\ -pt_BR\t Alexandra Moreire <alexandream@gmail.com>\n\t\ -\t Adrovane Marques Kade <adrovane@gmail.com>\n\n\t\ -ru_RU\t brahmann_ <brahmann@mthr.net.ru>\n\n\t\ -vi_VN\t Clytie Siddall <clytie@riverland.net.au>\n\n\t\ -zh_CN\t Dormouse Young <dormouse.young@gmail.com>\n\n\t\ -zh_TW\t KoViCH <kovich.ian@gmail.com>\n\n\t"
+const gchar *translators[][2] = { + { "be_BY", "Yura Semashko <yurand2@gmail.com>" }, + { "bg", "Dilyan Rusev <dilyanrusev@gmail.com>" }, + { "ca_ES", "Toni Garcia-Navarro <topi@elpiset.net>" }, + { "cs_CZ", "Petr Messner <messa@messa.cz>" }, + { "de_DE", "Enrico Tröger <enrico.troeger@uvena.de>\nFrank Lanitz <frank@frank.uvena.de>" }, + { "es", "Damián Viano <debian@damianv.com.ar>\nNacho Cabanes <ncabanes@gmail.com>" }, + { "fi_FI", "Harri Koskinen <harri@fastmonkey.org>" }, + { "fr", "Jean-Philippe Moal <skateinmars@skateinmars.net>" }, + { "hu", "Gabor Kmetyko <kg_kilo@freemail.hu>" }, + { "it", "Max Baldinelli <m.baldinelli@agora.it>,\nDario Santomarco <dariello@yahoo.it>" }, + { "nl", "Kurt De Bree <kdebree@telenet.be>" }, + { "pl_PL", "Jarosław Foksa <jfoksa@gmail.com>" }, + { "pt_BR", "Alexandra Moreire <alexandream@gmail.com>\nAdrovane Marques Kade <adrovane@gmail.com>" }, + { "ru_RU", "brahmann_ <brahmann@mthr.net.ru>" }, + { "vi_VN", "Clytie Siddall <clytie@riverland.net.au>" }, + { "zh_CN", "Dormouse Young <dormouse.young@gmail.com>" }, + { "zh_TW", "KoViCH <kovich.ian@gmail.com>" } +}; +static const gint translators_len = sizeof(translators) / sizeof(translators[0]); + +const gchar *prev_translators[][2] = { + { "pl_PL", "Jacek Wolszczak <shutdownrunnter@02.pl>" }, +}; +static const gint prev_translators_len = sizeof(prev_translators) / sizeof(prev_translators[0]); + + static void header_eventbox_style_set(GtkWidget *widget); static void header_label_style_set(GtkWidget *widget); static void homepage_clicked(GtkButton *button, gpointer data);
+#define ROW(text, row, col, x_align, y_padding) \ + label = gtk_label_new((text)); \ + gtk_table_attach(GTK_TABLE(table), label, (col), (col) + 1, (row), (row) + 1, \ + (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_FILL), 0, (y_padding)); \ + gtk_label_set_use_markup(GTK_LABEL(label), TRUE); \ + gtk_misc_set_alignment(GTK_MISC(label), (x_align), 0); + + static GtkWidget *create_dialog(void) { GtkWidget *dialog; @@ -89,11 +92,11 @@ GtkWidget *url_button; GtkWidget *cop_label; GtkWidget *label; - GtkWidget *credits_label; GtkWidget *license_textview; GtkWidget *notebook; GtkWidget *box; GtkWidget *credits_scrollwin; + GtkWidget *table; GtkWidget *license_scrollwin; GtkWidget *info_box; GtkWidget *button; @@ -104,7 +107,7 @@ gchar *license_text = NULL; gchar buffer[512]; gchar buffer2[128]; - gchar *credits; + gint i, row = 0;
dialog = gtk_dialog_new();
@@ -222,18 +225,87 @@ // create "Credits" tab credits_scrollwin = gtk_scrolled_window_new(NULL, NULL); gtk_container_set_border_width(GTK_CONTAINER(credits_scrollwin), 6); - gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(credits_scrollwin), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); - credits_label = gtk_label_new(NULL); - gtk_label_set_selectable(GTK_LABEL(credits_label), TRUE); - gtk_label_set_use_markup(GTK_LABEL(credits_label), TRUE); - credits = g_strdup_printf(CREDITS, _("Developers"), _("maintainer"), _("developer"), - _("translation maintainer"), _("Translators")); - credits = utils_str_replace(credits, "<language>", _("language")); - gtk_label_set_markup(GTK_LABEL(credits_label), credits); - gtk_misc_set_alignment(GTK_MISC(credits_label), 0.0, 0.0); - gtk_widget_show(credits_label); - gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(credits_scrollwin), credits_label); - gtk_viewport_set_shadow_type(GTK_VIEWPORT(gtk_widget_get_parent(credits_label)), GTK_SHADOW_NONE); + gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(credits_scrollwin), + GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); + + table = gtk_table_new(14 + translators_len + prev_translators_len, 3, FALSE); + gtk_table_set_col_spacings(GTK_TABLE(table), 10); + + row = 0; + g_snprintf(buffer, sizeof(buffer), + "<span size="larger" weight="bold">%s</span>", _("Developers")); + label = gtk_label_new(buffer); + gtk_table_attach(GTK_TABLE(table), label, 0, 2, row, row + 1, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 5); + gtk_label_set_use_markup(GTK_LABEL(label), TRUE); + gtk_misc_set_alignment(GTK_MISC(label), 0, 0); + row++; + + g_snprintf(buffer, sizeof(buffer), "Enrico Tröger - %s", _("maintainer")); + ROW(buffer, row, 1, 0, 0); + row++; + ROW("<enrico.troeger@uvena.de>", row, 1, 0, 0); + row++; + ROW("", row, 0, 0, 0); + row++; + + g_snprintf(buffer, sizeof(buffer), "Nick Treleaven - %s", _("developer")); + ROW(buffer, row, 1, 0, 0); + row++; + ROW("<nick.treleaven@btinternet.com>", row, 1, 0, 0); + row++; + ROW("", row, 0, 0, 0); + row++; + + g_snprintf(buffer, sizeof(buffer), "Frank Lanitz - %s", _("translation maintainer")); + ROW(buffer, 7, 1, 0, 0); + row++; + ROW("<frank@frank.uvena.de>", row, 1, 0, 0); + row++; + ROW("", row, 0, 0, 0); + row++; + + g_snprintf(buffer, sizeof(buffer), + "<span size="larger" weight="bold">%s</span>", _("Translators")); + label = gtk_label_new(buffer); + gtk_table_attach(GTK_TABLE(table), label, 0, 2, row, row + 1, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 5); + gtk_label_set_use_markup(GTK_LABEL(label), TRUE); + gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); + row++; + + for (i = 0; i < translators_len; i++) + { + ROW(translators[i][0], row, 0, 1, 4); + ROW(translators[i][1], row, 1, 0, 4); + row++; + } + + ROW("", row, 0, 0, 0); + row++; + + g_snprintf(buffer, sizeof(buffer), + "<span size="larger" weight="bold">%s</span>", _("Previous Translators")); + label = gtk_label_new(buffer); + gtk_table_attach(GTK_TABLE(table), label, 0, 2, row, row + 1, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 5); + gtk_label_set_use_markup(GTK_LABEL(label), TRUE); + gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); + row++; + + for (i = 0; i < prev_translators_len; i++) + { + ROW(prev_translators[i][0], row, 0, 1, 4); + ROW(prev_translators[i][1], row, 1, 0, 4); + row++; + } + + gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(credits_scrollwin), table); + gtk_viewport_set_shadow_type(GTK_VIEWPORT(gtk_widget_get_parent(table)), GTK_SHADOW_NONE); + gtk_widget_show_all(table); label = gtk_label_new(_("Credits")); gtk_widget_show(label); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), credits_scrollwin, label); @@ -241,7 +313,8 @@ // create "License" tab license_scrollwin = gtk_scrolled_window_new(NULL, NULL); gtk_container_set_border_width(GTK_CONTAINER(license_scrollwin), 6); - gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(license_scrollwin), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(license_scrollwin), + GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); license_textview = gtk_text_view_new(); gtk_text_view_set_editable(GTK_TEXT_VIEW(license_textview), FALSE); gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(license_textview), FALSE); @@ -255,12 +328,12 @@ g_file_get_contents(buffer, &license_text, NULL, NULL); if (license_text == NULL) { - license_text = g_strdup("License text could not be found, please google for GPLv2"); + license_text = g_strdup( + _("License text could not be found, please search the web for GPLv2")); } tb = gtk_text_view_get_buffer(GTK_TEXT_VIEW(license_textview)); gtk_text_buffer_set_text(tb, license_text, strlen(license_text));
- g_free(credits); g_free(license_text);
gtk_notebook_append_page(GTK_NOTEBOOK(notebook), license_scrollwin, label);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.