mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 05:09:10 +02:00
* Applied patch to create popup menu for TreeView (bug ID #31747)
git-svn-id: trunk@56867 -
This commit is contained in:
parent
3374ff6e7d
commit
645d8d86a9
@ -4,7 +4,7 @@ object MainForm: TMainForm
|
|||||||
Top = 125
|
Top = 125
|
||||||
Width = 695
|
Width = 695
|
||||||
Caption = 'JSON Viewer'
|
Caption = 'JSON Viewer'
|
||||||
ClientHeight = 488
|
ClientHeight = 486
|
||||||
ClientWidth = 695
|
ClientWidth = 695
|
||||||
Icon.Data = {
|
Icon.Data = {
|
||||||
7E04000000000100010010100000010020006804000016000000280000001000
|
7E04000000000100010010100000010020006804000016000000280000001000
|
||||||
@ -128,18 +128,20 @@ object MainForm: TMainForm
|
|||||||
end
|
end
|
||||||
object TVJSON: TTreeView
|
object TVJSON: TTreeView
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 483
|
Height = 460
|
||||||
Top = 26
|
Top = 26
|
||||||
Width = 695
|
Width = 695
|
||||||
Align = alClient
|
Align = alClient
|
||||||
HideSelection = False
|
HideSelection = False
|
||||||
Images = ILJSON
|
Images = ILJSON
|
||||||
|
PopupMenu = PMTreeView
|
||||||
|
RightClickSelect = True
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
OnEdited = TVJSONEdited
|
OnEdited = TVJSONEdited
|
||||||
OnEditing = TVJSONEditing
|
OnEditing = TVJSONEditing
|
||||||
Options = [tvoAutoItemHeight, tvoKeepCollapsedNodes, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips, tvoThemedDraw]
|
Options = [tvoAutoItemHeight, tvoKeepCollapsedNodes, tvoRightClickSelect, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips, tvoThemedDraw]
|
||||||
end
|
end
|
||||||
object ActionList1: TActionList
|
object ALJSON: TActionList
|
||||||
Images = ILJSON
|
Images = ILJSON
|
||||||
left = 88
|
left = 88
|
||||||
top = 128
|
top = 128
|
||||||
@ -1007,4 +1009,39 @@ object MainForm: TMainForm
|
|||||||
left = 376
|
left = 376
|
||||||
top = 128
|
top = 128
|
||||||
end
|
end
|
||||||
|
object PMTreeView: TPopupMenu
|
||||||
|
Images = ILJSON
|
||||||
|
left = 123
|
||||||
|
top = 215
|
||||||
|
object MenuItem4: TMenuItem
|
||||||
|
Action = ANewNullValue
|
||||||
|
end
|
||||||
|
object MenuItem5: TMenuItem
|
||||||
|
Action = ANewBooleanValue
|
||||||
|
end
|
||||||
|
object MenuItem6: TMenuItem
|
||||||
|
Action = ANewNumberValue
|
||||||
|
end
|
||||||
|
object MenuItem7: TMenuItem
|
||||||
|
Action = ANewStringValue
|
||||||
|
end
|
||||||
|
object MenuItem9: TMenuItem
|
||||||
|
Action = ANewArray
|
||||||
|
end
|
||||||
|
object MenuItem10: TMenuItem
|
||||||
|
Action = ANewObject
|
||||||
|
end
|
||||||
|
object MenuItem11: TMenuItem
|
||||||
|
Caption = '-'
|
||||||
|
end
|
||||||
|
object MenuItem12: TMenuItem
|
||||||
|
Action = ADeleteValue
|
||||||
|
end
|
||||||
|
object MenuItem13: TMenuItem
|
||||||
|
Caption = '-'
|
||||||
|
end
|
||||||
|
object MenuItem14: TMenuItem
|
||||||
|
Action = AExpandCurrentContainer
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
@ -37,8 +37,8 @@
|
|||||||
{"hash":246305444,"name":"tmainform.apasteasdocument.hint","sourcebytes":[80,97,115,116,101,32,74,83,79,78,32,100,97,116,97,32,105,110,32,99,108,105,112,98,111,97,114,100,32,97,115,32,110,101,119,32,100,111,99,117,109,101,110,116],"value":"Paste JSON data in clipboard as new document"},
|
{"hash":246305444,"name":"tmainform.apasteasdocument.hint","sourcebytes":[80,97,115,116,101,32,74,83,79,78,32,100,97,116,97,32,105,110,32,99,108,105,112,98,111,97,114,100,32,97,115,32,110,101,119,32,100,111,99,117,109,101,110,116],"value":"Paste JSON data in clipboard as new document"},
|
||||||
{"hash":108454787,"name":"tmainform.aexpandall.caption","sourcebytes":[69,38,120,112,97,110,100,32,97,108,108,32,110,111,100,101,115],"value":"E&xpand all nodes"},
|
{"hash":108454787,"name":"tmainform.aexpandall.caption","sourcebytes":[69,38,120,112,97,110,100,32,97,108,108,32,110,111,100,101,115],"value":"E&xpand all nodes"},
|
||||||
{"hash":25630004,"name":"tmainform.aexpandall.hint","sourcebytes":[69,120,112,97,110,100,32,97,108,108,32,110,111,100,101,115,32,105,110,32,116,104,101,32,100,111,99,117,109,101,110,116],"value":"Expand all nodes in the document"},
|
{"hash":25630004,"name":"tmainform.aexpandall.hint","sourcebytes":[69,120,112,97,110,100,32,97,108,108,32,110,111,100,101,115,32,105,110,32,116,104,101,32,100,111,99,117,109,101,110,116],"value":"Expand all nodes in the document"},
|
||||||
{"hash":115078537,"name":"tmainform.aexpandcurrentcontainer.caption","sourcebytes":[69,120,112,97,110,100,32,38,99,117,114,114,101,110,116,32,111,98,106,101,99,116,47,97,114,114,97,121],"value":"Expand ¤t object\/array"},
|
{"hash":115078537,"name":"tmainform.aexpandcurrentcontainer.caption","sourcebytes":[69,120,112,97,110,100,32,38,99,117,114,114,101,110,116,32,111,98,106,101,99,116,47,97,114,114,97,121],"value":"Expand ¤t object/array"},
|
||||||
{"hash":179714329,"name":"tmainform.aexpandcurrentcontainer.hint","sourcebytes":[69,120,112,97,110,100,32,97,108,108,32,110,111,100,101,115,32,105,110,32,116,104,101,32,99,117,114,114,101,110,116,32,111,98,106,101,99,116,47,97,114,114,97,121],"value":"Expand all nodes in the current object\/array"},
|
{"hash":179714329,"name":"tmainform.aexpandcurrentcontainer.hint","sourcebytes":[69,120,112,97,110,100,32,97,108,108,32,110,111,100,101,115,32,105,110,32,116,104,101,32,99,117,114,114,101,110,116,32,111,98,106,101,99,116,47,97,114,114,97,121],"value":"Expand all nodes in the current object/array"},
|
||||||
{"hash":2805828,"name":"tmainform.afind.caption","sourcebytes":[38,70,105,110,100],"value":"&Find"},
|
{"hash":2805828,"name":"tmainform.afind.caption","sourcebytes":[38,70,105,110,100],"value":"&Find"},
|
||||||
{"hash":127763701,"name":"tmainform.afindnext.caption","sourcebytes":[70,105,110,100,32,38,110,101,120,116,32,111,99,99,117,114,114,101,110,99,101],"value":"Find &next occurrence"},
|
{"hash":127763701,"name":"tmainform.afindnext.caption","sourcebytes":[70,105,110,100,32,38,110,101,120,116,32,111,99,99,117,114,114,101,110,99,101],"value":"Find &next occurrence"},
|
||||||
{"hash":2805797,"name":"tmainform.mfile.caption","sourcebytes":[38,70,105,108,101],"value":"&File"},
|
{"hash":2805797,"name":"tmainform.mfile.caption","sourcebytes":[38,70,105,108,101],"value":"&File"},
|
||||||
|
@ -54,12 +54,22 @@ type
|
|||||||
ASave: TAction;
|
ASave: TAction;
|
||||||
AOpen: TAction;
|
AOpen: TAction;
|
||||||
ANew: TAction;
|
ANew: TAction;
|
||||||
ActionList1: TActionList;
|
ALJSON: TActionList;
|
||||||
FDJSON: TFindDialog;
|
FDJSON: TFindDialog;
|
||||||
ILJSON: TImageList;
|
ILJSON: TImageList;
|
||||||
MEDit: TMenuItem;
|
MEDit: TMenuItem;
|
||||||
|
MenuItem10: TMenuItem;
|
||||||
|
MenuItem11: TMenuItem;
|
||||||
|
MenuItem12: TMenuItem;
|
||||||
|
MenuItem13: TMenuItem;
|
||||||
|
MenuItem14: TMenuItem;
|
||||||
MenuItem2: TMenuItem;
|
MenuItem2: TMenuItem;
|
||||||
MenuItem3: TMenuItem;
|
MenuItem3: TMenuItem;
|
||||||
|
MenuItem4: TMenuItem;
|
||||||
|
MenuItem5: TMenuItem;
|
||||||
|
MenuItem6: TMenuItem;
|
||||||
|
MenuItem7: TMenuItem;
|
||||||
|
MenuItem9: TMenuItem;
|
||||||
MIQuoteStrings: TMenuItem;
|
MIQuoteStrings: TMenuItem;
|
||||||
MIAllowTrailingComma: TMenuItem;
|
MIAllowTrailingComma: TMenuItem;
|
||||||
MIAllowComments: TMenuItem;
|
MIAllowComments: TMenuItem;
|
||||||
@ -74,6 +84,7 @@ type
|
|||||||
MISortMembers: TMenuItem;
|
MISortMembers: TMenuItem;
|
||||||
MenuItem8: TMenuItem;
|
MenuItem8: TMenuItem;
|
||||||
MIDelete: TMenuItem;
|
MIDelete: TMenuItem;
|
||||||
|
PMTreeView: TPopupMenu;
|
||||||
PSMain: TIniPropStorage;
|
PSMain: TIniPropStorage;
|
||||||
MenuItem1: TMenuItem;
|
MenuItem1: TMenuItem;
|
||||||
MINewNull: TMenuItem;
|
MINewNull: TMenuItem;
|
||||||
@ -750,6 +761,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
P.ImageIndex:=ImageTypeMap[D.JSONType];
|
P.ImageIndex:=ImageTypeMap[D.JSONType];
|
||||||
P.SelectedIndex:=ImageTypeMap[D.JSONType];
|
P.SelectedIndex:=ImageTypeMap[D.JSONType];
|
||||||
|
P.MakeVisible;
|
||||||
end;
|
end;
|
||||||
ShowJSONData(P,D);
|
ShowJSONData(P,D);
|
||||||
end;
|
end;
|
||||||
@ -779,6 +791,8 @@ Var
|
|||||||
F : TFileStream;
|
F : TFileStream;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
if (AFileName<>'') then
|
||||||
|
begin
|
||||||
F:=TFileStream.Create(AFileName,fmCreate);
|
F:=TFileStream.Create(AFileName,fmCreate);
|
||||||
try
|
try
|
||||||
If Assigned(FRoot) then
|
If Assigned(FRoot) then
|
||||||
@ -791,6 +805,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
FFileName:=AFileName;
|
FFileName:=AFileName;
|
||||||
SetCaption;
|
SetCaption;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Function TMainForm.GetSaveFileName(Force : Boolean) : String;
|
Function TMainForm.GetSaveFileName(Force : Boolean) : String;
|
||||||
|
Binary file not shown.
@ -117,7 +117,7 @@ msgstr "Den gewählten Wert löschen"
|
|||||||
|
|
||||||
#: tmainform.aexpandall.caption
|
#: tmainform.aexpandall.caption
|
||||||
msgid "E&xpand all nodes"
|
msgid "E&xpand all nodes"
|
||||||
msgstr ""
|
msgstr "Alle Knoten erweitern"
|
||||||
|
|
||||||
#: tmainform.aexpandall.hint
|
#: tmainform.aexpandall.hint
|
||||||
msgid "Expand all nodes in the document"
|
msgid "Expand all nodes in the document"
|
||||||
@ -133,7 +133,7 @@ msgstr ""
|
|||||||
|
|
||||||
#: tmainform.afind.caption
|
#: tmainform.afind.caption
|
||||||
msgid "&Find"
|
msgid "&Find"
|
||||||
msgstr ""
|
msgstr "Suchen"
|
||||||
|
|
||||||
#: tmainform.afindnext.caption
|
#: tmainform.afindnext.caption
|
||||||
msgid "Find &next occurrence"
|
msgid "Find &next occurrence"
|
||||||
@ -165,11 +165,11 @@ msgstr "Einen neuen booleschen Wert hinzufügen"
|
|||||||
|
|
||||||
#: tmainform.anewnullvalue.caption
|
#: tmainform.anewnullvalue.caption
|
||||||
msgid "New N&ull value"
|
msgid "New N&ull value"
|
||||||
msgstr ""
|
msgstr "Neuer N&ull Wert"
|
||||||
|
|
||||||
#: tmainform.anewnullvalue.hint
|
#: tmainform.anewnullvalue.hint
|
||||||
msgid "Add a new null value"
|
msgid "Add a new null value"
|
||||||
msgstr ""
|
msgstr "Neuen Null Wert hinzufügen"
|
||||||
|
|
||||||
#: tmainform.anewnumbervalue.caption
|
#: tmainform.anewnumbervalue.caption
|
||||||
msgid "&New numerical Value"
|
msgid "&New numerical Value"
|
||||||
@ -189,7 +189,7 @@ msgstr "Ein neues JSON-Objekt hinzufügen"
|
|||||||
|
|
||||||
#: tmainform.anewstringvalue.caption
|
#: tmainform.anewstringvalue.caption
|
||||||
msgid "New &string value"
|
msgid "New &string value"
|
||||||
msgstr ""
|
msgstr "Neuer &String Wert"
|
||||||
|
|
||||||
#: tmainform.anewstringvalue.hint
|
#: tmainform.anewstringvalue.hint
|
||||||
msgid "Add a new string value"
|
msgid "Add a new string value"
|
||||||
@ -197,7 +197,7 @@ msgstr ""
|
|||||||
|
|
||||||
#: tmainform.aopen.caption
|
#: tmainform.aopen.caption
|
||||||
msgid "&Open"
|
msgid "&Open"
|
||||||
msgstr ""
|
msgstr "Ö&ffnen"
|
||||||
|
|
||||||
#: tmainform.aopen.hint
|
#: tmainform.aopen.hint
|
||||||
msgid "Open JSON document from file"
|
msgid "Open JSON document from file"
|
||||||
@ -260,15 +260,15 @@ msgstr "Datei"
|
|||||||
#: tmainform.miallowcomments.caption
|
#: tmainform.miallowcomments.caption
|
||||||
msgctxt "tmainform.miallowcomments.caption"
|
msgctxt "tmainform.miallowcomments.caption"
|
||||||
msgid "Allow comments"
|
msgid "Allow comments"
|
||||||
msgstr ""
|
msgstr "Kommentare erlauben"
|
||||||
|
|
||||||
#: tmainform.miallowtrailingcomma.caption
|
#: tmainform.miallowtrailingcomma.caption
|
||||||
msgid "Allow trailing comma"
|
msgid "Allow trailing comma"
|
||||||
msgstr ""
|
msgstr "Abschließendes Komma erlauben"
|
||||||
|
|
||||||
#: tmainform.micompact.caption
|
#: tmainform.micompact.caption
|
||||||
msgid "Compact display"
|
msgid "Compact display"
|
||||||
msgstr ""
|
msgstr "Kompakte Darstellung"
|
||||||
|
|
||||||
#: tmainform.midocument.caption
|
#: tmainform.midocument.caption
|
||||||
msgid "&New document with object"
|
msgid "&New document with object"
|
||||||
@ -280,15 +280,15 @@ msgstr "Werte"
|
|||||||
|
|
||||||
#: tmainform.miquotestrings.caption
|
#: tmainform.miquotestrings.caption
|
||||||
msgid "Quote string values"
|
msgid "Quote string values"
|
||||||
msgstr ""
|
msgstr "Stringwerte in Anführungszeichen"
|
||||||
|
|
||||||
#: tmainform.misortmembers.caption
|
#: tmainform.misortmembers.caption
|
||||||
msgid "Sort object members"
|
msgid "Sort object members"
|
||||||
msgstr ""
|
msgstr "Objektfelder sortieren "
|
||||||
|
|
||||||
#: tmainform.mistrict.caption
|
#: tmainform.mistrict.caption
|
||||||
msgid "&Strict JSON"
|
msgid "&Strict JSON"
|
||||||
msgstr ""
|
msgstr "&Striktes JSON"
|
||||||
|
|
||||||
#: tmainform.moptions.caption
|
#: tmainform.moptions.caption
|
||||||
msgid "&Options"
|
msgid "&Options"
|
||||||
@ -296,11 +296,11 @@ msgstr "Einstellungen"
|
|||||||
|
|
||||||
#: tmainform.odjson.title
|
#: tmainform.odjson.title
|
||||||
msgid "Select a JSON file"
|
msgid "Select a JSON file"
|
||||||
msgstr ""
|
msgstr "Wählen Sie eine JSON Datei"
|
||||||
|
|
||||||
#: tmainform.sdjson.title
|
#: tmainform.sdjson.title
|
||||||
msgid "Save JSON document to file"
|
msgid "Save JSON document to file"
|
||||||
msgstr ""
|
msgstr "JSON Dokument in Datei speichern"
|
||||||
|
|
||||||
#: tmainform.tbjson.caption
|
#: tmainform.tbjson.caption
|
||||||
msgid "TBJSON"
|
msgid "TBJSON"
|
||||||
|
Loading…
Reference in New Issue
Block a user