LCL/IDE: Improved usability of TreeView component editor, patch "treeeditor_fixes" by n7800. Issue #40748.

This commit is contained in:
wp_xyz 2024-02-22 00:00:50 +01:00
parent a3ba11e5c3
commit fd01caa9a2
24 changed files with 458 additions and 219 deletions

View File

@ -1784,12 +1784,18 @@ msgstr ""
msgid "Confirmation"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationimages
#: objinspstrconsts.sccstredtconfirmationfilereplace
msgctxt "objinspstrconsts.sccstredtconfirmationfilereplace"
msgid "The file already exists, replace it?"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationimagesloss
msgctxt "objinspstrconsts.sccstredtconfirmationimagesloss"
msgid "Information about node images cannot be stored in the file. Continue anyway?"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationreplace
msgid "The file already exists, replace it?"
#: objinspstrconsts.sccstredtconfirmationtreereplace
msgid "The current tree will be overwritten, continue?"
msgstr ""
#: objinspstrconsts.sccstredtdelete
@ -1813,17 +1819,22 @@ msgid "Item"
msgstr "Element"
#: objinspstrconsts.sccstredtlabelimageindex
#, object-pascal-format, fuzzy, badformat
#| msgid "Image Index"
msgctxt "objinspstrconsts.sccstredtlabelimageindex"
msgid "Image Index"
msgid "Image Index%s:"
msgstr "Index de l'Imatge"
#: objinspstrconsts.sccstredtlabelselindex
msgid "Selected Index"
#, object-pascal-format, fuzzy, badformat
#| msgid "Selected Index"
msgid "Selected Index%s:"
msgstr "Index sel·leccionat"
#: objinspstrconsts.sccstredtlabelstateindex
#, object-pascal-format
msgctxt "objinspstrconsts.sccstredtlabelstateindex"
msgid "State Index"
msgid "State Index%s:"
msgstr ""
#: objinspstrconsts.sccstredtnewitem

View File

@ -1723,12 +1723,18 @@ msgstr "Editor položek TreeView"
msgid "Confirmation"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationimages
#: objinspstrconsts.sccstredtconfirmationfilereplace
msgctxt "objinspstrconsts.sccstredtconfirmationfilereplace"
msgid "The file already exists, replace it?"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationimagesloss
msgctxt "objinspstrconsts.sccstredtconfirmationimagesloss"
msgid "Information about node images cannot be stored in the file. Continue anyway?"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationreplace
msgid "The file already exists, replace it?"
#: objinspstrconsts.sccstredtconfirmationtreereplace
msgid "The current tree will be overwritten, continue?"
msgstr ""
#: objinspstrconsts.sccstredtdelete
@ -1752,17 +1758,23 @@ msgid "Item"
msgstr "Položka"
#: objinspstrconsts.sccstredtlabelimageindex
#, object-pascal-format, fuzzy, badformat
#| msgid "Image Index"
msgctxt "objinspstrconsts.sccstredtlabelimageindex"
msgid "Image Index"
msgid "Image Index%s:"
msgstr "Index obrázku"
#: objinspstrconsts.sccstredtlabelselindex
msgid "Selected Index"
#, object-pascal-format, fuzzy, badformat
#| msgid "Selected Index"
msgid "Selected Index%s:"
msgstr "Vybraný index"
#: objinspstrconsts.sccstredtlabelstateindex
#, object-pascal-format, fuzzy, badformat
#| msgid "State Index"
msgctxt "objinspstrconsts.sccstredtlabelstateindex"
msgid "State Index"
msgid "State Index%s:"
msgstr "Stavový index"
#: objinspstrconsts.sccstredtnewitem

View File

@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: 2024-02-18 01:21+0100\n"
"PO-Revision-Date: 2024-02-21 23:55+0100\n"
"Last-Translator: Swen Heinig <swen@heinig.email>\n"
"Language-Team: Deutsch <lazarus@miraclec.com>\n"
"Language: de\n"
@ -242,11 +242,11 @@ msgstr "&Name:"
#: objinspstrconsts.fesnofields
msgid "It was not possible to get the dataset fields list."
msgstr "Es war nicht möglich, die Liste der Felder des Datasets zu lesen"
msgstr "Es war nicht möglich, die Liste der Felder des Datasets zu lesen."
#: objinspstrconsts.fesnofieldsnote
msgid "Fields list is not available, can't check for duplicates."
msgstr "Feldliste ist nicht verfügbar, kann nicht auf Duplikate prüfen"
msgstr "Feldliste ist nicht verfügbar, kann nicht auf Duplikate prüfen."
#: objinspstrconsts.fesokbtn
msgctxt "objinspstrconsts.fesokbtn"
@ -1720,13 +1720,19 @@ msgstr "Editor für TreeView-Einträge"
msgid "Confirmation"
msgstr "Bestätigung"
#: objinspstrconsts.sccstredtconfirmationimages
#: objinspstrconsts.sccstredtconfirmationfilereplace
msgctxt "objinspstrconsts.sccstredtconfirmationfilereplace"
msgid "The file already exists, replace it?"
msgstr "Die Datei existiert bereits. Soll sie ersetzt werden?"
#: objinspstrconsts.sccstredtconfirmationimagesloss
msgctxt "objinspstrconsts.sccstredtconfirmationimagesloss"
msgid "Information about node images cannot be stored in the file. Continue anyway?"
msgstr "Information über die Knoten-Bilder kann nicht in der Datei gespeichert werden. Trotzdem fortfahren?"
#: objinspstrconsts.sccstredtconfirmationreplace
msgid "The file already exists, replace it?"
msgstr "Die Datei existiert bereits. Soll sie ersetzt werden?"
#: objinspstrconsts.sccstredtconfirmationtreereplace
msgid "The current tree will be overwritten, continue?"
msgstr "Der aktuelle Baum wird überschrieben. Fortfahren?"
#: objinspstrconsts.sccstredtdelete
msgctxt "objinspstrconsts.sccstredtdelete"
@ -1734,16 +1740,14 @@ msgid "Delete"
msgstr "Löschen"
#: objinspstrconsts.sccstredtimagelistnotassigned
#, object-pascal-format, fuzzy
#| msgid "%s not assigned."
#, object-pascal-format
msgid "\"%s\" not assigned"
msgstr "%s nicht zugewiesen."
msgstr "%s nicht zugewiesen"
#: objinspstrconsts.sccstredtinvalidindex
#, object-pascal-format, fuzzy
#| msgid "%s has only %d images."
#, object-pascal-format
msgid "\"%s\" has only %d images"
msgstr "%s enthält nur %d Bilder."
msgstr "%s enthält nur %d Bilder"
#: objinspstrconsts.sccstredtitem
msgctxt "objinspstrconsts.sccstredtitem"
@ -1751,18 +1755,21 @@ msgid "Item"
msgstr "Eintrag"
#: objinspstrconsts.sccstredtlabelimageindex
#, object-pascal-format
msgctxt "objinspstrconsts.sccstredtlabelimageindex"
msgid "Image Index"
msgstr "Bildindex"
msgid "Image Index%s:"
msgstr "Bildindex %s:"
#: objinspstrconsts.sccstredtlabelselindex
msgid "Selected Index"
msgstr "Ausgewählter Index"
#, object-pascal-format
msgid "Selected Index%s:"
msgstr "Ausgewählter Index %s:"
#: objinspstrconsts.sccstredtlabelstateindex
#, object-pascal-format
msgctxt "objinspstrconsts.sccstredtlabelstateindex"
msgid "State Index"
msgstr "Statusindex"
msgid "State Index%s:"
msgstr "Statusindex %s:"
#: objinspstrconsts.sccstredtnewitem
msgctxt "objinspstrconsts.sccstredtnewitem"
@ -1780,7 +1787,7 @@ msgstr "&Nein"
#: objinspstrconsts.sccstredtopen
msgid "Open file"
msgstr ""
msgstr "Datei öffnen"
#: objinspstrconsts.sccstredtopendialog
msgctxt "objinspstrconsts.sccstredtopendialog"
@ -1864,4 +1871,3 @@ msgstr "Tab nach links bewegen"
#: objinspstrconsts.tccesmovetabright
msgid "Move tab right"
msgstr "Tab nach rechts bewegen"

