]> granicus.if.org Git - transmission/commitdiff
on 10.6 avoid some wizardry to work around a 10.5 bug when switching a table's image...
authorMitchell Livingston <livings124@transmissionbt.com>
Tue, 15 Sep 2009 04:56:48 +0000 (04:56 +0000)
committerMitchell Livingston <livings124@transmissionbt.com>
Tue, 15 Sep 2009 04:56:48 +0000 (04:56 +0000)
macosx/TorrentTableView.m

index 9138085a935f3d1e91229e5e8e6152609bf87cef..6c095bedcea2c0f7bd56b76f584abcfb667aabc2 100644 (file)
         if ([ident isEqualToString: @"UL Image"] || [ident isEqualToString: @"DL Image"])
         {
             //ensure arrows are white only when selected
-            NSImage * image = [cell image];
-            BOOL template = [cell backgroundStyle] == NSBackgroundStyleLowered;
-            if ([image isTemplate] != template)
+            if ([NSApp isOnSnowLeopardOrBetter])
+                [[cell image] setTemplate: [cell backgroundStyle] == NSBackgroundStyleLowered];
+            else
             {
-                [image setTemplate: template];
-                [cell setImage: nil];
-                [cell setImage: image];
+                NSImage * image = [cell image];
+                const BOOL template = [cell backgroundStyle] == NSBackgroundStyleLowered;
+                if ([image isTemplate] != template)
+                {
+                    [image setTemplate: template];
+                    [cell setImage: nil];
+                    [cell setImage: image];
+                }
             }
         }
     }