Re: preview of the new GtkComboBox



> Hi,
> 
> Here are some random thoughts, based mostly on the headers, haven't
> checked out the implemtation yet -
> 
>  - get rid of the spaces inside parentheses ( no spaces around this
>    text )

I've got a very unusual coding style :). I'm working on it...

> 
>  - I wouldn't expose GtkComboBoxGridItem, all its fields are private.
>    Just use the widget instead:
> 
>     gtk_combo_box_grid_select_item (GtkComboBoxGrid *grid, 
>                                     GtkWidget       *item);
> 
>    You can store the GtkComboBoxGridItem as an internal implementation
>    detail. It might be convenient to set the GridItem as object
>    data on the child widget in your implementation.
> 

Done.

>  - gtk_combo_box_grid_add () isn't needed, gtk_container_add() should
>    be made to work here

The widgets you'll add, will come in a button, which will come in the
grid. The problem is that the widget needs to have the container you add
him to (the GtkComboBoxGrid) as parent. GTK+ doesn't like it if I reparent
the widget to a button (especially gtk_container_remove(), the assertion
widget->parent == GTK_WIDGET (container) fails).

> 
>  - gtk_combo_box_construct () should be replaced by object arguments
>    eventually
> 
>  - If there's a popup_hide(), shouldn't there be a popup_show()? 
>    What's the intended use of this method?
>

I'll create a gtk_combo_box_popup_show (GtkComboBox *cbox);.

>  - gtk_combo_box_set_sensitive() isn't needed; if you
>    gtk_widget_set_sensitive() on a container, it automatically
>    recursively sets sensitivity on children.
> 
>  - however, the previous behavior probably depends on implementing
>    the forall virtual method from GtkContainer, which you should
>    do
>

I'll implement this too.

I'll try to get all the above things right and to post a second preview
tomorrow. 

	Kris


-- 
"Running Windows on a Pentium is like having a brand new Porsche but only
be able to drive backwards with the handbrake on."
	(Unknown source - taken from fortune-mod-1.0-11)





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