View File

@ -1722,12 +1722,18 @@ msgstr "Editor de elementos de TreeView"
msgid "Confirmation"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationimages
#: objinspstrconsts.sccstredtconfirmationfilereplace
msgctxt "objinspstrconsts.sccstredtconfirmationfilereplace"
msgid "The file already exists, replace it?"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationimagesloss
msgctxt "objinspstrconsts.sccstredtconfirmationimagesloss"
msgid "Information about node images cannot be stored in the file. Continue anyway?"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationreplace
msgid "The file already exists, replace it?"
#: objinspstrconsts.sccstredtconfirmationtreereplace
msgid "The current tree will be overwritten, continue?"
msgstr ""
#: objinspstrconsts.sccstredtdelete
@ -1751,17 +1757,23 @@ msgid "Item"
msgstr "Elemento"
#: objinspstrconsts.sccstredtlabelimageindex
#, object-pascal-format, fuzzy, badformat
#| msgid "Image Index"
msgctxt "objinspstrconsts.sccstredtlabelimageindex"
msgid "Image Index"
msgid "Image Index%s:"
msgstr "Índice de imagen"
#: objinspstrconsts.sccstredtlabelselindex
msgid "Selected Index"
#, object-pascal-format, fuzzy, badformat
#| msgid "Selected Index"
msgid "Selected Index%s:"
msgstr "Índice seleccionado"
#: objinspstrconsts.sccstredtlabelstateindex
#, object-pascal-format, fuzzy, badformat
#| msgid "State Index"
msgctxt "objinspstrconsts.sccstredtlabelstateindex"
msgid "State Index"
msgid "State Index%s:"
msgstr "Índice de estado"
#: objinspstrconsts.sccstredtnewitem

View File

@ -1722,12 +1722,18 @@ msgstr "TreeView:n kohtien muokkain"
msgid "Confirmation"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationimages
#: objinspstrconsts.sccstredtconfirmationfilereplace
msgctxt "objinspstrconsts.sccstredtconfirmationfilereplace"
msgid "The file already exists, replace it?"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationimagesloss
msgctxt "objinspstrconsts.sccstredtconfirmationimagesloss"
msgid "Information about node images cannot be stored in the file. Continue anyway?"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationreplace
msgid "The file already exists, replace it?"
#: objinspstrconsts.sccstredtconfirmationtreereplace
msgid "The current tree will be overwritten, continue?"
msgstr ""
#: objinspstrconsts.sccstredtdelete
@ -1751,17 +1757,23 @@ msgid "Item"
msgstr "Kohta"
#: objinspstrconsts.sccstredtlabelimageindex
#, object-pascal-format, fuzzy, badformat
#| msgid "Image Index"
msgctxt "objinspstrconsts.sccstredtlabelimageindex"
msgid "Image Index"
msgid "Image Index%s:"
msgstr "Kuvan index"
#: objinspstrconsts.sccstredtlabelselindex
msgid "Selected Index"
#, object-pascal-format, fuzzy, badformat
#| msgid "Selected Index"
msgid "Selected Index%s:"
msgstr "Valittu index"
#: objinspstrconsts.sccstredtlabelstateindex
#, object-pascal-format, fuzzy, badformat
#| msgid "State Index"
msgctxt "objinspstrconsts.sccstredtlabelstateindex"
msgid "State Index"
msgid "State Index%s:"
msgstr "Tilan index"
#: objinspstrconsts.sccstredtnewitem

View File

@ -1719,12 +1719,18 @@ msgstr "Éditeur d'éléments TreeView"
msgid "Confirmation"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationimages
#: objinspstrconsts.sccstredtconfirmationfilereplace
msgctxt "objinspstrconsts.sccstredtconfirmationfilereplace"
msgid "The file already exists, replace it?"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationimagesloss
msgctxt "objinspstrconsts.sccstredtconfirmationimagesloss"
msgid "Information about node images cannot be stored in the file. Continue anyway?"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationreplace
msgid "The file already exists, replace it?"
#: objinspstrconsts.sccstredtconfirmationtreereplace
msgid "The current tree will be overwritten, continue?"
msgstr ""
#: objinspstrconsts.sccstredtdelete
@ -1748,17 +1754,23 @@ msgid "Item"
msgstr "Élément"
#: objinspstrconsts.sccstredtlabelimageindex
#, object-pascal-format, fuzzy, badformat
#| msgid "Image Index"
msgctxt "objinspstrconsts.sccstredtlabelimageindex"
msgid "Image Index"
msgid "Image Index%s:"
msgstr "Index d'image"
#: objinspstrconsts.sccstredtlabelselindex
msgid "Selected Index"
#, object-pascal-format, fuzzy, badformat
#| msgid "Selected Index"
msgid "Selected Index%s:"
msgstr "Index sélectionné"
#: objinspstrconsts.sccstredtlabelstateindex
#, object-pascal-format, fuzzy, badformat
#| msgid "State Index"
msgctxt "objinspstrconsts.sccstredtlabelstateindex"
msgid "State Index"
msgid "State Index%s:"
msgstr "Index d'état"
#: objinspstrconsts.sccstredtnewitem

View File

