You've already forked lazarus-ccr
tvplanit: Fix crash (with heaptrace on) due to incomplete Notification. Cosmetic changes.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5149 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -95,9 +95,6 @@
|
||||
</Linking>
|
||||
<Other>
|
||||
<CustomOptions Value="-dBUFDATASET"/>
|
||||
<OtherDefines Count="1">
|
||||
<Define0 Value="BUFDATASET"/>
|
||||
</OtherDefines>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
|
@ -675,6 +675,10 @@ msgstr "keine"
|
||||
msgid "(None)"
|
||||
msgstr "(Nichts)"
|
||||
|
||||
#: vpsr.rsnooverlayedevents
|
||||
msgid "none"
|
||||
msgstr "keine"
|
||||
|
||||
#: vpsr.rsnoprintformats
|
||||
msgid "No print formats have been defined"
|
||||
msgstr "Es sind keine Druckformate definiert."
|
||||
|
@ -681,6 +681,10 @@ msgstr "Aucun"
|
||||
msgid "(None)"
|
||||
msgstr "(Aucun)"
|
||||
|
||||
#: vpsr.rsnooverlayedevents
|
||||
msgid "none"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rsnoprintformats
|
||||
msgid "No print formats have been defined"
|
||||
msgstr "Formats d'impression non-défini"
|
||||
@ -1496,3 +1500,4 @@ msgstr "Spécificateur d'axe inconnu"
|
||||
#: vpsr.sxmldecnotatbeg
|
||||
msgid "The XML declaration must appear before the first element"
|
||||
msgstr "La déclaration XML doit apparaître avant le premier élément"
|
||||
|
||||
|
@ -675,6 +675,10 @@ msgstr "Geen"
|
||||
msgid "(None)"
|
||||
msgstr "(Geen)"
|
||||
|
||||
#: vpsr.rsnooverlayedevents
|
||||
msgid "none"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rsnoprintformats
|
||||
msgid "No print formats have been defined"
|
||||
msgstr "Er zijn geen afdrukformaten gedefinieerd."
|
||||
@ -1490,3 +1494,4 @@ msgstr "Onbekende as specificatie: %s"
|
||||
#: vpsr.sxmldecnotatbeg
|
||||
msgid "The XML declaration must appear before the first element"
|
||||
msgstr "De XML declaratie moet voor het eerste element staan"
|
||||
|
||||
|
@ -665,6 +665,10 @@ msgstr ""
|
||||
msgid "(None)"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rsnooverlayedevents
|
||||
msgid "none"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rsnoprintformats
|
||||
msgid "No print formats have been defined"
|
||||
msgstr ""
|
||||
|
@ -675,6 +675,10 @@ msgstr "Нет"
|
||||
msgid "(None)"
|
||||
msgstr "(Нет)"
|
||||
|
||||
#: vpsr.rsnooverlayedevents
|
||||
msgid "none"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rsnoprintformats
|
||||
msgid "No print formats have been defined"
|
||||
msgstr "Не определён формат печати"
|
||||
@ -1490,3 +1494,4 @@ msgstr ""
|
||||
#: vpsr.sxmldecnotatbeg
|
||||
msgid "The XML declaration must appear before the first element"
|
||||
msgstr ""
|
||||
|
||||
|
@ -243,6 +243,7 @@ type
|
||||
procedure SetDayBuffer(Value: Integer);
|
||||
procedure SetRange(StartTime, EndTime: TDateTime);
|
||||
|
||||
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
|
||||
procedure NotifyLinked;
|
||||
procedure LinkToControls(AOwner: TComponent);
|
||||
procedure UnlinkFromControls(AOwner: TComponent);
|
||||
@ -329,6 +330,7 @@ type
|
||||
FControlLink: TVpControlLink;
|
||||
FLastPrintLine: Integer;
|
||||
function CheckCreateResource : Boolean;
|
||||
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
|
||||
procedure SetDataStore (const Value : TVpCustomDataStore); virtual;
|
||||
procedure SetControlLink (const Value : TVpControlLink);
|
||||
procedure CMEnter(var Msg: {$IFDEF DELPHI}TMessage{$ELSE}TLMessage{$ENDIF}); message CM_ENTER;
|
||||
@ -600,16 +602,21 @@ begin
|
||||
Result := FMediaFolder <> '';
|
||||
end;
|
||||
|
||||
procedure TVpCustomDatastore.Notification(AComponent: TComponent; Operation: TOperation);
|
||||
begin
|
||||
inherited Notification(AComponent, Operation);
|
||||
if (Operation = opRemove) and (AComponent = FLinkedOwner) then
|
||||
FLinkedOwner := nil;
|
||||
end;
|
||||
|
||||
procedure TVpCustomDataStore.NotifyLinked;
|
||||
var
|
||||
i: Integer;
|
||||
|
||||
begin
|
||||
for i := 0 to FNotifiers.Count - 1 do
|
||||
if Assigned(FNotifiers[i]) then
|
||||
PostMessage(PVpWatcher(FNotifiers[i]).Handle, Vp_DataStoreChanged, 0, 0);
|
||||
end;
|
||||
{=====}
|
||||
|
||||
procedure TVpCustomDataStore.SetActiveDate(Value: TDateTime);
|
||||
var
|
||||
@ -775,7 +782,6 @@ begin
|
||||
if not Loading then
|
||||
NotifyDependents;
|
||||
end;
|
||||
{=====}
|
||||
|
||||
procedure TVpCustomDataStore.PurgeEvents(Res: TVpResource);
|
||||
begin
|
||||
@ -783,7 +789,6 @@ begin
|
||||
if not Loading then
|
||||
NotifyDependents;
|
||||
end;
|
||||
{=====}
|
||||
|
||||
procedure TVpCustomDataStore.PurgeContacts(Res: TVpResource);
|
||||
begin
|
||||
@ -791,7 +796,6 @@ begin
|
||||
if not Loading then
|
||||
NotifyDependents;
|
||||
end;
|
||||
{=====}
|
||||
|
||||
procedure TVpCustomDataStore.PurgeTasks(Res: TVpResource);
|
||||
begin
|
||||
@ -799,7 +803,6 @@ begin
|
||||
if not Loading then
|
||||
NotifyDependents;
|
||||
end;
|
||||
{=====}
|
||||
|
||||
procedure TVpCustomDatastore.UpdateGroupEvents;
|
||||
var
|
||||
@ -1034,11 +1037,8 @@ begin
|
||||
inherited;
|
||||
|
||||
OnChange := ResourceChanged;
|
||||
|
||||
FResourceUpdateStyle := ruOnChange;
|
||||
|
||||
Style := csDropDownList;
|
||||
|
||||
DoubleBuffered := true;
|
||||
|
||||
{ If the ResourceCombo is being dropped onto a form for the first }
|
||||
@ -1132,21 +1132,23 @@ begin
|
||||
//Empty on purpose
|
||||
end;
|
||||
{=====}
|
||||
procedure TVpResourceCombo.SetResourceUpdateStyle (
|
||||
const v : TVpResourceUpdate);
|
||||
procedure TVpResourceCombo.SetResourceUpdateStyle(const v: TVpResourceUpdate);
|
||||
begin
|
||||
if v <> FResourceUpdateStyle then begin
|
||||
FResourceUpdateStyle := v;
|
||||
case FResourceUpdateStyle of
|
||||
ruOnChange : begin
|
||||
ruOnChange:
|
||||
begin
|
||||
OnChange := ResourceChanged;
|
||||
OnExit := nil;
|
||||
end;
|
||||
ruOnExit : begin
|
||||
ruOnExit:
|
||||
begin
|
||||
OnChange := nil;
|
||||
OnExit := ResourceChanged;
|
||||
end;
|
||||
ruOnDropDownClose : begin
|
||||
ruOnDropDownClose:
|
||||
begin
|
||||
OnChange := nil;
|
||||
OnExit := nil;
|
||||
end;
|
||||
@ -1181,8 +1183,8 @@ var
|
||||
I: Integer;
|
||||
begin
|
||||
inherited;
|
||||
{ If the control is being dropped onto a form for the first time then }
|
||||
{ Auto connect to the first ControlLink component found }
|
||||
{ If the control is being dropped onto a form for the first time then
|
||||
auto-connect to the first ControlLink component found }
|
||||
if (csDesigning in ComponentState) and not (csLoading in ComponentState) then
|
||||
begin
|
||||
I := 0;
|
||||
@ -1208,7 +1210,6 @@ function TVpLinkableControl.CheckCreateResource : Boolean;
|
||||
var
|
||||
ResEdit: TVpResourceEditDialog;
|
||||
frmSelectResource: TfrmSelectResource;
|
||||
|
||||
begin
|
||||
Result := False;
|
||||
if not Assigned(DataStore) then
|
||||
@ -1216,8 +1217,8 @@ begin
|
||||
if not Assigned(DataStore.Resource) then begin
|
||||
if DataStore.Resources.Count > 0 then begin
|
||||
{ No resource is selected, select one }
|
||||
if MessageDlg (RSSelectResource, mtConfirmation,
|
||||
[mbYes, mbNo], 0) = mrYes then begin
|
||||
if MessageDlg(RSSelectResource, mtConfirmation, [mbYes, mbNo], 0) = mrYes then
|
||||
begin
|
||||
frmSelectResource := TfrmSelectResource.Create(Self);
|
||||
try
|
||||
frmSelectResource.VpResourceCombo1.DataStore := DataStore;
|
||||
@ -1231,10 +1232,11 @@ begin
|
||||
end;
|
||||
end else
|
||||
Exit;
|
||||
end else begin
|
||||
end else
|
||||
begin
|
||||
{ There are no resources at all, add one }
|
||||
if MessageDlg (RSAddNewResource, mtConfirmation,
|
||||
[mbYes, mbNo], 0) = mrYes then begin
|
||||
if MessageDlg(RSAddNewResource, mtConfirmation, [mbYes, mbNo], 0) = mrYes then
|
||||
begin
|
||||
ResEdit := TVpResourceEditDialog.Create(Self);
|
||||
try
|
||||
ResEdit.DataStore := DataStore;
|
||||
@ -1250,12 +1252,23 @@ begin
|
||||
Result := True;
|
||||
end;
|
||||
|
||||
{=====}
|
||||
function TVpLinkableControl.GetLastPrintLine: Integer;
|
||||
begin
|
||||
Result := FLastPrintLine;
|
||||
end;
|
||||
{=====}
|
||||
|
||||
procedure TVpLinkableControl.Notification(AComponent: TComponent;
|
||||
Operation: TOperation);
|
||||
begin
|
||||
inherited Notification(AComponent, Operation);
|
||||
if (Operation = opRemove) then begin
|
||||
if (AComponent = FDatastore) then
|
||||
FDatastore := nil;
|
||||
if (AComponent = FControlLink) then
|
||||
FControlLink := nil;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TVpLinkableControl.SetDataStore(const Value: TVpCustomDataStore);
|
||||
begin
|
||||
if Value = nil then begin
|
||||
|
@ -723,7 +723,7 @@ begin
|
||||
AMenu.Add(newItem);
|
||||
|
||||
newSubItem := TMenuItem.Create(AMenu.Owner);
|
||||
newSubItem.Caption := 'none';
|
||||
newSubItem.Caption := RSNoOverlayedEvents;
|
||||
newSubItem.OnClick := AEventHandler;
|
||||
newSubItem.GroupIndex := 1;
|
||||
newSubItem.AutoCheck := true;
|
||||
|
@ -154,6 +154,7 @@ resourcestring
|
||||
RSStartEndTimeError = 'Incorrect order of start and end times. ' +
|
||||
'Do you want to flip them?';
|
||||
RSCannotEditOverlayedEvent= 'Cannot edit this overlayed event.';
|
||||
RSNoOverlayedEvents = 'none';
|
||||
|
||||
{Task Specific}
|
||||
RSConfirmDeleteTask = 'Delete this task from your list?';
|
||||
|
Reference in New Issue
Block a user