Changes to Messagebox.

Added line to CodeTools to prevent duplicate USES entries.

git-svn-id: trunk@382 -
This commit is contained in:
lazarus 2001-11-01 21:30:35 +00:00
parent 0180f8302a
commit 5da619f0b3
5 changed files with 43 additions and 21 deletions

View File

@ -4558,6 +4558,7 @@ function TBasicCodeTool.AddUnitToMainUsesSection(const NewUnitName,
var UsesNode, SectionNode: TCodeTreeNode;
NewUnitTerm: string;
InsertPos: integer;
Junk : TAtomPosition;
begin
Result:=false;
if (NewUnitName='') or (length(NewUnitName)>255) then exit;
@ -4566,7 +4567,8 @@ begin
UsesNode:=FindMainUsesSection;
if UsesNode<>nil then begin
// add unit to existing uses section
Result:=AddUnitToUsesSection(UsesNode,NewUnitName, NewUnitInFile,
if not(FindUnitInUsesSection(UsesNode,Uppercase(NewUnitName),Junk,Junk)) then
Result:=AddUnitToUsesSection(UsesNode,NewUnitName, NewUnitInFile,
SourceChangeCache);
end else begin
// create a new uses section

View File

@ -697,7 +697,7 @@ writeln('[TMainIDE.FormCloseQuery]');
CanClose:=true;
if SomethingOfProjectIsModified then begin
if (Application.MessageBox('Save changes to project?','Project changed', MB_IconQuestion+mb_YesNo))=mrYes then
if (Application.MessageBox('Save changes to project2?','Project changed', MB_IconQuestion+mb_YesNo))=mrYes then
begin
CanClose:=DoSaveProject(false,false)<>mrAbort;
if CanClose=false then exit;
@ -4367,6 +4367,10 @@ end.
{ =============================================================================
$Log$
Revision 1.132 2001/11/01 21:30:32 lazarus
Changes to Messagebox.
Added line to CodeTools to prevent duplicate USES entries.
Revision 1.131 2001/11/01 18:48:48 lazarus
Changed Application.Messagebox to use TMessageBox class.
Added icon images for mtError and mtConfirmation
@ -8987,6 +8991,10 @@ end.
{ =============================================================================
$Log$
Revision 1.132 2001/11/01 21:30:32 lazarus
Changes to Messagebox.
Added line to CodeTools to prevent duplicate USES entries.
Revision 1.131 2001/11/01 18:48:48 lazarus
Changed Application.Messagebox to use TMessageBox class.
Added icon images for mtError and mtConfirmation

View File

@ -56,38 +56,38 @@ var
Buttons : TMsgDlgButtons;
begin
//This uses TMessageBox class in MessageDialogs.inc
if (Flags and MB_OK) = MB_OK then
Buttons := [mbOK]
else
if (Flags and MB_OKCANCEL) = MB_OKCANCEL then
Buttons := [mbOK,mbCancel]
if (Flags and MB_RETRYCANCEL) = MB_RETRYCANCEL then
Buttons := [mbREtry, mbCancel]
else
if (Flags and MB_YESNO) = MB_YESNO then
Buttons := [mbYes, mbNo]
else
if (Flags and MB_YESNOCANCEL) = MB_YESNOCANCEL then
Buttons := [mbYes, mbNo, mbCancel]
else
if (Flags and MB_ABORTRETRYIGNORE) = MB_ABORTRETRYIGNORE then
Buttons := [mbAbort, mbRetry, mbIgnore]
else
if (Flags and MB_YESNOCANCEL) = MB_YESNOCANCEL then
Buttons := [mbYes, mbNO, mbCAncel]
if (Flags and MB_OKCANCEL) = MB_OKCANCEL then
Buttons := [mbOK,mbCancel]
else
if (Flags and MB_YESNO) = MB_YESNO then
Buttons := [mbYes, mbNo]
else
if (Flags and MB_RETRYCANCEL) = MB_RETRYCANCEL then
Buttons := [mbREtry, mbCancel]
if (Flags and MB_OK) = MB_OK then
Buttons := [mbOK]
else
Buttons := [mbOK];
if (Flags and MB_ICONWARNING) = MB_ICONWARNING then
DlgTYpe := mtWarning
else
if (Flags and MB_ICONERROR) = MB_ICONERROR then
DlgTYpe := mtError
if (Flags and MB_ICONQUESTION) = MB_ICONQUESTION then
DlgTYpe := mtConfirmation
else
if (Flags and MB_ICONINFORMATION) = MB_ICONINFORMATION then
DlgTYpe := mtInformation
else
if (Flags and MB_ICONQUESTION) = MB_ICONQUESTION then
DlgTYpe := mtConfirmation
if (Flags and MB_ICONERROR) = MB_ICONERROR then
DlgTYpe := mtError
else
if (Flags and MB_ICONWARNING) = MB_ICONWARNING then
DlgTYpe := mtWarning
else
DlgTYpe := mtCustom;
@ -343,6 +343,10 @@ end;
{ =============================================================================
$Log$
Revision 1.12 2001/11/01 21:30:35 lazarus
Changes to Messagebox.
Added line to CodeTools to prevent duplicate USES entries.
Revision 1.11 2001/11/01 18:48:52 lazarus
Changed Application.Messagebox to use TMessageBox class.
Added icon images for mtError and mtConfirmation

View File

@ -1206,6 +1206,10 @@ end;
{ =============================================================================
$Log$
Revision 1.40 2001/11/01 21:30:35 lazarus
Changes to Messagebox.
Added line to CodeTools to prevent duplicate USES entries.
Revision 1.39 2001/10/31 16:29:22 lazarus
Fixed the gtk mousemove bug where the control gets the coord's based on it's parent instead of itself.
Shane

View File

@ -3113,6 +3113,10 @@ end;
{ =============================================================================
$Log$
Revision 1.65 2001/11/01 21:30:35 lazarus
Changes to Messagebox.
Added line to CodeTools to prevent duplicate USES entries.
Revision 1.64 2001/10/31 16:29:22 lazarus
Fixed the gtk mousemove bug where the control gets the coord's based on it's parent instead of itself.
Shane