@ -1795,12 +1795,18 @@ msgstr "תצוגת עץ של עורך פריטים"
msgid "Confirmation"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationimages
#: objinspstrconsts.sccstredtconfirmationfilereplace
msgctxt "objinspstrconsts.sccstredtconfirmationfilereplace"
msgid "The file already exists, replace it?"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationimagesloss
msgctxt "objinspstrconsts.sccstredtconfirmationimagesloss"
msgid "Information about node images cannot be stored in the file. Continue anyway?"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationreplace
msgid "The file already exists, replace it?"
#: objinspstrconsts.sccstredtconfirmationtreereplace
msgid "The current tree will be overwritten, continue?"
msgstr ""
#: objinspstrconsts.sccstredtdelete
@ -1824,19 +1830,23 @@ msgid "Item"
msgstr "פריט"
#: objinspstrconsts.sccstredtlabelimageindex
#, object-pascal-format, fuzzy, badformat
#| msgid "Image Index"
msgctxt "objinspstrconsts.sccstredtlabelimageindex"
msgid "Image Index"
msgid "Image Index%s:"
msgstr "אינדקס דמות"
#: objinspstrconsts.sccstredtlabelselindex
#, fuzzy
#, object-pascal-format, fuzzy, badformat
#| msgid "Selected Index:"
msgid "Selected Index"
msgid "Selected Index%s:"
msgstr "אינדקס שנבחר"
#: objinspstrconsts.sccstredtlabelstateindex
#, object-pascal-format, fuzzy, badformat
#| msgid "State Index"
msgctxt "objinspstrconsts.sccstredtlabelstateindex"
msgid "State Index"
msgid "State Index%s:"
msgstr "אינדקס מצב"
#: objinspstrconsts.sccstredtnewitem

View File

@ -1722,12 +1722,18 @@ msgstr "TreeView elemszerkesztő"
msgid "Confirmation"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationimages
#: objinspstrconsts.sccstredtconfirmationfilereplace
msgctxt "objinspstrconsts.sccstredtconfirmationfilereplace"
msgid "The file already exists, replace it?"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationimagesloss
msgctxt "objinspstrconsts.sccstredtconfirmationimagesloss"
msgid "Information about node images cannot be stored in the file. Continue anyway?"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationreplace
msgid "The file already exists, replace it?"
#: objinspstrconsts.sccstredtconfirmationtreereplace
msgid "The current tree will be overwritten, continue?"
msgstr ""
#: objinspstrconsts.sccstredtdelete
@ -1751,17 +1757,23 @@ msgid "Item"
msgstr "Elem"
#: objinspstrconsts.sccstredtlabelimageindex
#, object-pascal-format, fuzzy, badformat
#| msgid "Image Index"
msgctxt "objinspstrconsts.sccstredtlabelimageindex"
msgid "Image Index"
msgid "Image Index%s:"
msgstr "Kép index"
#: objinspstrconsts.sccstredtlabelselindex
msgid "Selected Index"
#, object-pascal-format, fuzzy, badformat
#| msgid "Selected Index"
msgid "Selected Index%s:"
msgstr "Kijelölt index"
#: objinspstrconsts.sccstredtlabelstateindex
#, object-pascal-format, fuzzy, badformat
#| msgid "State Index"
msgctxt "objinspstrconsts.sccstredtlabelstateindex"
msgid "State Index"
msgid "State Index%s:"
msgstr "Állapot index"
#: objinspstrconsts.sccstredtnewitem

View File

@ -1798,12 +1798,18 @@ msgstr "Editor Item TreeView"
msgid "Confirmation"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationimages
#: objinspstrconsts.sccstredtconfirmationfilereplace
msgctxt "objinspstrconsts.sccstredtconfirmationfilereplace"
msgid "The file already exists, replace it?"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationimagesloss
msgctxt "objinspstrconsts.sccstredtconfirmationimagesloss"
msgid "Information about node images cannot be stored in the file. Continue anyway?"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationreplace
msgid "The file already exists, replace it?"
#: objinspstrconsts.sccstredtconfirmationtreereplace
msgid "The current tree will be overwritten, continue?"
msgstr ""
#: objinspstrconsts.sccstredtdelete
@ -1827,19 +1833,23 @@ msgid "Item"
msgstr "Item"
#: objinspstrconsts.sccstredtlabelimageindex
#, object-pascal-format, fuzzy, badformat
#| msgid "Image Index"
msgctxt "objinspstrconsts.sccstredtlabelimageindex"
msgid "Image Index"
msgid "Image Index%s:"
msgstr "Indeks Gambar"
#: objinspstrconsts.sccstredtlabelselindex
#, fuzzy
#, object-pascal-format, fuzzy, badformat
#| msgid "Selected Index:"
msgid "Selected Index"
msgid "Selected Index%s:"
msgstr "Indeks Dipilih"
#: objinspstrconsts.sccstredtlabelstateindex
#, object-pascal-format, fuzzy, badformat
#| msgid "State Index"
msgctxt "objinspstrconsts.sccstredtlabelstateindex"
msgid "State Index"
msgid "State Index%s:"
msgstr "Indeks Keadaan"
#: objinspstrconsts.sccstredtnewitem

View File

@ -1725,12 +1725,18 @@ msgstr "Editor voci della Treeview"
msgid "Confirmation"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationimages
#: objinspstrconsts.sccstredtconfirmationfilereplace
msgctxt "objinspstrconsts.sccstredtconfirmationfilereplace"
msgid "The file already exists, replace it?"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationimagesloss
msgctxt "objinspstrconsts.sccstredtconfirmationimagesloss"
msgid "Information about node images cannot be stored in the file. Continue anyway?"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationreplace
msgid "The file already exists, replace it?"
#: objinspstrconsts.sccstredtconfirmationtreereplace
msgid "The current tree will be overwritten, continue?"
msgstr ""
#: objinspstrconsts.sccstredtdelete
@ -1754,17 +1760,23 @@ msgid "Item"
msgstr "Voce"
#: objinspstrconsts.sccstredtlabelimageindex
#, object-pascal-format, fuzzy, badformat
#| msgid "Image Index"
msgctxt "objinspstrconsts.sccstredtlabelimageindex"
msgid "Image Index"
msgid "Image Index%s:"
msgstr "Image Index"
#: objinspstrconsts.sccstredtlabelselindex
msgid "Selected Index"
#, object-pascal-format, fuzzy, badformat
#| msgid "Selected Index"
msgid "Selected Index%s:"
msgstr "Indice selezionato"
#: objinspstrconsts.sccstredtlabelstateindex
#, object-pascal-format, fuzzy, badformat
#| msgid "State Index"
msgctxt "objinspstrconsts.sccstredtlabelstateindex"
msgid "State Index"
msgid "State Index%s:"
msgstr "Indice di Stato"
#: objinspstrconsts.sccstredtnewitem

