Re: Updating Minimized Windows
Re: Updating Minimized Windows
- Subject: Re: Updating Minimized Windows
- From: Mark Swanson <email@hidden>
- Date: Thu, 24 Oct 2002 16:19:31 -0500
I still can't update mini window icons, but I found a related answer to my
own question and wanted to post my findings for others to benefit. Here was
my question...
>
I want to update the dock tile of a minimized window (with the app's
>
current window contents). How do I do this?
Here is what I discovered...
There are two kinds of icons in the dock for any app. The one left of the
separator, know as the Application Icon and the one(s) right of the
separator for any minimized windows. Cocoa provides API to change both:
Application Icon: NSApplication has a method -
(void)setApplicationIconImage:(NSImage *)anImage
Minimized Window Icons: NSWindow has a method-
(void)setMiniwindowImage:(NSImage *)anImage
The problem I had was that neither call did anything. So after digging
around, I finally figured out why the call to change the Application icon
didn9t work. You need to add the following code somewhere in your
application (I used awakeFromNIB:)
// So dock tile will change
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSDictionary *appDefaults = [NSDictionary dictionaryWithObject:@"YES"
forKey:@"AppleDockIconEnabled"];
[defaults registerDefaults:appDefaults];
This is the needed magic joo-joo to make the App Icon change and it seems to
work fine. I never did figure out how to change the Minimized Window Icon
(other than the fact that in Jaguar the 3badge2 on the minimized window icon
is a tiny version of the app icon, which you can change as I explained
above). setMiniwindowImage seems to do nothing.
QuickTime Player does update the minimized window icon, so I know it can be
done. I'm just not smart enough to figure it out. I suspect there is yet
another secret user pref to be set. Anyone know ??????
Mark S.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.