RE: Missing API and API that needs improvements



Hi Philip,

>-----Original Message-----
>From: ext Philip Van Hoof [mailto:spam pvanhoof be] 
>Sent: Thursday, August 24, 2006 16:23
>To: Binnema Dirk-Jan (Nokia-M/Helsinki)
>Cc: tinymail-devel-list gnome org
>Subject: RE: Missing API and API that needs improvements
>
>On Thu, 2006-08-24 at 13:47 +0300, Dirk-Jan Binnema nokia com wrote:
>
>> "_by_header"? What should that do?
>> 
>> And there should be error handling, at the very least a gboolean 
>> return value, but probably some error code.
>
>To be honest, I haven't yet put a lot time in the 
>message-transfering API ideas. Feel free to cook something 
>(different) together.
>
>ps. It would be great if you could use the wiki for that.

Yup, will do so. Need to think a bit before doing that though :)

>> void tny_folder_store_iface_remove_folder 
>(TnyFolderStoreIface *self, 
>> TnyFolderIface *folder); TnyFolderIface 
>> *tny_folder_store_iface_create_folder
>> (TnyFolderStoreIface *self, const gchar *name);
>
>> Same here, they need error handling. And I guess you'd need 
>the parent 
>> folder as well for these functions.
>
>Ahaaaaa but there you miss the ball. TnyFolderStoreIface is 
>that instance! But note that it can also be a TnyStoreAccount. 
>Both are suitable as parent to remove a folder from. There's 
>two implementations but one API. Simple for the developer.

Ah ok! Thanks for the clarification.

>> You seem to like out-params... Can't they return the list as the 
>> return value?
>
>
>No. Because then you can't choose the list implementation. 
>Then it will always return the same list implementation 
>(TnyList for example).

[....]

Ah - I see where you are going. Good point.

[ searching ]

>It's important (for speed) that you do te comparison only when 
>it's really needed. This means that you do it the ListModel 
>versus View implementation. Because those implementations know 
>when an item will be needed (to be viewed).
>
>A GtkTreeModelFilter over an existing model would be suitable for this.
>
>What you basically do is to hide the items that didn't match the query.
>
>But only on-row-becomes-visible. Just like the messages that 
>are flagged as deleted.

Well, I might want to find that one message X sent to me, about
Y. I agree the GtkTreeFolderModel would be nice for Rhythmbox-like
searching through my mails. But not for general searching.

Best wishes,
Dirk.
 



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