IDE/LCL: Prevent using the TListItems component editor when the associated listview is in virtual mode. https://forum.lazarus.freepascal.org/index.php/topic,66660.0.html, patch by dsiders.

This commit is contained in:
wp_xyz 2024-03-18 21:07:15 +01:00
parent 5f9dd398f7
commit 5621ec7af3
23 changed files with 94 additions and 3 deletions

View File

@ -1643,6 +1643,10 @@ msgctxt "objinspstrconsts.sccslvedtlabelstateindex"
msgid "State Index:"
msgstr ""
#: objinspstrconsts.sccslvedtmsgownerdata
msgid "List items cannot be edited at design-time when OwnerData is enabled. Use Items.Count and OnData at run-time instead."
msgstr ""
#: objinspstrconsts.sccslvedtnewitem
#, fuzzy
msgctxt "objinspstrconsts.sccslvedtnewitem"

View File

@ -1588,6 +1588,10 @@ msgctxt "objinspstrconsts.sccslvedtlabelstateindex"
msgid "State Index:"
msgstr "Stavový index:"
#: objinspstrconsts.sccslvedtmsgownerdata
msgid "List items cannot be edited at design-time when OwnerData is enabled. Use Items.Count and OnData at run-time instead."
msgstr ""
#: objinspstrconsts.sccslvedtnewitem
msgctxt "objinspstrconsts.sccslvedtnewitem"
msgid "New Item"

View File

@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: 2024-02-21 23:55+0100\n"
"PO-Revision-Date: 2024-03-18 21:06+0100\n"
"Last-Translator: Swen Heinig <swen@heinig.email>\n"
"Language-Team: Deutsch <lazarus@miraclec.com>\n"
"Language: de\n"
@ -1586,6 +1586,10 @@ msgctxt "objinspstrconsts.sccslvedtlabelstateindex"
msgid "State Index:"
msgstr "Status-Index:"
#: objinspstrconsts.sccslvedtmsgownerdata
msgid "List items cannot be edited at design-time when OwnerData is enabled. Use Items.Count and OnData at run-time instead."
msgstr "Listeneinträge können zur Entwurfszeit nicht bearbeitet werden, wenn OwnerData aktiviert ist. Verwenden Sie dafür stattdessen Items.Count und das OnData-Ereignis."
#: objinspstrconsts.sccslvedtnewitem
msgctxt "objinspstrconsts.sccslvedtnewitem"
msgid "New Item"
@ -1871,4 +1875,3 @@ msgstr "Tab nach links bewegen"
#: objinspstrconsts.tccesmovetabright
msgid "Move tab right"
msgstr "Tab nach rechts bewegen"

View File

@ -1589,6 +1589,10 @@ msgctxt "objinspstrconsts.sccslvedtlabelstateindex"
msgid "State Index:"
msgstr "Índice de estado:"
#: objinspstrconsts.sccslvedtmsgownerdata
msgid "List items cannot be edited at design-time when OwnerData is enabled. Use Items.Count and OnData at run-time instead."
msgstr ""
#: objinspstrconsts.sccslvedtnewitem
msgctxt "objinspstrconsts.sccslvedtnewitem"
msgid "New Item"

View File

@ -1587,6 +1587,10 @@ msgctxt "objinspstrconsts.sccslvedtlabelstateindex"
msgid "State Index:"
msgstr "Tila osoitin:"
#: objinspstrconsts.sccslvedtmsgownerdata
msgid "List items cannot be edited at design-time when OwnerData is enabled. Use Items.Count and OnData at run-time instead."
msgstr ""
#: objinspstrconsts.sccslvedtnewitem
msgctxt "objinspstrconsts.sccslvedtnewitem"
msgid "New Item"

View File

@ -1584,6 +1584,10 @@ msgctxt "objinspstrconsts.sccslvedtlabelstateindex"
msgid "State Index:"
msgstr "État de l'index :"
#: objinspstrconsts.sccslvedtmsgownerdata
msgid "List items cannot be edited at design-time when OwnerData is enabled. Use Items.Count and OnData at run-time instead."
msgstr ""
#: objinspstrconsts.sccslvedtnewitem
msgctxt "objinspstrconsts.sccslvedtnewitem"
msgid "New Item"

View File

