Re: Tree View sidebar / List View



*snip*
> 
> In general (i haven't thought this through), i'd like there to be only one 
> source for listview models in nautilus. Probably one with just one column 
> that had the NautilusFile in it, and then you'd use 
> gtk_tree_view_column_set_cell_data_func() to get the data from the 
> model/nautilusfile to the cellrenderer/column.
> 
> You would just call nautilus_file_get_model() or something.
> 
> That way we would have very little duplication, and doing various sorts of 
> lists would be pretty simple.
> 
> -- 
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>  Alexander Larsson                                            Red Hat, Inc 


Yes, perhaps I'm missing something, but going through fm-list-model.c it
seems to me that creating that entire model was a little unnecessary and
that the gtk_tree_view_column_set_cell_data_func() way was simpler and
more reasonable.  The only reason I can think for creating your own
model would be for the tree view, where you really want to know if the
NautilusFile has children without having to add them to the model (you
also get such useful features as the "Loading..." text).

Additionally, the only reasonable differences (IMHO) between the Tree
View sidebar and the List View are that 1)the tree view has only one
column and 2) the tree view is a tree, rather than a list.

Both of these could be relatively easily accomplished using both one
model and one view, but in the List View case, just disable the
expanders and in the sidebar case, just disable the all but the one
column (and set some reasonable default zoom, possibly turn the rules
hinting off).  The point is all of this could be done based on the
requested IID (I think, don't know very much aboot Bonobo at the moment)
and save a LOT of code duplication.


--Shahms



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