View File

@ -1732,12 +1732,18 @@ msgstr "ツリービューアイテムエディタ"
msgid "Confirmation"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationimages
#: objinspstrconsts.sccstredtconfirmationfilereplace
msgctxt "objinspstrconsts.sccstredtconfirmationfilereplace"
msgid "The file already exists, replace it?"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationimagesloss
msgctxt "objinspstrconsts.sccstredtconfirmationimagesloss"
msgid "Information about node images cannot be stored in the file. Continue anyway?"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationreplace
msgid "The file already exists, replace it?"
#: objinspstrconsts.sccstredtconfirmationtreereplace
msgid "The current tree will be overwritten, continue?"
msgstr ""
#: objinspstrconsts.sccstredtdelete
@ -1761,17 +1767,23 @@ msgid "Item"
msgstr "項目"
#: objinspstrconsts.sccstredtlabelimageindex
#, object-pascal-format, fuzzy, badformat
#| msgid "Image Index"
msgctxt "objinspstrconsts.sccstredtlabelimageindex"
msgid "Image Index"
msgid "Image Index%s:"
msgstr "イメージのインデックス"
#: objinspstrconsts.sccstredtlabelselindex
msgid "Selected Index"
#, object-pascal-format, fuzzy, badformat
#| msgid "Selected Index"
msgid "Selected Index%s:"
msgstr "選択時のインデックス"
#: objinspstrconsts.sccstredtlabelstateindex
#, object-pascal-format, fuzzy, badformat
#| msgid "State Index"
msgctxt "objinspstrconsts.sccstredtlabelstateindex"
msgid "State Index"
msgid "State Index%s:"
msgstr "ステートのインデックス"
#: objinspstrconsts.sccstredtnewitem

View File

@ -1724,12 +1724,18 @@ msgstr "TreeView elementų rengyklė"
msgid "Confirmation"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationimages
#: objinspstrconsts.sccstredtconfirmationfilereplace
msgctxt "objinspstrconsts.sccstredtconfirmationfilereplace"
msgid "The file already exists, replace it?"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationimagesloss
msgctxt "objinspstrconsts.sccstredtconfirmationimagesloss"
msgid "Information about node images cannot be stored in the file. Continue anyway?"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationreplace
msgid "The file already exists, replace it?"
#: objinspstrconsts.sccstredtconfirmationtreereplace
msgid "The current tree will be overwritten, continue?"
msgstr ""
#: objinspstrconsts.sccstredtdelete
@ -1753,17 +1759,23 @@ msgid "Item"
msgstr "Elementas"
#: objinspstrconsts.sccstredtlabelimageindex
#, object-pascal-format, fuzzy, badformat
#| msgid "Image Index"
msgctxt "objinspstrconsts.sccstredtlabelimageindex"
msgid "Image Index"
msgid "Image Index%s:"
msgstr "Įprastas pav."
#: objinspstrconsts.sccstredtlabelselindex
msgid "Selected Index"
#, object-pascal-format, fuzzy, badformat
#| msgid "Selected Index"
msgid "Selected Index%s:"
msgstr "Pav. pažymėjus"
#: objinspstrconsts.sccstredtlabelstateindex
#, object-pascal-format, fuzzy, badformat
#| msgid "State Index"
msgctxt "objinspstrconsts.sccstredtlabelstateindex"
msgid "State Index"
msgid "State Index%s:"
msgstr "Būsenos pav."
#: objinspstrconsts.sccstredtnewitem

View File

@ -1787,12 +1787,18 @@ msgstr "TreeView Onderdelen editor"
msgid "Confirmation"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationimages
#: objinspstrconsts.sccstredtconfirmationfilereplace
msgctxt "objinspstrconsts.sccstredtconfirmationfilereplace"
msgid "The file already exists, replace it?"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationimagesloss
msgctxt "objinspstrconsts.sccstredtconfirmationimagesloss"
msgid "Information about node images cannot be stored in the file. Continue anyway?"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationreplace
msgid "The file already exists, replace it?"
#: objinspstrconsts.sccstredtconfirmationtreereplace
msgid "The current tree will be overwritten, continue?"
msgstr ""
#: objinspstrconsts.sccstredtdelete
@ -1816,17 +1822,23 @@ msgid "Item"
msgstr "Onderdeel"
#: objinspstrconsts.sccstredtlabelimageindex
#, object-pascal-format, fuzzy, badformat
#| msgid "Image Index"
msgctxt "objinspstrconsts.sccstredtlabelimageindex"
msgid "Image Index"
msgid "Image Index%s:"
msgstr "Afbeelding Index"
#: objinspstrconsts.sccstredtlabelselindex
msgid "Selected Index"
#, object-pascal-format, fuzzy, badformat
#| msgid "Selected Index"
msgid "Selected Index%s:"
msgstr "Geselecteerde index"
#: objinspstrconsts.sccstredtlabelstateindex
#, object-pascal-format, fuzzy, badformat
#| msgid "State Index"
msgctxt "objinspstrconsts.sccstredtlabelstateindex"
msgid "State Index"
msgid "State Index%s:"
msgstr "Status index"
#: objinspstrconsts.sccstredtnewitem

View File

@ -1717,12 +1717,18 @@ msgstr "Edytor elementów TreeView"
msgid "Confirmation"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationimages
#: objinspstrconsts.sccstredtconfirmationfilereplace
msgctxt "objinspstrconsts.sccstredtconfirmationfilereplace"
msgid "The file already exists, replace it?"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationimagesloss
msgctxt "objinspstrconsts.sccstredtconfirmationimagesloss"
msgid "Information about node images cannot be stored in the file. Continue anyway?"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationreplace
msgid "The file already exists, replace it?"
#: objinspstrconsts.sccstredtconfirmationtreereplace
msgid "The current tree will be overwritten, continue?"
msgstr ""
#: objinspstrconsts.sccstredtdelete
@ -1746,17 +1752,20 @@ msgid "Item"
msgstr "Element"
#: objinspstrconsts.sccstredtlabelimageindex
#, object-pascal-format
msgctxt "objinspstrconsts.sccstredtlabelimageindex"
msgid "Image Index"
msgid "Image Index%s:"
msgstr ""
#: objinspstrconsts.sccstredtlabelselindex
msgid "Selected Index"
#, object-pascal-format
msgid "Selected Index%s:"
msgstr ""
#: objinspstrconsts.sccstredtlabelstateindex
#, object-pascal-format
msgctxt "objinspstrconsts.sccstredtlabelstateindex"
msgid "State Index"
msgid "State Index%s:"
msgstr ""
#: objinspstrconsts.sccstredtnewitem

View File

