[evolution-data-server] Remove unused camel_store_summary_clear().
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Remove unused camel_store_summary_clear().
- Date: Fri, 16 Aug 2013 18:06:54 +0000 (UTC)
commit d35610a2e044cde1733eebcd9d46ce46cb42ed3a
Author: Matthew Barnes <mbarnes redhat com>
Date: Fri Aug 16 10:12:38 2013 -0400
Remove unused camel_store_summary_clear().
Was only called from CamelStoreSummary's finalize().
camel/camel-store-summary.c | 38 ++++++------------------------
camel/camel-store-summary.h | 3 --
docs/reference/camel/camel-sections.txt | 1 -
3 files changed, 8 insertions(+), 34 deletions(-)
---
diff --git a/camel/camel-store-summary.c b/camel/camel-store-summary.c
index 90e980c..43d0756 100644
--- a/camel/camel-store-summary.c
+++ b/camel/camel-store-summary.c
@@ -69,8 +69,15 @@ static void
store_summary_finalize (GObject *object)
{
CamelStoreSummary *summary = CAMEL_STORE_SUMMARY (object);
+ guint ii;
+
+ for (ii = 0; ii < summary->folders->len; ii++) {
+ CamelStoreInfo *info;
+
+ info = g_ptr_array_index (summary->folders, ii);
+ camel_store_summary_info_unref (summary, info);
+ }
- camel_store_summary_clear (summary);
g_ptr_array_free (summary->folders, TRUE);
g_hash_table_destroy (summary->folders_path);
g_hash_table_destroy (summary->priv->folder_summaries);
@@ -802,35 +809,6 @@ camel_store_summary_touch (CamelStoreSummary *summary)
}
/**
- * camel_store_summary_clear:
- * @summary: a #CamelStoreSummary object
- *
- * Empty the summary contents.
- **/
-void
-camel_store_summary_clear (CamelStoreSummary *summary)
-{
- gint i;
-
- g_return_if_fail (CAMEL_IS_STORE_SUMMARY (summary));
-
- camel_store_summary_lock (summary, CAMEL_STORE_SUMMARY_SUMMARY_LOCK);
- if (camel_store_summary_count (summary) == 0) {
- camel_store_summary_unlock (summary, CAMEL_STORE_SUMMARY_SUMMARY_LOCK);
- return;
- }
-
- for (i = 0; i < summary->folders->len; i++)
- camel_store_summary_info_unref (summary, summary->folders->pdata[i]);
-
- g_ptr_array_set_size (summary->folders, 0);
- g_hash_table_destroy (summary->folders_path);
- summary->folders_path = g_hash_table_new (g_str_hash, g_str_equal);
- summary->flags |= CAMEL_STORE_SUMMARY_DIRTY;
- camel_store_summary_unlock (summary, CAMEL_STORE_SUMMARY_SUMMARY_LOCK);
-}
-
-/**
* camel_store_summary_remove:
* @summary: a #CamelStoreSummary object
* @info: a #CamelStoreInfo
diff --git a/camel/camel-store-summary.h b/camel/camel-store-summary.h
index 06bf830..f17035d 100644
--- a/camel/camel-store-summary.h
+++ b/camel/camel-store-summary.h
@@ -186,9 +186,6 @@ void camel_store_summary_remove (CamelStoreSummary *summary,
void camel_store_summary_remove_path (CamelStoreSummary *summary,
const gchar *path);
-/* remove all items */
-void camel_store_summary_clear (CamelStoreSummary *summary);
-
/* lookup functions */
gint camel_store_summary_count (CamelStoreSummary *summary);
CamelStoreInfo *
diff --git a/docs/reference/camel/camel-sections.txt b/docs/reference/camel/camel-sections.txt
index 89bdf1f..b1e9666 100644
--- a/docs/reference/camel/camel-sections.txt
+++ b/docs/reference/camel/camel-sections.txt
@@ -2596,7 +2596,6 @@ camel_store_summary_info_unref
camel_store_summary_info_free
camel_store_summary_remove
camel_store_summary_remove_path
-camel_store_summary_clear
camel_store_summary_count
camel_store_summary_index
camel_store_summary_path
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]