Added simple Chinese (zh_CN) translation

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@995 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Frank Lanitz 2006-11-14 17:16:11 +00:00
parent c3300b2da9
commit bc4b8fb16d
7 changed files with 3079 additions and 260 deletions

View File

@ -1,3 +1,10 @@
2006-11-14 Frank Lanitz <frank@frank.uvena.de>
* po/zh.po, src/about.c, configure.in, THANKS:
Added simple Chinese (zh_CN) translation (Thanks to
Dormouse Young <mouselinux@163.com>)
2006-11-14 Nick Treleaven <nick.treleaven@btinternet.com>
* src/templates.c, src/templates.h, src/callbacks.c, src/filetypes.c,

1
THANKS
View File

@ -35,3 +35,4 @@ Jacek Wolszczak <shutdownrunner(at)o2(dot)pl> - pl_PL
Alexandre Moreira <alexandream(at)gmail(dot)com> - pt_BR
brahmann_ <brahmann(at)mthr(dot)net(dot)ru> - ru_RU
Clytie Siddall <clytie(at)riverland(dot)net(dot)au> - vi_VN
Dormouse Young <dormouse.young@gmail.com> - zh_CN

View File

@ -123,7 +123,7 @@ AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
# Add the languages which your application supports here.
ALL_LINGUAS="be ca cs de es it nl pl pt_BR ru vi"
ALL_LINGUAS="be ca cs de es it nl pl pt_BR ru vi zh"
AM_GLIB_GNU_GETTEXT

View File

@ -1,3 +1,10 @@
2006-11-14 Frank Lanitz <frank@frank.uvena.de>
* de.po: Small update of German translation
* zh.po: Added simple Chinese (zh_CN) translation
(Thanks to Dormouse Young <mouselinux@163.com>)
2006-11-09 Frank Lanitz <frank@frank.uvena.de>
* de.po, Changelog: Fixed some typos (thanks to Enrico for doing this)

155
po/de.po
View File

