~ubuntu-branches/ubuntu/wily/evolution-data-server/wily

« back to all changes in this revision

Viewing changes to camel/camel-folder-summary.c

  • Committer: Package Import Robot
  • Author(s): Iain Lane
  • Date: 2015-07-20 13:34:59 UTC
  • mfrom: (1.1.126) (1.2.48 sid)
  • Revision ID: package-import@ubuntu.com-20150720133459-g6y46hnu5ewtoz08
Tags: 3.16.4-0ubuntu2
debian/patches/0001-Bug-752373-Monthly-events-do-not-recur-correctly.patch:
Cherry-pick patch from upstream to fix events not recurring correctly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
/*
3
3
 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
4
4
 *
5
 
 * Authors: Michael Zucchi <notzed@ximian.com>
6
 
 *
7
 
 * This library is free software you can redistribute it and/or modify it
 
5
 * This library is free software: you can redistribute it and/or modify it
8
6
 * under the terms of the GNU Lesser General Public License as published by
9
7
 * the Free Software Foundation.
10
8
 *
11
9
 * This library is distributed in the hope that it will be useful, but
12
10
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13
 
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 
11
 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
14
12
 * for more details.
15
13
 *
16
14
 * You should have received a copy of the GNU Lesser General Public License
17
 
 * along with this library; if not, see <http://www.gnu.org/licenses/>.
 
15
 * along with this library. If not, see <http://www.gnu.org/licenses/>.
 
16
 *
 
17
 * Authors: Michael Zucchi <notzed@ximian.com>
18
18
 */
19
19
 
20
20
#ifdef HAVE_CONFIG_H
2003
2003
}
2004
2004
 
2005
2005
static void
2006
 
gather_dirty_uids (gpointer key,
2007
 
                   gpointer value,
2008
 
                   gpointer user_data)
 
2006
gather_dirty_or_flagged_uids (gpointer key,
 
2007
                              gpointer value,
 
2008
                              gpointer user_data)
2009
2009
{
2010
2010
        const gchar *uid = key;
2011
2011
        CamelMessageInfoBase *info = value;
2012
2012
        GHashTable *hash = user_data;
2013
2013
 
2014
 
        if (info->dirty)
 
2014
        if (info->dirty || (info->flags & CAMEL_MESSAGE_FOLDER_FLAGGED) != 0)
2015
2015
                g_hash_table_insert (hash, (gpointer) camel_pstring_strdup (uid), GINT_TO_POINTER (1));
2016
2016
}
2017
2017
 
2041
2041
 
2042
2042
        camel_folder_summary_lock (summary);
2043
2043
 
2044
 
        g_hash_table_foreach (summary->priv->loaded_infos, gather_dirty_uids, hash);
 
2044
        g_hash_table_foreach (summary->priv->loaded_infos, gather_dirty_or_flagged_uids, hash);
2045
2045
        g_hash_table_foreach (summary->priv->uids, gather_changed_uids, hash);
2046
2046
 
2047
2047
        res = g_ptr_array_sized_new (g_hash_table_size (hash));
2118
2118
{
2119
2119
        CamelStore *parent_store;
2120
2120
        CamelSession *session;
 
2121
        gchar *description;
2121
2122
 
2122
2123
        /* If folder is freed or if the cache is nil then clean up */
2123
2124
        if (!summary->priv->folder ||
2135
2136
 
2136
2137
        parent_store = camel_folder_get_parent_store (summary->priv->folder);
2137
2138
        session = camel_service_ref_session (CAMEL_SERVICE (parent_store));
 
2139
        description = g_strdup_printf (_("Release unused memory for folder '%s'"), camel_folder_get_full_name (summary->priv->folder));
2138
2140
 
2139
2141
        camel_session_submit_job (
2140
 
                session,
 
2142
                session, description,
2141
2143
                (CamelSessionCallback) remove_cache,
2142
2144
                g_object_ref (summary),
2143
2145
                (GDestroyNotify) g_object_unref);
2144
2146
 
2145
2147
        g_object_unref (session);
 
2148
        g_free (description);
2146
2149
 
2147
2150
        return TRUE;
2148
2151
}
2343
2346
                   object which is invalidates its content when it reaches the dispose. */
2344
2347
                session = camel_service_ref_session (CAMEL_SERVICE (parent_store));
2345
2348
                if (session) {
 
2349
                        gchar *description;
 
2350
 
 
2351
                        description = g_strdup_printf (_("Update preview data for folder '%s'"), camel_folder_get_full_name (summary->priv->folder));
 
2352
 
2346
2353
                        camel_session_submit_job (
2347
 
                                session,
 
2354
                                session, description,
2348
2355
                                (CamelSessionCallback) preview_update,
2349
2356
                                g_object_ref (summary->priv->folder),
2350
2357
                                (GDestroyNotify) g_object_unref);
 
2358
 
2351
2359
                        g_object_unref (session);
 
2360
                        g_free (description);
2352
2361
                }
2353
2362
        }
2354
2363
 
4014
4023
 
4015
4024
                for (i = 0; i < parts; i++) {
4016
4025
                        CamelMimePart *part = camel_multipart_get_part (CAMEL_MULTIPART (containee), i);
4017
 
                        g_assert (part);
 
4026
                        g_return_val_if_fail (part, info);
4018
4027
                        child = summary_build_content_info_message (summary, msginfo, part);
4019
4028
                        if (child) {
4020
4029
                                child->parent = info;