Packager: remove obsolete psfAskBeforeSaving from TPkgSaveFlag. Saving is always asked in PackageEditorFormCloseQuery.

git-svn-id: trunk@32612 -
This commit is contained in:
juha 2011-10-02 00:29:34 +00:00
parent 3a2de31121
commit 982044bb4d
6 changed files with 32 additions and 43 deletions

View File

@ -3686,7 +3686,6 @@ resourcestring
lisThePackageAddsThePathToTheIncludePathOfTheIDEThisI = 'The package %s ' lisThePackageAddsThePathToTheIncludePathOfTheIDEThisI = 'The package %s '
+'adds the path "%s" to the include path of the IDE.%sThis is probably a ' +'adds the path "%s" to the include path of the IDE.%sThis is probably a '
+'misconfiguration of the package.'; +'misconfiguration of the package.';
lisPkgMangPackageChangedSave = 'Package %s%s%s changed. Save?';
lisPkgMangErrorWritingPackage = 'Error Writing Package'; lisPkgMangErrorWritingPackage = 'Error Writing Package';
lisPkgMangUnableToWritePackageToFileError = 'Unable to write package %s%s%s%' lisPkgMangUnableToWritePackageToFileError = 'Unable to write package %s%s%s%'
+'sto file %s%s%s.%sError: %s'; +'sto file %s%s%s.%sError: %s';
@ -3986,7 +3985,6 @@ resourcestring
lisPckEditUninstall = 'Uninstall'; lisPckEditUninstall = 'Uninstall';
lisPckEditViewPackageSource = 'View Package Source'; lisPckEditViewPackageSource = 'View Package Source';
lisPckEditGeneralOptions = 'General Options'; lisPckEditGeneralOptions = 'General Options';
lisPckEditSaveChanges = 'Save Changes?';
lisPckEditPackageHasChangedSavePackage = 'Package %s%s%s has changed.%sSave package?'; lisPckEditPackageHasChangedSavePackage = 'Package %s%s%s has changed.%sSave package?';
lisPckEditPage = '%s, Page: %s'; lisPckEditPage = '%s, Page: %s';
lisPckEditRemoveFile2 = 'Remove file?'; lisPckEditRemoveFile2 = 'Remove file?';

View File

@ -150,8 +150,7 @@ type
type type
TPkgSaveFlag = ( TPkgSaveFlag = (
psfSaveAs, psfSaveAs
psfAskBeforeSaving
); );
TPkgSaveFlags = set of TPkgSaveFlag; TPkgSaveFlags = set of TPkgSaveFlag;

View File

