You've already forked lazarus-ccr
spktoolbar: Replace Polish comments and exception messages by google-translated texts.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5976 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -127,6 +127,15 @@ implementation
|
|||||||
|
|
||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
|
|
||||||
|
resourcestring
|
||||||
|
RSCannotMoveAboveFirstElement = 'You can not move above the top of the first element!';
|
||||||
|
RSCannotMoveBeyondLastElement = 'You can not move beyond the last element!';
|
||||||
|
RSDamagedTreeStructure = 'Damaged tree structure!';
|
||||||
|
RSIncorrectFieldData = 'Incorrect data in the field!';
|
||||||
|
RSIncorrectObjectInTree = 'Incorrect object attached to the tree!';
|
||||||
|
RSNoObjectSelected = 'No object selected!';
|
||||||
|
RSNoObjectSelectedToMove = 'No object selected to move!';
|
||||||
|
|
||||||
{ TfrmEditWindow }
|
{ TfrmEditWindow }
|
||||||
|
|
||||||
procedure TfrmEditWindow.aAddPaneExecute(Sender: TObject);
|
procedure TfrmEditWindow.aAddPaneExecute(Sender: TObject);
|
||||||
@ -144,9 +153,9 @@ begin
|
|||||||
|
|
||||||
Node := tvStructure.Selected;
|
Node := tvStructure.Selected;
|
||||||
if Node = nil then
|
if Node = nil then
|
||||||
raise Exception.Create('TfrmEditWindow.aAddPaneExecute: Brak zaznaczonego obiektu!');
|
raise Exception.Create('TfrmEditWindow.aAddPaneExecute: ' + RSNoObjectSelected);
|
||||||
if Node.Data = nil then
|
if Node.Data = nil then
|
||||||
raise Exception.Create('TfrmEditWindow.aAddPaneExecute: Uszkodzona struktura drzewa!');
|
raise Exception.Create('TfrmEditWindow.aAddPaneExecute: ' + RSDamagedTreeStructure);
|
||||||
|
|
||||||
Obj := TObject(Node.Data);
|
Obj := TObject(Node.Data);
|
||||||
if Obj is TSpkTab then
|
if Obj is TSpkTab then
|
||||||
@ -166,7 +175,7 @@ begin
|
|||||||
if Obj is TSpkPane then
|
if Obj is TSpkPane then
|
||||||
begin
|
begin
|
||||||
if not(CheckValidPaneNode(Node)) then
|
if not(CheckValidPaneNode(Node)) then
|
||||||
raise Exception.Create('TfrmEditWindow.aAddPaneExecute: Uszkodzona struktura drzewa!');
|
raise Exception.Create('TfrmEditWindow.aAddPaneExecute: ' + RSDamagedTreeStructure);
|
||||||
Tab := TSpkTab(Node.Parent.Data);
|
Tab := TSpkTab(Node.Parent.Data);
|
||||||
Pane := TSpkPane.Create(FToolbar.Owner);
|
Pane := TSpkPane.Create(FToolbar.Owner);
|
||||||
Pane.Parent := FToolbar;
|
Pane.Parent := FToolbar;
|
||||||
@ -182,7 +191,7 @@ begin
|
|||||||
if Obj is TSpkBaseItem then
|
if Obj is TSpkBaseItem then
|
||||||
begin
|
begin
|
||||||
if not(CheckValidItemNode(Node)) then
|
if not(CheckValidItemNode(Node)) then
|
||||||
raise Exception.Create('TfrmEditWindow.aAddPaneExecute: Uszkodzona struktura drzewa!');
|
raise Exception.Create('TfrmEditWindow.aAddPaneExecute: ' + RSDamagedTreeStructure);
|
||||||
Tab := TSpkTab(Node.Parent.Parent.Data);
|
Tab := TSpkTab(Node.Parent.Parent.Data);
|
||||||
Pane := TSpkPane.Create(FToolbar.Owner);
|
Pane := TSpkPane.Create(FToolbar.Owner);
|
||||||
Pane.Parent := FToolbar;
|
Pane.Parent := FToolbar;
|
||||||
@ -195,7 +204,7 @@ begin
|
|||||||
NewNode.Selected := true;
|
NewNode.Selected := true;
|
||||||
CheckActionsAvailability;
|
CheckActionsAvailability;
|
||||||
end else
|
end else
|
||||||
raise Exception.Create('TfrmEditWindow.aAddPaneExecute: Nieprawid�owy obiekt podwieszony pod ga��zi�!');
|
raise Exception.Create('TfrmEditWindow.aAddPaneExecute: ' + RSIncorrectObjectInTree);
|
||||||
|
|
||||||
FDesigner.PropertyEditorHook.PersistentAdded(Pane,True);
|
FDesigner.PropertyEditorHook.PersistentAdded(Pane,True);
|
||||||
FDesigner.Modified;
|
FDesigner.Modified;
|
||||||
@ -262,9 +271,9 @@ begin
|
|||||||
|
|
||||||
Node := tvStructure.Selected;
|
Node := tvStructure.Selected;
|
||||||
if Node = nil then
|
if Node = nil then
|
||||||
raise Exception.Create('TfrmEditWindow.AddItem: Brak zaznaczonego obiektu!');
|
raise Exception.Create('TfrmEditWindow.AddItem: ' + RSNoObjectSelected);
|
||||||
if Node.Data = nil then
|
if Node.Data = nil then
|
||||||
raise Exception.Create('TfrmEditWindow.AddItem: Uszkodzona struktura drzewa!');
|
raise Exception.Create('TfrmEditWindow.AddItem: ' + RSDamagedTreeStructure);
|
||||||
|
|
||||||
Obj := TObject(Node.Data);
|
Obj := TObject(Node.Data);
|
||||||
if Obj is TSpkPane then
|
if Obj is TSpkPane then
|
||||||
@ -285,7 +294,7 @@ begin
|
|||||||
if Obj is TSpkBaseItem then
|
if Obj is TSpkBaseItem then
|
||||||
begin
|
begin
|
||||||
if not CheckValidItemNode(Node) then
|
if not CheckValidItemNode(Node) then
|
||||||
raise Exception.Create('TfrmEditWindow.AddItem: Uszkodzona struktura drzewa!');
|
raise Exception.Create('TfrmEditWindow.AddItem: ' + RSDamagedTreeStructure);
|
||||||
Pane := TSpkPane(Node.Parent.Data);
|
Pane := TSpkPane(Node.Parent.Data);
|
||||||
Item := ItemClass.Create(FToolbar.Owner);
|
Item := ItemClass.Create(FToolbar.Owner);
|
||||||
Item.Parent := FToolbar;
|
Item.Parent := FToolbar;
|
||||||
@ -299,7 +308,7 @@ begin
|
|||||||
NewNode.Selected := true;
|
NewNode.Selected := true;
|
||||||
CheckActionsAvailability;
|
CheckActionsAvailability;
|
||||||
end else
|
end else
|
||||||
raise Exception.Create('TfrmEditWindow.AddItem: Nieprawid�owy obiekt podwieszony pod ga��zi�!');
|
raise Exception.Create('TfrmEditWindow.AddItem: ' + RSIncorrectObjectInTree);
|
||||||
FDesigner.PropertyEditorHook.PersistentAdded(Item,True);
|
FDesigner.PropertyEditorHook.PersistentAdded(Item,True);
|
||||||
FDesigner.Modified;
|
FDesigner.Modified;
|
||||||
end;
|
end;
|
||||||
@ -318,22 +327,22 @@ begin
|
|||||||
|
|
||||||
Node := tvStructure.Selected;
|
Node := tvStructure.Selected;
|
||||||
if Node = nil then
|
if Node = nil then
|
||||||
raise Exception.Create('TfrmEditWindow.aMoveDownExecute: Nie zaznaczono obiektu do przesuni�cia!');
|
raise Exception.Create('TfrmEditWindow.aMoveDownExecute: ' + RSNoObjectSelectedToMove);
|
||||||
if Node.Data = nil then
|
if Node.Data = nil then
|
||||||
raise Exception.Create('TfrmEditWindow.aMoveDownExecute: Uszkodzona struktura drzewa!');
|
raise Exception.Create('TfrmEditWindow.aMoveDownExecute: ' + RSDamagedTreeStructure);
|
||||||
|
|
||||||
Obj := TObject(Node.Data);
|
Obj := TObject(Node.Data);
|
||||||
if Obj is TSpkTab then
|
if Obj is TSpkTab then
|
||||||
begin
|
begin
|
||||||
if not CheckValidTabNode(Node) then
|
if not CheckValidTabNode(Node) then
|
||||||
raise Exception.Create('TfrmEditWindow.aMoveDownExecute: Uszkodzona struktura drzewa!');
|
raise Exception.Create('TfrmEditWindow.aMoveDownExecute: ' + RSDamagedTreeStructure);
|
||||||
|
|
||||||
Tab := TSpkTab(Node.Data);
|
Tab := TSpkTab(Node.Data);
|
||||||
index := FToolbar.Tabs.IndexOf(Tab);
|
index := FToolbar.Tabs.IndexOf(Tab);
|
||||||
if (index = -1) then
|
if (index = -1) then
|
||||||
raise Exception.Create('TfrmEditWindow.aMoveDownExecute: Uszkodzona struktura drzewa!');
|
raise Exception.Create('TfrmEditWindow.aMoveDownExecute: ' + RSDamagedTreeStructure);
|
||||||
if (index = FToolbar.Tabs.Count - 1) then
|
if (index = FToolbar.Tabs.Count - 1) then
|
||||||
raise Exception.Create('TfrmEditWindow.aMoveDownExecute: Nie mo�na przesun�� w d�� ostatniego elementu!');
|
raise Exception.Create('TfrmEditWindow.aMoveDownExecute: ' + RSCannotMoveBeyondLastElement);
|
||||||
|
|
||||||
FToolbar.Tabs.Exchange(index, index+1);
|
FToolbar.Tabs.Exchange(index, index+1);
|
||||||
FToolbar.TabIndex := index+1;
|
FToolbar.TabIndex := index+1;
|
||||||
@ -346,16 +355,16 @@ begin
|
|||||||
if Obj is TSpkPane then
|
if Obj is TSpkPane then
|
||||||
begin
|
begin
|
||||||
if not CheckValidPaneNode(Node) then
|
if not CheckValidPaneNode(Node) then
|
||||||
raise Exception.Create('TfrmEditWindow.aMoveDownExecute: Uszkodzona struktura drzewa!');
|
raise Exception.Create('TfrmEditWindow.aMoveDownExecute: ' + RSDamagedTreeStructure);
|
||||||
|
|
||||||
Pane := TSpkPane(Node.Data);
|
Pane := TSpkPane(Node.Data);
|
||||||
Tab := TSpkTab(Node.Parent.Data);
|
Tab := TSpkTab(Node.Parent.Data);
|
||||||
|
|
||||||
index := Tab.Panes.IndexOf(Pane);
|
index := Tab.Panes.IndexOf(Pane);
|
||||||
if (index = -1) then
|
if (index = -1) then
|
||||||
raise Exception.Create('TfrmEditWindow.aMoveDownExecute: Uszkodzona struktura drzewa!');
|
raise Exception.Create('TfrmEditWindow.aMoveDownExecute: ' + RSDamagedTreeStructure);
|
||||||
if (index = Tab.Panes.Count - 1) then
|
if (index = Tab.Panes.Count - 1) then
|
||||||
raise Exception.Create('TfrmEditWindow.aMoveDownExecute: Nie mo�na przesun�� w d�� ostatniego elementu!');
|
raise Exception.Create('TfrmEditWindow.aMoveDownExecute: ' + RSCannotMoveBeyondLastElement);
|
||||||
|
|
||||||
Tab.Panes.Exchange(index, index+1);
|
Tab.Panes.Exchange(index, index+1);
|
||||||
|
|
||||||
@ -367,16 +376,16 @@ begin
|
|||||||
if Obj is TSpkBaseItem then
|
if Obj is TSpkBaseItem then
|
||||||
begin
|
begin
|
||||||
if not CheckValidItemNode(Node) then
|
if not CheckValidItemNode(Node) then
|
||||||
raise Exception.Create('TfrmEditWindow.aMoveDown.Execute: Uszkodzona struktura drzewa!');
|
raise Exception.Create('TfrmEditWindow.aMoveDown.Execute: ' + RSDamagedTreeStructure);
|
||||||
|
|
||||||
Item := TSpkBaseItem(Node.Data);
|
Item := TSpkBaseItem(Node.Data);
|
||||||
Pane := TSpkPane(Node.Parent.Data);
|
Pane := TSpkPane(Node.Parent.Data);
|
||||||
|
|
||||||
index := Pane.Items.IndexOf(Item);
|
index := Pane.Items.IndexOf(Item);
|
||||||
if (index = -1) then
|
if (index = -1) then
|
||||||
raise Exception.Create('TfrmEditWindow.aMoveDownExecute: Uszkodzona struktura drzewa!');
|
raise Exception.Create('TfrmEditWindow.aMoveDownExecute: ' + RSDamagedTreeStructure);
|
||||||
if (index = Pane.Items.Count - 1) then
|
if (index = Pane.Items.Count - 1) then
|
||||||
raise Exception.Create('TfrmEditWindow.aMoveDownExecute: Nie mo�na przesun�� w d�� ostatniego elementu!');
|
raise Exception.Create('TfrmEditWindow.aMoveDownExecute: ' + RSCannotMoveBeyondLastElement);
|
||||||
|
|
||||||
Pane.Items.Exchange(index, index+1);
|
Pane.Items.Exchange(index, index+1);
|
||||||
|
|
||||||
@ -385,7 +394,7 @@ begin
|
|||||||
CheckActionsAvailability;
|
CheckActionsAvailability;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
raise Exception.Create('TfrmEditWindow.aMoveDownExecute: Nieprawid�owy obiekt podwieszony pod ga��zi�!');
|
raise Exception.Create('TfrmEditWindow.aMoveDownExecute: ' + RSIncorrectObjectInTree);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmEditWindow.aMoveUpExecute(Sender: TObject);
|
procedure TfrmEditWindow.aMoveUpExecute(Sender: TObject);
|
||||||
@ -402,22 +411,22 @@ begin
|
|||||||
|
|
||||||
Node := tvStructure.Selected;
|
Node := tvStructure.Selected;
|
||||||
if Node = nil then
|
if Node = nil then
|
||||||
raise Exception.Create('TfrmEditWindow.aMoveUpExecute: Nie zaznaczono obiektu do przesuni�cia!');
|
raise Exception.Create('TfrmEditWindow.aMoveUpExecute: '+ RSNoObjectSelectedToMove);
|
||||||
if Node.Data = nil then
|
if Node.Data = nil then
|
||||||
raise Exception.Create('TfrmEditWindow.aMoveUpExecute: Uszkodzona struktura drzewa!');
|
raise Exception.Create('TfrmEditWindow.aMoveUpExecute: ' + RSDamagedTreeStructure);
|
||||||
|
|
||||||
Obj := TObject(Node.Data);
|
Obj := TObject(Node.Data);
|
||||||
if Obj is TSpkTab then
|
if Obj is TSpkTab then
|
||||||
begin
|
begin
|
||||||
if not CheckValidTabNode(Node) then
|
if not CheckValidTabNode(Node) then
|
||||||
raise Exception.Create('TfrmEditWindow.aMoveUpExecute: Uszkodzona struktura drzewa!');
|
raise Exception.Create('TfrmEditWindow.aMoveUpExecute: ' + RSDamagedTreeStructure);
|
||||||
|
|
||||||
Tab := TSpkTab(Node.Data);
|
Tab := TSpkTab(Node.Data);
|
||||||
index := FToolbar.Tabs.IndexOf(Tab);
|
index := FToolbar.Tabs.IndexOf(Tab);
|
||||||
if (index = -1) then
|
if (index = -1) then
|
||||||
raise Exception.Create('TfrmEditWindow.aMoveUpExecute: Uszkodzona struktura drzewa!');
|
raise Exception.Create('TfrmEditWindow.aMoveUpExecute: ' + RSDamagedTreeStructure);
|
||||||
if (index = 0) then
|
if (index = 0) then
|
||||||
raise Exception.Create('TfrmEditWindow.aMoveUpExecute: Nie mo�na przesun�� do g�ry pierwszego elementu!');
|
raise Exception.Create('TfrmEditWindow.aMoveUpExecute: ' + RSCannotMoveAboveFirstElement);
|
||||||
|
|
||||||
FToolbar.Tabs.Exchange(index, index-1);
|
FToolbar.Tabs.Exchange(index, index-1);
|
||||||
FToolbar.TabIndex := index-1;
|
FToolbar.TabIndex := index-1;
|
||||||
@ -430,15 +439,15 @@ begin
|
|||||||
if Obj is TSpkPane then
|
if Obj is TSpkPane then
|
||||||
begin
|
begin
|
||||||
if not CheckValidPaneNode(Node) then
|
if not CheckValidPaneNode(Node) then
|
||||||
raise Exception.Create('TfrmEditWindow.aMoveUpExecute: Uszkodzona struktura drzewa!');
|
raise Exception.Create('TfrmEditWindow.aMoveUpExecute: ' + RSDamagedTreeStructure);
|
||||||
|
|
||||||
Pane := TSpkPane(Node.Data);
|
Pane := TSpkPane(Node.Data);
|
||||||
Tab := TSpkTab(Node.Parent.Data);
|
Tab := TSpkTab(Node.Parent.Data);
|
||||||
index := Tab.Panes.IndexOf(Pane);
|
index := Tab.Panes.IndexOf(Pane);
|
||||||
if (index = -1) then
|
if (index = -1) then
|
||||||
raise Exception.Create('TfrmEditWindow.aMoveUpExecute: Uszkodzona struktura drzewa!');
|
raise Exception.Create('TfrmEditWindow.aMoveUpExecute: ' + RSDamagedTreeStructure);
|
||||||
if (index = 0) then
|
if (index = 0) then
|
||||||
raise Exception.Create('TfrmEditWindow.aMoveUpExecute: Nie mo�na przesun�� do g�ry pierwszego elementu!');
|
raise Exception.Create('TfrmEditWindow.aMoveUpExecute: ' + RSCannotMoveAboveFirstElement);
|
||||||
|
|
||||||
Tab.Panes.Exchange(index, index-1);
|
Tab.Panes.Exchange(index, index-1);
|
||||||
|
|
||||||
@ -450,15 +459,15 @@ begin
|
|||||||
if Obj is TSpkBaseItem then
|
if Obj is TSpkBaseItem then
|
||||||
begin
|
begin
|
||||||
if not CheckValidItemNode(Node) then
|
if not CheckValidItemNode(Node) then
|
||||||
raise Exception.Create('TfrmEditWindow.aMoveUpExecute: Uszkodzona struktura drzewa!');
|
raise Exception.Create('TfrmEditWindow.aMoveUpExecute: ' + RSDamagedTreeStructure);
|
||||||
|
|
||||||
Item := TSpkBaseItem(Node.Data);
|
Item := TSpkBaseItem(Node.Data);
|
||||||
Pane := TSpkPane(Node.Parent.Data);
|
Pane := TSpkPane(Node.Parent.Data);
|
||||||
index := Pane.Items.IndexOf(Item);
|
index := Pane.Items.IndexOf(Item);
|
||||||
if (index = -1) then
|
if (index = -1) then
|
||||||
raise Exception.Create('TfrmEditWindow.aMoveUpExecute: Uszkodzona struktura drzewa!');
|
raise Exception.Create('TfrmEditWindow.aMoveUpExecute: ' + RSDamagedTreeStructure);
|
||||||
if (index = 0) then
|
if (index = 0) then
|
||||||
raise Exception.Create('TfrmEditWindow.aMoveUpExecute: Nie mo�na przesun�� do g�ry pierwszego elementu!');
|
raise Exception.Create('TfrmEditWindow.aMoveUpExecute: ' + RSCannotMoveAboveFirstElement);
|
||||||
|
|
||||||
Pane.Items.Exchange(index, index-1);
|
Pane.Items.Exchange(index, index-1);
|
||||||
|
|
||||||
@ -466,7 +475,7 @@ begin
|
|||||||
Node.Selected := true;
|
Node.Selected := true;
|
||||||
CheckActionsAvailability;
|
CheckActionsAvailability;
|
||||||
end else
|
end else
|
||||||
raise Exception.Create('TfrmEditWindow.aMoveUpExecute: Nieprawid�owy obiekt podwieszony pod ga��zi�!');
|
raise Exception.Create('TfrmEditWindow.aMoveUpExecute: ' + RSIncorrectObjectInTree);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmEditWindow.aRemoveItemExecute(Sender: TObject);
|
procedure TfrmEditWindow.aRemoveItemExecute(Sender: TObject);
|
||||||
@ -537,14 +546,14 @@ begin
|
|||||||
begin
|
begin
|
||||||
Obj := TObject(Node.Data);
|
Obj := TObject(Node.Data);
|
||||||
if Obj = nil then
|
if Obj = nil then
|
||||||
raise Exception.Create('TfrmEditWindow.CheckActionsAvailability: Nieprawid�owe dane w ga��zi!');
|
raise Exception.Create('TfrmEditWindow.CheckActionsAvailability: ' + RSIncorrectFieldData);
|
||||||
|
|
||||||
if Obj is TSpkTab then
|
if Obj is TSpkTab then
|
||||||
begin
|
begin
|
||||||
Tab := Obj as TSpkTab;
|
Tab := Obj as TSpkTab;
|
||||||
|
|
||||||
if not CheckValidTabNode(Node) then
|
if not CheckValidTabNode(Node) then
|
||||||
raise Exception.Create('TfrmEditWindow.CheckActionsAvailability: Uszkodzona struktura drzewa!');
|
raise Exception.Create('TfrmEditWindow.CheckActionsAvailability: ' + RSDamagedTreeStructure);
|
||||||
|
|
||||||
aAddTab.Enabled := true;
|
aAddTab.Enabled := true;
|
||||||
aRemoveTab.Enabled := true;
|
aRemoveTab.Enabled := true;
|
||||||
@ -558,7 +567,7 @@ begin
|
|||||||
|
|
||||||
index := FToolbar.Tabs.IndexOf(Tab);
|
index := FToolbar.Tabs.IndexOf(Tab);
|
||||||
if index = -1 then
|
if index = -1 then
|
||||||
raise Exception.Create('TfrmEditWindow.CheckActionsAvailability: Uszkodzona struktura drzewa!');
|
raise Exception.Create('TfrmEditWindow.CheckActionsAvailability: ' + RSDamagedTreeStructure);
|
||||||
|
|
||||||
aMoveUp.Enabled := (index > 0);
|
aMoveUp.Enabled := (index > 0);
|
||||||
aMoveDown.enabled := (index < FToolbar.Tabs.Count-1);
|
aMoveDown.enabled := (index < FToolbar.Tabs.Count-1);
|
||||||
@ -567,7 +576,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
Pane := TSpkPane(Obj);
|
Pane := TSpkPane(Obj);
|
||||||
if not(CheckValidPaneNode(Node)) then
|
if not(CheckValidPaneNode(Node)) then
|
||||||
raise Exception.Create('TfrmEditWindow.CheckActionsAvailability: Uszkodzona struktura drzewa!');
|
raise Exception.Create('TfrmEditWindow.CheckActionsAvailability: ' + RSDamagedTreeStructure);
|
||||||
|
|
||||||
Tab := TSpkTab(Node.Parent.Data);
|
Tab := TSpkTab(Node.Parent.Data);
|
||||||
|
|
||||||
@ -583,7 +592,7 @@ begin
|
|||||||
|
|
||||||
index := Tab.Panes.IndexOf(Pane);
|
index := Tab.Panes.IndexOf(Pane);
|
||||||
if index = -1 then
|
if index = -1 then
|
||||||
raise Exception.Create('TfrmEditWindow.CheckActionsAvailability: Uszkodzona struktura drzewa!');
|
raise Exception.Create('TfrmEditWindow.CheckActionsAvailability: ' + RSDamagedTreeStructure);
|
||||||
|
|
||||||
aMoveUp.Enabled := (index > 0);
|
aMoveUp.Enabled := (index > 0);
|
||||||
aMoveDown.Enabled := (index < Tab.Panes.Count-1);
|
aMoveDown.Enabled := (index < Tab.Panes.Count-1);
|
||||||
@ -592,7 +601,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
Item := TSpkBaseItem(Obj);
|
Item := TSpkBaseItem(Obj);
|
||||||
if not CheckValidItemNode(Node) then
|
if not CheckValidItemNode(Node) then
|
||||||
raise Exception.Create('TfrmEditWindow.CheckActionsAvailability: Uszkodzona struktura drzewa!');
|
raise Exception.Create('TfrmEditWindow.CheckActionsAvailability: ' + RSDamagedTreeStructure);
|
||||||
|
|
||||||
Pane := TSpkPane(Node.Parent.Data);
|
Pane := TSpkPane(Node.Parent.Data);
|
||||||
|
|
||||||
@ -608,12 +617,12 @@ begin
|
|||||||
|
|
||||||
index := Pane.Items.IndexOf(Item);
|
index := Pane.Items.IndexOf(Item);
|
||||||
if index = -1 then
|
if index = -1 then
|
||||||
raise Exception.Create('TfrmEditWindow.CheckActionsAvailability: Uszkodzona struktura drzewa!');
|
raise Exception.Create('TfrmEditWindow.CheckActionsAvailability: ' + RSDamagedTreeStructure);
|
||||||
|
|
||||||
aMoveUp.Enabled := (index > 0);
|
aMoveUp.Enabled := (index > 0);
|
||||||
aMoveDown.Enabled := (index < Pane.Items.Count - 1);
|
aMoveDown.Enabled := (index < Pane.Items.Count - 1);
|
||||||
end else
|
end else
|
||||||
raise Exception.Create('TfrmEditWindow.CheckActionsAvailability: Nieprawid�owy obiekt podwieszony pod ga��zi�!');
|
raise Exception.Create('TfrmEditWindow.CheckActionsAvailability: ' + RSIncorrectObjectInTree);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -692,10 +701,9 @@ begin
|
|||||||
|
|
||||||
if (AComponent = FToolbar) and (Operation = opRemove) then
|
if (AComponent = FToolbar) and (Operation = opRemove) then
|
||||||
begin
|
begin
|
||||||
// W�a�nie zwalniany jest toolbar, kt�rego zawarto�� wy�wietla okno
|
// The toolbar is currently released, whose content is displayed in the
|
||||||
// edytora. Trzeba posprz�ta� zawarto�� - w przeciwnym wypadku okno
|
// editor window. Need to clean up the content - otherwise the window will
|
||||||
// b�dzie mia�o referencje do ju� usuni�tych element�w toolbara, co
|
// have references to the already removed toolbars, which will end in AVs ...
|
||||||
// sko�czy si� AVami...
|
|
||||||
SetData(nil, nil);
|
SetData(nil, nil);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -736,12 +744,12 @@ begin
|
|||||||
|
|
||||||
Node := tvStructure.Selected;
|
Node := tvStructure.Selected;
|
||||||
if not (CheckValidItemNode(Node)) then
|
if not (CheckValidItemNode(Node)) then
|
||||||
raise Exception.Create('TfrmEditWindow.aRemoveItemExecute: Uszkodzona struktura drzewa!');
|
raise Exception.Create('TfrmEditWindow.aRemoveItemExecute: ' + RSDamagedTreeStructure);
|
||||||
Item := TSpkBaseItem(Node.Data);
|
Item := TSpkBaseItem(Node.Data);
|
||||||
Pane := TSpkPane(Node.Parent.Data);
|
Pane := TSpkPane(Node.Parent.Data);
|
||||||
index := Pane.Items.IndexOf(Item);
|
index := Pane.Items.IndexOf(Item);
|
||||||
if index = -1 then
|
if index = -1 then
|
||||||
raise Exception.Create('TfrmEditWindow.aRemoveItemExecute: Uszkodzona struktura drzewa!');
|
raise Exception.Create('TfrmEditWindow.aRemoveItemExecute: ' + RSDamagedTreeStructure);
|
||||||
if Node.getPrevSibling <> nil then
|
if Node.getPrevSibling <> nil then
|
||||||
NextNode := Node.getPrevSibling
|
NextNode := Node.getPrevSibling
|
||||||
else if Node.GetNextSibling <> nil then
|
else if Node.GetNextSibling <> nil then
|
||||||
@ -767,12 +775,12 @@ begin
|
|||||||
|
|
||||||
Node := tvStructure.Selected;
|
Node := tvStructure.Selected;
|
||||||
if not (CheckValidPaneNode(Node)) then
|
if not (CheckValidPaneNode(Node)) then
|
||||||
raise Exception.Create('TfrmEditWindow.aRemovePaneExecute: Uszkodzona struktura drzewa!');
|
raise Exception.Create('TfrmEditWindow.aRemovePaneExecute: ' + RSDamagedTreeStructure);
|
||||||
Pane := TSpkPane(Node.Data);
|
Pane := TSpkPane(Node.Data);
|
||||||
Tab := TSpkTab(Node.Parent.Data);
|
Tab := TSpkTab(Node.Parent.Data);
|
||||||
index := Tab.Panes.IndexOf(Pane);
|
index := Tab.Panes.IndexOf(Pane);
|
||||||
if index = -1 then
|
if index = -1 then
|
||||||
raise Exception.Create('TfrmEditWindow.aRemovePaneExecute: Uszkodzona struktura drzewa!');
|
raise Exception.Create('TfrmEditWindow.aRemovePaneExecute: ' + RSDamagedTreeStructure);
|
||||||
if Node.GetPrevSibling <> nil then
|
if Node.GetPrevSibling <> nil then
|
||||||
NextNode := Node.GetPrevSibling
|
NextNode := Node.GetPrevSibling
|
||||||
else if Node.GetNextSibling <> nil then
|
else if Node.GetNextSibling <> nil then
|
||||||
@ -797,11 +805,11 @@ begin
|
|||||||
|
|
||||||
Node := tvStructure.Selected;
|
Node := tvStructure.Selected;
|
||||||
if not (CheckValidTabNode(Node)) then
|
if not (CheckValidTabNode(Node)) then
|
||||||
raise Exception.Create('TfrmEditWindow.aRemoveTabExecute: Uszkodzona struktura drzewa!');
|
raise Exception.Create('TfrmEditWindow.aRemoveTabExecute: ' + RSDamagedTreeStructure);
|
||||||
Tab := TSpkTab(Node.Data);
|
Tab := TSpkTab(Node.Data);
|
||||||
index := FToolbar.Tabs.IndexOf(Tab);
|
index := FToolbar.Tabs.IndexOf(Tab);
|
||||||
if index = -1 then
|
if index = -1 then
|
||||||
raise Exception.Create('TfrmEditWindow.aRemoveTabExecute: Uszkodzona struktura drzewa!');
|
raise Exception.Create('TfrmEditWindow.aRemoveTabExecute: ' + RSDamagedTreeStructure);
|
||||||
if Node.GetPrevSibling <> nil then
|
if Node.GetPrevSibling <> nil then
|
||||||
NextNode := Node.GetPrevSibling
|
NextNode := Node.GetPrevSibling
|
||||||
else if Node.GetNextSibling <> nil then
|
else if Node.GetNextSibling <> nil then
|
||||||
@ -812,17 +820,17 @@ begin
|
|||||||
tvStructure.Items.Delete(Node);
|
tvStructure.Items.Delete(Node);
|
||||||
if Assigned(NextNode) then
|
if Assigned(NextNode) then
|
||||||
begin
|
begin
|
||||||
// Zdarzenie OnChange wyzwoli aktualizacj� zaznaczonego obiektu w
|
// The OnChange event will trigger an update of the selected object in
|
||||||
// Object Inspectorze
|
// the Object Inspector
|
||||||
NextNode.Selected := true;
|
NextNode.Selected := true;
|
||||||
CheckActionsAvailability;
|
CheckActionsAvailability;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
// Nie ma ju� �adnych obiekt�w na li�cie, ale co� musi zosta� wy�wietlone w
|
// There are no more objects in the list, but something has to be displayed
|
||||||
// Object Inspectorze - wy�wietlamy wi�c samego toolbara (w przeciwnym
|
// in the Object Inspector - so we will display the toolbars itself
|
||||||
// wypadku IDE b�dzie pr�bowa�o wy�wietli� w Object Inspectorze w�a�ciwo�ci
|
// (otherwise the IDE will attempt to display the object's properties in
|
||||||
// w�a�nie zwolnionego obiektu, co sko�czy si�, powiedzmy, niezbyt mi�o)
|
// the Object Inspector, which will end, say, not very nice)
|
||||||
//DesignObj := PersistentToDesignObject(FToolbar);
|
//DesignObj := PersistentToDesignObject(FToolbar);
|
||||||
FDesigner.SelectOnlyThisComponent(FToolbar);
|
FDesigner.SelectOnlyThisComponent(FToolbar);
|
||||||
CheckActionsAvailability;
|
CheckActionsAvailability;
|
||||||
@ -904,7 +912,7 @@ begin
|
|||||||
while tabnode<>nil do
|
while tabnode<>nil do
|
||||||
begin
|
begin
|
||||||
if not CheckValidTabNode(tabnode) then
|
if not CheckValidTabNode(tabnode) then
|
||||||
raise Exception.Create('TfrmEditWindow.RefreshNames: Uszkodzona struktura drzewa!');
|
raise Exception.Create('TfrmEditWindow.RefreshNames: ' + RSDamagedTreeStructure);
|
||||||
|
|
||||||
tabnode.Text := TSpkTab(tabnode.Data).Caption;
|
tabnode.Text := TSpkTab(tabnode.Data).Caption;
|
||||||
|
|
||||||
@ -912,7 +920,7 @@ begin
|
|||||||
while panenode <> nil do
|
while panenode <> nil do
|
||||||
begin
|
begin
|
||||||
if not CheckValidPaneNode(panenode) then
|
if not CheckValidPaneNode(panenode) then
|
||||||
raise Exception.Create('TfrmEditWindow.RefreshNames: Uszkodzona struktura drzewa!');
|
raise Exception.Create('TfrmEditWindow.RefreshNames: ' + RSDamagedTreeStructure);
|
||||||
|
|
||||||
panenode.Text := TSpkPane(panenode.Data).Caption;
|
panenode.Text := TSpkPane(panenode.Data).Caption;
|
||||||
|
|
||||||
@ -920,7 +928,7 @@ begin
|
|||||||
while itemnode <> nil do
|
while itemnode <> nil do
|
||||||
begin
|
begin
|
||||||
if not CheckValidItemNode(itemnode) then
|
if not CheckValidItemNode(itemnode) then
|
||||||
raise Exception.Create('TfrmEditWindow.RefreshNames: Uszkodzona struktura drzewa!');
|
raise Exception.Create('TfrmEditWindow.RefreshNames: ' + RSDamagedTreeStructure);
|
||||||
|
|
||||||
Obj := TSpkBaseItem(itemnode.Data);
|
Obj := TSpkBaseItem(itemnode.Data);
|
||||||
s := GetItemCaption(Obj);
|
s := GetItemCaption(Obj);
|
||||||
@ -950,14 +958,14 @@ begin
|
|||||||
begin
|
begin
|
||||||
Obj := TObject(Node.Data);
|
Obj := TObject(Node.Data);
|
||||||
if Obj = nil then
|
if Obj = nil then
|
||||||
raise Exception.Create('TfrmEditWindow.tvStructureChange: Nieprawid�owe dane w ga��zi!');
|
raise Exception.Create('TfrmEditWindow.tvStructureChange: ' + RSIncorrectFieldData);
|
||||||
if Obj is TSpkTab then
|
if Obj is TSpkTab then
|
||||||
begin
|
begin
|
||||||
Tab := TSpkTab(Obj);
|
Tab := TSpkTab(Obj);
|
||||||
FDesigner.SelectOnlyThisComponent(Tab);
|
FDesigner.SelectOnlyThisComponent(Tab);
|
||||||
index := FToolbar.Tabs.IndexOf(Tab);
|
index := FToolbar.Tabs.IndexOf(Tab);
|
||||||
if index=-1 then
|
if index=-1 then
|
||||||
raise Exception.Create('TfrmEditWindow.tvStructureChange: Uszkodzona struktura drzewa!');
|
raise Exception.Create('TfrmEditWindow.tvStructureChange: ' + RSDamagedTreeStructure);
|
||||||
FToolbar.TabIndex := index;
|
FToolbar.TabIndex := index;
|
||||||
end else
|
end else
|
||||||
if Obj is TSpkPane then
|
if Obj is TSpkPane then
|
||||||
@ -965,11 +973,11 @@ begin
|
|||||||
Pane := TSpkPane(Obj);
|
Pane := TSpkPane(Obj);
|
||||||
FDesigner.SelectOnlyThisComponent(Pane);
|
FDesigner.SelectOnlyThisComponent(Pane);
|
||||||
if not(CheckValidPaneNode(Node)) then
|
if not(CheckValidPaneNode(Node)) then
|
||||||
raise Exception.Create('TfrmEditWindow.tvStructureChange: Uszkodzona struktura drzewa!');
|
raise Exception.Create('TfrmEditWindow.tvStructureChange: ' + RSDamagedTreeStructure);
|
||||||
Tab := TSpkTab(Node.Parent.Data);
|
Tab := TSpkTab(Node.Parent.Data);
|
||||||
index := FToolbar.Tabs.IndexOf(Tab);
|
index := FToolbar.Tabs.IndexOf(Tab);
|
||||||
if index = -1 then
|
if index = -1 then
|
||||||
raise Exception.Create('TfrmEditWindow.tvStructureChange: Uszkodzona struktura drzewa!');
|
raise Exception.Create('TfrmEditWindow.tvStructureChange: ' + RSDamagedTreeStructure);
|
||||||
FToolbar.TabIndex := index;
|
FToolbar.TabIndex := index;
|
||||||
end else
|
end else
|
||||||
if Obj is TSpkBaseItem then
|
if Obj is TSpkBaseItem then
|
||||||
@ -977,14 +985,14 @@ begin
|
|||||||
Item := TSpkBaseItem(Obj);
|
Item := TSpkBaseItem(Obj);
|
||||||
FDesigner.SelectOnlyThisComponent(Item);
|
FDesigner.SelectOnlyThisComponent(Item);
|
||||||
if not CheckValidItemNode(Node) then
|
if not CheckValidItemNode(Node) then
|
||||||
raise Exception.Create('TfrmEditWindow.tvStructureChange: Uszkodzona struktura drzewa!');
|
raise Exception.Create('TfrmEditWindow.tvStructureChange: ' + RSDamagedTreeStructure);
|
||||||
Tab := TSpkTab(Node.Parent.Parent.Data);
|
Tab := TSpkTab(Node.Parent.Parent.Data);
|
||||||
index := FToolbar.Tabs.IndexOf(Tab);
|
index := FToolbar.Tabs.IndexOf(Tab);
|
||||||
if index = -1 then
|
if index = -1 then
|
||||||
raise Exception.Create('TfrmEditWindow.tvStructureChange: Uszkodzona struktura drzewa!');
|
raise Exception.Create('TfrmEditWindow.tvStructureChange: ' + RSDamagedTreeStructure);
|
||||||
FToolbar.TabIndex := index;
|
FToolbar.TabIndex := index;
|
||||||
end else
|
end else
|
||||||
raise Exception.Create('TfrmEditWindow.tvStructureChange: Nieprawid�owy obiekt podwieszony pod ga��zi�!');
|
raise Exception.Create('TfrmEditWindow.tvStructureChange: ' + RSIncorrectObjectInTree);
|
||||||
end else
|
end else
|
||||||
FDesigner.SelectOnlyThisComponent(FToolbar);
|
FDesigner.SelectOnlyThisComponent(FToolbar);
|
||||||
|
|
||||||
@ -1020,7 +1028,7 @@ begin
|
|||||||
exit;
|
exit;
|
||||||
|
|
||||||
if Node.Data = nil then
|
if Node.Data = nil then
|
||||||
raise Exception.Create('TfrmEditWindow.tvStructureEdited: Uszkodzona struktura drzewa!');
|
raise Exception.Create('TfrmEditWindow.tvStructureEdited: ' + RSDamagedTreeStructure);
|
||||||
|
|
||||||
if TObject(Node.Data) is TSpkTab then
|
if TObject(Node.Data) is TSpkTab then
|
||||||
begin
|
begin
|
||||||
@ -1040,7 +1048,7 @@ begin
|
|||||||
SetItemCaption(Item, S);
|
SetItemCaption(Item, S);
|
||||||
FDesigner.Modified;
|
FDesigner.Modified;
|
||||||
end else
|
end else
|
||||||
raise Exception.Create('TfrmEditWindow.tvStructureEdited: Uszkodzona struktura drzewa!');
|
raise Exception.Create('TfrmEditWindow.tvStructureEdited: ' + RSDamagedTreeStructure);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmEditWindow.tvStructureKeyDown(Sender: TObject; var Key: Word;
|
procedure TfrmEditWindow.tvStructureKeyDown(Sender: TObject; var Key: Word;
|
||||||
@ -1053,8 +1061,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
if tvStructure.Selected <> nil then
|
if tvStructure.Selected <> nil then
|
||||||
begin
|
begin
|
||||||
// Sprawdzamy, jakiego rodzaju obiekt jest zaznaczony - wystarczy
|
// We check what kind of object is selected - just test the type of the object
|
||||||
// przetestowa� typ podwieszonego obiektu.
|
|
||||||
if TObject(tvStructure.Selected.Data) is TSpkTab then
|
if TObject(tvStructure.Selected.Data) is TSpkTab then
|
||||||
DoRemoveTab
|
DoRemoveTab
|
||||||
else if TObject(tvStructure.Selected.Data) is TSpkPane then
|
else if TObject(tvStructure.Selected.Data) is TSpkPane then
|
||||||
@ -1062,7 +1069,7 @@ begin
|
|||||||
else if TObject(tvStructure.Selected.Data) is TSpkBaseItem then
|
else if TObject(tvStructure.Selected.Data) is TSpkBaseItem then
|
||||||
DoRemoveItem
|
DoRemoveItem
|
||||||
else
|
else
|
||||||
raise Exception.Create('TfrmEditWindow.tvStructureKeyDown: Damaged tree structure!');
|
raise Exception.Create('TfrmEditWindow.tvStructureKeyDown: ' + RSDamagedTreeStructure);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Reference in New Issue
Block a user