@ -1650,6 +1650,10 @@ msgctxt "objinspstrconsts.sccslvedtlabelstateindex"
msgid "State Index:"
msgstr "אינדקס מצב:"
#: objinspstrconsts.sccslvedtmsgownerdata
msgid "List items cannot be edited at design-time when OwnerData is enabled. Use Items.Count and OnData at run-time instead."
msgstr ""
#: objinspstrconsts.sccslvedtnewitem
msgctxt "objinspstrconsts.sccslvedtnewitem"
msgid "New Item"

View File

@ -1587,6 +1587,10 @@ msgctxt "objinspstrconsts.sccslvedtlabelstateindex"
msgid "State Index:"
msgstr "Állapot index:"
#: objinspstrconsts.sccslvedtmsgownerdata
msgid "List items cannot be edited at design-time when OwnerData is enabled. Use Items.Count and OnData at run-time instead."
msgstr ""
#: objinspstrconsts.sccslvedtnewitem
msgctxt "objinspstrconsts.sccslvedtnewitem"
msgid "New Item"

View File

@ -1650,6 +1650,10 @@ msgctxt "objinspstrconsts.sccslvedtlabelstateindex"
msgid "State Index:"
msgstr "Indeks Keadaan:"
#: objinspstrconsts.sccslvedtmsgownerdata
msgid "List items cannot be edited at design-time when OwnerData is enabled. Use Items.Count and OnData at run-time instead."
msgstr ""
#: objinspstrconsts.sccslvedtnewitem
#, fuzzy
msgctxt "objinspstrconsts.sccslvedtnewitem"

View File

@ -1590,6 +1590,10 @@ msgctxt "objinspstrconsts.sccslvedtlabelstateindex"
msgid "State Index:"
msgstr "Indice di stato:"
#: objinspstrconsts.sccslvedtmsgownerdata
msgid "List items cannot be edited at design-time when OwnerData is enabled. Use Items.Count and OnData at run-time instead."
msgstr ""
#: objinspstrconsts.sccslvedtnewitem
msgctxt "objinspstrconsts.sccslvedtnewitem"
msgid "New Item"

View File

@ -1597,6 +1597,10 @@ msgctxt "objinspstrconsts.sccslvedtlabelstateindex"
msgid "State Index:"
msgstr "ステートのインデックス:"
#: objinspstrconsts.sccslvedtmsgownerdata
msgid "List items cannot be edited at design-time when OwnerData is enabled. Use Items.Count and OnData at run-time instead."
msgstr ""
#: objinspstrconsts.sccslvedtnewitem
msgctxt "objinspstrconsts.sccslvedtnewitem"
msgid "New Item"

View File

@ -1589,6 +1589,10 @@ msgctxt "objinspstrconsts.sccslvedtlabelstateindex"
msgid "State Index:"
msgstr "Būsenos indeksas:"
#: objinspstrconsts.sccslvedtmsgownerdata
msgid "List items cannot be edited at design-time when OwnerData is enabled. Use Items.Count and OnData at run-time instead."
msgstr ""
#: objinspstrconsts.sccslvedtnewitem
msgctxt "objinspstrconsts.sccslvedtnewitem"
msgid "New Item"

View File

@ -1642,6 +1642,10 @@ msgctxt "objinspstrconsts.sccslvedtlabelstateindex"
msgid "State Index:"
msgstr "Status index:"
#: objinspstrconsts.sccslvedtmsgownerdata
msgid "List items cannot be edited at design-time when OwnerData is enabled. Use Items.Count and OnData at run-time instead."
msgstr ""
#: objinspstrconsts.sccslvedtnewitem
msgctxt "objinspstrconsts.sccslvedtnewitem"
msgid "New Item"

View File

@ -1582,6 +1582,10 @@ msgctxt "objinspstrconsts.sccslvedtlabelstateindex"
msgid "State Index:"
msgstr ""
#: objinspstrconsts.sccslvedtmsgownerdata
msgid "List items cannot be edited at design-time when OwnerData is enabled. Use Items.Count and OnData at run-time instead."
msgstr ""
#: objinspstrconsts.sccslvedtnewitem
msgctxt "objinspstrconsts.sccslvedtnewitem"
msgid "New Item"

View File

@ -1574,6 +1574,10 @@ msgctxt "objinspstrconsts.sccslvedtlabelstateindex"
msgid "State Index:"
msgstr ""
#: objinspstrconsts.sccslvedtmsgownerdata
msgid "List items cannot be edited at design-time when OwnerData is enabled. Use Items.Count and OnData at run-time instead."
msgstr ""
#: objinspstrconsts.sccslvedtnewitem
msgctxt "objinspstrconsts.sccslvedtnewitem"
msgid "New Item"

View File

