Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002121 [JEDI VCL] 00 JVCL Components minor always 2004-09-05 04:31 2005-04-12 09:41
Reporter mschumann View Status public  
Assigned To obones
Priority normal Resolution fixed Platform
Status resolved   OS
Projection none   OS Version
ETA none Fixed in Version 3.10 Product Version 3.00 BETA
  Target Version Product Build
Summary 0002121: jvThumbViews onGetTitle doesnt always get called
Description I extended jvThumbViews to call the event OnGetTitle also with Files read from a directory. This allows changing all Titles not only those of pics added manually. IMO this is the correct behaviour - the event GetTitle should be called with every thumbnail.
Steps To Reproduce
Additional Information Here are the proposed changes (marked with // *** added by micha schumann):

procedure TJvThumbView.SetDirectory(Value: string);
var
  Counter1, FStartTime: DWORD;
  Cancel: Boolean;
  ReadFileList: TStringList;
  OldCursor: TCursor;

  // *** added by micha schumann
  // *** allow to change title also with scanned files
  FFont: TFont;
  FColor: TColor;
  ThumbnailTitle: string;
  // *** end addition by micha schumann

// Pic: TPicture;
begin
  FSelected := -1;
  // If Not FPainted then
  // begin
  // postMessage(Self.Handle,WM_LoadWhenReady,0,0);
  // Exit;
  // end;
  FDiskSize := 0;
  if FFilling then
    Exit;
  if Value <> '' then
  begin
    ReadFileList := TStringList.Create;
    OldCursor := Cursor;
    try
      FFilling := True;
    // if Assigned(ReadFileList) then FreeAndNil(ReadFileList);
      FStartTime := GetTickCount;
      GetFiles(Value);
      if FSorted then
        ReadFileList.Assign(FFileListSorted)
      else
        ReadFileList.Assign(FFileList);
      EmptyList;
      FDirectory := Value;
      if Assigned(FOnStartScanning) then
        FOnStartScanning(Self, ReadFileList.Count - 1);
      if ReadFileList.Count > 0 then
      begin
        Cancel := False;
        for Counter1 := 0 to ReadFileList.Count - 1 do
        begin
          if Assigned(FOnScanProgress) then
            FOnScanProgress(Self, Counter1 + 1, Cancel);
          if Cancel then
            Break;
          AddThumb(ExtractFilename(ReadFileList.Strings[Counter1]), True);
          TJvThumbnail(FThumbList.Objects[Counter1]).FileName := ReadFileList.Strings[Counter1];

          // *** added by micha schumann
          // *** allow to change title also with scanned files
          if Assigned(FOnGetTitle) then
          begin
            FFont := TFont.Create;
            FColor := clBtnFace;
            FOnGetTitle(Self, ReadFileList.Strings[Counter1], ThumbnailTitle, FFont, FColor);

TJvThumbnail(FThumbList.Objects[Counter1]).SetTitlePanel(ThumbnailTitle, FFont, FColor);
            FreeAndNil(FFont);
          end;
          // *** end addition by micha schumann

          Inc(FDiskSize, TJvThumbnail(FThumbList.Objects[Counter1]).FileSize);
          if (Cursor <> crHourGlass) and (GetTickCount - FStartTime > 1000) then
            Cursor := crHourGlass;
        end;
      end;
      if Assigned(FOnStopScanning) then
        FOnStopScanning(Self);
    finally
      FreeAndNil(ReadFileList);
      FFilling := False;
      Cursor := OldCursor;
    end
  end
  else
    EmptyList;
  FDirectory := Value;
  if (FThumbList.Count > 0) and (Selected < 0) then
    SetSelected(0);
  Invalidate;
end;
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0006970)
obones (administrator)
2005-04-12 08:43

Could you check with the lates JVCL and let us know if this is still required ?
(0006978)
mschumann (reporter)
2005-04-12 09:35

No - no longer required. Sorry for forgetting to report that. Thanks for all your effort!

- Issue History
Date Modified Username Field Change
2004-09-05 04:31 mschumann New Issue
2005-04-12 08:43 obones Note Added: 0006970
2005-04-12 08:43 obones Status new => feedback
2005-04-12 09:35 mschumann Note Added: 0006978
2005-04-12 09:41 obones Status feedback => resolved
2005-04-12 09:41 obones Resolution open => fixed
2005-04-12 09:41 obones Assigned To => obones


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker