Re: GtkBuilder Public API - Last call
- From: markku vire iki fi
- To: Yevgen Muntyan <muntyan tamu edu>
- Cc: Gtk+ Developers <gtk-devel-list gnome org>
- Subject: Re: GtkBuilder Public API - Last call
- Date: Thu, 14 Jun 2007 12:42:29 +0300
Hi,
Lainaus Yevgen Muntyan <muntyan tamu edu>:
[clip]
>
> Yes you can set the name after construction.
>
> gtk_builder_build_stuff();
> widget1 = gtk_builder_lookup ("foo");
> gtk_widget_set_name (widget1, "gtk-tooltips");
> /* oops, forgot to set up widget2 after adding it in glade,
> since we set all the properties in glade, don't we? */
>
> IMHO, it's silly.
>
> I don't think it's a big deal because we won't get to the level
> of doing everything in glade anyway. Still, it's a weird thing.
> Anyway, let us stop. People are fine with this, good.
> No need to tell how to work it around, it's clear how to
> work it around; and no need to explain how it's wrong to
> do these nasty things with styles, because it's *not* wrong
> (it sucks one has to do things like that, indeed).
What about the opposite scenario: Application developer wants that
some widgets designed by glade need to have their names set, in order
to be themed in a special way. If the builder won't set the names,
then developer ends up fetching the pointers and set the names by hand...
just like in your example.
So, I'm asking: Why not include something like "set widget name" option
into glade and xml-file, or separate property for the name to be set??
Those widgets that have this flag set will have gtk_widget_set_name called,
other do not (name is just a internal reference, like a variable name in C).
By default this would be off (since most widgets are certainly not special
ones, you are not calling gtk_widget_set_name for each widget if you write
the UI by hand, do you...)
-Markku-
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]