mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-12 10:20:49 +01: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
|
ClientWidth = 598
|
||||||
OnClose = AddToProjectDialogClose
|
OnClose = AddToProjectDialogClose
|
||||||
Position = poScreenCenter
|
Position = poScreenCenter
|
||||||
LCLVersion = '1.1'
|
LCLVersion = '1.3'
|
||||||
object Notebook: TPageControl
|
object Notebook: TPageControl
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 289
|
Height = 289
|
||||||
@ -46,8 +46,11 @@ object AddToProjectDialog: TAddToProjectDialog
|
|||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Columns = <>
|
Columns = <>
|
||||||
MultiSelect = True
|
MultiSelect = True
|
||||||
|
ReadOnly = True
|
||||||
|
RowSelect = True
|
||||||
SortType = stText
|
SortType = stText
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
|
ViewStyle = vsReport
|
||||||
OnSelectItem = AddFileListViewSelectItem
|
OnSelectItem = AddFileListViewSelectItem
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -121,9 +124,12 @@ object AddToProjectDialog: TAddToProjectDialog
|
|||||||
Top = 6
|
Top = 6
|
||||||
Width = 582
|
Width = 582
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
|
AutoWidthLastColumn = True
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Columns = <>
|
Columns = <>
|
||||||
MultiSelect = True
|
MultiSelect = True
|
||||||
|
ReadOnly = True
|
||||||
|
RowSelect = True
|
||||||
SortType = stText
|
SortType = stText
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
ViewStyle = vsReport
|
ViewStyle = vsReport
|
||||||
|
|||||||
@ -379,17 +379,27 @@ var
|
|||||||
begin
|
begin
|
||||||
ItemCnt:=0;
|
ItemCnt:=0;
|
||||||
CurFile:=GetSelectedFile;
|
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
|
if CurFile<>nil then begin
|
||||||
AddPopupMenuItem(lisOpenFile, @OpenButtonClick, true);
|
AddPopupMenuItem(lisOpenFile, @OpenButtonClick, true);
|
||||||
AddPopupMenuItem(lisPckEditRemoveFile, @RemoveBitBtnClick, RemoveBitBtn.Enabled);
|
AddPopupMenuItem(lisPckEditRemoveFile, @RemoveBitBtnClick, RemoveBitBtn.Enabled);
|
||||||
if FilenameIsPascalSource(CurFile.Filename) then begin
|
if FilenameIsPascalSource(CurFile.Filename) then begin
|
||||||
Item:=AddPopupMenuItem(lisDisableI18NForLFM,
|
Item:=AddPopupMenuItem(lisDisableI18NForLFM,@ToggleI18NForLFMMenuItemClick,true);
|
||||||
@ToggleI18NForLFMMenuItemClick,true);
|
|
||||||
Item.Checked:=CurFile.DisableI18NForLFM;
|
Item.Checked:=CurFile.DisableI18NForLFM;
|
||||||
Item.ShowAlwaysCheckable:=true;
|
Item.ShowAlwaysCheckable:=true;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
CurDependency:=GetSelectedDependency;
|
|
||||||
|
// Item under required packages section
|
||||||
if CurDependency<>nil then begin
|
if CurDependency<>nil then begin
|
||||||
AddPopupMenuItem(lisMenuOpenPackage, @OpenButtonClick, true);
|
AddPopupMenuItem(lisMenuOpenPackage, @OpenButtonClick, true);
|
||||||
if CurDependency.Removed then begin
|
if CurDependency.Removed then begin
|
||||||
@ -414,9 +424,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
AddPopupMenuItem(lisRemoveNonExistingFiles,@RemoveNonExistingFilesMenuItemClick,
|
|
||||||
not LazProject.IsVirtual);
|
|
||||||
|
|
||||||
while ItemsPopupMenu.Items.Count>ItemCnt do
|
while ItemsPopupMenu.Items.Count>ItemCnt do
|
||||||
ItemsPopupMenu.Items.Delete(ItemsPopupMenu.Items.Count-1);
|
ItemsPopupMenu.Items.Delete(ItemsPopupMenu.Items.Count-1);
|
||||||
end;
|
end;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user