MokoSearchBar and a method to clear categories

Thomas Wood thomas at openedhand.com
Thu Aug 30 15:45:58 CEST 2007


On Thu, 2007-08-30 at 12:47 +0100, Chris Lord wrote:
> On Thu, 2007-08-30 at 12:57 +0200, Holger Freyther wrote:
> > Hi,
> > 
> > I see MokoSearchBar has insert_category, _prepend_category and  
> > remove_category. As we use a GtkComboBox with a GtkListStore as model  
> > what about providing a _clear_categories method as well? Also would  
> > it make sense to offer a way to use a different model for the  
> > combobox? E
> > 
> > E.g. the following call could be the implementation:
> > 	gtk_list_store_clear (GTK_LIST_STORE (
> > 							gtk_combo_box_get_model (
> > 									GTK_COMBO_BOX (view->category_combo))));
> > 
> > 
> > z.
> 
> moko_search_bar_count_categories and moko_search_bar_clear_categories
> added in r2857. I think I didn't reply to the list before, so to
> reiterate, I don't think it's a good idea to be able to set the model,
> as the category chooser is intended to always have text. Perhaps others
> have comments on this?

I'd rather just expose the combobox to be honest. I need to be able to
set the model for Contacts and I don't own the model myself. Also, I'm
not sure how you plan to add separators?

I'd prefer MokoSearchBar to only encapsulate the show/hide and
arrangement logic of the UI. Anything more is really just abstraction
for the sake of it.

Regards,

Thomas

-- 
OpenedHand Ltd.

Unit R Homesdale Business Center / 216-218 Homesdale Road /
Bromley / BR1 2QZ / UK             Tel: +44 (0)20 8819 6559

Expert Open Source For Consumer Devices - http://o-hand.com/
------------------------------------------------------------




More information about the framework-devel mailing list