You can use either absolute or relative image paths. In this example, you are assuming that logo.gif is in the same directory as your executable. You should build the path out of the provided components & then give an absolute path.

Also, Glade's source code generation is depreciated (in fact, it's completely removed from Glade 3)! You should just load the .glade file with GladeXML (libglade) so that it is dynamically created during runtime.

I have some simple code (just window and one picture which is button like - can be clicked). And I want source code so I can change and modify that source (add some my function to button etc...) and I dont know how to do it if I use Glade 3 which generates just .glade (xml file) ???

Well, I would really recommend that you lean using libglade and not auto-generated code as you'd be learning a lot of obsolete code. Start with something simple, a tutorial, and then build from there.

In you glade file, I have added a signal handler to the window's "destroy" event which will call gtk_main_quit when you destroy the window (clicking the 'x' in the titlebar). This is how you will handle events in your application. You will define "handlers" for "signals" in Glade and then write code to do whatever you want.

In your example, using Glade 3, I click on the window and then click the 'Signals" tab of the 'Properties" pane and add 'gtk_main_quit' as the handler for the "destroy" event. The new glade file looks like this:

Who is online

Users browsing this forum: Google [Bot] and 2 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum