Re: Using glade and Actions

Haven't you noticed the Gtk::Builder::get_object() method?

Its documentation says "Note that this function does not increment the reference count of the returned object." That's wrong. That sentence is there just because the documentation is copied from the documentation of gtk_builder_get_object().


2012-05-10 23:47, g4hx skrev:
Hello everyone,

unfortunately, I have a new problem with gtk3mmm: I have some
Actions/ActionGroups created using glade. Now I want to connect the
on_activate() signal of a certain Action to a member function of my
class. To this end, I need to get a reference to this Action from the
Builder. However, the Builder only has a get_widget method, which fails

"gtkmm: object `ActZoomIn' (type=`gtkmm__GtkActionGroup') (in GtkBuilder
file) is not a widget type."

My question is how to obtain the Action form the Builder or else how to
rewrite the code or modify the glade file to connect the Action's
method. Btw I also need a reference to an ActionGroup to call its
set_sensitive method, so glade's handler functions alone won't be
sufficient for me.


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