Re: gtk_widget_class_install_style_property
- From: "Matt Hoosier" <mwhoosier gmail com>
- To: "Murray Cumming" <murrayc murrayc com>
- Cc: Kent Bolton <kaboltongtkmm gmail com>, gtkmm-list gnome org
- Subject: Re: gtk_widget_class_install_style_property
- Date: Thu, 24 Aug 2006 13:29:06 -0500
Murray,
If I understand the intuition of calling the Glib::ObjectBase
constructor explicitly to supply a custom GType name, we're generating
a new GType for every C++ object instance. Is this correct?
If so, do we have any reason to be concerned about the overhead
implied by that, say after doing 100,000 instantiation/cleanup cycles
of a widget from that C++ class?
--Matt
On 6/8/06, Murray Cumming <murrayc murrayc com> wrote:
On Tue, 2006-05-30 at 19:32 +0200, Murray Cumming wrote:
> On Fri, 2006-05-26 at 10:43 +0200, Murray Cumming wrote:
> > I've tried to get that working here:
> > http://cvs.gnome.org/viewcvs/gtkmm/examples/book/custom/custom_widget/mywidget.cc?view=markup
> > But while parsing my rc file:
> > http://cvs.gnome.org/viewcvs/gtkmm/examples/book/custom/custom_widget/custom_gtkrc?view=markup
> >
> > I get this error:
> > "
> > custom_gtkrc:3: error: invalid identifier `examplescale', expected valid
> > identifier
> > "
> >
> > Maybe someone knows what I am doing wrong.
>
> I submitted a GTK+ bug about that error:
> http://bugzilla.gnome.org/show_bug.cgi?id=343012
>
> However, even when I hack glibmm to produce custom types that start with
> a capital letter, which fixes that error, I still can't seem to actually
> get a value out of the rc file.
The GTK+ bug is still there, so we still need to hack glibmm for now,
but with that hack, I now have a working example:
http://cvs.gnome.org/viewcvs/gtkmm/examples/book/custom/custom_widget/
The secret (discovered on gtk-list gnome org) was that the style values
are only available when the widget has been realized. Luckily, that's
when we need them.
--
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]