- register more picture extensions (.cur, .icns)
- add simple implementation to TCustomIcon.UpdateCurrentView

git-svn-id: trunk@15613 -
This commit is contained in:
paul 2008-06-30 02:14:12 +00:00
parent 145033569a
commit 93c931063d
3 changed files with 11 additions and 4 deletions

View File

@ -712,6 +712,8 @@ end;
procedure TCustomIcon.UpdateCurrentView;
begin
{$IFDEF VerboseLCLTodos}{$note implement me}{$ENDIF}
FreeCanvasContext;
Changed(Self);
end;
function TCustomIcon.UpdateHandles(ABitmap, AMask: HBITMAP): Boolean;

View File

@ -51,7 +51,9 @@ begin
Add('pbm', rsPortableBitmap, TPortableAnyMapGraphic);
Add('pgm', rsPortableGrayMap, TPortableAnyMapGraphic);
Add('ppm', rsPortablePixmap, TPortableAnyMapGraphic);
Add('ico', rsIcon, TCustomIcon);
Add('ico', rsIcon, TIcon);
Add('icns', rsIcns, TIcnsIcon);
Add('cur', rsCursor, TCursorImage);
Add('jpg', rsJpeg, TJpegImage);
end;
@ -432,9 +434,10 @@ var
begin
if (Value=FGraphic) then exit;
NewGraphic := nil;
ok:=false;
ok := False;
try
if Value <> nil then begin
if Value <> nil then
begin
NewGraphic := TGraphicClass(Value.ClassType).Create;
NewGraphic.Assign(Value);
NewGraphic.OnChange := @Changed;
@ -443,7 +446,7 @@ begin
FGraphic.Free;
FGraphic := NewGraphic;
Changed(Self);
ok:=true;
ok := True;
finally
// this try..finally construction will in case of an exception
// not alter the error backtrace output

View File

@ -185,6 +185,8 @@ ResourceString
rsPortableGrayMap = 'Portable GrayMap';
rsPortablePixmap = 'Portable PixMap';
rsIcon = 'Icon';
rsIcns = 'OSX Icon Resource';
rsCursor = 'Cursor';
rsJpeg = 'Joint Picture Expert Group';
rsUnsupportedClipboardFormat = 'Unsupported clipboard format: %s';
rsGroupIndexCannotBeLessThanPrevious = 'GroupIndex cannot be less than a '