@ -1706,12 +1706,18 @@ msgstr ""
msgid "Confirmation"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationimages
#: objinspstrconsts.sccstredtconfirmationfilereplace
msgctxt "objinspstrconsts.sccstredtconfirmationfilereplace"
msgid "The file already exists, replace it?"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationimagesloss
msgctxt "objinspstrconsts.sccstredtconfirmationimagesloss"
msgid "Information about node images cannot be stored in the file. Continue anyway?"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationreplace
msgid "The file already exists, replace it?"
#: objinspstrconsts.sccstredtconfirmationtreereplace
msgid "The current tree will be overwritten, continue?"
msgstr ""
#: objinspstrconsts.sccstredtdelete
@ -1735,17 +1741,20 @@ msgid "Item"
msgstr ""
#: objinspstrconsts.sccstredtlabelimageindex
#, object-pascal-format
msgctxt "objinspstrconsts.sccstredtlabelimageindex"
msgid "Image Index"
msgid "Image Index%s:"
msgstr ""
#: objinspstrconsts.sccstredtlabelselindex
msgid "Selected Index"
#, object-pascal-format
msgid "Selected Index%s:"
msgstr ""
#: objinspstrconsts.sccstredtlabelstateindex
#, object-pascal-format
msgctxt "objinspstrconsts.sccstredtlabelstateindex"
msgid "State Index"
msgid "State Index%s:"
msgstr ""
#: objinspstrconsts.sccstredtnewitem

View File

@ -1716,12 +1716,18 @@ msgstr "Editor Itens \"TreeView\""
msgid "Confirmation"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationimages
#: objinspstrconsts.sccstredtconfirmationfilereplace
msgctxt "objinspstrconsts.sccstredtconfirmationfilereplace"
msgid "The file already exists, replace it?"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationimagesloss
msgctxt "objinspstrconsts.sccstredtconfirmationimagesloss"
msgid "Information about node images cannot be stored in the file. Continue anyway?"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationreplace
msgid "The file already exists, replace it?"
#: objinspstrconsts.sccstredtconfirmationtreereplace
msgid "The current tree will be overwritten, continue?"
msgstr ""
#: objinspstrconsts.sccstredtdelete
@ -1745,17 +1751,23 @@ msgid "Item"
msgstr "Item"
#: objinspstrconsts.sccstredtlabelimageindex
#, object-pascal-format, fuzzy, badformat
#| msgid "Image Index"
msgctxt "objinspstrconsts.sccstredtlabelimageindex"
msgid "Image Index"
msgid "Image Index%s:"
msgstr "Índice Imagem"
#: objinspstrconsts.sccstredtlabelselindex
msgid "Selected Index"
#, object-pascal-format, fuzzy, badformat
#| msgid "Selected Index"
msgid "Selected Index%s:"
msgstr "Índice Selecionado"
#: objinspstrconsts.sccstredtlabelstateindex
#, object-pascal-format, fuzzy, badformat
#| msgid "State Index"
msgctxt "objinspstrconsts.sccstredtlabelstateindex"
msgid "State Index"
msgid "State Index%s:"
msgstr "Índice Estado"
#: objinspstrconsts.sccstredtnewitem

View File

@ -1715,13 +1715,21 @@ msgstr "Редактор элементов TreeView"
msgid "Confirmation"
msgstr "Подтверждение"
#: objinspstrconsts.sccstredtconfirmationimages
#: objinspstrconsts.sccstredtconfirmationfilereplace
#, fuzzy
msgctxt "objinspstrconsts.sccstredtconfirmationfilereplace"
msgid "The file already exists, replace it?"
msgstr "Файл уже существует. Заменить его?"
#: objinspstrconsts.sccstredtconfirmationimagesloss
#, fuzzy
msgctxt "objinspstrconsts.sccstredtconfirmationimagesloss"
msgid "Information about node images cannot be stored in the file. Continue anyway?"
msgstr "Сведения об изображениях элементов не могут быть сохранены в файл. Продолжить всё равно?"
#: objinspstrconsts.sccstredtconfirmationreplace
msgid "The file already exists, replace it?"
msgstr "Файл уже существует. Заменить его?"
#: objinspstrconsts.sccstredtconfirmationtreereplace
msgid "The current tree will be overwritten, continue?"
msgstr ""
#: objinspstrconsts.sccstredtdelete
msgctxt "objinspstrconsts.sccstredtdelete"
@ -1746,17 +1754,23 @@ msgid "Item"
msgstr "Элемент"
#: objinspstrconsts.sccstredtlabelimageindex
#, object-pascal-format, fuzzy, badformat
#| msgid "Image Index"
msgctxt "objinspstrconsts.sccstredtlabelimageindex"
msgid "Image Index"
msgid "Image Index%s:"
msgstr "Индекс изображения"
#: objinspstrconsts.sccstredtlabelselindex
msgid "Selected Index"
#, object-pascal-format, fuzzy, badformat
#| msgid "Selected Index"
msgid "Selected Index%s:"
msgstr "Выбранный индекс"
#: objinspstrconsts.sccstredtlabelstateindex
#, object-pascal-format, fuzzy, badformat
#| msgid "State Index"
msgctxt "objinspstrconsts.sccstredtlabelstateindex"
msgid "State Index"
msgid "State Index%s:"
msgstr "Индекс состояния"
#: objinspstrconsts.sccstredtnewitem

View File

@ -1730,12 +1730,18 @@ msgstr "Editor položiek TreeView"
msgid "Confirmation"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationimages
#: objinspstrconsts.sccstredtconfirmationfilereplace
msgctxt "objinspstrconsts.sccstredtconfirmationfilereplace"
msgid "The file already exists, replace it?"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationimagesloss
msgctxt "objinspstrconsts.sccstredtconfirmationimagesloss"
msgid "Information about node images cannot be stored in the file. Continue anyway?"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationreplace
msgid "The file already exists, replace it?"
#: objinspstrconsts.sccstredtconfirmationtreereplace
msgid "The current tree will be overwritten, continue?"
msgstr ""
#: objinspstrconsts.sccstredtdelete
@ -1759,17 +1765,23 @@ msgid "Item"
msgstr "Položka"
#: objinspstrconsts.sccstredtlabelimageindex
#, object-pascal-format, fuzzy, badformat
#| msgid "Image Index"
msgctxt "objinspstrconsts.sccstredtlabelimageindex"
msgid "Image Index"
msgid "Image Index%s:"
msgstr "Index obrázka"
#: objinspstrconsts.sccstredtlabelselindex
msgid "Selected Index"
#, object-pascal-format, fuzzy, badformat
#| msgid "Selected Index"
msgid "Selected Index%s:"
msgstr "Index výberu"
#: objinspstrconsts.sccstredtlabelstateindex
#, object-pascal-format, fuzzy, badformat
#| msgid "State Index"
msgctxt "objinspstrconsts.sccstredtlabelstateindex"
msgid "State Index"
msgid "State Index%s:"
msgstr "Index stavu"
#: objinspstrconsts.sccstredtnewitem

