diff --git a/ide/environmentopts.pp b/ide/environmentopts.pp index 23e325609a..a2b22b6aba 100644 --- a/ide/environmentopts.pp +++ b/ide/environmentopts.pp @@ -650,7 +650,8 @@ begin // windows InitLayoutList; FIDEDialogLayoutList:=TIDEDialogLayoutList.Create; - IDEOptionDefs.IDEDialogLayoutList:=FIDEDialogLayoutList; + if IDEOptionDefs.IDEDialogLayoutList=nil then + IDEOptionDefs.IDEDialogLayoutList:=FIDEDialogLayoutList; FMinimizeAllOnMinimizeMain:=false; // form editor @@ -732,8 +733,9 @@ begin FFPCSourceDirHistory.Free; FDebuggerFileHistory.Free; FTestBuildDirHistory.Free; + if IDEOptionDefs.IDEDialogLayoutList=FIDEDialogLayoutList then + IDEOptionDefs.IDEDialogLayoutList:=nil; FIDEDialogLayoutList.Free; - IDEOptionDefs.IDEDialogLayoutList:=nil; fIDEWindowLayoutList.Free; FXMLCfg.Free; inherited Destroy; @@ -3197,8 +3199,9 @@ begin end; InputHistories.StoreFileDialogSettings(SaveDialog); except - // ToDo - writeln('ERROR: [TEnvironmentOptionsDialog.SaveDesktopSettingsToFileButtonClick]'); + on E: Exception do begin + writeln('ERROR: [TEnvironmentOptionsDialog.SaveDesktopSettingsToFileButtonClick] ',E.Message); + end; end; finally SaveDialog.Free; diff --git a/ide/ideoptiondefs.pas b/ide/ideoptiondefs.pas index 8decde0df5..2f738f1d86 100644 --- a/ide/ideoptiondefs.pas +++ b/ide/ideoptiondefs.pas @@ -274,8 +274,8 @@ type property Items[Index: integer]: TIDEDialogLayout read GetItems; end; -const - IDEDialogLayoutList: TIDEDialogLayoutList = nil; +var + IDEDialogLayoutList: TIDEDialogLayoutList; implementation @@ -1062,5 +1062,8 @@ begin Items[i].SaveToXMLConfig(XMLConfig,Path+'/Dialog'+IntToStr(i+1)); end; +initialization + IDEDialogLayoutList:=nil; + end. diff --git a/lcl/include/customcheckbox.inc b/lcl/include/customcheckbox.inc index f209161ad5..774d77686b 100644 --- a/lcl/include/customcheckbox.inc +++ b/lcl/include/customcheckbox.inc @@ -133,7 +133,7 @@ begin if FState <> OldState then begin ApplyChanges; - Click; + if not ClicksDisabled then Click; end; end; @@ -146,10 +146,7 @@ end; ------------------------------------------------------------------------------} procedure TCustomCheckBox.Toggle; begin - if GetChecked then - SetChecked(False) - else - SetChecked(True); + SetChecked(not GetChecked); end; {------------------------------------------------------------------------------ @@ -166,6 +163,18 @@ begin end; end; +{------------------------------------------------------------------------------ + procedure TCustomCheckBox.Click; + ------------------------------------------------------------------------------} +procedure TCustomCheckBox.Click; +begin + inherited Changed; + inherited Click; +end; + +{------------------------------------------------------------------------------ + procedure TCustomCheckBox.SetText(const Value: TCaption); + ------------------------------------------------------------------------------} procedure TCustomCheckBox.SetText(const Value: TCaption); var ParseStr : String; @@ -186,6 +195,9 @@ begin end; { $Log$ + Revision 1.12 2003/03/25 16:29:53 mattias + fixed sending TButtonControl.OnClick on every change + Revision 1.11 2003/03/17 20:50:30 mattias fixed TRadioGroup.ItemIndex=-1 diff --git a/lcl/stdctrls.pp b/lcl/stdctrls.pp index 2039cd06eb..d4a941bdbd 100644 --- a/lcl/stdctrls.pp +++ b/lcl/stdctrls.pp @@ -643,16 +643,19 @@ type procedure SetChecked(Value: Boolean); override; procedure SetText(const Value: TCaption); override; procedure ApplyChanges; virtual; - property AllowGrayed: Boolean read FAllowGrayed write FAllowGrayed; - property State: TCheckBoxState read GetState write SetState; + procedure Click; override; public constructor Create(TheOwner: TComponent); override; + public + property AllowGrayed: Boolean read FAllowGrayed write FAllowGrayed; + property State: TCheckBoxState read GetState write SetState; published property TabOrder; property TabStop; end; {$IFNDef NewCheckBox} + // Normal checkbox TCheckBox = class(TCustomCheckBox) protected procedure DoAutoSize; Override; @@ -689,6 +692,7 @@ type property OnStartDrag; end; {$Else NewCheckBox} + // new checkbox TCBAlignment = (alLeftJustify, alRightJustify); TCheckBoxStyle = (cbsSystem, cbsCrissCross, cbsCheck); @@ -741,8 +745,6 @@ type property Align; Property AutoSize; property WordWrap : Boolean read FWordWrap write FWordWrap; - //property OnMouseEnter; - //property OnMouseExit; property TabStop; property Anchors; @@ -751,6 +753,8 @@ type property Font; property OnClick; property OnDblClick; + property OnEnter; + property OnExit; property OnKeyDown; property OnKeyUp; property OnKeyPress; @@ -769,6 +773,9 @@ type end; {$EndIf NewCheckBox} + + { TToggleBox } + TToggleBox = class(TCustomCheckBox) private public @@ -803,7 +810,7 @@ type end; - {TRadioButton} + { TRadioButton } TRadioButton = class(TCustomCheckBox) protected @@ -841,7 +848,9 @@ type property OnStartDrag; end; - {TStaticText} + + { TStaticText } + TStaticBorderStyle = (sbsNone, sbsSingle, sbsSunken); TCustomStaticText = class(TCustomControl) @@ -1395,6 +1404,9 @@ end. { ============================================================================= $Log$ + Revision 1.83 2003/03/25 16:29:53 mattias + fixed sending TButtonControl.OnClick on every change + Revision 1.82 2003/03/17 20:53:16 mattias removed SetRadioButtonGroupMode