Questions about GTK



Hello,

I am using GTK for a project and I managed to use it successfully. I am very happy about it, GTK is great. Anyway, after few weeks working with it, I have two different questions to ask :

1) I am using a toolbar with buttons in it. Basically, I have some kind of animations that I can stop or play when I click on the icons of my toolbar. The behaviour I would like to have is when I click on the Play button, then it becomes a Stop button and when I click on the Stop button, it becomes a "Play button". It will enough for me only the change the icon in the toolbar but I didn't find anything I am sure about. I did a 'grep -r "set_icon" * in the gtk1.2 include folder. I got a "gtk_drag_set_icon_widget" and other functions like that and "gdk_window_set_icon" in the gdk.h file. What functions should I use to do what Iwant ?

2) My second question is about resizing the application. When the application starts with an animation (I put in it in a GnomeCanvas which is not Gtk but...), Gtk is able to size my main windows to the right size. When I am loading a new bigger animation, then Gtk automatically changes the size of my windows which is GREAT. But when I am loading a new smaller animation, because (I guess) Gtk doesn't need to resize the window to make it fit the animation, the size of my windows stays the same. So, I would like to know how can I ask to Gtk to resize my main Window, so it fits my animation the smallest it can.



Thank you very much,


Thomas




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]