View File

@ -1716,12 +1716,18 @@ msgstr "TreeView Öğe düzenleyici"
msgid "Confirmation"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationimages
#: objinspstrconsts.sccstredtconfirmationfilereplace
msgctxt "objinspstrconsts.sccstredtconfirmationfilereplace"
msgid "The file already exists, replace it?"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationimagesloss
msgctxt "objinspstrconsts.sccstredtconfirmationimagesloss"
msgid "Information about node images cannot be stored in the file. Continue anyway?"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationreplace
msgid "The file already exists, replace it?"
#: objinspstrconsts.sccstredtconfirmationtreereplace
msgid "The current tree will be overwritten, continue?"
msgstr ""
#: objinspstrconsts.sccstredtdelete
@ -1745,17 +1751,23 @@ msgid "Item"
msgstr "Öğe"
#: objinspstrconsts.sccstredtlabelimageindex
#, object-pascal-format, fuzzy, badformat
#| msgid "Image Index"
msgctxt "objinspstrconsts.sccstredtlabelimageindex"
msgid "Image Index"
msgid "Image Index%s:"
msgstr "Resim Dizini"
#: objinspstrconsts.sccstredtlabelselindex
msgid "Selected Index"
#, object-pascal-format, fuzzy, badformat
#| msgid "Selected Index"
msgid "Selected Index%s:"
msgstr "Seçilen dizin"
#: objinspstrconsts.sccstredtlabelstateindex
#, object-pascal-format, fuzzy, badformat
#| msgid "State Index"
msgctxt "objinspstrconsts.sccstredtlabelstateindex"
msgid "State Index"
msgid "State Index%s:"
msgstr "Durum dizini"
#: objinspstrconsts.sccstredtnewitem

View File

@ -1719,12 +1719,18 @@ msgstr "Редактор елементів TreeView"
msgid "Confirmation"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationimages
#: objinspstrconsts.sccstredtconfirmationfilereplace
msgctxt "objinspstrconsts.sccstredtconfirmationfilereplace"
msgid "The file already exists, replace it?"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationimagesloss
msgctxt "objinspstrconsts.sccstredtconfirmationimagesloss"
msgid "Information about node images cannot be stored in the file. Continue anyway?"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationreplace
msgid "The file already exists, replace it?"
#: objinspstrconsts.sccstredtconfirmationtreereplace
msgid "The current tree will be overwritten, continue?"
msgstr ""
#: objinspstrconsts.sccstredtdelete
@ -1748,17 +1754,23 @@ msgid "Item"
msgstr "Елемент"
#: objinspstrconsts.sccstredtlabelimageindex
#, object-pascal-format, fuzzy, badformat
#| msgid "Image Index"
msgctxt "objinspstrconsts.sccstredtlabelimageindex"
msgid "Image Index"
msgid "Image Index%s:"
msgstr "Індекс зображення"
#: objinspstrconsts.sccstredtlabelselindex
msgid "Selected Index"
#, object-pascal-format, fuzzy, badformat
#| msgid "Selected Index"
msgid "Selected Index%s:"
msgstr "Вибраний індекс"
#: objinspstrconsts.sccstredtlabelstateindex
#, object-pascal-format, fuzzy, badformat
#| msgid "State Index"
msgctxt "objinspstrconsts.sccstredtlabelstateindex"
msgid "State Index"
msgid "State Index%s:"
msgstr "Індекс стану"
#: objinspstrconsts.sccstredtnewitem

View File

@ -1719,12 +1719,18 @@ msgstr "TreeView项目编辑器"
msgid "Confirmation"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationimages
#: objinspstrconsts.sccstredtconfirmationfilereplace
msgctxt "objinspstrconsts.sccstredtconfirmationfilereplace"
msgid "The file already exists, replace it?"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationimagesloss
msgctxt "objinspstrconsts.sccstredtconfirmationimagesloss"
msgid "Information about node images cannot be stored in the file. Continue anyway?"
msgstr ""
#: objinspstrconsts.sccstredtconfirmationreplace
msgid "The file already exists, replace it?"
#: objinspstrconsts.sccstredtconfirmationtreereplace
msgid "The current tree will be overwritten, continue?"
msgstr ""
#: objinspstrconsts.sccstredtdelete
@ -1748,17 +1754,23 @@ msgid "Item"
msgstr "项目"
#: objinspstrconsts.sccstredtlabelimageindex
#, object-pascal-format, fuzzy, badformat
#| msgid "Image Index"
msgctxt "objinspstrconsts.sccstredtlabelimageindex"
msgid "Image Index"
msgid "Image Index%s:"
msgstr "图片索引"
#: objinspstrconsts.sccstredtlabelselindex
msgid "Selected Index"
#, object-pascal-format, fuzzy, badformat
#| msgid "Selected Index"
msgid "Selected Index%s:"
msgstr "选择索引"
#: objinspstrconsts.sccstredtlabelstateindex
#, object-pascal-format, fuzzy, badformat
#| msgid "State Index"
msgctxt "objinspstrconsts.sccstredtlabelstateindex"
msgid "State Index"
msgid "State Index%s:"
msgstr "状态索引"
#: objinspstrconsts.sccstredtnewitem

View File

@ -104,9 +104,9 @@ resourcestring
sccsTrEdtApply = 'Apply';
sccsTrEdtOpen = 'Open file';
sccsTrEdtSave = 'Save to file';
sccsTrEdtLabelImageIndex = 'Image Index';
sccsTrEdtLabelSelIndex = 'Selected Index';
sccsTrEdtLabelStateIndex = 'State Index';
sccsTrEdtLabelImageIndex = 'Image Index%s:';
sccsTrEdtLabelSelIndex = 'Selected Index%s:';
sccsTrEdtLabelStateIndex = 'State Index%s:';
sccsTrEdtItem = 'Item';
sccsTrEdtOpenDialog = 'Open';
sccsTrEdtSaveDialog = 'Save';
@ -115,9 +115,10 @@ resourcestring
sccsTrEdtCancel = '&Cancel';
sccsTrEdtInvalidIndex = '"%s" has only %d images';
sccsTrEdtImageListNotAssigned = '"%s" not assigned';
sccsTrEdtConfirmationCaption = 'Confirmation';
sccsTrEdtConfirmationImages = 'Information about node images cannot be stored in the file. Continue anyway?';
sccsTrEdtConfirmationReplace = 'The file already exists, replace it?';
sccsTrEdtConfirmationCaption = 'Confirmation';
sccsTrEdtConfirmationImagesLoss = 'Information about node images cannot be stored in the file. Continue anyway?';
sccsTrEdtConfirmationFileReplace = 'The file already exists, replace it?';
sccsTrEdtConfirmationTreeReplace = 'The current tree will be overwritten, continue?';
// ListView Items Editor
sccsLvEdtCaption = 'ListView Items Editor';

