MokoSearchBar and a method to clear categories

Chris Lord chris at openedhand.com
Thu Aug 30 17:27:50 CEST 2007


On Thu, 2007-08-30 at 14:45 +0100, Thomas Wood wrote:
> 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.

ok, you're probably right, I'll sort this out tomorrow.

--Chris





More information about the framework-devel mailing list