Re: GtkBuilder Public API - Last call
- From: Yevgen Muntyan <muntyan tamu edu>
- To: Matthias Clasen <matthias clasen gmail com>
- Cc: Gtk+ Developers <gtk-devel-list gnome org>, Johan Dahlin <jdahlin async com br>, Christian Robottom Reis <kiko async com br>
- Subject: Re: GtkBuilder Public API - Last call
- Date: Wed, 13 Jun 2007 03:40:40 -0500
Matthias Clasen wrote:
On 6/13/07, Yevgen Muntyan <muntyan tamu edu> wrote:
>
> Um, then gtk_widget_get/set_name is going to be deprecated?
> gtk_widget_set_name() sets widget->name member, and that structure
> member is used (in particular?) by themes, that's how it works.
> What does "name of GtkBuildable" mean?
>
In any case, the question "Does GtkBuilder call
gtk_widget_set_name(widget, "name_from_xml_file")" still
stands. It can be important since it will break widgets which
set name in a constructor or before (some do, e.g. to modify
cursor color). And it can become actually important now,
since until glade-3 it was rather impossible to use fancy
non-stock widgets. Or, if other code relies on "widget
name" being name from xml, setting the name to modify
style will break that other code.
Yes, GtkBuilder calls gtk_widget_set_name. I don't see how that will
break
anything, though - GtkUIManager does the same, as does libglade.
Right, GtkUIManager as well as libglade hardly use non-stock
widgets now (see above). How many glade files use GtkSourceView
for instance? (or GtkUIManager xml description, for that matter)
Widgets which set a name in a constructor are already semi-broken
anyway. Widget names are supposed to be an application/user feature,
not something thats used in the implementation of a widget.
Programmers are also not supposed to set style properties. Nevertheless
it happens, and widget name is one of tools for that. It is a documented
use which shouldn't break, isn't it?
How do you draw the line between "implementation of a widget" and
"an application" part exactly? Note that what you said makes it look
like calling gtk_widget_set_name() by a widget implementation is
not supposed to happen; while doing it by GtkBuilder is indeed right
and good; is it quite logical? GtkBuilder is more a user than the widget?
Yevgen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]