Re: gtkmm and glade questions

2009/8/15 Darius Blaszyk <dhkblaszyk zeelandnet nl>:
> As a beginner in GTK gui developing I have started to use gtkmm (2.4)
> and glade (3.4.5). I find glade very useful because it allows me to
> quickly develop the GUI and tweak it easily. The .glade file is
> converted into an .o file and linked right into the application. I'm
> just not sure about the scalability of this combination. My application
> will hold no more than a dozen forms I presume. Am I on the right track
> here or should I dump glade and do everything in code? What are the
> advantages then?

If you are talking about a C generator - it is deprecated for a long time. Now
glade should produce .xml file, which you use in code with Gtk::Builder. But
Glade 3.4.5 doesn't have generation of GtkBuilder file format, so you'll need
to use libglademm library, which is deprecated too. I'd recommend upgrading
your software to recent version.

> Working with gtkmm and glade also gave me some issues with connecting
> signal handlers. I have no problem connecting a signal handler in code
> to a button. On the other hand, I have tried also to setup the signal
> handler connection in glade (both tried the activate and clicked
> handler) so I would not need to do this in code anymore (and only keep
> the handler function in the code file). But no matter what it does not
> work. Am I missing something here or does this feature not work anyway?

Signal connecting from Glade doesn't yet work in Gtkmm-2.4. It maybe will
work in Gtkmm 3, if Murray decides to apply patches supporting signal

> Related to the signal handlers, I have no luck yet in setting up a
> signal handler to a menu item. Gtk::ImageMenuItem does not seem to have
> a signal_clicked() method, so what should I use instead?

Maybe signal_activate should be used?

> Regards, Darius
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org

I forwarded this message, because I forgot to CC gtkmm-list.

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