View File

@ -51,6 +51,7 @@ object TreeViewItemsEditorForm: TTreeViewItemsEditorForm
Constraints.MinHeight = 25
Constraints.MinWidth = 75
TabOrder = 4
OnClick = btnApplyClick
end
end
object ToolBar: TToolBar
@ -64,13 +65,13 @@ object TreeViewItemsEditorForm: TTreeViewItemsEditorForm
Left = 1
Top = 2
Caption = 'tbNewItem'
OnClick = tbNewItemSubItemClick
OnClick = tbNewItemClick
end
object tbNewSubItem: TToolButton
Left = 24
Top = 2
Caption = 'tbNewSubItem'
OnClick = tbNewItemSubItemClick
OnClick = tbNewItemClick
end
object tb1: TToolButton
Left = 47
@ -134,6 +135,7 @@ object TreeViewItemsEditorForm: TTreeViewItemsEditorForm
Left = 182
Top = 2
Caption = 'tbOpen'
OnClick = tbOpenClick
end
end
object pnlImageIndexes: TPanel

View File

@ -65,7 +65,7 @@ type
procedure spnIndexChange(Sender: TObject);
procedure tbDeleteClick(Sender: TObject);
procedure tbMoveClick(Sender: TObject);
procedure tbNewItemSubItemClick(Sender: TObject);
procedure tbNewItemClick(Sender: TObject);
procedure tbOpenClick(Sender: TObject);
procedure tbRenameClick(Sender: TObject);
procedure tbSaveClick(Sender: TObject);
@ -74,11 +74,10 @@ type
fModified: Boolean;
fTreeView: TCustomTreeView;
procedure LoadFromTree(aTreeView: TCustomTreeView);
procedure SaveToTree;
procedure SaveToSourceTree;
procedure UpdateEnabledStates;
procedure UpdateImageHints;
procedure FinishNodeEditing;
procedure CancelNodeEditing;
public
property Modified: Boolean read fModified write fModified;
end;
@ -103,14 +102,14 @@ implementation
{$R *.lfm}
{ The function returns TRUE if the tree has been changed. }
// The function returns true if the tree has been changed
function EditTreeView(ATreeView: TCustomTreeView): boolean;
begin
with TTreeViewItemsEditorForm.Create(Application) do
try
LoadFromTree(ATreeView);
if ShowModal = mrOK then
SaveToTree;
SaveToSourceTree;
Result := Modified;
finally
Free;
@ -121,10 +120,12 @@ end;
procedure TTreeViewItemsEditorForm.FormCreate(Sender: TObject);
begin
fModified := false;
{ Captions }
// form
self .Caption := sccsTrEdtCaption;
self .Caption := sccsTrEdtCaption;
btnApply.Caption := sccsTrEdtApply;
// toolbar
@ -139,9 +140,9 @@ begin
tbOpen .Hint := sccsTrEdtOpen + ' [Ctrl+O]';
// image indexes
lblImageIndex .Caption := sccsTrEdtLabelImageIndex + ':';
lblSelectedIndex.Caption := sccsTrEdtLabelSelIndex + ':';
lblStateIndex .Caption := sccsTrEdtLabelStateIndex + ':';
lblImageIndex .Caption := Format(sccsTrEdtLabelImageIndex, ['']);
lblSelectedIndex.Caption := Format(sccsTrEdtLabelSelIndex , ['']);
lblStateIndex .Caption := Format(sccsTrEdtLabelStateIndex, ['']);
// dialogs
dlgOpen.Title := sccsTrEdtOpenDialog;
@ -152,10 +153,9 @@ begin
{ Images }
// form
btnApply.LoadGlyphFromResource(idButtonRetry);
{ Hints }
// toolbar
ToolBar.Images := IDEImages.Images_16;
tbNewItem .ImageIndex := IDEImages.LoadImage('new_item');
@ -180,12 +180,12 @@ end;
procedure TTreeViewItemsEditorForm.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
var
lWasEdited: Boolean;
begin
// form actions
if (Key = VK_RETURN) and (Shift = [ssCtrl]) then
begin
FinishNodeEditing;
ModalResult := mrOK;
Key := 0;
end
@ -196,24 +196,26 @@ begin
end
else if (Key = VK_ESCAPE) and (Shift = []) then
begin
// pressing [Esc] in an open editor cancel text editing
if treEditor.IsEditing then
CancelNodeEditing
else
// pressing [Esc] in an open in-place editor cancel text editing
if not treEditor.IsEditing then
begin
ModalResult := mrCancel;
Key := 0;
Key := 0;
end;
end
// create item
else if (Key = VK_N) and (Shift = [ssCtrl]) then
begin
tbNewItemSubItemClick(tbNewItem); // "Sender" is the pressed button
tbNewItemClick(tbNewItem); // "Sender" is the pressed button
Key := 0;
end
else if (Key = VK_N) and (Shift = [ssCtrl, ssShift]) then
begin
tbNewItemSubItemClick(tbNewSubItem); // "Sender" is the pressed button
tbNewItemClick(tbNewSubItem); // "Sender" is the pressed button
Key := 0;
end
// delete item
else if (Key = VK_DELETE) and (Shift = []) then
begin
@ -225,6 +227,17 @@ begin
Key := 0;
end;
end
// rename item
// the location in the FormKeyDown makes it independent of the current focus
else if (Key = VK_F2) and (Shift = []) then
begin
if not treEditor.IsEditing then
if Assigned(treEditor.Selected) then
treEditor.Selected.EditText;
Key := 0;
end
// move item
else if (Key = VK_DOWN) and (Shift = [ssCtrl, ssShift]) then
begin
@ -236,13 +249,13 @@ begin
tbMoveClick(tbMoveUp); // "Sender" is the pressed button
Key := 0;
end
// move selection
else if (Key in [VK_DOWN, VK_UP]) and (Shift = []) then
begin
if treEditor.IsEditing then
begin
// close text editor
FinishNodeEditing;
// select next
if Key = VK_DOWN then
treEditor.MoveToNextNode(true)
@ -255,13 +268,14 @@ begin
Key := 0;
end;
end
// save and load in/from file
else if (Key = VK_S) and (Shift = [ssCtrl]) then
begin
tbSaveClick(Sender);
Key := 0;
end
else if (Key in [VK_L, VK_O]) and (Shift = [ssCtrl]) then
else if (Key in [VK_O]) and (Shift = [ssCtrl]) then
begin
tbOpenClick(Sender);
Key := 0;
@ -270,17 +284,14 @@ end;
procedure TTreeViewItemsEditorForm.tbRenameClick(Sender: TObject);
begin
treEditor.Selected.EditText;
if Assigned(treEditor.Selected) then
treEditor.Selected.EditText;
end;
procedure TTreeViewItemsEditorForm.tbNewItemSubItemClick(Sender: TObject);
procedure TTreeViewItemsEditorForm.tbNewItemClick(Sender: TObject);
var
lEdited: Boolean;
lNewName: String;
begin
lEdited := treEditor.IsEditing;
FinishNodeEditing;
lNewName := sccsTrEdtItem + IntToStr(treEditor.Items.Count);
if Sender = tbNewItem then
treEditor.Selected := treEditor.Items.Add(treEditor.Selected, lNewName)
@ -289,7 +300,7 @@ begin
else
raise Exception.Create('[tbNewItemClick] Unknown Sender');
if lEdited and Assigned(treEditor.Selected) then
if Assigned(treEditor.Selected) then
begin
treEditor.SetFocus;
treEditor.Selected.EditText;
@ -302,8 +313,6 @@ procedure TTreeViewItemsEditorForm.tbMoveClick(Sender: TObject);
var
lCurNode: TTreeNode;
begin
FinishNodeEditing;
lCurNode := treEditor.Selected;
if lCurNode = nil then exit;
@ -320,7 +329,6 @@ begin
raise Exception.Create('[tbMoveClick] Unknown Sender');
UpdateEnabledStates;
treEditor.SetFocus; // return focus after button click
end;
procedure TTreeViewItemsEditorForm.treEditorSelectionChanged(Sender: TObject);
@ -356,9 +364,7 @@ end;
procedure TTreeViewItemsEditorForm.btnApplyClick(Sender: TObject);
begin
FinishNodeEditing;
SaveToTree;
fModified := true;
SaveToSourceTree;
end;
procedure TTreeViewItemsEditorForm.tbDeleteClick(Sender: TObject);
@ -382,27 +388,35 @@ begin
treEditor.Selected := lNextNode;
UpdateEnabledStates;
treEditor.SetFocus; // return focus after button click
end;
end;
procedure TTreeViewItemsEditorForm.tbOpenClick(Sender: TObject);
//
function ConfirmTreeReplace: boolean;
begin
if treEditor.Items.Count > 0 then
result := QuestionDlg(sccsTrEdtConfirmationCaption, sccsTrEdtConfirmationTreeReplace,
TMsgDlgType.mtConfirmation, [mrYes, sccsTrEdtYes, mrNo, sccsTrEdtNo,
mrCancel, sccsTrEdtCancel], 0) = mrYes
else
result := true;
end;
//
begin
FinishNodeEditing;
if dlgOpen.Execute then
if ConfirmTreeReplace and dlgOpen.Execute then
begin
treEditor.LoadFromFile(dlgOpen.FileName);
treEditor.FullExpand;
treEditor.Selected := treEditor.Items.GetFirstNode;
treEditor.SetFocus; // return focus after button click
treEditor.SetFocus;
UpdateEnabledStates;
end;
end;
procedure TTreeViewItemsEditorForm.tbSaveClick(Sender: TObject);
//
function ImagesFound: boolean;
var
i: Integer;
@ -415,21 +429,21 @@ procedure TTreeViewItemsEditorForm.tbSaveClick(Sender: TObject);
exit(true);
result := false;
end;
//
function ConfirmImagesLoss: boolean;
begin
if ImagesFound then
result := QuestionDlg(sccsTrEdtConfirmationCaption, sccsTrEdtConfirmationImages,
result := QuestionDlg(sccsTrEdtConfirmationCaption, sccsTrEdtConfirmationImagesLoss,
TMsgDlgType.mtConfirmation, [mrYes, sccsTrEdtYes, mrNo, sccsTrEdtNo,
mrCancel, sccsTrEdtCancel], 0) = mrYes
else
result := true;
end;
//
function ConfirmReplace: boolean;
function ConfirmFileReplace: boolean;
begin
if FileExists(dlgSave.FileName) then
result := QuestionDlg(sccsTrEdtConfirmationCaption, sccsTrEdtConfirmationReplace,
result := QuestionDlg(sccsTrEdtConfirmationCaption, sccsTrEdtConfirmationFileReplace,
TMsgDlgType.mtConfirmation, [mrYes, sccsTrEdtYes, mrNo, sccsTrEdtNo,
mrCancel, sccsTrEdtCancel], 0) = mrYes
else
@ -437,12 +451,8 @@ procedure TTreeViewItemsEditorForm.tbSaveClick(Sender: TObject);
end;
//
begin
FinishNodeEditing;
if ConfirmImagesLoss and dlgSave.Execute and ConfirmReplace then
if ConfirmImagesLoss and dlgSave.Execute and ConfirmFileReplace then
treEditor.SaveToFile(dlgSave.FileName);
treEditor.SetFocus; // return focus after button click
end;
procedure TTreeViewItemsEditorForm.spnIndexChange(Sender: TObject);
@ -459,7 +469,7 @@ end;
// Show hints and "*" in label for invalid index
procedure TTreeViewItemsEditorForm.UpdateImageHints;
//
procedure UpdateImageHint(aSpinEdit: TSpinEdit;
aIsStateImages: boolean; aLabel: TLabel; aCaption: string);
var
@ -497,9 +507,9 @@ procedure TTreeViewItemsEditorForm.UpdateImageHints;
// show asterisk if necessary
if aLabel.ShowHint then
aLabel.Caption := aCaption + '*'
aLabel.Caption := Format(aCaption, ['*'])
else
aLabel.Caption := aCaption;
aLabel.Caption := Format(aCaption, ['']);
end;
//
begin
@ -511,18 +521,6 @@ begin
end;
end;
procedure TTreeViewItemsEditorForm.FinishNodeEditing;
begin
if treEditor.Items.Count > 0 then
treEditor.Items[0].EndEdit(false);
end;
procedure TTreeViewItemsEditorForm.CancelNodeEditing;
begin
if treEditor.Items.Count > 0 then
treEditor.Items[0].EndEdit(true);
end;
procedure TTreeViewItemsEditorForm.LoadFromTree(aTreeView: TCustomTreeView);
begin
fTreeView := aTreeView;
@ -538,10 +536,11 @@ begin
UpdateEnabledStates;
end;
procedure TTreeViewItemsEditorForm.SaveToTree;
procedure TTreeViewItemsEditorForm.SaveToSourceTree;
begin
if Assigned(fTreeView) then
fTreeView.Items.Assign(treEditor.Items);
fModified := true;
end;
procedure TTreeViewItemsEditorForm.UpdateEnabledStates;