From 9d9384a99d60e238f0302e3252c27a2fa755bff7 Mon Sep 17 00:00:00 2001
From: konablend <kona8lend@gmail.com>
Date: Thu, 18 Jun 2009 16:47:21 +0000
Subject: [PATCH] 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
---
 macosx/Controller.mm | 11 +++--------
 1 file 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 ];
-- 
2.40.0