mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-27 04:33:54 +02:00
IDE: "Add" command to ProjectInspector popup menu and make AddToProjectDlg's lists read-only. Issue #25755, patch from Flávio Etrusco
git-svn-id: trunk@44211 -
This commit is contained in:
parent
cdecfeb377
commit
af1dd4d00e
@ -10,7 +10,7 @@ object AddToProjectDialog: TAddToProjectDialog
|
||||
ClientWidth = 598
|
||||
OnClose = AddToProjectDialogClose
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '1.1'
|
||||
LCLVersion = '1.3'
|
||||
object Notebook: TPageControl
|
||||
Left = 0
|
||||
Height = 289
|
||||
@ -46,8 +46,11 @@ object AddToProjectDialog: TAddToProjectDialog
|
||||
BorderSpacing.Around = 6
|
||||
Columns = <>
|
||||
MultiSelect = True
|
||||
ReadOnly = True
|
||||
RowSelect = True
|
||||
SortType = stText
|
||||
TabOrder = 0
|
||||
ViewStyle = vsReport
|
||||
OnSelectItem = AddFileListViewSelectItem
|
||||
end
|
||||
end
|
||||
@ -121,9 +124,12 @@ object AddToProjectDialog: TAddToProjectDialog
|
||||
Top = 6
|
||||
Width = 582
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
AutoWidthLastColumn = True
|
||||
BorderSpacing.Around = 6
|
||||
Columns = <>
|
||||
MultiSelect = True
|
||||
ReadOnly = True
|
||||
RowSelect = True
|
||||
SortType = stText
|
||||
TabOrder = 0
|
||||
ViewStyle = vsReport
|
||||
|
@ -379,17 +379,27 @@ var
|
||||
begin
|
||||
ItemCnt:=0;
|
||||
CurFile:=GetSelectedFile;
|
||||
CurDependency:=GetSelectedDependency;
|
||||
|
||||
// Section headers
|
||||
if (CurFile = nil) and (CurDependency = nil) then begin
|
||||
AddPopupMenuItem(lisBtnDlgAdd, @AddBitBtnClick, AddBitBtn.Enabled);
|
||||
AddPopupMenuItem(lisRemoveNonExistingFiles,@RemoveNonExistingFilesMenuItemClick,
|
||||
not LazProject.IsVirtual);
|
||||
end;
|
||||
|
||||
// Item under files section
|
||||
if CurFile<>nil then begin
|
||||
AddPopupMenuItem(lisOpenFile, @OpenButtonClick, true);
|
||||
AddPopupMenuItem(lisPckEditRemoveFile, @RemoveBitBtnClick, RemoveBitBtn.Enabled);
|
||||
if FilenameIsPascalSource(CurFile.Filename) then begin
|
||||
Item:=AddPopupMenuItem(lisDisableI18NForLFM,
|
||||
@ToggleI18NForLFMMenuItemClick,true);
|
||||
Item:=AddPopupMenuItem(lisDisableI18NForLFM,@ToggleI18NForLFMMenuItemClick,true);
|
||||
Item.Checked:=CurFile.DisableI18NForLFM;
|
||||
Item.ShowAlwaysCheckable:=true;
|
||||
end;
|
||||
end;
|
||||
CurDependency:=GetSelectedDependency;
|
||||
|
||||
// Item under required packages section
|
||||
if CurDependency<>nil then begin
|
||||
AddPopupMenuItem(lisMenuOpenPackage, @OpenButtonClick, true);
|
||||
if CurDependency.Removed then begin
|
||||
@ -414,9 +424,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
AddPopupMenuItem(lisRemoveNonExistingFiles,@RemoveNonExistingFilesMenuItemClick,
|
||||
not LazProject.IsVirtual);
|
||||
|
||||
while ItemsPopupMenu.Items.Count>ItemCnt do
|
||||
ItemsPopupMenu.Items.Delete(ItemsPopupMenu.Items.Count-1);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user