Remove unused camel_store_summary_clear().
authorMatthew Barnes <mbarnes@redhat.com>
Fri, 16 Aug 2013 14:12:38 +0000 (10:12 -0400)
committerMatthew Barnes <mbarnes@redhat.com>
Fri, 16 Aug 2013 18:07:21 +0000 (14:07 -0400)
Was only called from CamelStoreSummary's finalize().

camel/camel-store-summary.c
camel/camel-store-summary.h
docs/reference/camel/camel-sections.txt

index 90e980c..43d0756 100644 (file)
@@ -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
index 06bf830..f17035d 100644 (file)
@@ -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 *
index 89bdf1f..b1e9666 100644 (file)
@@ -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