mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-08 11:56:11 +02:00
IDE: localized 'Use a unit from this project' dialog. Based on patch by Marcelo B Paula, bug #18673
git-svn-id: trunk@29362 -
This commit is contained in:
parent
1687922e06
commit
426a7e3efd
@ -5170,6 +5170,13 @@ resourcestring
|
|||||||
+'set (macro LCLWidgetType)';
|
+'set (macro LCLWidgetType)';
|
||||||
lisCircleInMacros = 'Circle in macros';
|
lisCircleInMacros = 'Circle in macros';
|
||||||
|
|
||||||
|
// Uses Unit dialog
|
||||||
|
dlgNoUnusedItem = 'No unused items are available in this project.';
|
||||||
|
dlgUseUnitCaption = 'Use a unit from this project';
|
||||||
|
dlgInsertSection = 'Insert into Uses section of';
|
||||||
|
dlgInsertInterface = 'Interface';
|
||||||
|
dlgInsertImplementation = 'Implementation';
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -8,6 +8,7 @@ object UseProjUnitDialog: TUseProjUnitDialog
|
|||||||
ClientWidth = 318
|
ClientWidth = 318
|
||||||
Constraints.MinHeight = 150
|
Constraints.MinHeight = 150
|
||||||
Constraints.MinWidth = 200
|
Constraints.MinWidth = 200
|
||||||
|
OnCreate = FormCreate
|
||||||
Position = poScreenCenter
|
Position = poScreenCenter
|
||||||
LCLVersion = '0.9.31'
|
LCLVersion = '0.9.31'
|
||||||
object ButtonPanel1: TButtonPanel
|
object ButtonPanel1: TButtonPanel
|
||||||
|
@ -1,3 +1,26 @@
|
|||||||
|
{ Copyright (C) 2011,
|
||||||
|
|
||||||
|
***************************************************************************
|
||||||
|
* *
|
||||||
|
* This source is free software; you can redistribute it and/or modify *
|
||||||
|
* it under the terms of the GNU General Public License as published by *
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or *
|
||||||
|
* (at your option) any later version. *
|
||||||
|
* *
|
||||||
|
* This code is distributed in the hope that it will be useful, but *
|
||||||
|
* WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||||
|
* General Public License for more details. *
|
||||||
|
* *
|
||||||
|
* A copy of the GNU General Public License is available on the World *
|
||||||
|
* Wide Web at <http://www.gnu.org/copyleft/gpl.html>. You can also *
|
||||||
|
* obtain it by writing to the Free Software Foundation, *
|
||||||
|
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||||
|
* *
|
||||||
|
***************************************************************************
|
||||||
|
|
||||||
|
Last change: 02.02.2010 by Marcelo B Paula
|
||||||
|
}
|
||||||
unit UseProjUnitDlg;
|
unit UseProjUnitDlg;
|
||||||
|
|
||||||
{$mode objfpc}{$H+}
|
{$mode objfpc}{$H+}
|
||||||
@ -18,6 +41,7 @@ type
|
|||||||
ButtonPanel1: TButtonPanel;
|
ButtonPanel1: TButtonPanel;
|
||||||
UnitsListBox: TListBox;
|
UnitsListBox: TListBox;
|
||||||
SectionRadioGroup: TRadioGroup;
|
SectionRadioGroup: TRadioGroup;
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
private
|
private
|
||||||
procedure AddItems(AItems: TStrings);
|
procedure AddItems(AItems: TStrings);
|
||||||
procedure SelectFirst;
|
procedure SelectFirst;
|
||||||
@ -92,7 +116,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
ShowMessage('No unused items are available in this project.');
|
ShowMessage(dlgNoUnusedItem);
|
||||||
finally
|
finally
|
||||||
CodeToolBoss.SourceCache.ClearAllSourceLogEntries;
|
CodeToolBoss.SourceCache.ClearAllSourceLogEntries;
|
||||||
UseProjUnitDlg.Free;
|
UseProjUnitDlg.Free;
|
||||||
@ -104,6 +128,19 @@ end;
|
|||||||
|
|
||||||
{ TUseProjUnitDialog }
|
{ TUseProjUnitDialog }
|
||||||
|
|
||||||
|
procedure TUseProjUnitDialog.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
// Internationalization
|
||||||
|
Caption := dlgUseUnitCaption;
|
||||||
|
SectionRadioGroup.Caption := dlgInsertSection;
|
||||||
|
SectionRadioGroup.Items.Clear;
|
||||||
|
SectionRadioGroup.Items.Add(dlgInsertInterface);
|
||||||
|
SectionRadioGroup.Items.Add(dlgInsertImplementation);
|
||||||
|
SectionRadioGroup.ItemIndex:=1;
|
||||||
|
ButtonPanel1.OKButton.Caption:=lisOk;
|
||||||
|
ButtonPanel1.CancelButton.Caption:=dlgCancel;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TUseProjUnitDialog.AddItems(AItems: TStrings);
|
procedure TUseProjUnitDialog.AddItems(AItems: TStrings);
|
||||||
begin
|
begin
|
||||||
UnitsListBox.Items.Assign(AItems);
|
UnitsListBox.Items.Assign(AItems);
|
||||||
|
Loading…
Reference in New Issue
Block a user