Re: [gnome-db] Path that implements gnome_db_combo_set_model



On Fri, 2003-11-28 at 19:20, Gonzalo Paniagua Javier wrote:
> El vie, 28-11-2003 a las 16:41, Rodrigo Moya escribió:
> > On Fri, 2003-11-28 at 16:37, Gonzalo Paniagua Javier wrote:
> > > gnome_db_combo_set_model is empty. Here's a patch to implement it.
> > > 
> > > Ok to commit?
> > 
> > yes, please, commit to both HEAD and the 1.0 branch, since that should
> > go there also.
> 
> After thinking for a while, I think that my previous patch does not do
> what we intend. Ie, it does not bind the model to the combo. It just
> copies what the model has when it's called.
> 
you're right

> I came up with a patch to really bind it, so that changes to the model
> are inmediatly reflected in the combo. I hooked the "changed" signal in
> the model and tried a simple test that adds a row to the model after
> setting the combo model. It did nothing.
> 
> Shouldn't we be emitting the "changed" signal in:
> 	gda_data_model_append_row
> 	gda_data_model_remove_row
> 	gda_data_model_update_row
> 	gda_data_model_end_edit (not sure about this)
> ?
yes, we should. Those functions should call gda_data_model_row_inserted,
gda_data_model_row_removed, etc, which should emit the corresponding
signals and call gda_data_model_changed.

In your change you call both functions from append_row, remove_row, etc.
I think it would be better if those functions just called
gda_data_model_row_inserted/row_removed, and those in turn will call
gda_data_model_changed. Change that please and commit to both branches.

cheers




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