The "find" dialog is now integrated to the window
This commit is contained in:
parent
8ec8363b68
commit
8c94116d63
144
po/de.po
144
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-12-08 08:43+0100\n"
|
||||
"POT-Creation-Date: 2011-12-08 09:08+0100\n"
|
||||
"PO-Revision-Date: 2010-04-07 22:05+0200\n"
|
||||
"Last-Translator: Pierre Pronchery <khorben@defora.org>\n"
|
||||
"Language-Team: German\n"
|
||||
@ -16,233 +16,229 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: ../src/editor.c:97
|
||||
#: ../src/editor.c:96
|
||||
msgid "_New"
|
||||
msgstr "_Neu"
|
||||
|
||||
#: ../src/editor.c:99
|
||||
#: ../src/editor.c:98
|
||||
msgid "_Open"
|
||||
msgstr "_Offnen"
|
||||
|
||||
#: ../src/editor.c:102
|
||||
#: ../src/editor.c:101
|
||||
msgid "_Save"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:104
|
||||
#: ../src/editor.c:103
|
||||
msgid "_Save as..."
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:107
|
||||
#: ../src/editor.c:106
|
||||
msgid "_Close"
|
||||
msgstr "_Schliessen"
|
||||
|
||||
#: ../src/editor.c:114
|
||||
#: ../src/editor.c:113
|
||||
msgid "_Undo"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:116
|
||||
#: ../src/editor.c:115
|
||||
msgid "_Redo"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:118
|
||||
#: ../src/editor.c:117
|
||||
msgid "_Cut"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:120
|
||||
#: ../src/editor.c:119
|
||||
msgid "_Copy"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:122
|
||||
#: ../src/editor.c:121
|
||||
msgid "_Paste"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:125
|
||||
#: ../src/editor.c:124
|
||||
msgid "Select _all"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:132
|
||||
#: ../src/editor.c:131
|
||||
msgid "_Unselect all"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:134
|
||||
#: ../src/editor.c:133
|
||||
msgid "_Find"
|
||||
msgstr ""
|
||||
msgstr "_Suchen"
|
||||
|
||||
#: ../src/editor.c:137
|
||||
#: ../src/editor.c:136
|
||||
msgid "_Preferences"
|
||||
msgstr "_Einstellungen"
|
||||
|
||||
#: ../src/editor.c:144
|
||||
#: ../src/editor.c:143
|
||||
msgid "_File..."
|
||||
msgstr "_Datei..."
|
||||
|
||||
#: ../src/editor.c:150
|
||||
#: ../src/editor.c:149
|
||||
msgid "_About"
|
||||
msgstr "_Info"
|
||||
|
||||
#: ../src/editor.c:161
|
||||
#: ../src/editor.c:160
|
||||
msgid "_File"
|
||||
msgstr "_Datei"
|
||||
|
||||
#: ../src/editor.c:162
|
||||
#: ../src/editor.c:161
|
||||
msgid "_Edit"
|
||||
msgstr "_Bearbeitung"
|
||||
|
||||
#: ../src/editor.c:163
|
||||
#: ../src/editor.c:162
|
||||
msgid "_Insert"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:164
|
||||
#: ../src/editor.c:163
|
||||
msgid "_Help"
|
||||
msgstr "_Hilfe"
|
||||
|
||||
#: ../src/editor.c:171
|
||||
#: ../src/editor.c:170
|
||||
msgid "New"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:172
|
||||
#: ../src/editor.c:171
|
||||
msgid "Open"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:174
|
||||
#: ../src/editor.c:173
|
||||
msgid "Save"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:175
|
||||
#: ../src/editor.c:174
|
||||
msgid "Save as"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:178
|
||||
#: ../src/editor.c:177
|
||||
msgid "Cut"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:179
|
||||
#: ../src/editor.c:178
|
||||
msgid "Copy"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:180
|
||||
#: ../src/editor.c:179
|
||||
msgid "Paste"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:183
|
||||
#: ../src/editor.c:182
|
||||
msgid "Preferences"
|
||||
msgstr "Einstellungen"
|
||||
|
||||
#: ../src/editor.c:195
|
||||
#: ../src/editor.c:194
|
||||
msgid "none"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:196
|
||||
#: ../src/editor.c:195
|
||||
msgid "characters"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:197
|
||||
#: ../src/editor.c:196
|
||||
msgid "words"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:198
|
||||
#: ../src/editor.c:197
|
||||
msgid "words then characters"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:281
|
||||
msgid "Text editor - "
|
||||
#: ../src/editor.c:270
|
||||
msgid "Find:"
|
||||
msgstr "Suchen:"
|
||||
|
||||
#: ../src/editor.c:280
|
||||
msgid "Case-sensitive"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:282
|
||||
msgid "Wrap"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:316
|
||||
msgid "Text editor - "
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:317
|
||||
msgid "(Untitled)"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:395
|
||||
#: ../src/editor.c:430
|
||||
msgid "translator-credits"
|
||||
msgstr "Pierre Pronchery <khorben@defora.org>"
|
||||
|
||||
#: ../src/editor.c:431
|
||||
#: ../src/editor.c:466
|
||||
msgid "Could not save configuration"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:448 ../src/editor.c:457 ../src/editor.c:910
|
||||
#: ../src/editor.c:915
|
||||
#: ../src/editor.c:483 ../src/editor.c:492 ../src/editor.c:850
|
||||
#: ../src/editor.c:855
|
||||
msgid "Question"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:473 ../src/editor.c:477
|
||||
#: ../src/editor.c:508 ../src/editor.c:512
|
||||
msgid "Error"
|
||||
msgstr "Fehler"
|
||||
|
||||
#: ../src/editor.c:499 ../src/editor.c:747
|
||||
#: ../src/editor.c:534 ../src/editor.c:687
|
||||
msgid ""
|
||||
"There are unsaved changes.\n"
|
||||
"Discard or save them?"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:559
|
||||
msgid "Find text"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:570
|
||||
msgid "Text:"
|
||||
msgstr "Text:"
|
||||
|
||||
#: ../src/editor.c:581
|
||||
msgid "Case-sensitive"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:583
|
||||
msgid "Wrap"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:626
|
||||
msgid "Text not found"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:705
|
||||
#: ../src/editor.c:645
|
||||
msgid "Insert file..."
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:711 ../src/editor.c:824
|
||||
#: ../src/editor.c:651 ../src/editor.c:764
|
||||
msgid "Text files"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:715 ../src/editor.c:828
|
||||
#: ../src/editor.c:655 ../src/editor.c:768
|
||||
msgid "All files"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:753
|
||||
#: ../src/editor.c:693
|
||||
msgid "Discard"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:818
|
||||
#: ../src/editor.c:758
|
||||
msgid "Open file..."
|
||||
msgstr "Offnen..."
|
||||
|
||||
#: ../src/editor.c:886
|
||||
#: ../src/editor.c:826
|
||||
msgid "Partial write"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:914
|
||||
#: ../src/editor.c:854
|
||||
msgid "This file already exists. Overwrite?"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:923
|
||||
#: ../src/editor.c:863
|
||||
msgid "Allocation error"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:938
|
||||
#: ../src/editor.c:878
|
||||
msgid "Save as..."
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:995
|
||||
#: ../src/editor.c:935
|
||||
msgid "Text editor preferences"
|
||||
msgstr "Text Editor Einstellungen"
|
||||
|
||||
#: ../src/editor.c:1012
|
||||
#: ../src/editor.c:952
|
||||
msgid "Font:"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:1022
|
||||
#: ../src/editor.c:962
|
||||
msgid "Wrap mode:"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:1173
|
||||
msgid "Text not found"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/main.c:43
|
||||
msgid "Usage: editor [file]\n"
|
||||
msgstr ""
|
||||
|
142
po/es.po
142
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-12-08 08:43+0100\n"
|
||||
"POT-Creation-Date: 2011-12-08 09:08+0100\n"
|
||||
"PO-Revision-Date: 2010-04-07 22:07+0200\n"
|
||||
"Last-Translator: Pierre Pronchery <khorben@defora.org>\n"
|
||||
"Language-Team: Spanish\n"
|
||||
@ -16,233 +16,229 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: ../src/editor.c:97
|
||||
#: ../src/editor.c:96
|
||||
msgid "_New"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:99
|
||||
#: ../src/editor.c:98
|
||||
msgid "_Open"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:102
|
||||
#: ../src/editor.c:101
|
||||
msgid "_Save"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:104
|
||||
#: ../src/editor.c:103
|
||||
msgid "_Save as..."
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:107
|
||||
#: ../src/editor.c:106
|
||||
msgid "_Close"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:114
|
||||
#: ../src/editor.c:113
|
||||
msgid "_Undo"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:116
|
||||
#: ../src/editor.c:115
|
||||
msgid "_Redo"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:118
|
||||
#: ../src/editor.c:117
|
||||
msgid "_Cut"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:120
|
||||
#: ../src/editor.c:119
|
||||
msgid "_Copy"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:122
|
||||
#: ../src/editor.c:121
|
||||
msgid "_Paste"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:125
|
||||
#: ../src/editor.c:124
|
||||
msgid "Select _all"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:132
|
||||
#: ../src/editor.c:131
|
||||
msgid "_Unselect all"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:134
|
||||
#: ../src/editor.c:133
|
||||
msgid "_Find"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:137
|
||||
#: ../src/editor.c:136
|
||||
msgid "_Preferences"
|
||||
msgstr "_Preferencias"
|
||||
|
||||
#: ../src/editor.c:144
|
||||
#: ../src/editor.c:143
|
||||
msgid "_File..."
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:150
|
||||
#: ../src/editor.c:149
|
||||
msgid "_About"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:161
|
||||
#: ../src/editor.c:160
|
||||
msgid "_File"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:162
|
||||
#: ../src/editor.c:161
|
||||
msgid "_Edit"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:163
|
||||
#: ../src/editor.c:162
|
||||
msgid "_Insert"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:164
|
||||
#: ../src/editor.c:163
|
||||
msgid "_Help"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:171
|
||||
#: ../src/editor.c:170
|
||||
msgid "New"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:172
|
||||
#: ../src/editor.c:171
|
||||
msgid "Open"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:174
|
||||
#: ../src/editor.c:173
|
||||
msgid "Save"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:175
|
||||
#: ../src/editor.c:174
|
||||
msgid "Save as"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:178
|
||||
#: ../src/editor.c:177
|
||||
msgid "Cut"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:179
|
||||
#: ../src/editor.c:178
|
||||
msgid "Copy"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:180
|
||||
#: ../src/editor.c:179
|
||||
msgid "Paste"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:183
|
||||
#: ../src/editor.c:182
|
||||
msgid "Preferences"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:195
|
||||
#: ../src/editor.c:194
|
||||
msgid "none"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:196
|
||||
#: ../src/editor.c:195
|
||||
msgid "characters"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:197
|
||||
#: ../src/editor.c:196
|
||||
msgid "words"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:198
|
||||
#: ../src/editor.c:197
|
||||
msgid "words then characters"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:281
|
||||
msgid "Text editor - "
|
||||
#: ../src/editor.c:270
|
||||
msgid "Find:"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:280
|
||||
msgid "Case-sensitive"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:282
|
||||
msgid "Wrap"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:316
|
||||
msgid "Text editor - "
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:317
|
||||
msgid "(Untitled)"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:395
|
||||
#: ../src/editor.c:430
|
||||
msgid "translator-credits"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:431
|
||||
#: ../src/editor.c:466
|
||||
msgid "Could not save configuration"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:448 ../src/editor.c:457 ../src/editor.c:910
|
||||
#: ../src/editor.c:915
|
||||
#: ../src/editor.c:483 ../src/editor.c:492 ../src/editor.c:850
|
||||
#: ../src/editor.c:855
|
||||
msgid "Question"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:473 ../src/editor.c:477
|
||||
#: ../src/editor.c:508 ../src/editor.c:512
|
||||
msgid "Error"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:499 ../src/editor.c:747
|
||||
#: ../src/editor.c:534 ../src/editor.c:687
|
||||
msgid ""
|
||||
"There are unsaved changes.\n"
|
||||
"Discard or save them?"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:559
|
||||
msgid "Find text"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:570
|
||||
msgid "Text:"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:581
|
||||
msgid "Case-sensitive"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:583
|
||||
msgid "Wrap"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:626
|
||||
msgid "Text not found"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:705
|
||||
#: ../src/editor.c:645
|
||||
msgid "Insert file..."
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:711 ../src/editor.c:824
|
||||
#: ../src/editor.c:651 ../src/editor.c:764
|
||||
msgid "Text files"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:715 ../src/editor.c:828
|
||||
#: ../src/editor.c:655 ../src/editor.c:768
|
||||
msgid "All files"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:753
|
||||
#: ../src/editor.c:693
|
||||
msgid "Discard"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:818
|
||||
#: ../src/editor.c:758
|
||||
msgid "Open file..."
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:886
|
||||
#: ../src/editor.c:826
|
||||
msgid "Partial write"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:914
|
||||
#: ../src/editor.c:854
|
||||
msgid "This file already exists. Overwrite?"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:923
|
||||
#: ../src/editor.c:863
|
||||
msgid "Allocation error"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:938
|
||||
#: ../src/editor.c:878
|
||||
msgid "Save as..."
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:995
|
||||
#: ../src/editor.c:935
|
||||
msgid "Text editor preferences"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:1012
|
||||
#: ../src/editor.c:952
|
||||
msgid "Font:"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:1022
|
||||
#: ../src/editor.c:962
|
||||
msgid "Wrap mode:"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:1173
|
||||
msgid "Text not found"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/main.c:43
|
||||
msgid "Usage: editor [file]\n"
|
||||
msgstr ""
|
||||
|
144
po/fr.po
144
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-12-08 08:43+0100\n"
|
||||
"POT-Creation-Date: 2011-12-08 09:08+0100\n"
|
||||
"PO-Revision-Date: 2010-04-11 12:32+0200\n"
|
||||
"Last-Translator: Calimero <calimeroteknik@free.fr>\n"
|
||||
"Language-Team: French\n"
|
||||
@ -16,162 +16,174 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
|
||||
#: ../src/editor.c:97
|
||||
#: ../src/editor.c:96
|
||||
msgid "_New"
|
||||
msgstr "_Nouveau"
|
||||
|
||||
#: ../src/editor.c:99
|
||||
#: ../src/editor.c:98
|
||||
msgid "_Open"
|
||||
msgstr "_Ouvrir"
|
||||
|
||||
#: ../src/editor.c:102
|
||||
#: ../src/editor.c:101
|
||||
msgid "_Save"
|
||||
msgstr "_Enregistrer"
|
||||
|
||||
#: ../src/editor.c:104
|
||||
#: ../src/editor.c:103
|
||||
msgid "_Save as..."
|
||||
msgstr "_Enregistrer sous..."
|
||||
|
||||
#: ../src/editor.c:107
|
||||
#: ../src/editor.c:106
|
||||
msgid "_Close"
|
||||
msgstr "_Fermer"
|
||||
|
||||
#: ../src/editor.c:114
|
||||
#: ../src/editor.c:113
|
||||
msgid "_Undo"
|
||||
msgstr "_Annuler"
|
||||
|
||||
#: ../src/editor.c:116
|
||||
#: ../src/editor.c:115
|
||||
msgid "_Redo"
|
||||
msgstr "_Rétablir"
|
||||
|
||||
#: ../src/editor.c:118
|
||||
#: ../src/editor.c:117
|
||||
msgid "_Cut"
|
||||
msgstr "Co_uper"
|
||||
|
||||
#: ../src/editor.c:120
|
||||
#: ../src/editor.c:119
|
||||
msgid "_Copy"
|
||||
msgstr "_Copier"
|
||||
|
||||
#: ../src/editor.c:122
|
||||
#: ../src/editor.c:121
|
||||
msgid "_Paste"
|
||||
msgstr "C_oller"
|
||||
|
||||
#: ../src/editor.c:125
|
||||
#: ../src/editor.c:124
|
||||
msgid "Select _all"
|
||||
msgstr "Sélectionner _tout"
|
||||
|
||||
#: ../src/editor.c:132
|
||||
#: ../src/editor.c:131
|
||||
msgid "_Unselect all"
|
||||
msgstr "Tout _désélectionner"
|
||||
|
||||
#: ../src/editor.c:134
|
||||
#: ../src/editor.c:133
|
||||
msgid "_Find"
|
||||
msgstr "_Rechercher"
|
||||
msgstr "_Chercher"
|
||||
|
||||
#: ../src/editor.c:137
|
||||
#: ../src/editor.c:136
|
||||
msgid "_Preferences"
|
||||
msgstr "_Préférences"
|
||||
|
||||
#: ../src/editor.c:144
|
||||
#: ../src/editor.c:143
|
||||
msgid "_File..."
|
||||
msgstr "_Fichier..."
|
||||
|
||||
#: ../src/editor.c:150
|
||||
#: ../src/editor.c:149
|
||||
msgid "_About"
|
||||
msgstr "À _propos"
|
||||
|
||||
#: ../src/editor.c:161
|
||||
#: ../src/editor.c:160
|
||||
msgid "_File"
|
||||
msgstr "_Fichier"
|
||||
|
||||
#: ../src/editor.c:162
|
||||
#: ../src/editor.c:161
|
||||
msgid "_Edit"
|
||||
msgstr "É_dition"
|
||||
|
||||
#: ../src/editor.c:163
|
||||
#: ../src/editor.c:162
|
||||
msgid "_Insert"
|
||||
msgstr "_Insertion"
|
||||
|
||||
#: ../src/editor.c:164
|
||||
#: ../src/editor.c:163
|
||||
msgid "_Help"
|
||||
msgstr "_Aide"
|
||||
|
||||
#: ../src/editor.c:171
|
||||
#: ../src/editor.c:170
|
||||
msgid "New"
|
||||
msgstr "Nouveau"
|
||||
|
||||
#: ../src/editor.c:172
|
||||
#: ../src/editor.c:171
|
||||
msgid "Open"
|
||||
msgstr "Ouvrir"
|
||||
|
||||
#: ../src/editor.c:174
|
||||
#: ../src/editor.c:173
|
||||
msgid "Save"
|
||||
msgstr "Enregistrer"
|
||||
|
||||
#: ../src/editor.c:175
|
||||
#: ../src/editor.c:174
|
||||
msgid "Save as"
|
||||
msgstr "Enregistrer sous"
|
||||
|
||||
#: ../src/editor.c:178
|
||||
#: ../src/editor.c:177
|
||||
msgid "Cut"
|
||||
msgstr "Couper"
|
||||
|
||||
#: ../src/editor.c:179
|
||||
#: ../src/editor.c:178
|
||||
msgid "Copy"
|
||||
msgstr "Copier"
|
||||
|
||||
#: ../src/editor.c:180
|
||||
#: ../src/editor.c:179
|
||||
msgid "Paste"
|
||||
msgstr "Coller"
|
||||
|
||||
#: ../src/editor.c:183
|
||||
#: ../src/editor.c:182
|
||||
msgid "Preferences"
|
||||
msgstr "Préférences"
|
||||
|
||||
#: ../src/editor.c:195
|
||||
#: ../src/editor.c:194
|
||||
msgid "none"
|
||||
msgstr "aucun"
|
||||
|
||||
#: ../src/editor.c:196
|
||||
#: ../src/editor.c:195
|
||||
msgid "characters"
|
||||
msgstr "caractères"
|
||||
|
||||
#: ../src/editor.c:197
|
||||
#: ../src/editor.c:196
|
||||
msgid "words"
|
||||
msgstr "mots"
|
||||
|
||||
#: ../src/editor.c:198
|
||||
#: ../src/editor.c:197
|
||||
msgid "words then characters"
|
||||
msgstr "mots puis caractères"
|
||||
|
||||
#: ../src/editor.c:281
|
||||
#: ../src/editor.c:270
|
||||
msgid "Find:"
|
||||
msgstr "Chercher :"
|
||||
|
||||
#: ../src/editor.c:280
|
||||
msgid "Case-sensitive"
|
||||
msgstr "Sensible à la casse"
|
||||
|
||||
#: ../src/editor.c:282
|
||||
msgid "Wrap"
|
||||
msgstr "Boucler"
|
||||
|
||||
#: ../src/editor.c:316
|
||||
msgid "Text editor - "
|
||||
msgstr "Éditeur de texte - "
|
||||
|
||||
#: ../src/editor.c:282
|
||||
#: ../src/editor.c:317
|
||||
msgid "(Untitled)"
|
||||
msgstr "(Sans titre)"
|
||||
|
||||
#: ../src/editor.c:395
|
||||
#: ../src/editor.c:430
|
||||
msgid "translator-credits"
|
||||
msgstr ""
|
||||
"Calimero <calimeroteknik@free.fr>\n"
|
||||
"Pierre Pronchery <khorben@defora.org>"
|
||||
|
||||
#: ../src/editor.c:431
|
||||
#: ../src/editor.c:466
|
||||
msgid "Could not save configuration"
|
||||
msgstr "Erreur lors de la sauvegarde de la configuration"
|
||||
|
||||
#: ../src/editor.c:448 ../src/editor.c:457 ../src/editor.c:910
|
||||
#: ../src/editor.c:915
|
||||
#: ../src/editor.c:483 ../src/editor.c:492 ../src/editor.c:850
|
||||
#: ../src/editor.c:855
|
||||
msgid "Question"
|
||||
msgstr "Question"
|
||||
|
||||
#: ../src/editor.c:473 ../src/editor.c:477
|
||||
#: ../src/editor.c:508 ../src/editor.c:512
|
||||
msgid "Error"
|
||||
msgstr "Erreur"
|
||||
|
||||
#: ../src/editor.c:499 ../src/editor.c:747
|
||||
#: ../src/editor.c:534 ../src/editor.c:687
|
||||
msgid ""
|
||||
"There are unsaved changes.\n"
|
||||
"Discard or save them?"
|
||||
@ -179,74 +191,58 @@ msgstr ""
|
||||
"Il y a des changements non enregistrés.\n"
|
||||
"Abandonner ou enregistrer ?"
|
||||
|
||||
#: ../src/editor.c:559
|
||||
msgid "Find text"
|
||||
msgstr "Rechercher"
|
||||
|
||||
#: ../src/editor.c:570
|
||||
msgid "Text:"
|
||||
msgstr "Texte :"
|
||||
|
||||
#: ../src/editor.c:581
|
||||
msgid "Case-sensitive"
|
||||
msgstr "Sensible à la casse"
|
||||
|
||||
#: ../src/editor.c:583
|
||||
msgid "Wrap"
|
||||
msgstr "Boucler"
|
||||
|
||||
#: ../src/editor.c:626
|
||||
msgid "Text not found"
|
||||
msgstr "Texte non trouvé"
|
||||
|
||||
#: ../src/editor.c:705
|
||||
#: ../src/editor.c:645
|
||||
msgid "Insert file..."
|
||||
msgstr "Insérer un fichier..."
|
||||
|
||||
#: ../src/editor.c:711 ../src/editor.c:824
|
||||
#: ../src/editor.c:651 ../src/editor.c:764
|
||||
msgid "Text files"
|
||||
msgstr "Fichiers texte"
|
||||
|
||||
#: ../src/editor.c:715 ../src/editor.c:828
|
||||
#: ../src/editor.c:655 ../src/editor.c:768
|
||||
msgid "All files"
|
||||
msgstr "Tous les fichiers"
|
||||
|
||||
#: ../src/editor.c:753
|
||||
#: ../src/editor.c:693
|
||||
msgid "Discard"
|
||||
msgstr "Annuler"
|
||||
|
||||
#: ../src/editor.c:818
|
||||
#: ../src/editor.c:758
|
||||
msgid "Open file..."
|
||||
msgstr "Ouvrir un fichier..."
|
||||
|
||||
#: ../src/editor.c:886
|
||||
#: ../src/editor.c:826
|
||||
msgid "Partial write"
|
||||
msgstr "Écriture partielle"
|
||||
|
||||
#: ../src/editor.c:914
|
||||
#: ../src/editor.c:854
|
||||
msgid "This file already exists. Overwrite?"
|
||||
msgstr "Le fichier existe déjà. L'écraser ?"
|
||||
|
||||
#: ../src/editor.c:923
|
||||
#: ../src/editor.c:863
|
||||
msgid "Allocation error"
|
||||
msgstr "Erreur d'allocation"
|
||||
|
||||
#: ../src/editor.c:938
|
||||
#: ../src/editor.c:878
|
||||
msgid "Save as..."
|
||||
msgstr "Enregistrer sous..."
|
||||
|
||||
#: ../src/editor.c:995
|
||||
#: ../src/editor.c:935
|
||||
msgid "Text editor preferences"
|
||||
msgstr "Préférences de l'éditeur de texte"
|
||||
|
||||
#: ../src/editor.c:1012
|
||||
#: ../src/editor.c:952
|
||||
msgid "Font:"
|
||||
msgstr "Police :"
|
||||
|
||||
#: ../src/editor.c:1022
|
||||
#: ../src/editor.c:962
|
||||
msgid "Wrap mode:"
|
||||
msgstr "Retour à la ligne :"
|
||||
|
||||
#: ../src/editor.c:1173
|
||||
msgid "Text not found"
|
||||
msgstr "Texte non trouvé"
|
||||
|
||||
#: ../src/main.c:43
|
||||
msgid "Usage: editor [file]\n"
|
||||
msgstr "Usage: editor [fichier]\n"
|
||||
|
142
po/it.po
142
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-12-08 08:43+0100\n"
|
||||
"POT-Creation-Date: 2011-12-08 09:08+0100\n"
|
||||
"PO-Revision-Date: 2010-04-09 16:43+0200\n"
|
||||
"Last-Translator: Pierre Pronchery <khorben@defora.org>\n"
|
||||
"Language-Team: Italian\n"
|
||||
@ -17,233 +17,229 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: ../src/editor.c:97
|
||||
#: ../src/editor.c:96
|
||||
msgid "_New"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:99
|
||||
#: ../src/editor.c:98
|
||||
msgid "_Open"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:102
|
||||
#: ../src/editor.c:101
|
||||
msgid "_Save"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:104
|
||||
#: ../src/editor.c:103
|
||||
msgid "_Save as..."
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:107
|
||||
#: ../src/editor.c:106
|
||||
msgid "_Close"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:114
|
||||
#: ../src/editor.c:113
|
||||
msgid "_Undo"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:116
|
||||
#: ../src/editor.c:115
|
||||
msgid "_Redo"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:118
|
||||
#: ../src/editor.c:117
|
||||
msgid "_Cut"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:120
|
||||
#: ../src/editor.c:119
|
||||
msgid "_Copy"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:122
|
||||
#: ../src/editor.c:121
|
||||
msgid "_Paste"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:125
|
||||
#: ../src/editor.c:124
|
||||
msgid "Select _all"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:132
|
||||
#: ../src/editor.c:131
|
||||
msgid "_Unselect all"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:134
|
||||
#: ../src/editor.c:133
|
||||
msgid "_Find"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:137
|
||||
#: ../src/editor.c:136
|
||||
msgid "_Preferences"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:144
|
||||
#: ../src/editor.c:143
|
||||
msgid "_File..."
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:150
|
||||
#: ../src/editor.c:149
|
||||
msgid "_About"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:161
|
||||
#: ../src/editor.c:160
|
||||
msgid "_File"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:162
|
||||
#: ../src/editor.c:161
|
||||
msgid "_Edit"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:163
|
||||
#: ../src/editor.c:162
|
||||
msgid "_Insert"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:164
|
||||
#: ../src/editor.c:163
|
||||
msgid "_Help"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:171
|
||||
#: ../src/editor.c:170
|
||||
msgid "New"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:172
|
||||
#: ../src/editor.c:171
|
||||
msgid "Open"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:174
|
||||
#: ../src/editor.c:173
|
||||
msgid "Save"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:175
|
||||
#: ../src/editor.c:174
|
||||
msgid "Save as"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:178
|
||||
#: ../src/editor.c:177
|
||||
msgid "Cut"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:179
|
||||
#: ../src/editor.c:178
|
||||
msgid "Copy"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:180
|
||||
#: ../src/editor.c:179
|
||||
msgid "Paste"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:183
|
||||
#: ../src/editor.c:182
|
||||
msgid "Preferences"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:195
|
||||
#: ../src/editor.c:194
|
||||
msgid "none"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:196
|
||||
#: ../src/editor.c:195
|
||||
msgid "characters"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:197
|
||||
#: ../src/editor.c:196
|
||||
msgid "words"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:198
|
||||
#: ../src/editor.c:197
|
||||
msgid "words then characters"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:281
|
||||
msgid "Text editor - "
|
||||
#: ../src/editor.c:270
|
||||
msgid "Find:"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:280
|
||||
msgid "Case-sensitive"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:282
|
||||
msgid "Wrap"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:316
|
||||
msgid "Text editor - "
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:317
|
||||
msgid "(Untitled)"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:395
|
||||
#: ../src/editor.c:430
|
||||
msgid "translator-credits"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:431
|
||||
#: ../src/editor.c:466
|
||||
msgid "Could not save configuration"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:448 ../src/editor.c:457 ../src/editor.c:910
|
||||
#: ../src/editor.c:915
|
||||
#: ../src/editor.c:483 ../src/editor.c:492 ../src/editor.c:850
|
||||
#: ../src/editor.c:855
|
||||
msgid "Question"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:473 ../src/editor.c:477
|
||||
#: ../src/editor.c:508 ../src/editor.c:512
|
||||
msgid "Error"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:499 ../src/editor.c:747
|
||||
#: ../src/editor.c:534 ../src/editor.c:687
|
||||
msgid ""
|
||||
"There are unsaved changes.\n"
|
||||
"Discard or save them?"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:559
|
||||
msgid "Find text"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:570
|
||||
msgid "Text:"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:581
|
||||
msgid "Case-sensitive"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:583
|
||||
msgid "Wrap"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:626
|
||||
msgid "Text not found"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:705
|
||||
#: ../src/editor.c:645
|
||||
msgid "Insert file..."
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:711 ../src/editor.c:824
|
||||
#: ../src/editor.c:651 ../src/editor.c:764
|
||||
msgid "Text files"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:715 ../src/editor.c:828
|
||||
#: ../src/editor.c:655 ../src/editor.c:768
|
||||
msgid "All files"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:753
|
||||
#: ../src/editor.c:693
|
||||
msgid "Discard"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:818
|
||||
#: ../src/editor.c:758
|
||||
msgid "Open file..."
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:886
|
||||
#: ../src/editor.c:826
|
||||
msgid "Partial write"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:914
|
||||
#: ../src/editor.c:854
|
||||
msgid "This file already exists. Overwrite?"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:923
|
||||
#: ../src/editor.c:863
|
||||
msgid "Allocation error"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:938
|
||||
#: ../src/editor.c:878
|
||||
msgid "Save as..."
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:995
|
||||
#: ../src/editor.c:935
|
||||
msgid "Text editor preferences"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:1012
|
||||
#: ../src/editor.c:952
|
||||
msgid "Font:"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:1022
|
||||
#: ../src/editor.c:962
|
||||
msgid "Wrap mode:"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/editor.c:1173
|
||||
msgid "Text not found"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/main.c:43
|
||||
msgid "Usage: editor [file]\n"
|
||||
msgstr ""
|
||||
|
193
src/editor.c
193
src/editor.c
@ -16,8 +16,7 @@ static char const _license[] =
|
||||
"along with this program. If not, see <http://www.gnu.org/licenses/>.\n";
|
||||
/* TODO:
|
||||
* - use an infobar for errors
|
||||
* - consider using GtkSourceView also/instead
|
||||
* - move the "find" dialog over the status bar (and in Surfer too) */
|
||||
* - consider using GtkSourceView also/instead */
|
||||
|
||||
|
||||
|
||||
@ -204,6 +203,10 @@ static char * _editor_config_filename(void);
|
||||
static gboolean _editor_find(Editor * editor, char const * text,
|
||||
gboolean sensitive, gboolean wrap);
|
||||
|
||||
/* callbacks */
|
||||
static void _editor_on_find_clicked(gpointer data);
|
||||
static void _editor_on_find_hide(gpointer data);
|
||||
|
||||
|
||||
/* public */
|
||||
/* functions */
|
||||
@ -215,6 +218,7 @@ Editor * editor_new(void)
|
||||
Editor * editor;
|
||||
GtkAccelGroup * group;
|
||||
GtkWidget * vbox;
|
||||
GtkWidget * hbox;
|
||||
GtkWidget * widget;
|
||||
|
||||
if((editor = malloc(sizeof(*editor))) == NULL)
|
||||
@ -259,13 +263,44 @@ Editor * editor_new(void)
|
||||
editor_set_wrap_mode(editor, editor_get_wrap_mode(editor));
|
||||
gtk_container_add(GTK_CONTAINER(widget), editor->view);
|
||||
gtk_box_pack_start(GTK_BOX(vbox), widget, TRUE, TRUE, 0);
|
||||
/* find */
|
||||
editor->fi_dialog = gtk_hbox_new(FALSE, 4);
|
||||
hbox = editor->fi_dialog;
|
||||
gtk_container_set_border_width(GTK_CONTAINER(hbox), 4);
|
||||
widget = gtk_label_new(_("Find:"));
|
||||
gtk_box_pack_start(GTK_BOX(hbox), widget, FALSE, TRUE, 0);
|
||||
editor->fi_store = gtk_list_store_new(1, G_TYPE_STRING);
|
||||
editor->fi_text = gtk_combo_box_new_with_model_and_entry(GTK_TREE_MODEL(
|
||||
editor->fi_store));
|
||||
gtk_combo_box_set_entry_text_column(GTK_COMBO_BOX(editor->fi_text), 0);
|
||||
editor->fi_entry = gtk_bin_get_child(GTK_BIN(editor->fi_text));
|
||||
g_signal_connect_swapped(editor->fi_entry, "activate", G_CALLBACK(
|
||||
_editor_on_find_clicked), editor);
|
||||
gtk_box_pack_start(GTK_BOX(hbox), editor->fi_text, FALSE, TRUE, 0);
|
||||
editor->fi_case = gtk_check_button_new_with_label(_("Case-sensitive"));
|
||||
gtk_box_pack_start(GTK_BOX(hbox), editor->fi_case, FALSE, TRUE, 0);
|
||||
editor->fi_wrap = gtk_check_button_new_with_label(_("Wrap"));
|
||||
gtk_box_pack_start(GTK_BOX(hbox), editor->fi_wrap, FALSE, TRUE, 0);
|
||||
widget = gtk_button_new_from_stock(GTK_STOCK_FIND);
|
||||
g_signal_connect_swapped(widget, "clicked", G_CALLBACK(
|
||||
_editor_on_find_clicked), editor);
|
||||
gtk_box_pack_start(GTK_BOX(hbox), widget, FALSE, TRUE, 0);
|
||||
widget = gtk_button_new();
|
||||
gtk_button_set_image(GTK_BUTTON(widget), gtk_image_new_from_stock(
|
||||
GTK_STOCK_CLOSE, GTK_ICON_SIZE_BUTTON));
|
||||
gtk_button_set_relief(GTK_BUTTON(widget), GTK_RELIEF_NONE);
|
||||
g_signal_connect_swapped(widget, "clicked", G_CALLBACK(
|
||||
_editor_on_find_hide), editor);
|
||||
gtk_box_pack_end(GTK_BOX(hbox), widget, FALSE, TRUE, 0);
|
||||
gtk_widget_show_all(hbox);
|
||||
gtk_widget_hide(hbox);
|
||||
gtk_widget_set_no_show_all(hbox, TRUE);
|
||||
gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, TRUE, 0);
|
||||
/* statusbar */
|
||||
editor->statusbar = gtk_statusbar_new();
|
||||
gtk_box_pack_start(GTK_BOX(vbox), editor->statusbar, FALSE, TRUE, 0);
|
||||
/* preferences */
|
||||
editor->pr_window = NULL;
|
||||
/* find */
|
||||
editor->fi_dialog = NULL;
|
||||
/* about */
|
||||
editor->ab_window = NULL;
|
||||
gtk_container_add(GTK_CONTAINER(editor->window), vbox);
|
||||
@ -537,107 +572,12 @@ void editor_cut(Editor * editor)
|
||||
|
||||
|
||||
/* editor_find */
|
||||
static void _find_dialog(Editor * editor);
|
||||
static void _on_find_activate(GtkWidget * widget, gpointer data);
|
||||
static void _on_find_response(GtkWidget * widget, gint response, gpointer data);
|
||||
|
||||
void editor_find(Editor * editor, char const * text)
|
||||
{
|
||||
if(editor->fi_dialog == NULL)
|
||||
_find_dialog(editor);
|
||||
gtk_widget_show(editor->fi_dialog);
|
||||
if(text != NULL)
|
||||
gtk_entry_set_text(GTK_ENTRY(editor->fi_entry), text);
|
||||
gtk_window_present(GTK_WINDOW(editor->fi_dialog));
|
||||
}
|
||||
|
||||
static void _find_dialog(Editor * editor)
|
||||
{
|
||||
GtkWidget * vbox;
|
||||
GtkWidget * hbox;
|
||||
GtkWidget * label;
|
||||
|
||||
editor->fi_dialog = gtk_dialog_new_with_buttons(_("Find text"),
|
||||
GTK_WINDOW(editor->window),
|
||||
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);
|
||||
label = gtk_label_new(_("Text:"));
|
||||
gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, TRUE, 0);
|
||||
editor->fi_store = gtk_list_store_new(1, G_TYPE_STRING);
|
||||
editor->fi_text = gtk_combo_box_new_with_model_and_entry(GTK_TREE_MODEL(
|
||||
editor->fi_store));
|
||||
gtk_combo_box_set_entry_text_column(GTK_COMBO_BOX(editor->fi_text), 0);
|
||||
editor->fi_entry = gtk_bin_get_child(GTK_BIN(editor->fi_text));
|
||||
g_signal_connect(editor->fi_entry, "activate", G_CALLBACK(
|
||||
_on_find_activate), editor);
|
||||
gtk_box_pack_start(GTK_BOX(hbox), editor->fi_text, TRUE, TRUE, 4);
|
||||
gtk_box_pack_start(GTK_BOX(vbox), hbox, TRUE, TRUE, 4);
|
||||
editor->fi_case = gtk_check_button_new_with_label(_("Case-sensitive"));
|
||||
gtk_box_pack_start(GTK_BOX(vbox), editor->fi_case, TRUE, TRUE, 4);
|
||||
editor->fi_wrap = gtk_check_button_new_with_label(_("Wrap"));
|
||||
gtk_box_pack_start(GTK_BOX(vbox), editor->fi_wrap, TRUE, TRUE, 4);
|
||||
gtk_widget_show_all(vbox);
|
||||
g_signal_connect(G_OBJECT(editor->fi_dialog), "response", G_CALLBACK(
|
||||
_on_find_response), editor);
|
||||
}
|
||||
|
||||
static void _on_find_activate(GtkWidget * widget, gpointer data)
|
||||
{
|
||||
Editor * editor = data;
|
||||
char const * text;
|
||||
GtkTreeModel * model = GTK_TREE_MODEL(editor->fi_store);
|
||||
GtkTreeIter iter;
|
||||
gboolean valid;
|
||||
char * p;
|
||||
int res;
|
||||
gboolean sensitive;
|
||||
gboolean wrap;
|
||||
|
||||
if((text = gtk_entry_get_text(GTK_ENTRY(widget))) == NULL
|
||||
|| strlen(text) == 0)
|
||||
return;
|
||||
/* only append the text currently searched if not already known */
|
||||
for(valid = gtk_tree_model_get_iter_first(model, &iter); valid == TRUE;
|
||||
valid = gtk_tree_model_iter_next(model, &iter))
|
||||
{
|
||||
gtk_tree_model_get(model, &iter, 0, &p, -1);
|
||||
res = strcmp(text, p);
|
||||
free(p);
|
||||
if(res == 0)
|
||||
break;
|
||||
}
|
||||
if(valid == FALSE)
|
||||
{
|
||||
gtk_list_store_append(editor->fi_store, &iter);
|
||||
gtk_list_store_set(editor->fi_store, &iter, 0, text, -1);
|
||||
}
|
||||
sensitive = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(
|
||||
editor->fi_case));
|
||||
wrap = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(
|
||||
editor->fi_wrap));
|
||||
if(_editor_find(editor, text, sensitive, wrap) == TRUE)
|
||||
return;
|
||||
editor_error(editor, _("Text not found"), 0);
|
||||
}
|
||||
|
||||
static void _on_find_response(GtkWidget * widget, gint response, gpointer data)
|
||||
{
|
||||
Editor * editor = data;
|
||||
|
||||
if(response != GTK_RESPONSE_ACCEPT)
|
||||
{
|
||||
gtk_widget_hide(widget);
|
||||
if(response == GTK_RESPONSE_DELETE_EVENT)
|
||||
editor->fi_dialog = NULL;
|
||||
return;
|
||||
}
|
||||
_on_find_activate(editor->fi_entry, editor);
|
||||
gtk_widget_grab_focus(editor->fi_entry);
|
||||
}
|
||||
|
||||
|
||||
@ -1190,3 +1130,54 @@ static gboolean _find_match(Editor * editor, GtkTextBuffer * buffer,
|
||||
FALSE, 0.0, 0.0);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/* callbacks */
|
||||
/* editor_on_find_clicked */
|
||||
static void _editor_on_find_clicked(gpointer data)
|
||||
{
|
||||
Editor * editor = data;
|
||||
char const * text;
|
||||
GtkTreeModel * model = GTK_TREE_MODEL(editor->fi_store);
|
||||
GtkTreeIter iter;
|
||||
gboolean valid;
|
||||
char * p;
|
||||
int res;
|
||||
gboolean sensitive;
|
||||
gboolean wrap;
|
||||
|
||||
if((text = gtk_entry_get_text(GTK_ENTRY(editor->fi_entry))) == NULL
|
||||
|| strlen(text) == 0)
|
||||
return;
|
||||
/* only append the text currently searched if not already known */
|
||||
for(valid = gtk_tree_model_get_iter_first(model, &iter); valid == TRUE;
|
||||
valid = gtk_tree_model_iter_next(model, &iter))
|
||||
{
|
||||
gtk_tree_model_get(model, &iter, 0, &p, -1);
|
||||
res = strcmp(text, p);
|
||||
free(p);
|
||||
if(res == 0)
|
||||
break;
|
||||
}
|
||||
if(valid == FALSE)
|
||||
{
|
||||
gtk_list_store_append(editor->fi_store, &iter);
|
||||
gtk_list_store_set(editor->fi_store, &iter, 0, text, -1);
|
||||
}
|
||||
sensitive = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(
|
||||
editor->fi_case));
|
||||
wrap = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(
|
||||
editor->fi_wrap));
|
||||
if(_editor_find(editor, text, sensitive, wrap) == TRUE)
|
||||
return;
|
||||
editor_error(editor, _("Text not found"), 0);
|
||||
}
|
||||
|
||||
|
||||
/* editor_on_find_hide */
|
||||
static void _editor_on_find_hide(gpointer data)
|
||||
{
|
||||
Editor * editor = data;
|
||||
|
||||
gtk_widget_hide(editor->fi_dialog);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user