@ -1583,6 +1583,10 @@ msgctxt "objinspstrconsts.sccslvedtlabelstateindex"
msgid "State Index:"
msgstr "Índice Estado:"
#: objinspstrconsts.sccslvedtmsgownerdata
msgid "List items cannot be edited at design-time when OwnerData is enabled. Use Items.Count and OnData at run-time instead."
msgstr ""
#: objinspstrconsts.sccslvedtnewitem
msgctxt "objinspstrconsts.sccslvedtnewitem"
msgid "New Item"

View File

@ -1583,6 +1583,10 @@ msgctxt "objinspstrconsts.sccslvedtlabelstateindex"
msgid "State Index:"
msgstr "Индекс состояния:"
#: objinspstrconsts.sccslvedtmsgownerdata
msgid "List items cannot be edited at design-time when OwnerData is enabled. Use Items.Count and OnData at run-time instead."
msgstr ""
#: objinspstrconsts.sccslvedtnewitem
msgctxt "objinspstrconsts.sccslvedtnewitem"
msgid "New Item"

View File

@ -1597,6 +1597,10 @@ msgctxt "objinspstrconsts.sccslvedtlabelstateindex"
msgid "State Index:"
msgstr "Stavový index:"
#: objinspstrconsts.sccslvedtmsgownerdata
msgid "List items cannot be edited at design-time when OwnerData is enabled. Use Items.Count and OnData at run-time instead."
msgstr ""
#: objinspstrconsts.sccslvedtnewitem
msgctxt "objinspstrconsts.sccslvedtnewitem"
msgid "New Item"

View File

@ -1583,6 +1583,10 @@ msgctxt "objinspstrconsts.sccslvedtlabelstateindex"
msgid "State Index:"
msgstr "Durum dizini:"
#: objinspstrconsts.sccslvedtmsgownerdata
msgid "List items cannot be edited at design-time when OwnerData is enabled. Use Items.Count and OnData at run-time instead."
msgstr ""
#: objinspstrconsts.sccslvedtnewitem
msgctxt "objinspstrconsts.sccslvedtnewitem"
msgid "New Item"

View File

@ -1586,6 +1586,10 @@ msgctxt "objinspstrconsts.sccslvedtlabelstateindex"
msgid "State Index:"
msgstr "Індекс стану:"
#: objinspstrconsts.sccslvedtmsgownerdata
msgid "List items cannot be edited at design-time when OwnerData is enabled. Use Items.Count and OnData at run-time instead."
msgstr ""
#: objinspstrconsts.sccslvedtnewitem
msgctxt "objinspstrconsts.sccslvedtnewitem"
msgid "New Item"

View File

@ -1584,6 +1584,10 @@ msgctxt "objinspstrconsts.sccslvedtlabelstateindex"
msgid "State Index:"
msgstr "状态索引:"
#: objinspstrconsts.sccslvedtmsgownerdata
msgid "List items cannot be edited at design-time when OwnerData is enabled. Use Items.Count and OnData at run-time instead."
msgstr ""
#: objinspstrconsts.sccslvedtnewitem
msgctxt "objinspstrconsts.sccslvedtnewitem"
msgid "New Item"

View File

@ -29,7 +29,7 @@ interface
uses
Classes, SysUtils,
// LCL
Forms, Controls, ComCtrls, StdCtrls, Buttons, ButtonPanel,
Forms, Controls, ComCtrls, StdCtrls, Dialogs, Buttons, ButtonPanel,
// IdeIntf
PropEdits, ComponentEditors, ObjInspStrConsts, IDEWindowIntf;
@ -92,6 +92,13 @@ function EditListView(AListView: TListView): Boolean;
var
ListViewEditorDlg: TListViewItemsEditorForm;
begin
if AListView.OwnerData then
begin
MessageDlg(sccsLvEdtMsgOwnerData, mtError, [mbOK], 0);
Result := false;
exit;
end;
ListViewEditorDlg := TListViewItemsEditorForm.Create(Application);
try
ListViewEditorDlg.LoadFromList(AListView);

View File

@ -134,6 +134,7 @@ resourcestring
sccsLvEdtLabelImageIndex = 'Image Index:';
sccsLvEdtLabelStateIndex = 'State Index:';
sccsLvEdtItem = 'Item';
sccsLvEdtMsgOwnerData = 'List items cannot be edited at design-time when OwnerData is enabled. Use Items.Count and OnData at run-time instead.';
// Image editor strings
oisImageListComponentEditor = 'I&mageList Editor ...';