Page 1 of 1

Watch for Dock quit

Posted: Sat Mar 17, 2007 6:55 pm
by yelly
When the dock restarts, the Adium icon appears as if you were offline (or Adium was closed or whatever). My guess is that this happens because the dock uses the application icon, and Adium doesn't know to change it until your status changes. The easy solution is to have Adium watch for dock quits and change the icon appropriately.

Posted: Sat Mar 17, 2007 9:23 pm
by bgannin
The easy "user visible" action is to do this, it's not necessarily technically feasible. :)

Posted: Sun Mar 18, 2007 6:06 pm
by Knaledge
I've noticed that when using "Quit" via the dock icon for Adium that the application quits properly (no crashes or unexpected close) but the icon still appears as if I am "online" (the duck's eyes are still open).

Any thoughts on this?

Posted: Sun Mar 18, 2007 10:58 pm
by The_Tick
Hrmm.. well there's no distributed notification for this. We could poll the dock, but that's just ugly.

Posted: Thu Mar 22, 2007 4:40 pm
by Tony Arnold
I'm afraid my only advice on this would be exactly the same as Tick's - Friends don't let other friends poll the Dock for information. You'll need to use something like mach_inject to properly do that, and you're setting yourself up for a world o' pain if you do that.

Isn't there some way to force a dock icon to change back to the default on application terminate? Surely quitting via the dock doesn't skip standard de-allocations and the NSApplicationWillTerminate notification?