diff options
author | Milan Crha <mcrha@redhat.com> | 2013-09-27 21:05:59 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2013-09-27 21:05:59 +0800 |
commit | 6d68c41da73744865afb2ddcdf6b0c82ce9fc6fb (patch) | |
tree | 6d24c920432b31ee2126454c552522afcc5d6e44 /em-format/e-mail-part-list.c | |
parent | 1f38d1726eea377ac625d2d53e21682c831d1d45 (diff) | |
download | gsoc2013-evolution-6d68c41da73744865afb2ddcdf6b0c82ce9fc6fb.tar gsoc2013-evolution-6d68c41da73744865afb2ddcdf6b0c82ce9fc6fb.tar.gz gsoc2013-evolution-6d68c41da73744865afb2ddcdf6b0c82ce9fc6fb.tar.bz2 gsoc2013-evolution-6d68c41da73744865afb2ddcdf6b0c82ce9fc6fb.tar.lz gsoc2013-evolution-6d68c41da73744865afb2ddcdf6b0c82ce9fc6fb.tar.xz gsoc2013-evolution-6d68c41da73744865afb2ddcdf6b0c82ce9fc6fb.tar.zst gsoc2013-evolution-6d68c41da73744865afb2ddcdf6b0c82ce9fc6fb.zip |
Bug #689787 - Prefer-plain can hide message body for composer
Diffstat (limited to 'em-format/e-mail-part-list.c')
-rw-r--r-- | em-format/e-mail-part-list.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/em-format/e-mail-part-list.c b/em-format/e-mail-part-list.c index bcf7490634..5a87666305 100644 --- a/em-format/e-mail-part-list.c +++ b/em-format/e-mail-part-list.c @@ -398,6 +398,26 @@ e_mail_part_list_queue_parts (EMailPartList *part_list, } /** + * e_mail_part_list_is_empty: + * @part_list: an #EMailPartList + * + * Returns: whether the part list is empty (it doesn't contain any #EMailpart). + **/ +gboolean +e_mail_part_list_is_empty (EMailPartList *part_list) +{ + gboolean is_empty; + + g_return_val_if_fail (E_IS_MAIL_PART_LIST (part_list), TRUE); + + g_mutex_lock (&part_list->priv->queue_lock); + is_empty = g_queue_is_empty (&part_list->priv->queue); + g_mutex_unlock (&part_list->priv->queue_lock); + + return is_empty; +} + +/** * e_mail_part_list_get_registry: * * Returns a #CamelObjectBag where parsed #EMailPartLists can be stored. |