Re: pending patches
- From: Philip Van Hoof <spam pvanhoof be>
- To: Martin Bonnin <martinbonnin gmail com>
- Cc: tinymail-devel-list <tinymail-devel-list gnome org>
- Subject: Re: pending patches
- Date: Thu, 16 Oct 2008 20:52:01 +0200
Ok so after reviewing the patches and all items fixed, I tested this
against the demo-user interface of tinymail.
Once applied all folders are displayed duplicated.
This obviously means that I can't accept the patches, as this changes
the behaviour significantly (and incorrectly).
On Thu, 2008-10-16 at 20:42 +0200, Martin Bonnin wrote:
>
> 2008/10/16 Philip Van Hoof <spam pvanhoof be>
>
> About just Patch #10
>
> On Thu, 2008-10-16 at 18:18 +0200, Martin Bonnin wrote:
>
> > +static gboolean _tny_camel_send_queue_query_passes
> (TnyFolderStoreQuery *query, TnyFolder *folder)
> > +{
> > + gboolean retval = FALSE;
> > +
> > + if (query && (tny_list_get_length
> (tny_folder_store_query_get_items (query)) > 0)) {
>
>
> You can't do this with a caller-owns API like
> tny_folder_store_query_get_items
>
> TnyList *list = tny_folder_store_query_get_items (query);
>
> if (query && (tny_list_get_length (list) > 0)) {
> ...
> }
>
> g_object_unref (list);
>
>
> right !
> Attached is next try.
>
> --
> Martin
>
>
>
>
> > + TnyList *items =
> tny_folder_store_query_get_items (query);
> > + TnyIterator *iterator;
> > + iterator = tny_list_create_iterator (items);
> > +
> > + while (!tny_iterator_is_done (iterator))
> > + {
> > + TnyFolderStoreQueryItem *item =
> (TnyFolderStoreQueryItem*) tny_iterator_get_current
> (iterator);
> > + if (item) {
> > + TnyFolderStoreQueryOption
> options = tny_folder_store_query_item_get_options (item);
> > + const regex_t *regex =
> tny_folder_store_query_item_get_regex (item);
> > +
> > + if ((options &
> TNY_FOLDER_STORE_QUERY_OPTION_SUBSCRIBED) &&
> tny_folder_is_subscribed (folder)){
> > + retval = TRUE;
> > + }
> > +
> > + if ((options &
> TNY_FOLDER_STORE_QUERY_OPTION_UNSUBSCRIBED)
> && !(tny_folder_is_subscribed (folder))){
> > + retval = TRUE;
> > + }
> > +
> > + if (regex && options &
> TNY_FOLDER_STORE_QUERY_OPTION_MATCH_ON_NAME){
> > + if (regexec (regex,
> tny_folder_get_name (folder), 0, NULL, 0) == 0)
> > + retval =
> TRUE;
> > + }
> > +
> > + if (regex && options &
> TNY_FOLDER_STORE_QUERY_OPTION_MATCH_ON_ID){
> > + if (regexec (regex,
> tny_folder_get_id (folder), 0, NULL, 0) == 0)
> > + retval =
> TRUE;
> > + }
> > +
> > + g_object_unref (G_OBJECT
> (item));
> > + }
> > +
> > + tny_iterator_next (iterator);
> > + }
>
>
> > + g_object_unref (G_OBJECT (iterator));
> > + g_object_unref (G_OBJECT (items));
>
> There's no need to do casting using G_OBJECT here.
>
> > + } else {
> > + retval = TRUE;
> > + }
> > +
> > + return retval;
> > +}
>
> --
>
> Philip Van Hoof, freelance software developer
> home: me at pvanhoof dot be
> gnome: pvanhoof at gnome dot org
> http://pvanhoof.be/blog
> http://codeminded.be
>
>
>
>
> _______________________________________________
> tinymail-devel-list mailing list
> tinymail-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/tinymail-devel-list
--
Philip Van Hoof, freelance software developer
home: me at pvanhoof dot be
gnome: pvanhoof at gnome dot org
http://pvanhoof.be/blog
http://codeminded.be
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]