Watch for Dock quit

An instant messenger which can connect to AIM, GTalk, Jabber, ICQ, and more.
Post Reply
User avatar
yelly
Crema
Posts: 292
Joined: Thu Sep 01, 2005 2:20 pm
Location: Jerusalem, Israel
Contact:

Watch for Dock quit

Post 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.
User avatar
bgannin
Growl Team
Posts: 1817
Joined: Thu Dec 02, 2004 8:11 am
Location: ..here
Contact:

Post by bgannin »

The easy "user visible" action is to do this, it's not necessarily technically feasible. :)
Try my software!

#define ADIUMX pimp //by me
#define QUESTION ((2b) || (!2b))
Have you hugged a programmer today?
Knaledge
Harmless
Posts: 7
Joined: Sun Mar 18, 2007 6:52 am

Post 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?
User avatar
The_Tick
Cocoaforge Admin
Posts: 4642
Joined: Thu Dec 02, 2004 6:06 am
Contact:

Post by The_Tick »

Hrmm.. well there's no distributed notification for this. We could poll the dock, but that's just ugly.
User avatar
Tony Arnold
Harmless
Posts: 5
Joined: Fri Jan 28, 2005 3:55 am
Location: Australia
Contact:

Post 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?
Post Reply