Re: widget get_name() not working the way it used to



On Thu, 2011-06-30 at 06:41 -0400, Damon Register wrote:
> I am having trouble with the output of Gtk::Widget::get_name().
> In the past I have been using the get_name() to retrieve the name
> of the widget as defined in the Glade file.  If I had the following
> 
>      refGlade->get_widget("idc_quit", idc_quit);
> 
> then I would get the string "idc_quit" from
> 
>      idc_quit->get_name()
> 
> Now (with gtkmm 2.22) I get gtkmm__GtkButton returned from get_name()
> 
> Is this now broken or am I unfortunate enough to have been using an
> unintended/undocumented feature of gtkmm in the past?

There is Gtk::Buildable::get_name() and Gtk::Widget::get_name() and they
presumably return different things.

But we didn't start deriving from Gtk::Buildable until gtkmm 3, so I
don't know why the behaviour would have changed in gtkmm 2.22. Maybe
something changed in GTK+ then.

You could try gtk_buildable_get_name(idc_quit->gobj())

-- 
murrayc murrayc com
www.murrayc.com
www.openismus.com



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