@ -156,8 +156,7 @@ var
const const
PkgSaveFlagNames: array[TPkgSaveFlag] of string = ( PkgSaveFlagNames: array[TPkgSaveFlag] of string = (
'psfSaveAs', 'psfSaveAs'
'psfAskBeforeSaving'
); );
PkgOpenFlagNames: array[TPkgOpenFlag] of string = ( PkgOpenFlagNames: array[TPkgOpenFlag] of string = (

View File

@ -25,18 +25,18 @@ inherited PackageEditorForm: TPackageEditorForm
object FilePropsGroupBox: TGroupBox[1] object FilePropsGroupBox: TGroupBox[1]
Left = 0 Left = 0
Height = 118 Height = 118
Top = 314 Top = 318
Width = 577 Width = 577
Align = alBottom Align = alBottom
Caption = 'FilePropsGroupBox' Caption = 'FilePropsGroupBox'
ClientHeight = 100 ClientHeight = 101
ClientWidth = 573 ClientWidth = 573
TabOrder = 2 TabOrder = 2
object CallRegisterProcCheckBox: TCheckBox object CallRegisterProcCheckBox: TCheckBox
Left = 0 Left = 0
Height = 19 Height = 26
Top = 0 Top = 0
Width = 158 Width = 189
Caption = 'CallRegisterProcCheckBox' Caption = 'CallRegisterProcCheckBox'
OnChange = CallRegisterProcCheckBoxChange OnChange = CallRegisterProcCheckBoxChange
ParentShowHint = False ParentShowHint = False
@ -46,10 +46,10 @@ inherited PackageEditorForm: TPackageEditorForm
object AddToUsesPkgSectionCheckBox: TCheckBox object AddToUsesPkgSectionCheckBox: TCheckBox
AnchorSideLeft.Control = CallRegisterProcCheckBox AnchorSideLeft.Control = CallRegisterProcCheckBox
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
Left = 168 Left = 199
Height = 19 Height = 26
Top = 0 Top = 0
Width = 191 Width = 226
BorderSpacing.Left = 10 BorderSpacing.Left = 10
Caption = 'AddToUsesPkgSectionCheckBox' Caption = 'AddToUsesPkgSectionCheckBox'
OnChange = AddToUsesPkgSectionCheckBoxChange OnChange = AddToUsesPkgSectionCheckBoxChange
@ -62,9 +62,9 @@ inherited PackageEditorForm: TPackageEditorForm
AnchorSideTop.Control = MinVersionEdit AnchorSideTop.Control = MinVersionEdit
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 0 Left = 0
Height = 19 Height = 26
Top = 2 Top = -2
Width = 151 Width = 179
Caption = 'UseMinVersionCheckBox' Caption = 'UseMinVersionCheckBox'
OnChange = UseMinVersionCheckBoxChange OnChange = UseMinVersionCheckBoxChange
TabOrder = 2 TabOrder = 2
@ -73,7 +73,7 @@ inherited PackageEditorForm: TPackageEditorForm
AnchorSideLeft.Control = UseMinVersionCheckBox AnchorSideLeft.Control = UseMinVersionCheckBox
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = FilePropsGroupBox AnchorSideTop.Control = FilePropsGroupBox
Left = 161 Left = 189
Height = 23 Height = 23
Top = 0 Top = 0
Width = 100 Width = 100
@ -87,9 +87,9 @@ inherited PackageEditorForm: TPackageEditorForm
AnchorSideTop.Control = MaxVersionEdit AnchorSideTop.Control = MaxVersionEdit
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 0 Left = 0
Height = 19 Height = 26
Top = 27 Top = 23
Width = 152 Width = 182
Caption = 'UseMaxVersionCheckBox' Caption = 'UseMaxVersionCheckBox'
OnChange = UseMaxVersionCheckBoxChange OnChange = UseMaxVersionCheckBoxChange
TabOrder = 4 TabOrder = 4
@ -99,7 +99,7 @@ inherited PackageEditorForm: TPackageEditorForm
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = MinVersionEdit AnchorSideTop.Control = MinVersionEdit
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 162 Left = 192
Height = 23 Height = 23
Top = 25 Top = 25
Width = 100 Width = 100
@ -116,7 +116,7 @@ inherited PackageEditorForm: TPackageEditorForm
Left = 0 Left = 0
Height = 25 Height = 25
Top = 54 Top = 54
Width = 159 Width = 163
AutoSize = True AutoSize = True
BorderSpacing.Top = 6 BorderSpacing.Top = 6
Caption = 'ApplyDependencyButton' Caption = 'ApplyDependencyButton'
@ -127,33 +127,35 @@ inherited PackageEditorForm: TPackageEditorForm
AnchorSideTop.Control = CallRegisterProcCheckBox AnchorSideTop.Control = CallRegisterProcCheckBox
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 0 Left = 0
Height = 75 Height = 69
Top = 25 Top = 32
Width = 573 Width = 573
Align = alBottom Align = alBottom
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Top = 6 BorderSpacing.Top = 6
Caption = 'RegisteredPluginsGroupBox' Caption = 'RegisteredPluginsGroupBox'
ClientHeight = 57 ClientHeight = 52
ClientWidth = 569 ClientWidth = 569
TabOrder = 7 TabOrder = 7
object RegisteredListBox: TListBox object RegisteredListBox: TListBox
Left = 0 Left = 0
Height = 57 Height = 52
Top = 0 Top = 0
Width = 569 Width = 569
Align = alClient Align = alClient
ItemHeight = 0 ItemHeight = 0
OnDrawItem = RegisteredListBoxDrawItem OnDrawItem = RegisteredListBoxDrawItem
ScrollWidth = 565
Style = lbOwnerDrawFixed Style = lbOwnerDrawFixed
TabOrder = 0 TabOrder = 0
TopIndex = -1
end end
end end
end end
object StatusBar: TStatusBar[2] object StatusBar: TStatusBar[2]
Left = 0 Left = 0
Height = 23 Height = 19
Top = 432 Top = 436
Width = 577 Width = 577
Panels = <> Panels = <>
end end
@ -161,32 +163,32 @@ inherited PackageEditorForm: TPackageEditorForm
Cursor = crVSplit Cursor = crVSplit
Left = 0 Left = 0
Height = 5 Height = 5
Top = 309 Top = 313
Width = 577 Width = 577
Align = alBottom Align = alBottom
ResizeAnchor = akBottom ResizeAnchor = akBottom
end end
object ItemsPanel: TPanel[4] object ItemsPanel: TPanel[4]
Left = 0 Left = 0
Height = 261 Height = 265
Top = 48 Top = 48
Width = 577 Width = 577
Align = alClient Align = alClient
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 261 ClientHeight = 265
ClientWidth = 577 ClientWidth = 577
TabOrder = 1 TabOrder = 1
object FilesTreeView: TTreeView object FilesTreeView: TTreeView
AnchorSideTop.Control = FilterEdit AnchorSideTop.Control = FilterEdit
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 0 Left = 0
Height = 235 Height = 239
Top = 26 Top = 26
Width = 577 Width = 577
Align = alBottom Align = alBottom
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Top = 3 BorderSpacing.Top = 3
DefaultItemHeight = 17 DefaultItemHeight = 18
PopupMenu = FilesPopupMenu PopupMenu = FilesPopupMenu
ReadOnly = True ReadOnly = True
TabOrder = 1 TabOrder = 1

View File

@ -902,7 +902,7 @@ begin
if (LazPackage=nil) or (lpfDestroying in LazPackage.Flags) if (LazPackage=nil) or (lpfDestroying in LazPackage.Flags)
or (LazPackage.ReadOnly) or (not LazPackage.Modified) then exit; or (LazPackage.ReadOnly) or (not LazPackage.Modified) then exit;
MsgResult:=MessageDlg(lisPckEditSaveChanges, MsgResult:=MessageDlg(lisPkgMangSavePackage,
Format(lisPckEditPackageHasChangedSavePackage,['"',LazPackage.IDAsString,'"',#13]), Format(lisPckEditPackageHasChangedSavePackage,['"',LazPackage.IDAsString,'"',#13]),
mtConfirmation,[mbYes,mbNo,mbAbort],0); mtConfirmation,[mbYes,mbNo,mbAbort],0);
case MsgResult of case MsgResult of

View File

@ -2290,15 +2290,6 @@ begin
exit; exit;
end; end;
// ask user if package should be saved
if psfAskBeforeSaving in Flags then begin
Result:=IDEMessageDialog(lisPkgMangSavePackage,
Format(lisPkgMangPackageChangedSave, ['"',APackage.IDAsString,'"']),
mtConfirmation,[mbYes,mbNo,mbAbort]);
if (Result=mrNo) then Result:=mrIgnore;
if Result<>mrYes then exit;
end;
// warn about missing files // warn about missing files
Result:=WarnAboutMissingPackageFiles(APackage); Result:=WarnAboutMissingPackageFiles(APackage);
if Result<>mrOk then exit; if Result<>mrOk then exit;