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> 2006-11-14 Nick Treleaven <nick.treleaven@btinternet.com>
* src/templates.c, src/templates.h, src/callbacks.c, src/filetypes.c, * 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 Alexandre Moreira <alexandream(at)gmail(dot)com> - pt_BR
brahmann_ <brahmann(at)mthr(dot)net(dot)ru> - ru_RU brahmann_ <brahmann(at)mthr(dot)net(dot)ru> - ru_RU
Clytie Siddall <clytie(at)riverland(dot)net(dot)au> - vi_VN 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.]) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
# Add the languages which your application supports here. # 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 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> 2006-11-09 Frank Lanitz <frank@frank.uvena.de>
* de.po, Changelog: Fixed some typos (thanks to Enrico for doing this) * de.po, Changelog: Fixed some typos (thanks to Enrico for doing this)

155
po/de.po
View File

@ -7,8 +7,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: geany 0.8\n" "Project-Id-Version: geany 0.8\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-11-08 22:05+0100\n" "POT-Creation-Date: 2006-11-12 20:44+0100\n"
"PO-Revision-Date: 2006-11-08 22:31+0100\n" "PO-Revision-Date: 2006-11-14 18:11+0100\n"
"Last-Translator: Frank Lanitz <frank@frank.uvena.de>\n" "Last-Translator: Frank Lanitz <frank@frank.uvena.de>\n"
"Language-Team: German <frank@frank.uvena.de>\n" "Language-Team: German <frank@frank.uvena.de>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -79,12 +79,12 @@ msgstr ""
"Es könnte zu Problemen bei der Verwendung von Geany kommen.\n" "Es könnte zu Problemen bei der Verwendung von Geany kommen.\n"
"Geany trotzdem starten?" "Geany trotzdem starten?"
#: src/main.c:569 #: src/main.c:571
#, c-format #, c-format
msgid "This is Geany %s." msgid "This is Geany %s."
msgstr "Willkommen zu Geany %s." msgstr "Willkommen zu Geany %s."
#: src/main.c:571 #: src/main.c:573
#, c-format #, c-format
msgid "Configuration directory could not be created (%s)." msgid "Configuration directory could not be created (%s)."
msgstr "Konfigurationsverzeichnis konnte nicht erstellt werden (%s)." msgstr "Konfigurationsverzeichnis konnte nicht erstellt werden (%s)."
@ -442,7 +442,7 @@ msgstr "Entfernt alle gesetzten (Fehler)-Markierungen innerhalb des Dokumentes."
#. build the code #. build the code
#: src/interface.c:804 #: src/interface.c:804
#: src/build.c:702 #: src/build.c:803
msgid "_Build" msgid "_Build"
msgstr "_Erstellen" msgstr "_Erstellen"
@ -530,7 +530,7 @@ msgid "Compile the current file"
msgstr "Kompiliert die aktuelle Datei" msgstr "Kompiliert die aktuelle Datei"
#: src/interface.c:928 #: src/interface.c:928
#: src/build.c:762 #: src/build.c:863
msgid "Run or view the current file" msgid "Run or view the current file"
msgstr "Aktuelle Datei anzeigen oder ausführen" msgstr "Aktuelle Datei anzeigen oder ausführen"
@ -1103,7 +1103,7 @@ msgstr "Make"
#: src/interface.c:3146 #: src/interface.c:3146
#: src/prefs.c:1090 #: src/prefs.c:1090
#: src/vte.c:165 #: src/vte.c:168
msgid "Terminal" msgid "Terminal"
msgstr "Terminal" msgstr "Terminal"
@ -1404,7 +1404,7 @@ msgstr "Geben Sie die Zeile an, zu der Sie springen möchten:"
#. arguments #. arguments
#: src/dialogs.c:592 #: src/dialogs.c:592
#: src/build.c:902 #: src/build.c:1009
msgid "Set Arguments" msgid "Set Arguments"
msgstr "Programm-Parameter angeben" msgstr "Programm-Parameter angeben"
@ -1888,176 +1888,187 @@ msgstr "Warnung"
msgid "Information" msgid "Information"
msgstr "Information" msgstr "Information"
#: src/keyfile.c:69 #: src/keyfile.c:70
#, c-format #, c-format
msgid "%s configuration file, edit as you need" msgid "%s configuration file, edit as you need"
msgstr "%s Konfigurationsdatei. Bei Bedarf anpassen." 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" 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." 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 #: src/msgwindow.c:89
msgid "Status messages" msgid "Status messages"
msgstr "Meldungen" msgstr "Meldungen"
#: src/build.c:110 #: src/build.c:135
#, c-format #, c-format
msgid "Failed to view %s (make sure it is already compiled)" msgid "Failed to view %s (make sure it is already compiled)"
msgstr "Konnte %s nicht anzeigen (die Datei muss bereits erzeugt worden sein)" msgstr "Konnte %s nicht anzeigen (die Datei muss bereits erzeugt worden sein)"
#: src/build.c:143 #: src/build.c:168
#: src/build.c:358 #: src/build.c:551
#: src/build.c:526 #, 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 #: src/search.c:1036
#, c-format #, c-format
msgid "Process failed (%s)" msgid "Process failed (%s)"
msgstr "Prozess fehlgeschlagen (%s)" msgstr "Prozess fehlgeschlagen (%s)"
#: src/build.c:262 #: src/build.c:335
#, c-format #, 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)." msgstr "Ein Fehler ist aufgetreten, konnte Datei %s nicht prüfen (%s)."
#: src/build.c:341 #: src/build.c:414
#, c-format #, c-format
msgid "%s (in directory: %s)" msgid "%s (in directory: %s)"
msgstr "%s (im Verzeichnis: %s)" msgstr "%s (im Verzeichnis: %s)"
#: src/build.c:444 #: src/build.c:527
#, c-format #, c-format
msgid "Failed to execute %s (make sure it is already built)" msgid "Failed to execute %s (make sure it is already built)"
msgstr "Konnte %s nicht ausführen (die Datei muss bereits erzeugt worden sein)" msgstr "Konnte %s nicht ausführen (die Datei muss bereits erzeugt worden sein)"
#: src/build.c:469 #: src/build.c:565
#, 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
#, c-format #, c-format
msgid "Failed to change the working directory to %s" msgid "Failed to change the working directory to %s"
msgstr "Konnte nicht in Arbeitsverzeichnis %s wechseln" msgstr "Konnte nicht in Arbeitsverzeichnis %s wechseln"
#: src/build.c:501 #: src/build.c:705
#, 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
msgid "Compilation failed." msgid "Compilation failed."
msgstr "Kompilierung fehlgeschlagen." msgstr "Kompilierung fehlgeschlagen."
#: src/build.c:621 #: src/build.c:710
msgid "Compilation finished successfully." msgid "Compilation finished successfully."
msgstr "Kompilierung beendet - erfolgreich." msgstr "Kompilierung beendet - erfolgreich."
#. compile the code #. compile the code
#: src/build.c:688 #: src/build.c:789
msgid "_Compile" msgid "_Compile"
msgstr "_Kompilieren" msgstr "_Kompilieren"
#: src/build.c:691 #: src/build.c:792
msgid "Compiles the current file" msgid "Compiles the current file"
msgstr "Kompiliert die aktuelle Datei" msgstr "Kompiliert die aktuelle Datei"
#: src/build.c:706 #: src/build.c:807
msgid "Builds the current file (generate an executable file)" msgid "Builds the current file (generate an executable file)"
msgstr "Erstellt die aktuelle Datei (erzeugt eine ausführbare Datei)" msgstr "Erstellt die aktuelle Datei (erzeugt eine ausführbare Datei)"
#. build the code with make all #. build the code with make all
#: src/build.c:720 #: src/build.c:821
#: src/build.c:840 #: src/build.c:943
msgid "_Make all" msgid "_Make all"
msgstr "_Make all" msgstr "_Make all"
#: src/build.c:723 #: src/build.c:824
#: src/build.c:843 #: src/build.c:946
msgid "Builds the current file with the make tool and the default target" msgid "Builds the current file with the make tool and the default target"
msgstr "Erstellt die aktuelle Datei mit \"make\" und dem Default-Target" msgstr "Erstellt die aktuelle Datei mit \"make\" und dem Default-Target"
#. build the code with make custom #. build the code with make custom
#: src/build.c:731 #: src/build.c:832
#: src/build.c:851 #: src/build.c:954
msgid "Make custom _target" msgid "Make custom _target"
msgstr "Make eigenes _Target" msgstr "Make eigenes _Target"
#: src/build.c:735 #: src/build.c:836
#: src/build.c:855 #: src/build.c:958
msgid "Builds the current file with the make tool and the specified target" msgid "Builds the current file with the make tool and the specified target"
msgstr "Erstellt die aktuelle Datei mit \"make\" und dem angegebenem Target" msgstr "Erstellt die aktuelle Datei mit \"make\" und dem angegebenem Target"
#. build the code with make object #. build the code with make object
#: src/build.c:742 #: src/build.c:843
msgid "Make _object" msgid "Make _object"
msgstr "Make _Objekt-Datei" msgstr "Make _Objekt-Datei"
#: src/build.c:746 #: src/build.c:847
msgid "Compiles the current file using the make tool" msgid "Compiles the current file using the make tool"
msgstr "Kompiliert die aktuelle Datei mittels make " msgstr "Kompiliert die aktuelle Datei mittels make "
#: src/build.c:777 #: src/build.c:878
msgid "_Set Includes and Arguments" msgid "_Set Includes and Arguments"
msgstr "_Programm-Parameter angeben" 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" 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" msgstr "Include-Dateien und Bibliotheken-Pfade sowie Programmparameter festlegen"
#. DVI #. DVI
#: src/build.c:807 #: src/build.c:908
msgid "LaTeX -> DVI" msgid "LaTeX -> DVI"
msgstr "LaTeX -> DVI" msgstr "LaTeX -> DVI"
#: src/build.c:810 #: src/build.c:911
msgid "Compiles the current file into a DVI file" msgid "Compiles the current file into a DVI file"
msgstr "Kompiliert die aktuelle Datei als DVI-Datei." msgstr "Kompiliert die aktuelle Datei als DVI-Datei."
#. PDF #. PDF
#: src/build.c:820 #: src/build.c:922
msgid "LaTeX -> PDF" msgid "LaTeX -> PDF"
msgstr "LaTeX -> PDF" msgstr "LaTeX -> PDF"
#: src/build.c:823 #: src/build.c:925
msgid "Compiles the current file into a PDF file" msgid "Compiles the current file into a PDF file"
msgstr "Kompiliert die aktuelle Datei als PDF-Datei." msgstr "Kompiliert die aktuelle Datei als PDF-Datei."
#. DVI view #. DVI view
#: src/build.c:870 #: src/build.c:973
msgid "View DVI file" msgid "View DVI file"
msgstr "DVI-Datei anzeigen" msgstr "DVI-Datei anzeigen"
#: src/build.c:876 #: src/build.c:980
#: src/build.c:889 #: src/build.c:995
msgid "Compiles and view the current file" msgid "Compiles and view the current file"
msgstr "Kompiliert und zeigt die aktuelle Datei an." msgstr "Kompiliert und zeigt die aktuelle Datei an."
#. PDF view #. PDF view
#: src/build.c:883 #: src/build.c:989
msgid "View PDF file" msgid "View PDF file"
msgstr "PDF-Datei anzeigen" msgstr "PDF-Datei anzeigen"
#: src/build.c:909 #: src/build.c:1016
msgid "Sets the program paths and arguments" msgid "Sets the program paths and arguments"
msgstr "Programm-Parameter angeben" msgstr "Programm-Parameter angeben"
#: src/build.c:1098 #: src/build.c:1190
#: src/keybindings.c:172 #: src/keybindings.c:172
msgid "Make custom target" msgid "Make custom target"
msgstr "Make mit eigenem 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." 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." 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" msgid "Failed to execute the view program"
msgstr "Konnte das Anzeigeprogramm nicht ausführen." msgstr "Konnte das Anzeigeprogramm nicht ausführen."
#: src/build.c:1153 #: src/build.c:1248
msgid "Failed to execute the terminal program" msgid "Failed to execute the terminal program"
msgstr "Konnte das Terminal-Programm nicht ausführen." 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 #: src/prefs.c:298
msgid "Action" msgid "Action"
msgstr "Aktion" msgstr "Aktion"
@ -2164,53 +2175,53 @@ msgstr "Pfad der aktuellen Datei setzen"
msgid "Whether to execute \"cd $path\" when you switch between opened files." 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." 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" msgid "About Geany"
msgstr "Über Geany" msgstr "Über Geany"
#: src/about.c:159 #: src/about.c:161
msgid "A fast and lightweight IDE" msgid "A fast and lightweight IDE"
msgstr "Eine kleine und schnelle Entwicklungsumgebung" msgstr "Eine kleine und schnelle Entwicklungsumgebung"
#: src/about.c:180 #: src/about.c:182
#, c-format #, c-format
msgid "(built on %s)" msgid "(built on %s)"
msgstr "(kompiliert am %s)" msgstr "(kompiliert am %s)"
#. gtk_container_add(GTK_CONTAINER(info_box), cop_label); #. gtk_container_add(GTK_CONTAINER(info_box), cop_label);
#: src/about.c:211 #: src/about.c:213
msgid "Info" msgid "Info"
msgstr "Info" msgstr "Info"
#: src/about.c:223 #: src/about.c:225
msgid "Developers" msgid "Developers"
msgstr "Entwickler" msgstr "Entwickler"
#: src/about.c:223 #: src/about.c:225
msgid "Maintainer" msgid "Maintainer"
msgstr "Hauptentwickler" msgstr "Hauptentwickler"
#: src/about.c:223 #: src/about.c:225
msgid "developer" msgid "developer"
msgstr "Entwickler" msgstr "Entwickler"
#: src/about.c:224 #: src/about.c:226
msgid "translation maintainer" msgid "translation maintainer"
msgstr "Übersetzungskoordinator" msgstr "Übersetzungskoordinator"
#: src/about.c:224 #: src/about.c:226
msgid "Translators" msgid "Translators"
msgstr "Übersetzer" msgstr "Übersetzer"
#: src/about.c:225 #: src/about.c:227
msgid "language" msgid "language"
msgstr "Sprache" msgstr "Sprache"
#: src/about.c:231 #: src/about.c:233
msgid "Credits" msgid "Credits"
msgstr "Credits" msgstr "Credits"
#: src/about.c:244 #: src/about.c:246
msgid "License" msgid "License"
msgstr "Lizenz" msgstr "Lizenz"
@ -2523,7 +2534,7 @@ msgstr "Seitenleiste verbergen"
msgid "Reload" msgid "Reload"
msgstr "Neu laden" msgstr "Neu laden"
#: src/vte.c:366 #: src/vte.c:369
msgid "_Input Methods" msgid "_Input Methods"
msgstr "_Eingabemethoden" 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\ brahmann_ - <language> ru_RU\n\t\
&lt;brahmann@mthr.net.ru&gt;\n\n\t\ &lt;brahmann@mthr.net.ru&gt;\n\n\t\
Clytie Siddall - <language> vi_VN\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_eventbox_style_set(GtkWidget *widget);
static void header_label_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) static GtkWidget *create_dialog(void)
{ {
GtkWidget *dialog; GtkWidget *dialog;
GtkWidget *header_image; GtkWidget *header_image;
GtkWidget *header_label; GtkWidget *header_label;
GtkWidget *label_info; GtkWidget *label_info;
GtkWidget *codename_label; GtkWidget *codename_label;
GtkWidget *builddate_label; GtkWidget *builddate_label;
GtkWidget *url_button; GtkWidget *url_button;
GtkWidget *cop_label; GtkWidget *cop_label;
GtkWidget *label; GtkWidget *label;
GtkWidget *credits_label; GtkWidget *credits_label;
GtkWidget *license_textview; GtkWidget *license_textview;
GtkWidget *notebook; GtkWidget *notebook;
GtkWidget *box; GtkWidget *box;
GtkWidget *credits_scrollwin; GtkWidget *credits_scrollwin;
GtkWidget *license_scrollwin; GtkWidget *license_scrollwin;
GtkWidget *info_box; GtkWidget *info_box;
GtkWidget *button; GtkWidget *button;
GtkWidget *header_hbox; GtkWidget *header_hbox;
GtkWidget *header_eventbox; GtkWidget *header_eventbox;
GdkPixbuf *icon; GdkPixbuf *icon;
GtkTextBuffer* tb; GtkTextBuffer* tb;
gchar *license_text = NULL; gchar *license_text = NULL;
gchar buffer[512]; gchar buffer[512];
gchar buffer2[128]; gchar buffer2[128];
gchar *credits; gchar *credits;
dialog = gtk_dialog_new(); dialog = gtk_dialog_new();
//configure dialog //configure dialog
gtk_window_set_transient_for(GTK_WINDOW(dialog), GTK_WINDOW(app->window)); 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_position(GTK_WINDOW(dialog), GTK_WIN_POS_CENTER_ON_PARENT);
gtk_window_set_title(GTK_WINDOW(dialog), _("About Geany")); gtk_window_set_title(GTK_WINDOW(dialog), _("About Geany"));
button = gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE); 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_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_CLOSE);
gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE); 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); g_signal_connect(G_OBJECT(dialog), "key-press-event", G_CALLBACK(gb_on_key_pressed), NULL);
// create header // create header
header_eventbox = gtk_event_box_new(); header_eventbox = gtk_event_box_new();
gtk_widget_show(header_eventbox); gtk_widget_show(header_eventbox);
header_hbox = gtk_hbox_new(FALSE, 12); header_hbox = gtk_hbox_new(FALSE, 12);
gtk_container_set_border_width(GTK_CONTAINER(header_hbox), 4); gtk_container_set_border_width(GTK_CONTAINER(header_hbox), 4);
gtk_widget_show(header_hbox); gtk_widget_show(header_hbox);
gtk_container_add(GTK_CONTAINER(header_eventbox), header_hbox); gtk_container_add(GTK_CONTAINER(header_eventbox), header_hbox);
header_image = gtk_image_new(); header_image = gtk_image_new();
gtk_box_pack_start(GTK_BOX(header_hbox), header_image, FALSE,FALSE,0); gtk_box_pack_start(GTK_BOX(header_hbox), header_image, FALSE,FALSE,0);
header_label = gtk_label_new(NULL); header_label = gtk_label_new(NULL);
gtk_label_set_use_markup(GTK_LABEL(header_label), TRUE); gtk_label_set_use_markup(GTK_LABEL(header_label), TRUE);
// print the subversion revision if it is available // print the subversion revision if it is available
g_snprintf(buffer, sizeof(buffer), HEADER, (utils_str_equal(REVISION, "-1")) ? "" : " (" REVISION ")"); g_snprintf(buffer, sizeof(buffer), HEADER, (utils_str_equal(REVISION, "-1")) ? "" : " (" REVISION ")");
gtk_label_set_markup(GTK_LABEL(header_label), buffer); gtk_label_set_markup(GTK_LABEL(header_label), buffer);
gtk_widget_show(header_label); gtk_widget_show(header_label);
gtk_box_pack_start(GTK_BOX(header_hbox), header_label, FALSE,FALSE,0); gtk_box_pack_start(GTK_BOX(header_hbox), header_label, FALSE,FALSE,0);
header_eventbox_style_set(header_eventbox); header_eventbox_style_set(header_eventbox);
header_label_style_set(header_label); 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_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); 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); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), header_eventbox, FALSE, FALSE, 0);
// set image // set image
icon = ui_new_pixbuf_from_inline(GEANY_IMAGE_LOGO, FALSE); icon = ui_new_pixbuf_from_inline(GEANY_IMAGE_LOGO, FALSE);
gtk_image_set_from_pixbuf(GTK_IMAGE(header_image), icon); gtk_image_set_from_pixbuf(GTK_IMAGE(header_image), icon);
gtk_window_set_icon(GTK_WINDOW(dialog), icon); gtk_window_set_icon(GTK_WINDOW(dialog), icon);
// create notebook // create notebook
notebook = gtk_notebook_new(); notebook = gtk_notebook_new();
gtk_widget_show(notebook); gtk_widget_show(notebook);
gtk_container_set_border_width(GTK_CONTAINER(notebook), 2); gtk_container_set_border_width(GTK_CONTAINER(notebook), 2);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), notebook, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), notebook, TRUE, TRUE, 0);
// create "Info" tab // create "Info" tab
info_box = gtk_vbox_new(FALSE, 0); info_box = gtk_vbox_new(FALSE, 0);
//gtk_container_set_border_width(GTK_CONTAINER(info_box), 6); //gtk_container_set_border_width(GTK_CONTAINER(info_box), 6);
gtk_widget_show(info_box); gtk_widget_show(info_box);
label_info = gtk_label_new(NULL); label_info = gtk_label_new(NULL);
gtk_label_set_justify(GTK_LABEL(label_info), GTK_JUSTIFY_CENTER); gtk_label_set_justify(GTK_LABEL(label_info), GTK_JUSTIFY_CENTER);
gtk_label_set_selectable(GTK_LABEL(label_info), TRUE); gtk_label_set_selectable(GTK_LABEL(label_info), TRUE);
gtk_label_set_use_markup(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")); g_snprintf(buffer, sizeof(buffer), INFO, _("A fast and lightweight IDE"));
gtk_label_set_markup(GTK_LABEL(label_info), buffer); gtk_label_set_markup(GTK_LABEL(label_info), buffer);
gtk_misc_set_padding(GTK_MISC(label_info), 2, 11); gtk_misc_set_padding(GTK_MISC(label_info), 2, 11);
gtk_widget_show(label_info); gtk_widget_show(label_info);
gtk_box_pack_start(GTK_BOX(info_box), label_info, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(info_box), label_info, FALSE, FALSE, 0);
// Codename label // Codename label
codename_label = gtk_label_new(NULL); codename_label = gtk_label_new(NULL);
gtk_label_set_justify(GTK_LABEL(codename_label), GTK_JUSTIFY_CENTER); gtk_label_set_justify(GTK_LABEL(codename_label), GTK_JUSTIFY_CENTER);
gtk_label_set_selectable(GTK_LABEL(codename_label), TRUE); gtk_label_set_selectable(GTK_LABEL(codename_label), TRUE);
gtk_label_set_use_markup(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_label_set_markup(GTK_LABEL(codename_label), CODENAME);
gtk_misc_set_padding(GTK_MISC(codename_label), 2, 8); gtk_misc_set_padding(GTK_MISC(codename_label), 2, 8);
gtk_widget_show(codename_label); gtk_widget_show(codename_label);
gtk_box_pack_start(GTK_BOX(info_box), codename_label, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(info_box), codename_label, FALSE, FALSE, 0);
// build date label // build date label
builddate_label = gtk_label_new(NULL); builddate_label = gtk_label_new(NULL);
gtk_label_set_justify(GTK_LABEL(builddate_label), GTK_JUSTIFY_CENTER); gtk_label_set_justify(GTK_LABEL(builddate_label), GTK_JUSTIFY_CENTER);
gtk_label_set_selectable(GTK_LABEL(builddate_label), TRUE); gtk_label_set_selectable(GTK_LABEL(builddate_label), TRUE);
gtk_label_set_use_markup(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(buffer2, sizeof(buffer2), _("(built on %s)"), __DATE__);
g_snprintf(buffer, sizeof(buffer), BUILDDATE, buffer2); g_snprintf(buffer, sizeof(buffer), BUILDDATE, buffer2);
gtk_label_set_markup(GTK_LABEL(builddate_label), buffer); gtk_label_set_markup(GTK_LABEL(builddate_label), buffer);
gtk_misc_set_padding(GTK_MISC(builddate_label), 2, 2); gtk_misc_set_padding(GTK_MISC(builddate_label), 2, 2);
gtk_widget_show(builddate_label); gtk_widget_show(builddate_label);
gtk_box_pack_start(GTK_BOX(info_box), builddate_label, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(info_box), builddate_label, FALSE, FALSE, 0);
box = gtk_hbutton_box_new(); box = gtk_hbutton_box_new();
url_button = gtk_button_new(); url_button = gtk_button_new();
gtk_button_set_relief(GTK_BUTTON(url_button), GTK_RELIEF_NONE); 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); g_signal_connect(G_OBJECT(url_button), "clicked", G_CALLBACK(homepage_clicked), GEANY_HOMEPAGE);
label = gtk_label_new(NULL); label = gtk_label_new(NULL);
gtk_label_set_text(GTK_LABEL(label), GEANY_HOMEPAGE); gtk_label_set_text(GTK_LABEL(label), GEANY_HOMEPAGE);
gtk_widget_show(label); gtk_widget_show(label);
gtk_container_add(GTK_CONTAINER(url_button), label); gtk_container_add(GTK_CONTAINER(url_button), label);
gtk_widget_show(url_button); gtk_widget_show(url_button);
gtk_box_pack_start(GTK_BOX(box), url_button, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(box), url_button, FALSE, FALSE, 0);
gtk_widget_show(box); gtk_widget_show(box);
gtk_box_pack_start(GTK_BOX(info_box), box, FALSE, FALSE, 10); gtk_box_pack_start(GTK_BOX(info_box), box, FALSE, FALSE, 10);
// copyright label // copyright label
cop_label = gtk_label_new(NULL); cop_label = gtk_label_new(NULL);
gtk_label_set_justify(GTK_LABEL(cop_label), GTK_JUSTIFY_CENTER); gtk_label_set_justify(GTK_LABEL(cop_label), GTK_JUSTIFY_CENTER);
gtk_label_set_selectable(GTK_LABEL(cop_label), FALSE); gtk_label_set_selectable(GTK_LABEL(cop_label), FALSE);
gtk_label_set_use_markup(GTK_LABEL(cop_label), TRUE); gtk_label_set_use_markup(GTK_LABEL(cop_label), TRUE);
gtk_label_set_markup(GTK_LABEL(cop_label), COPYRIGHT); gtk_label_set_markup(GTK_LABEL(cop_label), COPYRIGHT);
gtk_misc_set_padding(GTK_MISC(cop_label), 2, 10); gtk_misc_set_padding(GTK_MISC(cop_label), 2, 10);
gtk_widget_show(cop_label); gtk_widget_show(cop_label);
gtk_box_pack_start(GTK_BOX(info_box), cop_label, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(info_box), cop_label, FALSE, FALSE, 0);
//gtk_container_add(GTK_CONTAINER(info_box), cop_label); //gtk_container_add(GTK_CONTAINER(info_box), cop_label);
label = gtk_label_new(_("Info")); label = gtk_label_new(_("Info"));
gtk_widget_show(label); gtk_widget_show(label);
gtk_widget_show_all(info_box); gtk_widget_show_all(info_box);
gtk_notebook_append_page(GTK_NOTEBOOK(notebook), info_box, label); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), info_box, label);
// create "Credits" tab // create "Credits" tab
credits_scrollwin = gtk_scrolled_window_new(NULL, NULL); credits_scrollwin = gtk_scrolled_window_new(NULL, NULL);
gtk_container_set_border_width(GTK_CONTAINER(credits_scrollwin), 6); 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); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(credits_scrollwin), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
credits_label = gtk_label_new(NULL); credits_label = gtk_label_new(NULL);
gtk_label_set_selectable(GTK_LABEL(credits_label), TRUE); gtk_label_set_selectable(GTK_LABEL(credits_label), TRUE);
gtk_label_set_use_markup(GTK_LABEL(credits_label), TRUE); gtk_label_set_use_markup(GTK_LABEL(credits_label), TRUE);
credits = g_strdup_printf(CREDITS, _("Developers"), _("Maintainer"), _("developer"), credits = g_strdup_printf(CREDITS, _("Developers"), _("Maintainer"), _("developer"),
_("translation maintainer"), _("Translators")); _("translation maintainer"), _("Translators"));
credits = utils_str_replace(credits, "<language>", _("language")); credits = utils_str_replace(credits, "<language>", _("language"));
gtk_label_set_markup(GTK_LABEL(credits_label), credits); gtk_label_set_markup(GTK_LABEL(credits_label), credits);
gtk_misc_set_alignment(GTK_MISC(credits_label), 0.0, 0.0); gtk_misc_set_alignment(GTK_MISC(credits_label), 0.0, 0.0);
gtk_widget_show(credits_label); gtk_widget_show(credits_label);
gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(credits_scrollwin), 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_viewport_set_shadow_type(GTK_VIEWPORT(gtk_widget_get_parent(credits_label)), GTK_SHADOW_NONE);
label = gtk_label_new(_("Credits")); label = gtk_label_new(_("Credits"));
gtk_widget_show(label); gtk_widget_show(label);
gtk_notebook_append_page(GTK_NOTEBOOK(notebook), credits_scrollwin, label); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), credits_scrollwin, label);
// create "License" tab // create "License" tab
license_scrollwin = gtk_scrolled_window_new(NULL, NULL); license_scrollwin = gtk_scrolled_window_new(NULL, NULL);
gtk_container_set_border_width(GTK_CONTAINER(license_scrollwin), 6); 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(); license_textview = gtk_text_view_new();
gtk_text_view_set_editable(GTK_TEXT_VIEW(license_textview), FALSE); gtk_text_view_set_editable(GTK_TEXT_VIEW(license_textview), FALSE);
gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(license_textview), FALSE); gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(license_textview), FALSE);
gtk_widget_show(license_textview); gtk_widget_show(license_textview);
gtk_container_add(GTK_CONTAINER(license_scrollwin), license_textview); gtk_container_add(GTK_CONTAINER(license_scrollwin), license_textview);
label = gtk_label_new(_("License")); label = gtk_label_new(_("License"));
gtk_widget_show(label); 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); g_file_get_contents(buffer, &license_text, NULL, NULL);
if (license_text == 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 google for GPLv2");
} }
tb = gtk_text_view_get_buffer(GTK_TEXT_VIEW(license_textview)); tb = gtk_text_view_get_buffer(GTK_TEXT_VIEW(license_textview));
gtk_text_buffer_set_text(tb, license_text, strlen(license_text)); gtk_text_buffer_set_text(tb, license_text, strlen(license_text));
g_free(credits); g_free(credits);
g_free(license_text); 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); gtk_widget_show_all(dialog);
return dialog; return dialog;
} }
void about_dialog_show(void) void about_dialog_show(void)
{ {
GtkWidget *dialog; GtkWidget *dialog;
dialog = create_dialog(); dialog = create_dialog();
gtk_dialog_run(GTK_DIALOG(dialog)); gtk_dialog_run(GTK_DIALOG(dialog));
gtk_widget_destroy(dialog); gtk_widget_destroy(dialog);
} }
static void header_eventbox_style_set(GtkWidget *widget) static void header_eventbox_style_set(GtkWidget *widget)
{ {
static gint recursive = 0; static gint recursive = 0;
GtkStyle *style; GtkStyle *style;
if (recursive > 0) if (recursive > 0)
return; return;
++recursive; ++recursive;
style = gtk_widget_get_style(widget); style = gtk_widget_get_style(widget);
gtk_widget_modify_bg(widget, GTK_STATE_NORMAL, &style->bg[GTK_STATE_SELECTED]); gtk_widget_modify_bg(widget, GTK_STATE_NORMAL, &style->bg[GTK_STATE_SELECTED]);
--recursive; --recursive;
} }
static void header_label_style_set(GtkWidget *widget) static void header_label_style_set(GtkWidget *widget)
{ {
static gint recursive = 0; static gint recursive = 0;
GtkStyle *style; GtkStyle *style;
if (recursive > 0) if (recursive > 0)
return; return;
++recursive; ++recursive;
style = gtk_widget_get_style(widget); style = gtk_widget_get_style(widget);
gtk_widget_modify_fg(widget, GTK_STATE_NORMAL, &style->fg[GTK_STATE_SELECTED]); gtk_widget_modify_fg(widget, GTK_STATE_NORMAL, &style->fg[GTK_STATE_SELECTED]);
--recursive; --recursive;
} }
static void homepage_clicked(GtkButton *button, gpointer data) static void homepage_clicked(GtkButton *button, gpointer data)
{ {
utils_start_browser(data); utils_start_browser(data);
} }