@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: geany 0.8\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-11-08 22:05+0100\n"
"PO-Revision-Date: 2006-11-08 22:31+0100\n"
"POT-Creation-Date: 2006-11-12 20:44+0100\n"
"PO-Revision-Date: 2006-11-14 18:11+0100\n"
"Last-Translator: Frank Lanitz <frank@frank.uvena.de>\n"
"Language-Team: German <frank@frank.uvena.de>\n"
"MIME-Version: 1.0\n"
@ -79,12 +79,12 @@ msgstr ""
"Es könnte zu Problemen bei der Verwendung von Geany kommen.\n"
"Geany trotzdem starten?"
#: src/main.c:569
#: src/main.c:571
#, c-format
msgid "This is Geany %s."
msgstr "Willkommen zu Geany %s."
#: src/main.c:571
#: src/main.c:573
#, c-format
msgid "Configuration directory could not be created (%s)."
msgstr "Konfigurationsverzeichnis konnte nicht erstellt werden (%s)."
@ -442,7 +442,7 @@ msgstr "Entfernt alle gesetzten (Fehler)-Markierungen innerhalb des Dokumentes."
#. build the code
#: src/interface.c:804
#: src/build.c:702
#: src/build.c:803
msgid "_Build"
msgstr "_Erstellen"
@ -530,7 +530,7 @@ msgid "Compile the current file"
msgstr "Kompiliert die aktuelle Datei"
#: src/interface.c:928
#: src/build.c:762
#: src/build.c:863
msgid "Run or view the current file"
msgstr "Aktuelle Datei anzeigen oder ausführen"
@ -1103,7 +1103,7 @@ msgstr "Make"
#: src/interface.c:3146
#: src/prefs.c:1090
#: src/vte.c:165
#: src/vte.c:168
msgid "Terminal"
msgstr "Terminal"
@ -1404,7 +1404,7 @@ msgstr "Geben Sie die Zeile an, zu der Sie springen möchten:"
#. arguments
#: src/dialogs.c:592
#: src/build.c:902
#: src/build.c:1009
msgid "Set Arguments"
msgstr "Programm-Parameter angeben"
@ -1888,176 +1888,187 @@ msgstr "Warnung"
msgid "Information"
msgstr "Information"
#: src/keyfile.c:69
#: src/keyfile.c:70
#, c-format
msgid "%s configuration file, edit as you need"
msgstr "%s Konfigurationsdatei. Bei Bedarf anpassen."
#: src/keyfile.c:327
#: src/keyfile.c:328
msgid "Type here what you want, use it as a notice/scratch board"
msgstr "Schreiben Sie hier rein, was sie möchten. Sie können es als Notizbuch nutzen."
#: src/keyfile.c:550
msgid "Failed to load one or more session files."
msgstr "Eine oder mehre Datei(en) aus der letzten Sitzung konnte(n) nicht geladen werden."
#: src/msgwindow.c:89
msgid "Status messages"
msgstr "Meldungen"
#: src/build.c:110
#: src/build.c:135
#, c-format
msgid "Failed to view %s (make sure it is already compiled)"
msgstr "Konnte %s nicht anzeigen (die Datei muss bereits erzeugt worden sein)"
#: src/build.c:143
#: src/build.c:358
#: src/build.c:526
#: src/build.c:168
#: src/build.c:551
#, c-format
msgid "Could not find terminal '%s' (check path for Terminal tool setting in Preferences)"
msgstr "Konnte das Terminalprogramm '%s' nicht finden (Pfad zum Terminalprogramm in den Einstellungen überprüfen)"
#: src/build.c:182
#: src/build.c:583
#, c-format
msgid "Failed to execute %s (start-script could not be created)"
msgstr "Konnte %s nicht ausführen (Start-Script konnte nicht erzeugt werden)"
#: src/build.c:210
#: src/build.c:431
#: src/build.c:608
#: src/search.c:1036
#, c-format
msgid "Process failed (%s)"
msgstr "Prozess fehlgeschlagen (%s)"
#: src/build.c:262
#: src/build.c:335
#, c-format
msgid "Something very strange is occured, could not stat %s (%s)"
msgid "Something very strange is occurred, could not stat %s (%s)."
msgstr "Ein Fehler ist aufgetreten, konnte Datei %s nicht prüfen (%s)."
#: src/build.c:341
#: src/build.c:414
#, c-format
msgid "%s (in directory: %s)"
msgstr "%s (im Verzeichnis: %s)"
#: src/build.c:444
#: src/build.c:527
#, c-format
msgid "Failed to execute %s (make sure it is already built)"
msgstr "Konnte %s nicht ausführen (die Datei muss bereits erzeugt worden sein)"
#: src/build.c:469
#, c-format
msgid "Could not find terminal '%s' (check path for Terminal tool setting in Preferences)"
msgstr "Konnte das Terminalprogramm '%s' nicht finden (Pfad zum Terminalprogramm in den Einstellungen überprüfen)"
#: src/build.c:483
#: src/build.c:565
#, c-format
msgid "Failed to change the working directory to %s"
msgstr "Konnte nicht in Arbeitsverzeichnis %s wechseln"
#: src/build.c:501
#, c-format
msgid "Failed to execute %s (start-script could not be created)"
msgstr "Konnte %s nicht ausführen (Start-Script konnte nicht erzeugt werden)"
#: src/build.c:616
#: src/build.c:705
msgid "Compilation failed."
msgstr "Kompilierung fehlgeschlagen."
#: src/build.c:621
#: src/build.c:710
msgid "Compilation finished successfully."
msgstr "Kompilierung beendet - erfolgreich."
#. compile the code
#: src/build.c:688
#: src/build.c:789
msgid "_Compile"
msgstr "_Kompilieren"
#: src/build.c:691
#: src/build.c:792
msgid "Compiles the current file"
msgstr "Kompiliert die aktuelle Datei"
#: src/build.c:706
#: src/build.c:807
msgid "Builds the current file (generate an executable file)"
msgstr "Erstellt die aktuelle Datei (erzeugt eine ausführbare Datei)"
#. build the code with make all
#: src/build.c:720
#: src/build.c:840
#: src/build.c:821
#: src/build.c:943
msgid "_Make all"
msgstr "_Make all"
#: src/build.c:723
#: src/build.c:843
#: src/build.c:824
#: src/build.c:946
msgid "Builds the current file with the make tool and the default target"
msgstr "Erstellt die aktuelle Datei mit \"make\" und dem Default-Target"
#. build the code with make custom
#: src/build.c:731
#: src/build.c:851
#: src/build.c:832
#: src/build.c:954
msgid "Make custom _target"
msgstr "Make eigenes _Target"
#: src/build.c:735
#: src/build.c:855
#: src/build.c:836
#: src/build.c:958
msgid "Builds the current file with the make tool and the specified target"
msgstr "Erstellt die aktuelle Datei mit \"make\" und dem angegebenem Target"
#. build the code with make object
#: src/build.c:742
#: src/build.c:843
msgid "Make _object"
msgstr "Make _Objekt-Datei"
#: src/build.c:746
#: src/build.c:847
msgid "Compiles the current file using the make tool"
msgstr "Kompiliert die aktuelle Datei mittels make "
#: src/build.c:777
#: src/build.c:878
msgid "_Set Includes and Arguments"
msgstr "_Programm-Parameter angeben"
#: src/build.c:782
#: src/build.c:883
msgid "Sets the includes and library paths for the compiler and the program arguments for execution"
msgstr "Include-Dateien und Bibliotheken-Pfade sowie Programmparameter festlegen"
#. DVI
#: src/build.c:807
#: src/build.c:908
msgid "LaTeX -> DVI"
msgstr "LaTeX -> DVI"
#: src/build.c:810
#: src/build.c:911
msgid "Compiles the current file into a DVI file"
msgstr "Kompiliert die aktuelle Datei als DVI-Datei."
#. PDF
#: src/build.c:820
#: src/build.c:922
msgid "LaTeX -> PDF"
msgstr "LaTeX -> PDF"
#: src/build.c:823
#: src/build.c:925
msgid "Compiles the current file into a PDF file"
msgstr "Kompiliert die aktuelle Datei als PDF-Datei."
#. DVI view
#: src/build.c:870
#: src/build.c:973
msgid "View DVI file"
msgstr "DVI-Datei anzeigen"
#: src/build.c:876
#: src/build.c:889
#: src/build.c:980
#: src/build.c:995
msgid "Compiles and view the current file"
msgstr "Kompiliert und zeigt die aktuelle Datei an."
#. PDF view
#: src/build.c:883
#: src/build.c:989
msgid "View PDF file"
msgstr "PDF-Datei anzeigen"
#: src/build.c:909
#: src/build.c:1016
msgid "Sets the program paths and arguments"
msgstr "Programm-Parameter angeben"
#: src/build.c:1098
#: src/build.c:1190
#: src/keybindings.c:172
msgid "Make custom target"
msgstr "Make mit eigenem Target"
#: src/build.c:1099
#: src/build.c:1191
msgid "Enter custom options here, all entered text is passed to the make command."
msgstr "Alles was Sie hier angeben, wird direkt an \"make\" übergeben."
#: src/build.c:1135
#: src/build.c:1229
msgid "Failed to execute the view program"
msgstr "Konnte das Anzeigeprogramm nicht ausführen."
#: src/build.c:1153
#: src/build.c:1248
msgid "Failed to execute the terminal program"
msgstr "Konnte das Terminal-Programm nicht ausführen."
#: src/build.c:1360
#, c-format
msgid "Process could not be stopped (%s)."
msgstr "Der Prozess konnte nicht angehalten werden (%s)."
#: src/prefs.c:298
msgid "Action"
msgstr "Aktion"
@ -2164,53 +2175,53 @@ msgstr "Pfad der aktuellen Datei setzen"
msgid "Whether to execute \"cd $path\" when you switch between opened files."
msgstr "Legt fest, ob \"cd $path\" in der VTE ausgeführt werden soll, wenn Sie zwischen geöffneten Dateien wechseln."
#: src/about.c:111
#: src/about.c:113
msgid "About Geany"
msgstr "Über Geany"
#: src/about.c:159
#: src/about.c:161
msgid "A fast and lightweight IDE"
msgstr "Eine kleine und schnelle Entwicklungsumgebung"
#: src/about.c:180
#: src/about.c:182
#, c-format
msgid "(built on %s)"
msgstr "(kompiliert am %s)"
#. gtk_container_add(GTK_CONTAINER(info_box), cop_label);
#: src/about.c:211
#: src/about.c:213
msgid "Info"
msgstr "Info"
#: src/about.c:223
#: src/about.c:225
msgid "Developers"
msgstr "Entwickler"
#: src/about.c:223
#: src/about.c:225
msgid "Maintainer"
msgstr "Hauptentwickler"
#: src/about.c:223
#: src/about.c:225
msgid "developer"
msgstr "Entwickler"
#: src/about.c:224
#: src/about.c:226
msgid "translation maintainer"
msgstr "Übersetzungskoordinator"
#: src/about.c:224
#: src/about.c:226
msgid "Translators"
msgstr "Übersetzer"
#: src/about.c:225
#: src/about.c:227
msgid "language"
msgstr "Sprache"
#: src/about.c:231
#: src/about.c:233
msgid "Credits"
msgstr "Credits"
#: src/about.c:244
#: src/about.c:246
msgid "License"
msgstr "Lizenz"
@ -2523,7 +2534,7 @@ msgstr "Seitenleiste verbergen"
msgid "Reload"
msgstr "Neu laden"
#: src/vte.c:366
#: src/vte.c:369
msgid "_Input Methods"
msgstr "_Eingabemethoden"

