tvplanit: Set version number to 1.8.3 for next OPM release. Fix ICal import ignoring taskdialog's Cancel
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9112 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
f30d928804
commit
8f77fac067
@ -894,7 +894,7 @@ var
|
||||
w: Integer;
|
||||
begin
|
||||
// Settings page
|
||||
w := {%H-}MaxValue([
|
||||
w := MaxValue([
|
||||
GetLabelWidth(LblLanguage),
|
||||
GetLabelWidth(LblTimeFormat),
|
||||
GetLabelWidth(LblFirstDayOfWeek),
|
||||
|
@ -17,6 +17,11 @@
|
||||
<UseExternalDbgSyms Value="True"/>
|
||||
</Debugging>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CompilerMessages>
|
||||
<IgnoredMessages idx6058="True"/>
|
||||
</CompilerMessages>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
<Description Value="Lazarus Port of Turbo Power's VisualPlanIt components based on version 1.0.3.
|
||||
(Runtime package)"/>
|
||||
@ -31,7 +36,7 @@ The Initial Developer of the Original Code is TurboPower Software.
|
||||
Portions created by TurboPower Software Inc. are Copyright (C) 2002 TurboPower Software Inc. All Rights Reserved.
|
||||
|
||||
Contributor(s): "/>
|
||||
<Version Major="1" Minor="8" Release="2"/>
|
||||
<Version Major="1" Minor="8" Release="3"/>
|
||||
<Files Count="68">
|
||||
<Item1>
|
||||
<Filename Value="source\vpbase.pas"/>
|
||||
|
@ -27,7 +27,7 @@ The Initial Developer of the Original Code is TurboPower Software.
|
||||
Portions created by TurboPower Software Inc. are Copyright (C) 2002 TurboPower Software Inc. All Rights Reserved.
|
||||
|
||||
Contributor(s): "/>
|
||||
<Version Major="1" Minor="8" Release="2"/>
|
||||
<Version Major="1" Minor="8" Release="3"/>
|
||||
<Files Count="6">
|
||||
<Item1>
|
||||
<Filename Value="source\design\vpreg.pas"/>
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
|
||||
"/>
|
||||
<Version Major="1" Minor="8" Release="2"/>
|
||||
<Version Major="1" Minor="8" Release="3"/>
|
||||
<Files Count="1">
|
||||
<Item1>
|
||||
<Filename Value="source\addons\zeos\vpzeosds.pas"/>
|
||||
|
@ -15,7 +15,7 @@
|
||||
</SearchPaths>
|
||||
</CompilerOptions>
|
||||
<Description Value="Visual PlanIt datastore for ZEOS database components (Designtime package)"/>
|
||||
<Version Major="1" Minor="8" Release="2"/>
|
||||
<Version Major="1" Minor="8" Release="3"/>
|
||||
<Files Count="1">
|
||||
<Item1>
|
||||
<Filename Value="source\addons\zeos\design\vpregzeos.pas"/>
|
||||
|
@ -55,7 +55,7 @@ type
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
procedure CreateTables;
|
||||
function GetNextID({%H-}TableName: string): integer; override;
|
||||
function GetNextID(TableName: string): integer; override;
|
||||
|
||||
property ResourceTable;
|
||||
property EventsTable;
|
||||
@ -76,7 +76,7 @@ implementation
|
||||
|
||||
uses
|
||||
LazFileUtils, ZAbstractDataset,
|
||||
VpConst, VpException;
|
||||
VpConst, VpException, VpMisc;
|
||||
|
||||
{ TVpZeosDatastore }
|
||||
|
||||
@ -497,6 +497,7 @@ end;
|
||||
autoincrement fields. }
|
||||
function TVpZeosDatastore.GetNextID(TableName: string): integer;
|
||||
begin
|
||||
Unused(TableName);
|
||||
Result := -1;
|
||||
end;
|
||||
|
||||
|
@ -143,7 +143,8 @@ implementation
|
||||
|
||||
uses
|
||||
PropEditUtils, IDEWindowIntf, StrUtils, ImgList,
|
||||
{%H-}VpConst, VpMisc;
|
||||
{%H-}VpConst, // needed for {$IF VP_LCL_SCALING ...}
|
||||
VpMisc;
|
||||
|
||||
const
|
||||
ITEMS_MARGIN = 2;
|
||||
|
@ -457,7 +457,7 @@ type
|
||||
|
||||
TVpHintWindow = class(THintWindow)
|
||||
public
|
||||
function CalcHintRect({%H-}MaxWidth: Integer; const AHint: String;
|
||||
function CalcHintRect(MaxWidth: Integer; const AHint: String;
|
||||
AData: pointer): TRect; override;
|
||||
end;
|
||||
|
||||
@ -1105,9 +1105,9 @@ end;
|
||||
{ TVpHintWindow }
|
||||
|
||||
function TVpHintWindow.CalcHintRect(MaxWidth: Integer; const AHint: String;
|
||||
AData: pointer): TRect;
|
||||
AData: Pointer): TRect;
|
||||
begin
|
||||
Result := inherited CalcHintRect(MAX_HINT_WIDTH, AHint, AData);
|
||||
Result := inherited CalcHintRect(MaxWidth, AHint, AData);
|
||||
end;
|
||||
|
||||
|
||||
|
@ -956,18 +956,21 @@ procedure TVpCustomDataStore.InternalPurgeContacts(Res: TVpResource);
|
||||
begin
|
||||
// Must be overridden by descendants to remove the contacts of the given
|
||||
// resource from the external storage
|
||||
Unused(Res);
|
||||
end;
|
||||
|
||||
procedure TVpCustomDataStore.InternalPurgeEvents(Res: TVpResource);
|
||||
begin
|
||||
// Must be overridden by descendants to remove the events of the given
|
||||
// resource from the external storage
|
||||
Unused(Res);
|
||||
end;
|
||||
|
||||
procedure TVpCustomDataStore.InternalPurgeTasks(Res: TVpResource);
|
||||
begin
|
||||
// Must be overridden by descendants to remove the tasks of the given
|
||||
// resource from the external storage
|
||||
Unused(Res);
|
||||
end;
|
||||
|
||||
procedure TVpCustomDataStore.PurgeResource(Res: TVpResource);
|
||||
@ -1717,7 +1720,7 @@ procedure TVpControlLink.SetCityStateZipFormat(const Value: String);
|
||||
begin
|
||||
if FCityStateZipFormat <> Value then begin
|
||||
FCityStateZipFormat := Value;
|
||||
Notify(self, neInvalidate, 0{%H-});
|
||||
Notify(self, neInvalidate, 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
@ -18,7 +18,7 @@ uses
|
||||
type
|
||||
TBufDataset = class(BufDataset.TBufDataset)
|
||||
protected
|
||||
procedure LoadBlobIntoBuffer({%H-}FieldDef: TFieldDef;{%H-}ABlobBuf: PBufBlobField); override;
|
||||
procedure LoadBlobIntoBuffer(FieldDef: TFieldDef; ABlobBuf: PBufBlobField); override;
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
@ -90,6 +90,7 @@ procedure TBufDataset.LoadBlobIntoBuffer(FieldDef: TFieldDef; ABlobBuf: PBufBlob
|
||||
begin
|
||||
// We just want to avoid the compiler warning.
|
||||
// TVpBufDSDataStore does not use BLOBs anyway.
|
||||
Unused(FieldDef, ABlobBuf);
|
||||
end;
|
||||
|
||||
|
||||
|
@ -56,7 +56,8 @@ implementation
|
||||
|
||||
uses
|
||||
LazUtf8,
|
||||
{%H-}VpConst, VpCanvasUtils;
|
||||
{%H-}VpConst, // needed for {$IF VP_SCALING...}
|
||||
VpCanvasUtils;
|
||||
|
||||
type
|
||||
TVpCalendarOpener = class(TVpCustomCalendar);
|
||||
|
@ -768,7 +768,8 @@ begin
|
||||
if not Assigned(FCanvas) then
|
||||
raise EVpCanvasError.Create(RSNoCanvas);
|
||||
|
||||
FillChar(LF{%H-}, SizeOf(LF), #0);
|
||||
LF := Default(TLogFont);
|
||||
FillChar(LF, SizeOf(LF), #0);
|
||||
LF.lfHeight := FCanvas.Font.Height;
|
||||
LF.lfWidth := 0;
|
||||
case Angle of
|
||||
@ -1696,6 +1697,7 @@ begin
|
||||
try
|
||||
bmp.SetSize(10, 10);
|
||||
bmp.Canvas.Font.Assign(ACanvas.Font);
|
||||
Metrics := Default(TTextMetric);
|
||||
GetTextMetrics(bmp.Canvas.Handle, Metrics);
|
||||
Result := Metrics.tmAveCharWidth;
|
||||
finally
|
||||
|
@ -886,7 +886,7 @@ var
|
||||
begin
|
||||
inherited;
|
||||
FScaledTextMargin := round(FContactGrid.TextMargin * Scale);
|
||||
FAnchorMargin := round(Scale * MARGIN) {%H-}+ FScaledTextMargin * 2;
|
||||
FAnchorMargin := round(Scale * MARGIN + FScaledTextMargin * 2);
|
||||
|
||||
numCols := FContactGrid.PrintNumColumns;
|
||||
if DisplayOnly and (numCols > 0) then
|
||||
|
@ -506,7 +506,7 @@ type
|
||||
function GetContact(Index: Integer): TVpContact;
|
||||
function Last:TVpContact;
|
||||
function ImportVCardFile(const AFileName: String; const APreview: Boolean = false;
|
||||
{%H-}ADefaultCategory: Integer = -1): TVpContactArr;
|
||||
ADefaultCategory: Integer = -1): TVpContactArr;
|
||||
procedure ExportVCardFile(const AFileName: String; const AContacts: TVpContactArr);
|
||||
procedure Sort;
|
||||
|
||||
@ -3136,6 +3136,8 @@ var
|
||||
datastore: TVpCustomDatastore;
|
||||
previewForm: TVpImportPreviewVCardForm;
|
||||
begin
|
||||
Unused(ADefaultCategory);
|
||||
|
||||
Result := nil;
|
||||
SetLength(Result, BLOCK_SIZE);
|
||||
contactCounter := 0;
|
||||
|
@ -1564,7 +1564,8 @@ end;
|
||||
procedure TVpDayView.DoStartDrag(var DragObject: TDragObject);
|
||||
{$IFDEF LCL}
|
||||
var
|
||||
P, HotSpot: TPoint;
|
||||
P: TPoint = (X:0; Y:0);
|
||||
HotSpot: TPoint;
|
||||
EventName: string;
|
||||
{$ENDIF}
|
||||
begin
|
||||
@ -1578,7 +1579,7 @@ begin
|
||||
|
||||
{$IFDEF LCL}
|
||||
EventName := FActiveEvent.Description;
|
||||
GetCursorPos(P{%H-});
|
||||
GetCursorPos(P);
|
||||
P := TVpDayView(Self).ScreenToClient(P);
|
||||
HotSpot := Point(P.X - Self.dvActiveEventRec.Left, P.Y - Self.dvActiveEventRec.Top);
|
||||
|
||||
@ -2744,7 +2745,9 @@ procedure TVpDayView.VpDayViewInit(Data: PtrInt);
|
||||
procedure TVpDayView.VpDayViewInit(var Msg: TMessage);
|
||||
{$ENDIF}
|
||||
begin
|
||||
{$IFNDEF LCL}
|
||||
{$IFDEF LCL}
|
||||
Unused(Data);
|
||||
{$ELSE}
|
||||
Unused(Msg);
|
||||
{$ENDIF}
|
||||
|
||||
|
@ -142,7 +142,7 @@ type
|
||||
CIVerifying: Boolean;
|
||||
{$IFDEF NEW_TIME_EDIT}
|
||||
procedure AcceptStartTimeHandler(Sender: TObject; var ATime: TDateTime;
|
||||
var {%H-}AcceptTime: Boolean);
|
||||
var AcceptTime: Boolean);
|
||||
{$ENDIF}
|
||||
procedure PopLists;
|
||||
procedure PositionControls;
|
||||
@ -229,6 +229,7 @@ begin
|
||||
enddt := StartDate.Date + ATime + dt;
|
||||
EndDate.Date := trunc(enddt);
|
||||
EndTime.Time := frac(enddt);
|
||||
AcceptTime := true;
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
|
@ -555,7 +555,6 @@ function TVpGanttEventList.FindFirstRecurrence(AEvent: TVpEvent;
|
||||
out AStart, AEnd: TDateTime): Boolean;
|
||||
var
|
||||
delta: Double;
|
||||
d: TDateTime;
|
||||
eventYear, eventMonth, eventDay: Word;
|
||||
startYear, startMonth, startDay: Word;
|
||||
begin
|
||||
@ -1564,7 +1563,6 @@ procedure TVpGanttView.KeyDown(var Key: Word; Shift: TShiftState);
|
||||
var
|
||||
P: TPoint;
|
||||
OneDay: Integer;
|
||||
c: Integer;
|
||||
begin
|
||||
inherited;
|
||||
|
||||
|
@ -21,7 +21,7 @@ type
|
||||
FCalendar: TVpICalendar;
|
||||
FChecked: Boolean;
|
||||
protected
|
||||
procedure SaveToStrings(const {%H-}AList: TStrings); virtual;
|
||||
procedure SaveToStrings(const AList: TStrings); virtual;
|
||||
public
|
||||
constructor Create(ACalendar: TVpICalendar); virtual;
|
||||
function FindItem(AKey: String): TVpICalItem;
|
||||
@ -195,7 +195,7 @@ type
|
||||
implementation
|
||||
|
||||
uses
|
||||
VpConst, VpBase;
|
||||
VpConst, VpMisc, VpBase;
|
||||
|
||||
const
|
||||
DATE_FORMAT = 'yyyymmdd';
|
||||
@ -358,6 +358,7 @@ end;
|
||||
|
||||
procedure TVpICalEntry.SaveToStrings(const AList: TStrings);
|
||||
begin
|
||||
Unused(AList);
|
||||
end;
|
||||
|
||||
|
||||
|
@ -28,12 +28,12 @@ type
|
||||
ButtonPanel: TPanel;
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure GridDrawCell(Sender: TObject; aCol, aRow: Integer; aRect: TRect;
|
||||
{%H-}aState: TGridDrawState);
|
||||
procedure GridGetCheckboxState(Sender: TObject; {%H-}ACol, ARow: Integer;
|
||||
aState: TGridDrawState);
|
||||
procedure GridGetCheckboxState(Sender: TObject; ACol, ARow: Integer;
|
||||
var Value: TCheckboxState);
|
||||
procedure GridPrepareCanvas({%H-}sender: TObject; aCol, {%H-}aRow: Integer;
|
||||
{%H-}aState: TGridDrawState);
|
||||
procedure GridSetCheckboxState(Sender: TObject; {%H-}ACol, ARow: Integer;
|
||||
procedure GridPrepareCanvas(Sender: TObject; aCol, aRow: Integer;
|
||||
aState: TGridDrawState);
|
||||
procedure GridSetCheckboxState(Sender: TObject; ACol, ARow: Integer;
|
||||
const Value: TCheckboxState);
|
||||
private
|
||||
FDatastore: TVpCustomDatastore;
|
||||
@ -45,15 +45,15 @@ type
|
||||
FCol0CheckState: TCheckboxState;
|
||||
FLockCheckState: Integer;
|
||||
procedure CalcRowHeights;
|
||||
function GetCellText({%H-}ACol, {%H-}ARow: Integer): String; virtual;
|
||||
function GetCellText(ACol, ARow: Integer): String; virtual;
|
||||
procedure PrepareItems; virtual;
|
||||
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
procedure CheckItem({%H-}ARow: Integer; {%H-}AChecked: Boolean); virtual;
|
||||
procedure CheckItem(ARow: Integer; AChecked: Boolean); virtual;
|
||||
function Execute: Boolean;
|
||||
function IsChecked({%H-}ARow: Integer): Boolean; virtual;
|
||||
function IsChecked(ARow: Integer): Boolean; virtual;
|
||||
property Datastore: TVpCustomDatastore read FDatastore write SetDatastore;
|
||||
property Grid: TVpImportGrid read FGrid;
|
||||
|
||||
@ -68,7 +68,7 @@ implementation
|
||||
|
||||
uses
|
||||
Themes,
|
||||
VpSR;
|
||||
VpSR, VpMisc;
|
||||
|
||||
{ TVpImportGrid }
|
||||
|
||||
@ -217,14 +217,17 @@ end;
|
||||
procedure TVpImportPreviewForm.CheckItem(ARow: Integer; AChecked: Boolean);
|
||||
var
|
||||
r: Integer;
|
||||
allcheckstate, cbs: TCheckboxState;
|
||||
allcheckstate: TCheckboxState = cbUnchecked;
|
||||
cbs: TCheckboxState = cbUnchecked;
|
||||
begin
|
||||
Unused(AChecked);
|
||||
|
||||
if ARow > 0 then
|
||||
begin
|
||||
Grid.GetCheckboxState(0, 1, allcheckstate{%H-});
|
||||
Grid.GetCheckboxState(0, 1, allcheckstate);
|
||||
for r := 2 to Grid.RowCount-1 do
|
||||
begin
|
||||
Grid.GetCheckboxState(0, r, cbs{%H-});
|
||||
Grid.GetCheckboxState(0, r, cbs);
|
||||
if cbs <> allcheckstate then
|
||||
begin
|
||||
FCol0Checkstate := cbGrayed;
|
||||
@ -244,6 +247,7 @@ end;
|
||||
To be overridden by ancestors. }
|
||||
function TVpImportPreviewForm.GetCellText(ACol, ARow: Integer): String;
|
||||
begin
|
||||
Unused(ACol, ARow);
|
||||
Result := '';
|
||||
end;
|
||||
|
||||
@ -253,6 +257,8 @@ var
|
||||
s: String;
|
||||
R: TRect;
|
||||
begin
|
||||
Unused(AState);
|
||||
|
||||
R := ARect;
|
||||
if (ACol = 0) and (ARow = 0) then
|
||||
Grid.DrawCellCheckboxBitmaps(aCol, aRow, R)
|
||||
@ -275,6 +281,8 @@ end;
|
||||
procedure TVpImportPreviewForm.GridGetCheckboxState(Sender: TObject; ACol,
|
||||
ARow: Integer; var Value: TCheckboxState);
|
||||
begin
|
||||
Unused(ACol);
|
||||
|
||||
if (ARow = 0) and (ACol = 0) then
|
||||
Value := FCol0CheckState
|
||||
else
|
||||
@ -287,11 +295,13 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TVpImportPreviewForm.GridPrepareCanvas(sender: TObject; aCol,
|
||||
procedure TVpImportPreviewForm.GridPrepareCanvas(Sender: TObject; aCol,
|
||||
aRow: Integer; aState: TGridDrawState);
|
||||
var
|
||||
ts: TTextStyle;
|
||||
begin
|
||||
Unused(Sender, ARow, AState);
|
||||
|
||||
if ACol = 1 then
|
||||
begin
|
||||
ts := Grid.Canvas.TextStyle;
|
||||
@ -326,6 +336,7 @@ end;
|
||||
To be overridden by ancestors. }
|
||||
function TVpImportPreviewForm.IsChecked(ARow: Integer): Boolean;
|
||||
begin
|
||||
Unused(ARow);
|
||||
Result := false;
|
||||
end;
|
||||
|
||||
|
@ -6,7 +6,7 @@ interface
|
||||
|
||||
uses
|
||||
LCLVersion, Classes, SysUtils, Forms, Controls, Graphics, Dialogs,
|
||||
VpData, VpBaseDS, VpImportPreview, VpICal, Grids, StdCtrls, Spin;
|
||||
VpData, VpBaseDS, VpImportPreview, VpICal, Grids, StdCtrls;
|
||||
|
||||
type
|
||||
|
||||
@ -20,10 +20,8 @@ type
|
||||
rbOpenEndDuration4Hrs: TRadioButton;
|
||||
procedure btnExecuteClick(Sender: TObject);
|
||||
procedure FormActivate(Sender: TObject);
|
||||
procedure GridGetEditText(Sender: TObject; {%H-}ACol, {%H-}ARow: Integer;
|
||||
var Value: string);
|
||||
procedure GridSetEditText(Sender: TObject; {%H-}ACol, {%H-}ARow: Integer;
|
||||
const Value: string);
|
||||
procedure GridGetEditText(Sender: TObject; ACol, ARow: Integer; var Value: string);
|
||||
procedure GridSetEditText(Sender: TObject; ACol, ARow: Integer; const Value: string);
|
||||
private
|
||||
FActivated: Boolean;
|
||||
FCalendar: TVpICalendar;
|
||||
@ -35,7 +33,7 @@ type
|
||||
{$IF LCL_FullVersion >= 3990000}
|
||||
private
|
||||
FCanCloseTaskDialog: Boolean;
|
||||
procedure OpenEndEventsDialog;
|
||||
function OpenEndEventsDialog: Boolean;
|
||||
procedure OpenendEventsDialogButtonClicked(Sender: TObject;
|
||||
AModalResult: TModalResult; var ACanClose: Boolean);
|
||||
procedure OpenEndEventsDialogRadioButtonClicked(Sender: TObject);
|
||||
@ -61,7 +59,7 @@ implementation
|
||||
{$R *.lfm}
|
||||
|
||||
uses
|
||||
VpSR, VpConst;
|
||||
VpSR, VpConst, VpMisc;
|
||||
|
||||
constructor TVPImportPreviewICalEventForm.Create(AOwner: TComponent);
|
||||
begin
|
||||
@ -213,6 +211,7 @@ procedure TVpImportPreviewICalEventForm.GridGetEditText(Sender: TObject; ACol,
|
||||
var
|
||||
event: TVpICalEvent;
|
||||
begin
|
||||
Unused(ACol, ARow);
|
||||
event := TVpICalEvent(FItems[Grid.Row - Grid.FixedRows]);
|
||||
if event <> nil then
|
||||
Value := Grid.Columns[2].PickList[event.PickedCategory];
|
||||
@ -223,7 +222,11 @@ begin
|
||||
if FCalendar.ContainsOpenEndEvents then
|
||||
begin
|
||||
{$IF LCL_FullVersion >= 3990000}
|
||||
OpenEndEventsDialog;
|
||||
if not OpenEndEventsDialog then
|
||||
begin
|
||||
ModalResult := mrNone;
|
||||
exit;
|
||||
end;
|
||||
{$ELSE}
|
||||
if not (rbOpenEndDuration30mins.Checked or rbOpenEndDuration1Hr.Checked or
|
||||
rbOpenEndDuration2Hrs.Checked or rbOpenEndDuration4Hrs.Checked) then
|
||||
@ -232,6 +235,7 @@ begin
|
||||
ModalResult := mrNone;
|
||||
exit;
|
||||
end;
|
||||
|
||||
if rbOpenEndDuration30mins.Checked then
|
||||
FCalendar.FixOpenEndEvents(0.5/24)
|
||||
else if rbOpenEndDuration1Hr.Checked then
|
||||
@ -266,6 +270,7 @@ procedure TVpImportPreviewICalEventForm.GridSetEditText(Sender: TObject; ACol,
|
||||
var
|
||||
event: TVpICalEvent;
|
||||
begin
|
||||
Unused(ACol, ARow);
|
||||
event := TVpICalEvent(FItems[Grid.Row - Grid.FixedRows]);
|
||||
if event <> nil then
|
||||
event.PickedCategory := Grid.Columns[2].PickList.IndexOf(Value);;
|
||||
@ -284,12 +289,13 @@ begin
|
||||
end;
|
||||
|
||||
{$IF LCL_FullVersion >= 3990000}
|
||||
procedure TVpImportPreviewICalEventForm.OpenendEventsDialog;
|
||||
function TVpImportPreviewICalEventForm.OpenendEventsDialog: Boolean;
|
||||
const
|
||||
DURATIONS: array[0..3] of Double = (0.5/24, 1.0/24, 2.0/24, 4.0/24);
|
||||
var
|
||||
dlg: TTaskDialog;
|
||||
begin
|
||||
Result := True;
|
||||
dlg := TTaskDialog.Create(nil);
|
||||
try
|
||||
dlg.Caption := RSImportICalendarEvents;
|
||||
@ -304,7 +310,9 @@ begin
|
||||
dlg.Flags := dlg.Flags + [tfNoDefaultRadioButton];
|
||||
dlg.Execute;
|
||||
if dlg.ModalResult = mrOK then
|
||||
FCalendar.FixOpenEndEvents(DURATIONS[dlg.RadioButton.Index]);
|
||||
FCalendar.FixOpenEndEvents(DURATIONS[dlg.RadioButton.Index])
|
||||
else
|
||||
Result := false;
|
||||
finally
|
||||
dlg.Free;
|
||||
end;
|
||||
@ -312,9 +320,9 @@ end;
|
||||
|
||||
procedure TVpImportPreviewICalEventForm.OpenendEventsDialogButtonClicked(
|
||||
Sender: TObject; AModalResult: TModalResult; var ACanClose: Boolean);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
Unused(Sender);
|
||||
|
||||
if AModalResult = mrCancel then
|
||||
exit;
|
||||
|
||||
|
@ -9,7 +9,7 @@ inherited VpImportPreviewICalTaskForm: TVpImportPreviewICalTaskForm
|
||||
Width = 655
|
||||
ClientWidth = 655
|
||||
inherited btnExecute: TButton
|
||||
Left = 439
|
||||
Left = 433
|
||||
end
|
||||
inherited btnCancel: TButton
|
||||
Left = 580
|
||||
|
@ -13,10 +13,8 @@ type
|
||||
{ TVpImportPreviewICalTaskForm }
|
||||
|
||||
TVpImportPreviewICalTaskForm = class(TVpImportPreviewForm)
|
||||
procedure GridGetEditText(Sender: TObject; {%H-}ACol, {%H-}ARow: Integer;
|
||||
var Value: string);
|
||||
procedure GridSetEditText(Sender: TObject; {%H-}ACol, ARow: Integer;
|
||||
const Value: string);
|
||||
procedure GridGetEditText(Sender: TObject; ACol, ARow: Integer; var Value: string);
|
||||
procedure GridSetEditText(Sender: TObject; ACol, ARow: Integer; const Value: string);
|
||||
private
|
||||
FCalendar: TVpICalendar;
|
||||
FDefaultCategory: String;
|
||||
@ -45,7 +43,7 @@ implementation
|
||||
{$R *.lfm}
|
||||
|
||||
uses
|
||||
VpSR, VpConst;
|
||||
VpSR, VpConst, VpMisc;
|
||||
|
||||
constructor TVPImportPreviewICalTaskForm.Create(AOwner: TComponent);
|
||||
begin
|
||||
@ -92,6 +90,7 @@ procedure TVpImportPreviewICalTaskForm.GridGetEditText(Sender: TObject; ACol,
|
||||
var
|
||||
task: TVpICalToDo;
|
||||
begin
|
||||
Unused(ARow, ACol);
|
||||
task := TVpICalToDo(FItems[Grid.Row - Grid.FixedRows]);
|
||||
if task <> nil then
|
||||
Value := Grid.Columns[2].PickList[task.PickedCategory];
|
||||
@ -102,6 +101,7 @@ procedure TVpImportPreviewICalTaskForm.GridSetEditText(Sender: TObject; ACol,
|
||||
var
|
||||
task: TVpICalToDo;
|
||||
begin
|
||||
Unused(ARow, ACol);
|
||||
task:= TVpICalToDo(FItems[Grid.Row - Grid.FixedRows]);
|
||||
if task <> nil then
|
||||
task.PickedCategory := Grid.Columns[2].PickList.IndexOf(Value);;
|
||||
|
@ -13,10 +13,8 @@ type
|
||||
{ TVpImportPreviewVCardForm }
|
||||
|
||||
TVpImportPreviewVCardForm = class(TVpImportPreviewForm)
|
||||
procedure GridGetEditText(Sender: TObject; {%H-}ACol, {%H-}ARow: Integer;
|
||||
var Value: string);
|
||||
procedure GridSetEditText(Sender: TObject; {%H-}ACol, {%H-}ARow: Integer;
|
||||
const Value: string);
|
||||
procedure GridGetEditText(Sender: TObject; ACol, ARow: Integer; var Value: string);
|
||||
procedure GridSetEditText(Sender: TObject; ACol, ARow: Integer; const Value: string);
|
||||
private
|
||||
FVCards: TVpVCards;
|
||||
FDefaultCategory: String;
|
||||
@ -43,7 +41,7 @@ implementation
|
||||
{$R *.lfm}
|
||||
|
||||
uses
|
||||
VpSR;
|
||||
VpSR, VpMisc;
|
||||
|
||||
constructor TVPImportPreviewVCardForm.Create(AOwner: TComponent);
|
||||
begin
|
||||
@ -114,6 +112,7 @@ procedure TVpImportPreviewVCardForm.GridGetEditText(Sender: TObject; ACol,
|
||||
var
|
||||
card: TVpVCard;
|
||||
begin
|
||||
Unused(ACol, ARow);
|
||||
card := TVpVCard(FItems[Grid.Row - Grid.FixedRows]);
|
||||
if card <> nil then
|
||||
Value := Grid.Columns[2].PickList[card.PickedCategory];
|
||||
@ -124,6 +123,7 @@ procedure TVpImportPreviewVCardForm.GridSetEditText(Sender: TObject; ACol,
|
||||
var
|
||||
card: TVpVCard;
|
||||
begin
|
||||
Unused(ARow, ACol);
|
||||
card := TVpVCard(FItems[Grid.Row - Grid.FixedRows]);
|
||||
if card <> nil then
|
||||
card.PickedCategory := Grid.Columns[2].PickList.IndexOf(Value);;
|
||||
|
@ -212,7 +212,7 @@ procedure ScaleImg(AImage: TCustomBitmap; ANewWidth, ANewHeight: Integer);
|
||||
function GetScrollbarHeight: Integer;
|
||||
function GetScrollbarWidth: Integer;
|
||||
|
||||
procedure FixLabels({%H-}AForm: TCustomForm);
|
||||
procedure FixLabels(AForm: TCustomForm);
|
||||
|
||||
function Between(x, min, max: Integer): Boolean;
|
||||
|
||||
@ -1335,6 +1335,8 @@ begin
|
||||
for i := 0 to AForm.ControlCount-1 do
|
||||
if AForm.Controls[i] is TLabel
|
||||
then TLabel(AForm.Controls[i]).Transparent := true;
|
||||
{$ELSE}
|
||||
Unused(AForm);
|
||||
{$IFEND}
|
||||
end;
|
||||
|
||||
|
@ -990,7 +990,8 @@ end;
|
||||
procedure TVpMonthView.DoStartDrag(var DragObject: TDragObject);
|
||||
{$IFDEF LCL}
|
||||
var
|
||||
P, HotSpot: TPoint;
|
||||
P: TPoint = (X:0; Y:0);
|
||||
HotSpot: TPoint;
|
||||
EventName: string;
|
||||
{$ENDIF}
|
||||
begin
|
||||
@ -999,7 +1000,7 @@ begin
|
||||
|
||||
if mvActiveEvent <> nil then begin
|
||||
{$IFDEF LCL}
|
||||
GetCursorPos(P{%H-});
|
||||
GetCursorPos(P);
|
||||
P := TVpMonthView(Self).ScreenToClient(P);
|
||||
EventName := mvActiveEvent.Description;
|
||||
HotSpot := Point(P.X - Self.mvActiveEventRec.Left, P.Y - Self.mvActiveEventRec.Top);
|
||||
|
@ -34,7 +34,6 @@ interface
|
||||
|
||||
uses
|
||||
{$IFDEF LCL}
|
||||
LMessages, LCLProc,LCLType,LCLIntf,
|
||||
{$ELSE}
|
||||
Windows, Messages,
|
||||
{$ENDIF}
|
||||
|
@ -710,7 +710,8 @@ var
|
||||
lContact: Integer;
|
||||
lLastPage: Boolean;
|
||||
begin
|
||||
Unused(EndDate);
|
||||
Unused(StartDate, EndDate);
|
||||
|
||||
if FPageInfo.Count = 0 then
|
||||
raise Exception.Create('No pages to print');
|
||||
|
||||
|
@ -94,18 +94,14 @@ var
|
||||
dx, dy: Integer;
|
||||
tm: Integer; // Scaled text margin;
|
||||
d2: Integer; // 2*Scale
|
||||
{%H-}d1px, {%H-}d2px, d3px: Integer;
|
||||
d3px: Integer;
|
||||
begin
|
||||
tm := FScaledTextMargin;
|
||||
|
||||
{$IF VP_LCL_SCALING > 0}
|
||||
d1px := FTasklist.Scale96ToFont(1);
|
||||
d2px := FTasklist.Scale96ToFont(2);
|
||||
d3px := FTasklist.Scale96ToFont(3);
|
||||
{$ELSE}
|
||||
tm := ScaleY(FTaskList.Textmargin, DesigntimeDPI);
|
||||
d1px := ScaleY(1, DesigntimeDPI);
|
||||
d2px := ScaleY(2, DesigntimeDPI);
|
||||
d3px := ScaleY(3, DesigntimeDPI);
|
||||
{$IFEND}
|
||||
|
||||
|
@ -1110,7 +1110,8 @@ end;
|
||||
procedure TVpWeekView.DoStartDrag(var DragObject: TDragObject);
|
||||
{$IFDEF LCL}
|
||||
var
|
||||
P, HotSpot: TPoint;
|
||||
P: TPoint = (X:0; Y:0);
|
||||
HotSpot: TPoint;
|
||||
EventName: string;
|
||||
{$ENDIF}
|
||||
begin
|
||||
@ -1119,7 +1120,7 @@ begin
|
||||
|
||||
if FActiveEvent <> nil then begin
|
||||
{$IFDEF LCL}
|
||||
GetCursorPos(P{%H-});
|
||||
GetCursorPos(P);
|
||||
P := TVpWeekView(Self).ScreenToClient(P);
|
||||
EventName := FActiveEvent.Description;
|
||||
HotSpot := Point(P.X - Self.wvActiveEventRec.Left, P.Y - Self.wvActiveEventRec.Top);
|
||||
|
@ -299,7 +299,6 @@ var
|
||||
i: Integer;
|
||||
node: TDOMNode;
|
||||
appending: Boolean;
|
||||
{%H-}nodename: String;
|
||||
begin
|
||||
L := TStringList.Create;
|
||||
try
|
||||
@ -1488,7 +1487,7 @@ end;
|
||||
procedure TVpXmlDatastore.WriteResources(ADoc: TDOMDocument; AParentNode: TDOMNode);
|
||||
var
|
||||
i, n: Integer;
|
||||
node, resroot, resnode, child, txt: TDOMNode;
|
||||
resroot, resnode, child, txt: TDOMNode;
|
||||
res: TVpResource;
|
||||
begin
|
||||
resRoot := ADoc.CreateElement('Resources');
|
||||
|
Loading…
Reference in New Issue
Block a user