View Full Version : iLiad Toolbar icons

07-30-2007, 08:24 AM
Hi all,

I have a question about the toolbar icons: I have written (found) some code for the iLiad that changes the state of the keyboard icon in the toolbar. The problem is that if I close (ctrl+c) this application, the keyboard icon does not get his old state back (the state before I started my application). Does somebody know what I can do?

By the way: how can I find out an icon state?

Adam B.
07-30-2007, 08:46 AM
All icons should return to their normal state when you cleanly close out of the program... Have you tried exiting with a quit? What about starting the program form the contentlister instead of the terminal?

07-30-2007, 09:23 AM
Sorry Adam, I don't know how to close a program cleanly (in C language):shy: Is this some GTK specific or what? Perhaps you can post a simple code snippet if it's no act?

Adam B.
07-30-2007, 10:16 AM
Google gtk_main_quit. I believe that's what cleanly closes the program...

07-30-2007, 10:42 AM
Ok, you are right. When I start the application over contentlister and close it with gtk_main_quit() the icons get her original state back. But why does it not close cleanly if I start the application over shell and press the close button (in my app)? Any ideas?

Adam B.
07-30-2007, 11:06 AM
The icons are controlled by the contentlister when no other programs are active. The contentlister keeps track of when an app is opened from it, and waits for it to close so that it knows when to restore the default icon set.

You may not even need to close cleanly, but simply launch the program from the contentlister and kill it from the terminal. This is typically only a minor inconvenience as most end-user apps will be launched and closed cleanly from the gui.

07-30-2007, 11:13 AM
Ah OK, I understand. Thank you very much.