You've already forked lazarus-ccr
CalLite: Fix crash when moving from a month with 31 days to a month with less days by means of the months dropdown. Set version 0.3.8 for next OPM release.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8089 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<Package Version="4">
|
||||
<Package Version="5">
|
||||
<Name Value="callight_pkg"/>
|
||||
<Type Value="RunAndDesignTime"/>
|
||||
<Author Value="Howard Page-Clark, Ariel Rodriguez and Werner Pamler"/>
|
||||
@ -11,9 +11,9 @@
|
||||
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
</CompilerOptions>
|
||||
<Description Value="A lightweight calendar component"/>
|
||||
<License Value="Modified LGL2 (with linking exception)"/>
|
||||
<Version Minor="3" Release="6"/>
|
||||
<Description Value="A light-weight calendar component"/>
|
||||
<License Value="Modified LGL2 (with linking exception, like Lazarus LCL)"/>
|
||||
<Version Minor="3" Release="8"/>
|
||||
<Files Count="1">
|
||||
<Item1>
|
||||
<Filename Value="source/calendarlite.pas"/>
|
||||
@ -21,6 +21,7 @@
|
||||
<UnitName Value="CalendarLite"/>
|
||||
</Item1>
|
||||
</Files>
|
||||
<CompatibilityMode Value="True"/>
|
||||
<i18n>
|
||||
<OutDir Value="languages"/>
|
||||
<EnableI18NForLFM Value="True"/>
|
||||
|
@ -1,11 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="11"/>
|
||||
<Version Value="12"/>
|
||||
<PathDelim Value="\"/>
|
||||
<General>
|
||||
<Flags>
|
||||
<CompatibilityMode Value="True"/>
|
||||
</Flags>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="CalLiteTest"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
|
@ -1326,12 +1326,11 @@ begin
|
||||
end;
|
||||
|
||||
procedure TCalDrawer.GotoMonth(AMonth: word);
|
||||
var
|
||||
d: TDate;
|
||||
begin
|
||||
if not TryEncodeDate(FThisYear, AMonth, FThisDay, d) then // Feb 29 in leap year!
|
||||
d := EncodeDate(FThisYear, AMonth, FThisDay);
|
||||
FOwner.Date := d;
|
||||
if (AMonth < 1) or (AMonth > 12) then
|
||||
exit;
|
||||
FThisDay := EnsureRange(FThisDay, 1, DaysInAMonth(FThisYear, AMonth));
|
||||
FOwner.Date := EncodeDate(FThisYear, AMonth, FThisDay);
|
||||
end;
|
||||
|
||||
procedure TCalDrawer.GotoToday;
|
||||
@ -1340,12 +1339,11 @@ begin
|
||||
end;
|
||||
|
||||
procedure TCalDrawer.GotoYear(AYear: word);
|
||||
var
|
||||
d: TDate;
|
||||
begin
|
||||
if not TryEncodeDate(AYear, FThisMonth, FThisDay, d) then // Feb 29 in leap year!
|
||||
d := EncodeDate(AYear, FThisMonth, FThisDay);
|
||||
FOwner.Date := d;
|
||||
if (FThisMonth < 1) or (FThisMonth > 12) then
|
||||
exit;
|
||||
FThisDay := EnsureRange(FThisday, 1, DaysInAMonth(AYear, FThisMonth));
|
||||
FOwner.Date := EncodeDate(AYear, FThisMonth, FThisDay);
|
||||
end;
|
||||
|
||||
procedure TCalDrawer.LeftClick(APoint: TPoint; Shift: TShiftState);
|
||||
@ -1922,8 +1920,6 @@ begin
|
||||
item.Tag := y;
|
||||
if y = FCalDrawer.FThisYear then
|
||||
item.Checked := true;
|
||||
if (FCalDrawer.FThisDay = 29) and (FCalDrawer.FThisMonth = 2) and not IsLeapYear(y)
|
||||
then item.Enabled:= False;
|
||||
Add(item);
|
||||
end;
|
||||
end;
|
||||
|
Reference in New Issue
Block a user