2791
po/zh.po Normal file

File diff suppressed because it is too large Load Diff

View File

@ -68,7 +68,9 @@ Alexandre Moreira - <language> pt_BR\n\t\
brahmann_ - <language> ru_RU\n\t\
&lt;brahmann@mthr.net.ru&gt;\n\n\t\
Clytie Siddall - <language> vi_VN\n\t\
&lt;clytie@riverland.net.au&gt;"
&lt;clytie@riverland.net.au&gt;\n\n\t\
Dormouse Young - <language> zh_CH\n\t\
&lt;dormouse.young@gmail.com&gt;\n\n\t"
static void header_eventbox_style_set(GtkWidget *widget);
static void header_label_style_set(GtkWidget *widget);
@ -77,236 +79,236 @@ static void homepage_clicked(GtkButton *button, gpointer data);
static GtkWidget *create_dialog(void)
{
GtkWidget *dialog;
GtkWidget *header_image;
GtkWidget *header_label;
GtkWidget *label_info;
GtkWidget *codename_label;
GtkWidget *builddate_label;
GtkWidget *url_button;
GtkWidget *cop_label;
GtkWidget *label;
GtkWidget *credits_label;
GtkWidget *license_textview;
GtkWidget *notebook;
GtkWidget *box;
GtkWidget *credits_scrollwin;
GtkWidget *license_scrollwin;
GtkWidget *info_box;
GtkWidget *button;
GtkWidget *header_hbox;
GtkWidget *header_eventbox;
GdkPixbuf *icon;
GtkTextBuffer* tb;
gchar *license_text = NULL;
gchar buffer[512];
gchar buffer2[128];
gchar *credits;
GtkWidget *dialog;
GtkWidget *header_image;
GtkWidget *header_label;
GtkWidget *label_info;
GtkWidget *codename_label;
GtkWidget *builddate_label;
GtkWidget *url_button;
GtkWidget *cop_label;
GtkWidget *label;
GtkWidget *credits_label;
GtkWidget *license_textview;
GtkWidget *notebook;
GtkWidget *box;
GtkWidget *credits_scrollwin;
GtkWidget *license_scrollwin;
GtkWidget *info_box;
GtkWidget *button;
GtkWidget *header_hbox;
GtkWidget *header_eventbox;
GdkPixbuf *icon;
GtkTextBuffer* tb;
gchar *license_text = NULL;
gchar buffer[512];
gchar buffer2[128];
gchar *credits;
dialog = gtk_dialog_new();
dialog = gtk_dialog_new();
//configure dialog
gtk_window_set_transient_for(GTK_WINDOW(dialog), GTK_WINDOW(app->window));
gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_CENTER_ON_PARENT);
gtk_window_set_title(GTK_WINDOW(dialog), _("About Geany"));
button = gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE);
gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_CLOSE);
gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE);
g_signal_connect(G_OBJECT(dialog), "key-press-event", G_CALLBACK(gb_on_key_pressed), NULL);
//configure dialog
gtk_window_set_transient_for(GTK_WINDOW(dialog), GTK_WINDOW(app->window));
gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_CENTER_ON_PARENT);
gtk_window_set_title(GTK_WINDOW(dialog), _("About Geany"));
button = gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE);
gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_CLOSE);
gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE);
g_signal_connect(G_OBJECT(dialog), "key-press-event", G_CALLBACK(gb_on_key_pressed), NULL);
// create header
header_eventbox = gtk_event_box_new();
gtk_widget_show(header_eventbox);
header_hbox = gtk_hbox_new(FALSE, 12);
gtk_container_set_border_width(GTK_CONTAINER(header_hbox), 4);
gtk_widget_show(header_hbox);
gtk_container_add(GTK_CONTAINER(header_eventbox), header_hbox);
header_image = gtk_image_new();
gtk_box_pack_start(GTK_BOX(header_hbox), header_image, FALSE,FALSE,0);
header_label = gtk_label_new(NULL);
gtk_label_set_use_markup(GTK_LABEL(header_label), TRUE);
// print the subversion revision if it is available
g_snprintf(buffer, sizeof(buffer), HEADER, (utils_str_equal(REVISION, "-1")) ? "" : " (" REVISION ")");
gtk_label_set_markup(GTK_LABEL(header_label), buffer);
gtk_widget_show(header_label);
gtk_box_pack_start(GTK_BOX(header_hbox), header_label, FALSE,FALSE,0);
header_eventbox_style_set(header_eventbox);
header_label_style_set(header_label);
g_signal_connect_after(G_OBJECT(header_eventbox), "style_set", G_CALLBACK(header_eventbox_style_set), NULL);
g_signal_connect_after(G_OBJECT(header_label), "style_set", G_CALLBACK(header_label_style_set), NULL);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), header_eventbox, FALSE, FALSE, 0);
// create header
header_eventbox = gtk_event_box_new();
gtk_widget_show(header_eventbox);
header_hbox = gtk_hbox_new(FALSE, 12);
gtk_container_set_border_width(GTK_CONTAINER(header_hbox), 4);
gtk_widget_show(header_hbox);
gtk_container_add(GTK_CONTAINER(header_eventbox), header_hbox);
header_image = gtk_image_new();
gtk_box_pack_start(GTK_BOX(header_hbox), header_image, FALSE,FALSE,0);
header_label = gtk_label_new(NULL);
gtk_label_set_use_markup(GTK_LABEL(header_label), TRUE);
// print the subversion revision if it is available
g_snprintf(buffer, sizeof(buffer), HEADER, (utils_str_equal(REVISION, "-1")) ? "" : " (" REVISION ")");
gtk_label_set_markup(GTK_LABEL(header_label), buffer);
gtk_widget_show(header_label);
gtk_box_pack_start(GTK_BOX(header_hbox), header_label, FALSE,FALSE,0);
header_eventbox_style_set(header_eventbox);
header_label_style_set(header_label);
g_signal_connect_after(G_OBJECT(header_eventbox), "style_set", G_CALLBACK(header_eventbox_style_set), NULL);
g_signal_connect_after(G_OBJECT(header_label), "style_set", G_CALLBACK(header_label_style_set), NULL);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), header_eventbox, FALSE, FALSE, 0);
// set image
icon = ui_new_pixbuf_from_inline(GEANY_IMAGE_LOGO, FALSE);
gtk_image_set_from_pixbuf(GTK_IMAGE(header_image), icon);
gtk_window_set_icon(GTK_WINDOW(dialog), icon);
// set image
icon = ui_new_pixbuf_from_inline(GEANY_IMAGE_LOGO, FALSE);
gtk_image_set_from_pixbuf(GTK_IMAGE(header_image), icon);
gtk_window_set_icon(GTK_WINDOW(dialog), icon);
// create notebook
notebook = gtk_notebook_new();
gtk_widget_show(notebook);
gtk_container_set_border_width(GTK_CONTAINER(notebook), 2);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), notebook, TRUE, TRUE, 0);
// create notebook
notebook = gtk_notebook_new();
gtk_widget_show(notebook);
gtk_container_set_border_width(GTK_CONTAINER(notebook), 2);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), notebook, TRUE, TRUE, 0);
// create "Info" tab
info_box = gtk_vbox_new(FALSE, 0);
//gtk_container_set_border_width(GTK_CONTAINER(info_box), 6);
gtk_widget_show(info_box);
// create "Info" tab
info_box = gtk_vbox_new(FALSE, 0);
//gtk_container_set_border_width(GTK_CONTAINER(info_box), 6);
gtk_widget_show(info_box);
label_info = gtk_label_new(NULL);
gtk_label_set_justify(GTK_LABEL(label_info), GTK_JUSTIFY_CENTER);
gtk_label_set_selectable(GTK_LABEL(label_info), TRUE);
gtk_label_set_use_markup(GTK_LABEL(label_info), TRUE);
g_snprintf(buffer, sizeof(buffer), INFO, _("A fast and lightweight IDE"));
gtk_label_set_markup(GTK_LABEL(label_info), buffer);
gtk_misc_set_padding(GTK_MISC(label_info), 2, 11);
gtk_widget_show(label_info);
gtk_box_pack_start(GTK_BOX(info_box), label_info, FALSE, FALSE, 0);
label_info = gtk_label_new(NULL);
gtk_label_set_justify(GTK_LABEL(label_info), GTK_JUSTIFY_CENTER);
gtk_label_set_selectable(GTK_LABEL(label_info), TRUE);
gtk_label_set_use_markup(GTK_LABEL(label_info), TRUE);
g_snprintf(buffer, sizeof(buffer), INFO, _("A fast and lightweight IDE"));
gtk_label_set_markup(GTK_LABEL(label_info), buffer);
gtk_misc_set_padding(GTK_MISC(label_info), 2, 11);
gtk_widget_show(label_info);
gtk_box_pack_start(GTK_BOX(info_box), label_info, FALSE, FALSE, 0);
// Codename label
codename_label = gtk_label_new(NULL);
gtk_label_set_justify(GTK_LABEL(codename_label), GTK_JUSTIFY_CENTER);
gtk_label_set_selectable(GTK_LABEL(codename_label), TRUE);
gtk_label_set_use_markup(GTK_LABEL(codename_label), TRUE);
gtk_label_set_markup(GTK_LABEL(codename_label), CODENAME);
gtk_misc_set_padding(GTK_MISC(codename_label), 2, 8);
gtk_widget_show(codename_label);
gtk_box_pack_start(GTK_BOX(info_box), codename_label, FALSE, FALSE, 0);
// Codename label
codename_label = gtk_label_new(NULL);
gtk_label_set_justify(GTK_LABEL(codename_label), GTK_JUSTIFY_CENTER);
gtk_label_set_selectable(GTK_LABEL(codename_label), TRUE);
gtk_label_set_use_markup(GTK_LABEL(codename_label), TRUE);
gtk_label_set_markup(GTK_LABEL(codename_label), CODENAME);
gtk_misc_set_padding(GTK_MISC(codename_label), 2, 8);
gtk_widget_show(codename_label);
gtk_box_pack_start(GTK_BOX(info_box), codename_label, FALSE, FALSE, 0);
// build date label
builddate_label = gtk_label_new(NULL);
gtk_label_set_justify(GTK_LABEL(builddate_label), GTK_JUSTIFY_CENTER);
gtk_label_set_selectable(GTK_LABEL(builddate_label), TRUE);
gtk_label_set_use_markup(GTK_LABEL(builddate_label), TRUE);
g_snprintf(buffer2, sizeof(buffer2), _("(built on %s)"), __DATE__);
g_snprintf(buffer, sizeof(buffer), BUILDDATE, buffer2);
gtk_label_set_markup(GTK_LABEL(builddate_label), buffer);
gtk_misc_set_padding(GTK_MISC(builddate_label), 2, 2);
gtk_widget_show(builddate_label);
gtk_box_pack_start(GTK_BOX(info_box), builddate_label, FALSE, FALSE, 0);
// build date label
builddate_label = gtk_label_new(NULL);
gtk_label_set_justify(GTK_LABEL(builddate_label), GTK_JUSTIFY_CENTER);
gtk_label_set_selectable(GTK_LABEL(builddate_label), TRUE);
gtk_label_set_use_markup(GTK_LABEL(builddate_label), TRUE);
g_snprintf(buffer2, sizeof(buffer2), _("(built on %s)"), __DATE__);
g_snprintf(buffer, sizeof(buffer), BUILDDATE, buffer2);
gtk_label_set_markup(GTK_LABEL(builddate_label), buffer);
gtk_misc_set_padding(GTK_MISC(builddate_label), 2, 2);
gtk_widget_show(builddate_label);
gtk_box_pack_start(GTK_BOX(info_box), builddate_label, FALSE, FALSE, 0);
box = gtk_hbutton_box_new();
url_button = gtk_button_new();
gtk_button_set_relief(GTK_BUTTON(url_button), GTK_RELIEF_NONE);
g_signal_connect(G_OBJECT(url_button), "clicked", G_CALLBACK(homepage_clicked), GEANY_HOMEPAGE);
label = gtk_label_new(NULL);
gtk_label_set_text(GTK_LABEL(label), GEANY_HOMEPAGE);
gtk_widget_show(label);
gtk_container_add(GTK_CONTAINER(url_button), label);
gtk_widget_show(url_button);
gtk_box_pack_start(GTK_BOX(box), url_button, FALSE, FALSE, 0);
gtk_widget_show(box);
gtk_box_pack_start(GTK_BOX(info_box), box, FALSE, FALSE, 10);
box = gtk_hbutton_box_new();
url_button = gtk_button_new();
gtk_button_set_relief(GTK_BUTTON(url_button), GTK_RELIEF_NONE);
g_signal_connect(G_OBJECT(url_button), "clicked", G_CALLBACK(homepage_clicked), GEANY_HOMEPAGE);
label = gtk_label_new(NULL);
gtk_label_set_text(GTK_LABEL(label), GEANY_HOMEPAGE);
gtk_widget_show(label);
gtk_container_add(GTK_CONTAINER(url_button), label);
gtk_widget_show(url_button);
gtk_box_pack_start(GTK_BOX(box), url_button, FALSE, FALSE, 0);
gtk_widget_show(box);
gtk_box_pack_start(GTK_BOX(info_box), box, FALSE, FALSE, 10);
// copyright label
cop_label = gtk_label_new(NULL);
gtk_label_set_justify(GTK_LABEL(cop_label), GTK_JUSTIFY_CENTER);
gtk_label_set_selectable(GTK_LABEL(cop_label), FALSE);
gtk_label_set_use_markup(GTK_LABEL(cop_label), TRUE);
gtk_label_set_markup(GTK_LABEL(cop_label), COPYRIGHT);
gtk_misc_set_padding(GTK_MISC(cop_label), 2, 10);
gtk_widget_show(cop_label);
gtk_box_pack_start(GTK_BOX(info_box), cop_label, FALSE, FALSE, 0);
//gtk_container_add(GTK_CONTAINER(info_box), cop_label);
// copyright label
cop_label = gtk_label_new(NULL);
gtk_label_set_justify(GTK_LABEL(cop_label), GTK_JUSTIFY_CENTER);
gtk_label_set_selectable(GTK_LABEL(cop_label), FALSE);
gtk_label_set_use_markup(GTK_LABEL(cop_label), TRUE);
gtk_label_set_markup(GTK_LABEL(cop_label), COPYRIGHT);
gtk_misc_set_padding(GTK_MISC(cop_label), 2, 10);
gtk_widget_show(cop_label);
gtk_box_pack_start(GTK_BOX(info_box), cop_label, FALSE, FALSE, 0);
//gtk_container_add(GTK_CONTAINER(info_box), cop_label);
label = gtk_label_new(_("Info"));
gtk_widget_show(label);
gtk_widget_show_all(info_box);
gtk_notebook_append_page(GTK_NOTEBOOK(notebook), info_box, label);
label = gtk_label_new(_("Info"));
gtk_widget_show(label);
gtk_widget_show_all(info_box);
gtk_notebook_append_page(GTK_NOTEBOOK(notebook), info_box, label);
// 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);
label = gtk_label_new(_("Credits"));
gtk_widget_show(label);
gtk_notebook_append_page(GTK_NOTEBOOK(notebook), credits_scrollwin, label);
// 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);
label = gtk_label_new(_("Credits"));
gtk_widget_show(label);
gtk_notebook_append_page(GTK_NOTEBOOK(notebook), credits_scrollwin, label);
// 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);
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);
gtk_widget_show(license_textview);
gtk_container_add(GTK_CONTAINER(license_scrollwin), license_textview);
label = gtk_label_new(_("License"));
gtk_widget_show(label);
// 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);
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);
gtk_widget_show(license_textview);
gtk_container_add(GTK_CONTAINER(license_scrollwin), license_textview);
label = gtk_label_new(_("License"));
gtk_widget_show(label);
g_snprintf(buffer, sizeof(buffer), "%s" G_DIR_SEPARATOR_S "GPL-2", app->datadir);
g_snprintf(buffer, sizeof(buffer), "%s" G_DIR_SEPARATOR_S "GPL-2", app->datadir);
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");
}
tb = gtk_text_view_get_buffer(GTK_TEXT_VIEW(license_textview));
gtk_text_buffer_set_text(tb, license_text, strlen(license_text));
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");
}
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);
g_free(credits);
g_free(license_text);
gtk_notebook_append_page(GTK_NOTEBOOK(notebook), license_scrollwin, label);
gtk_notebook_append_page(GTK_NOTEBOOK(notebook), license_scrollwin, label);
gtk_widget_show_all(dialog);
return dialog;
gtk_widget_show_all(dialog);
return dialog;
}
void about_dialog_show(void)
{
GtkWidget *dialog;
GtkWidget *dialog;
dialog = create_dialog();
dialog = create_dialog();
gtk_dialog_run(GTK_DIALOG(dialog));
gtk_widget_destroy(dialog);
gtk_dialog_run(GTK_DIALOG(dialog));
gtk_widget_destroy(dialog);
}
static void header_eventbox_style_set(GtkWidget *widget)
{
static gint recursive = 0;
GtkStyle *style;
static gint recursive = 0;
GtkStyle *style;
if (recursive > 0)
return;
if (recursive > 0)
return;
++recursive;
style = gtk_widget_get_style(widget);
gtk_widget_modify_bg(widget, GTK_STATE_NORMAL, &style->bg[GTK_STATE_SELECTED]);
--recursive;
++recursive;
style = gtk_widget_get_style(widget);
gtk_widget_modify_bg(widget, GTK_STATE_NORMAL, &style->bg[GTK_STATE_SELECTED]);
--recursive;
}
static void header_label_style_set(GtkWidget *widget)
{
static gint recursive = 0;
GtkStyle *style;
static gint recursive = 0;
GtkStyle *style;
if (recursive > 0)
return;
if (recursive > 0)
return;
++recursive;
style = gtk_widget_get_style(widget);
gtk_widget_modify_fg(widget, GTK_STATE_NORMAL, &style->fg[GTK_STATE_SELECTED]);
--recursive;
++recursive;
style = gtk_widget_get_style(widget);
gtk_widget_modify_fg(widget, GTK_STATE_NORMAL, &style->fg[GTK_STATE_SELECTED]);
--recursive;
}
static void homepage_clicked(GtkButton *button, gpointer data)
{
utils_start_browser(data);
utils_start_browser(data);
}