From: Jens F. <jfu...@us...> - 2005-07-24 17:33:51
|
Update of /cvsroot/jvcl/dev/JVCL3/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4690/run Modified Files: JvTipOfDay.pas Log Message: Mantis 0003047: Add property to disable/hide checkbox to 'Show Tips on Startup?' in JvTipOfDay Index: JvTipOfDay.pas =================================================================== RCS file: /cvsroot/jvcl/dev/JVCL3/run/JvTipOfDay.pas,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** JvTipOfDay.pas 17 Feb 2005 10:20:57 -0000 1.32 --- JvTipOfDay.pas 24 Jul 2005 17:33:42 -0000 1.33 *************** *** 42,46 **** type TJvCanShowEvent = procedure(Sender: TObject; var CanShow: Boolean) of object; ! TJvTipOfDayOption = (toShowOnStartUp, toUseAppStorage, toShowWhenFormShown); TJvTipOfDayOptions = set of TJvTipOfDayOption; --- 42,46 ---- type TJvCanShowEvent = procedure(Sender: TObject; var CanShow: Boolean) of object; ! TJvTipOfDayOption = (toShowOnStartUp, toUseAppStorage, toShowWhenFormShown, toShowStartupCheckbox); TJvTipOfDayOptions = set of TJvTipOfDayOption; *************** *** 154,158 **** property OnAfterExecute: TNotifyEvent read FOnAfterExecute write FOnAfterExecute; property OnCanShow: TJvCanShowEvent read FOnCanShow write FOnCanShow; ! property Options: TJvTipOfDayOptions read FOptions write FOptions default [toShowOnStartUp]; property Style: TJvTipOfDayStyle read FStyle write SetStyle default tsVC; property TipFont: TFont read FTipFont write SetTipFont stored IsFontStored; --- 154,158 ---- property OnAfterExecute: TNotifyEvent read FOnAfterExecute write FOnAfterExecute; property OnCanShow: TJvCanShowEvent read FOnCanShow write FOnCanShow; ! property Options: TJvTipOfDayOptions read FOptions write FOptions default [toShowOnStartUp, toShowStartupCheckbox]; property Style: TJvTipOfDayStyle read FStyle write SetStyle default tsVC; property TipFont: TFont read FTipFont write SetTipFont stored IsFontStored; *************** *** 225,229 **** FStyle := tsVC; FDefaultFonts := True; ! FOptions := [toShowOnStartUp]; FIsAutoExecute := False; --- 225,229 ---- FStyle := tsVC; FDefaultFonts := True; ! FOptions := [toShowOnStartUp, toShowStartupCheckbox]; FIsAutoExecute := False; *************** *** 313,320 **** ShowModal; ! if TButtonControlAccessProtected(FCheckBox).Checked then ! Include(FOptions, toShowOnStartUp) ! else ! Exclude(FOptions, toShowOnStartUp) finally Free; --- 313,321 ---- ShowModal; ! if toShowStartupCheckbox in Options then ! if TButtonControlAccessProtected(FCheckBox).Checked then ! Include(FOptions, toShowOnStartUp) ! else ! Exclude(FOptions, toShowOnStartUp) finally Free; *************** *** 347,354 **** with Sender as TForm do begin ! if TButtonControlAccessProtected(FCheckBox).Checked then ! Include(FOptions, toShowOnStartUp) ! else ! Exclude(FOptions, toShowOnStartUp); Release; // destroy it FRunning := False; --- 348,356 ---- with Sender as TForm do begin ! if toShowStartupCheckbox in Options then ! if TButtonControlAccessProtected(FCheckBox).Checked then ! Include(FOptions, toShowOnStartUp) ! else ! Exclude(FOptions, toShowOnStartUp); Release; // destroy it FRunning := False; *************** *** 481,491 **** { CheckBox: 'Show Tips on StartUp' } ! FCheckBox := TCheckBox.Create(AForm); ! with TCheckBox(FCheckBox) do begin ! Parent := AForm; ! SetBounds(20, 236, 144, 17); ! Caption := Self.CheckBoxText; ! Checked := toShowOnStartUp in Options; end; --- 483,496 ---- { CheckBox: 'Show Tips on StartUp' } ! if toShowStartupCheckbox in Options then begin ! FCheckBox := TCheckBox.Create(AForm); ! with TCheckBox(FCheckBox) do ! begin ! Parent := AForm; ! SetBounds(20, 236, 144, 17); ! Caption := Self.CheckBoxText; ! Checked := toShowOnStartUp in Options; ! end; end; *************** *** 583,593 **** { CheckBox: 'Show Tips on StartUp' } ! FCheckBox := TCheckBox.Create(AForm); ! with TCheckBox(FCheckBox) do begin ! Parent := AForm; ! SetBounds(8, 225, 200, 17); ! Caption := Self.CheckBoxText; ! Checked := toShowOnStartUp in Options; end; --- 588,601 ---- { CheckBox: 'Show Tips on StartUp' } ! if toShowStartupCheckbox in Options then begin ! FCheckBox := TCheckBox.Create(AForm); ! with TCheckBox(FCheckBox) do ! begin ! Parent := AForm; ! SetBounds(8, 225, 200, 17); ! Caption := Self.CheckBoxText; ! Checked := toShowOnStartUp in Options; ! end; end; |