From f86fb13890c84f7e2ac979a31554cd13876cead5 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Fri, 15 Apr 2011 23:54:52 +0000 Subject: [PATCH] Preparing migration to Gtk+ 3.0 --- po/de.po | 34 +++++++++++++++++----------------- po/es.po | 34 +++++++++++++++++----------------- po/fr.po | 34 +++++++++++++++++----------------- po/it.po | 34 +++++++++++++++++----------------- src/editor.c | 49 +++++++++++++++++++++++++++++++------------------ 5 files changed, 99 insertions(+), 86 deletions(-) diff --git a/po/de.po b/po/de.po index 4e93a50..932600d 100644 --- a/po/de.po +++ b/po/de.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Editor 0.1.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-02-02 06:43+0100\n" +"POT-Creation-Date: 2011-04-16 01:54+0200\n" "PO-Revision-Date: 2010-04-07 22:05+0200\n" "Last-Translator: Pierre Pronchery \n" "Language-Team: German\n" @@ -152,8 +152,8 @@ msgstr "" msgid "Error" msgstr "Fehler" -#: ../src/editor.c:465 ../src/editor.c:475 ../src/editor.c:613 -#: ../src/editor.c:627 ../src/editor.c:767 ../src/editor.c:772 +#: ../src/editor.c:465 ../src/editor.c:475 ../src/editor.c:617 +#: ../src/editor.c:631 ../src/editor.c:771 ../src/editor.c:776 msgid "Warning" msgstr "Achtung" @@ -167,61 +167,61 @@ msgstr "" msgid "Find text" msgstr "" -#: ../src/editor.c:540 +#: ../src/editor.c:544 msgid "Text:" msgstr "Text:" -#: ../src/editor.c:547 +#: ../src/editor.c:551 msgid "Case-sensitive" msgstr "" -#: ../src/editor.c:549 +#: ../src/editor.c:553 msgid "Wrap" msgstr "" -#: ../src/editor.c:572 +#: ../src/editor.c:576 msgid "Text not found" msgstr "" -#: ../src/editor.c:617 +#: ../src/editor.c:621 msgid "" "There are unsaved changes.\n" "Are you sure you want to discard them?" msgstr "" -#: ../src/editor.c:624 +#: ../src/editor.c:628 msgid "Discard" msgstr "" -#: ../src/editor.c:683 +#: ../src/editor.c:687 msgid "Open file..." msgstr "Offnen..." -#: ../src/editor.c:743 +#: ../src/editor.c:747 msgid "Partial write" msgstr "" -#: ../src/editor.c:771 +#: ../src/editor.c:775 msgid "This file already exists. Overwrite?" msgstr "" -#: ../src/editor.c:780 +#: ../src/editor.c:784 msgid "Allocation error" msgstr "" -#: ../src/editor.c:795 +#: ../src/editor.c:799 msgid "Save as..." msgstr "" -#: ../src/editor.c:852 +#: ../src/editor.c:856 msgid "Text editor preferences" msgstr "Text Editor Einstellungen" -#: ../src/editor.c:869 +#: ../src/editor.c:873 msgid "Font:" msgstr "" -#: ../src/editor.c:879 +#: ../src/editor.c:883 msgid "Wrap mode:" msgstr "" diff --git a/po/es.po b/po/es.po index ead89d9..1f75754 100644 --- a/po/es.po +++ b/po/es.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Editor 0.1.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-02-02 06:43+0100\n" +"POT-Creation-Date: 2011-04-16 01:54+0200\n" "PO-Revision-Date: 2010-04-07 22:07+0200\n" "Last-Translator: Pierre Pronchery \n" "Language-Team: Spanish\n" @@ -152,8 +152,8 @@ msgstr "" msgid "Error" msgstr "" -#: ../src/editor.c:465 ../src/editor.c:475 ../src/editor.c:613 -#: ../src/editor.c:627 ../src/editor.c:767 ../src/editor.c:772 +#: ../src/editor.c:465 ../src/editor.c:475 ../src/editor.c:617 +#: ../src/editor.c:631 ../src/editor.c:771 ../src/editor.c:776 msgid "Warning" msgstr "" @@ -167,61 +167,61 @@ msgstr "" msgid "Find text" msgstr "" -#: ../src/editor.c:540 +#: ../src/editor.c:544 msgid "Text:" msgstr "" -#: ../src/editor.c:547 +#: ../src/editor.c:551 msgid "Case-sensitive" msgstr "" -#: ../src/editor.c:549 +#: ../src/editor.c:553 msgid "Wrap" msgstr "" -#: ../src/editor.c:572 +#: ../src/editor.c:576 msgid "Text not found" msgstr "" -#: ../src/editor.c:617 +#: ../src/editor.c:621 msgid "" "There are unsaved changes.\n" "Are you sure you want to discard them?" msgstr "" -#: ../src/editor.c:624 +#: ../src/editor.c:628 msgid "Discard" msgstr "" -#: ../src/editor.c:683 +#: ../src/editor.c:687 msgid "Open file..." msgstr "" -#: ../src/editor.c:743 +#: ../src/editor.c:747 msgid "Partial write" msgstr "" -#: ../src/editor.c:771 +#: ../src/editor.c:775 msgid "This file already exists. Overwrite?" msgstr "" -#: ../src/editor.c:780 +#: ../src/editor.c:784 msgid "Allocation error" msgstr "" -#: ../src/editor.c:795 +#: ../src/editor.c:799 msgid "Save as..." msgstr "" -#: ../src/editor.c:852 +#: ../src/editor.c:856 msgid "Text editor preferences" msgstr "" -#: ../src/editor.c:869 +#: ../src/editor.c:873 msgid "Font:" msgstr "" -#: ../src/editor.c:879 +#: ../src/editor.c:883 msgid "Wrap mode:" msgstr "" diff --git a/po/fr.po b/po/fr.po index 4b830e3..5d67480 100644 --- a/po/fr.po +++ b/po/fr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Editor 0.1.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-02-02 06:43+0100\n" +"POT-Creation-Date: 2011-04-16 01:54+0200\n" "PO-Revision-Date: 2010-04-11 12:32+0200\n" "Last-Translator: Calimero \n" "Language-Team: French\n" @@ -152,8 +152,8 @@ msgstr "Erreur lors de la sauvegarde de la configuration" msgid "Error" msgstr "Erreur" -#: ../src/editor.c:465 ../src/editor.c:475 ../src/editor.c:613 -#: ../src/editor.c:627 ../src/editor.c:767 ../src/editor.c:772 +#: ../src/editor.c:465 ../src/editor.c:475 ../src/editor.c:617 +#: ../src/editor.c:631 ../src/editor.c:771 ../src/editor.c:776 msgid "Warning" msgstr "Avertissement" @@ -169,23 +169,23 @@ msgstr "" msgid "Find text" msgstr "Rechercher" -#: ../src/editor.c:540 +#: ../src/editor.c:544 msgid "Text:" msgstr "Texte :" -#: ../src/editor.c:547 +#: ../src/editor.c:551 msgid "Case-sensitive" msgstr "Sensible à la casse" -#: ../src/editor.c:549 +#: ../src/editor.c:553 msgid "Wrap" msgstr "Boucler" -#: ../src/editor.c:572 +#: ../src/editor.c:576 msgid "Text not found" msgstr "Texte non trouvé" -#: ../src/editor.c:617 +#: ../src/editor.c:621 msgid "" "There are unsaved changes.\n" "Are you sure you want to discard them?" @@ -193,39 +193,39 @@ msgstr "" "Il y a des changements non enregistrés.\n" "Êtes-vous sûr de vouloir les annuler ?" -#: ../src/editor.c:624 +#: ../src/editor.c:628 msgid "Discard" msgstr "Annuler" -#: ../src/editor.c:683 +#: ../src/editor.c:687 msgid "Open file..." msgstr "Ouvrir un fichier..." -#: ../src/editor.c:743 +#: ../src/editor.c:747 msgid "Partial write" msgstr "Écriture partielle" -#: ../src/editor.c:771 +#: ../src/editor.c:775 msgid "This file already exists. Overwrite?" msgstr "Le fichier existe déjà. L'écraser ?" -#: ../src/editor.c:780 +#: ../src/editor.c:784 msgid "Allocation error" msgstr "Erreur d'allocation" -#: ../src/editor.c:795 +#: ../src/editor.c:799 msgid "Save as..." msgstr "Enregistrer sous..." -#: ../src/editor.c:852 +#: ../src/editor.c:856 msgid "Text editor preferences" msgstr "Préférences de l'éditeur de texte" -#: ../src/editor.c:869 +#: ../src/editor.c:873 msgid "Font:" msgstr "Police :" -#: ../src/editor.c:879 +#: ../src/editor.c:883 msgid "Wrap mode:" msgstr "Retour à la ligne :" diff --git a/po/it.po b/po/it.po index 4c1d5d0..6bfeac3 100644 --- a/po/it.po +++ b/po/it.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Editor 0.1.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-02-02 06:43+0100\n" +"POT-Creation-Date: 2011-04-16 01:54+0200\n" "PO-Revision-Date: 2010-04-09 16:43+0200\n" "Last-Translator: Pierre Pronchery \n" "Language-Team: Italian\n" @@ -153,8 +153,8 @@ msgstr "" msgid "Error" msgstr "" -#: ../src/editor.c:465 ../src/editor.c:475 ../src/editor.c:613 -#: ../src/editor.c:627 ../src/editor.c:767 ../src/editor.c:772 +#: ../src/editor.c:465 ../src/editor.c:475 ../src/editor.c:617 +#: ../src/editor.c:631 ../src/editor.c:771 ../src/editor.c:776 msgid "Warning" msgstr "" @@ -168,61 +168,61 @@ msgstr "" msgid "Find text" msgstr "" -#: ../src/editor.c:540 +#: ../src/editor.c:544 msgid "Text:" msgstr "" -#: ../src/editor.c:547 +#: ../src/editor.c:551 msgid "Case-sensitive" msgstr "" -#: ../src/editor.c:549 +#: ../src/editor.c:553 msgid "Wrap" msgstr "" -#: ../src/editor.c:572 +#: ../src/editor.c:576 msgid "Text not found" msgstr "" -#: ../src/editor.c:617 +#: ../src/editor.c:621 msgid "" "There are unsaved changes.\n" "Are you sure you want to discard them?" msgstr "" -#: ../src/editor.c:624 +#: ../src/editor.c:628 msgid "Discard" msgstr "" -#: ../src/editor.c:683 +#: ../src/editor.c:687 msgid "Open file..." msgstr "" -#: ../src/editor.c:743 +#: ../src/editor.c:747 msgid "Partial write" msgstr "" -#: ../src/editor.c:771 +#: ../src/editor.c:775 msgid "This file already exists. Overwrite?" msgstr "" -#: ../src/editor.c:780 +#: ../src/editor.c:784 msgid "Allocation error" msgstr "" -#: ../src/editor.c:795 +#: ../src/editor.c:799 msgid "Save as..." msgstr "" -#: ../src/editor.c:852 +#: ../src/editor.c:856 msgid "Text editor preferences" msgstr "" -#: ../src/editor.c:869 +#: ../src/editor.c:873 msgid "Font:" msgstr "" -#: ../src/editor.c:879 +#: ../src/editor.c:883 msgid "Wrap mode:" msgstr "" diff --git a/src/editor.c b/src/editor.c index f55ad22..98a3a0e 100644 --- a/src/editor.c +++ b/src/editor.c @@ -75,12 +75,12 @@ static char const * _authors[] = #ifdef EMBEDDED static DesktopAccel _editor_accel[] = { - { G_CALLBACK(on_close), GDK_CONTROL_MASK, GDK_w }, - { G_CALLBACK(on_new), GDK_CONTROL_MASK, GDK_n }, - { G_CALLBACK(on_open), GDK_CONTROL_MASK, GDK_o }, - { G_CALLBACK(on_preferences), GDK_CONTROL_MASK, GDK_p }, - { G_CALLBACK(on_save), GDK_CONTROL_MASK, GDK_s }, - { G_CALLBACK(on_save_as), GDK_CONTROL_MASK, GDK_S }, + { G_CALLBACK(on_close), GDK_CONTROL_MASK, GDK_KEY_w }, + { G_CALLBACK(on_new), GDK_CONTROL_MASK, GDK_KEY_n }, + { G_CALLBACK(on_open), GDK_CONTROL_MASK, GDK_KEY_o }, + { G_CALLBACK(on_preferences), GDK_CONTROL_MASK, GDK_KEY_p }, + { G_CALLBACK(on_save), GDK_CONTROL_MASK, GDK_KEY_s }, + { G_CALLBACK(on_save_as), GDK_CONTROL_MASK, GDK_KEY_S }, { NULL, 0, 0 } }; #endif @@ -89,14 +89,14 @@ static DesktopAccel _editor_accel[] = static DesktopMenu _editor_menu_file[] = { { N_("_New"), G_CALLBACK(on_file_new), GTK_STOCK_NEW, GDK_CONTROL_MASK, - GDK_n }, + GDK_KEY_n }, { N_("_Open"), G_CALLBACK(on_file_open), GTK_STOCK_OPEN, - GDK_CONTROL_MASK, GDK_o }, + GDK_CONTROL_MASK, GDK_KEY_o }, { "", NULL, NULL, 0, 0 }, { N_("_Save"), G_CALLBACK(on_file_save), GTK_STOCK_SAVE, - GDK_CONTROL_MASK, GDK_s }, + GDK_CONTROL_MASK, GDK_KEY_s }, { N_("_Save as..."), G_CALLBACK(on_file_save_as), GTK_STOCK_SAVE_AS, - GDK_CONTROL_MASK | GDK_SHIFT_MASK, GDK_S }, + GDK_CONTROL_MASK | GDK_SHIFT_MASK, GDK_KEY_S }, { "", NULL, NULL, 0, 0 }, { N_("_Close"), G_CALLBACK(on_file_close), GTK_STOCK_CLOSE, 0, 0 }, { NULL, NULL, NULL, 0, 0 } @@ -106,15 +106,15 @@ static DesktopMenu _editor_menu_edit[] = { /* FIXME implement undo and redo */ { N_("_Undo"), NULL, GTK_STOCK_UNDO, GDK_CONTROL_MASK, - GDK_z }, - { N_("_Redo"), NULL, GTK_STOCK_REDO, GDK_CONTROL_MASK, GDK_r }, + GDK_KEY_z }, + { N_("_Redo"), NULL, GTK_STOCK_REDO, GDK_CONTROL_MASK, GDK_KEY_r }, { "", NULL, NULL, 0, 0 }, { N_("_Cut"), G_CALLBACK(on_edit_cut), GTK_STOCK_CUT, GDK_CONTROL_MASK, - GDK_x }, + GDK_KEY_x }, { N_("_Copy"), G_CALLBACK(on_edit_copy), GTK_STOCK_COPY, - GDK_CONTROL_MASK, GDK_c }, + GDK_CONTROL_MASK, GDK_KEY_c }, { N_("_Paste"), G_CALLBACK(on_edit_paste), GTK_STOCK_PASTE, - GDK_CONTROL_MASK, GDK_v }, + GDK_CONTROL_MASK, GDK_KEY_v }, { "", NULL, NULL, 0, 0 }, { N_("Select _all"), G_CALLBACK(on_edit_select_all), #if GTK_CHECK_VERSION(2, 10, 0) @@ -122,14 +122,14 @@ static DesktopMenu _editor_menu_edit[] = #else "edit-select-all", #endif - GDK_CONTROL_MASK, GDK_A }, + GDK_CONTROL_MASK, GDK_KEY_A }, { N_("_Unselect all"), G_CALLBACK(on_edit_unselect_all), NULL, 0, 0 }, { "", NULL, NULL, 0, 0 }, { N_("_Find"), G_CALLBACK(on_edit_find), GTK_STOCK_FIND, - GDK_CONTROL_MASK, GDK_F }, + GDK_CONTROL_MASK, GDK_KEY_F }, { "", NULL, NULL, 0, 0 }, { N_("_Preferences"), G_CALLBACK(on_edit_preferences), - GTK_STOCK_PREFERENCES, GDK_CONTROL_MASK, GDK_p }, + GTK_STOCK_PREFERENCES, GDK_CONTROL_MASK, GDK_KEY_p }, { NULL, NULL, NULL, 0, 0 } }; @@ -535,7 +535,11 @@ static void _find_dialog(Editor * editor) GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, GTK_STOCK_FIND, GTK_RESPONSE_ACCEPT, NULL); +#if GTK_CHECK_VERSION(2, 14, 0) + vbox = gtk_dialog_get_content_area(GTK_DIALOG(editor->fi_dialog)); +#else vbox = GTK_DIALOG(editor->fi_dialog)->vbox; +#endif hbox = gtk_hbox_new(FALSE, 0); widget = gtk_label_new(_("Text:")); gtk_box_pack_start(GTK_BOX(hbox), widget, FALSE, TRUE, 0); @@ -880,10 +884,19 @@ void editor_show_preferences(Editor * editor, gboolean show) gtk_misc_set_alignment(GTK_MISC(widget), 0.0, 0.5); gtk_size_group_add_widget(group, widget); gtk_box_pack_start(GTK_BOX(hbox), widget, FALSE, TRUE, 0); +#if GTK_CHECK_VERSION(2, 24, 0) + editor->pr_wrap = gtk_combo_box_text_new(); +#else editor->pr_wrap = gtk_combo_box_new_text(); +#endif for(i = 0; i < sizeof(_editor_wrap) / sizeof(*_editor_wrap); i++) +#if GTK_CHECK_VERSION(2, 24, 0) + gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(editor->pr_wrap), + NULL, _(_editor_wrap[i].name)); +#else gtk_combo_box_append_text(GTK_COMBO_BOX(editor->pr_wrap), _(_editor_wrap[i].name)); +#endif gtk_box_pack_start(GTK_BOX(hbox), editor->pr_wrap, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); _preferences_on_cancel(editor);