diff options
author | konablend <[email protected]> | 2009-06-18 16:47:21 +0000 |
---|---|---|
committer | konablend <[email protected]> | 2009-06-18 16:47:21 +0000 |
commit | 9d9384a99d60e238f0302e3252c27a2fa755bff7 (patch) | |
tree | 3850228b8592c73653bf62df42cd234f1cef1174 /macosx | |
parent | 2bbee7dc6b7236d75057c194dc12f9aafcd48334 (diff) |
MacGUI: fix 64-bit icon to be used during dock-icon progress bar updates.
- also prevents icon from getting trumped back to 32-bit after encode completes.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2566 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/Controller.mm | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/macosx/Controller.mm b/macosx/Controller.mm index bb1e77623..4203c6746 100644 --- a/macosx/Controller.mm +++ b/macosx/Controller.mm @@ -559,7 +559,6 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It **********************************************************************/ - (void) UpdateDockIcon: (float) progress { - NSImage * icon; NSData * tiff; NSBitmapImageRep * bmp; uint32_t * pen; @@ -569,17 +568,14 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It int row_start, row_end; int i, j; - /* Get application original icon */ - icon = [NSImage imageNamed: @"NSApplicationIcon"]; - if( progress < 0.0 || progress > 1.0 ) { - [NSApp setApplicationIconImage: icon]; + [NSApp setApplicationIconImage: fApplicationIcon]; return; } /* Get it in a raw bitmap form */ - tiff = [icon TIFFRepresentationUsingCompression: + tiff = [fApplicationIcon TIFFRepresentationUsingCompression: NSTIFFCompressionNone factor: 1.0]; bmp = [NSBitmapImageRep imageRepWithData: tiff]; @@ -628,7 +624,7 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It /* Now update the dock icon */ tiff = [bmp TIFFRepresentationUsingCompression: NSTIFFCompressionNone factor: 1.0]; - icon = [[NSImage alloc] initWithData: tiff]; + NSImage* icon = [[NSImage alloc] initWithData: tiff]; [NSApp setApplicationIconImage: icon]; [icon release]; } @@ -1443,7 +1439,6 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It - (IBAction)showAboutPanel:(id)sender { - //[NSApp orderFrontStandardAboutPanel:sender]; NSMutableDictionary* d = [[NSMutableDictionary alloc] initWithObjectsAndKeys: fApplicationIcon, @"ApplicationIcon", nil ]; |