Remove unused CAMEL_STORE_INFO_NAME.
authorMatthew Barnes <mbarnes@redhat.com>
Fri, 16 Aug 2013 15:36:25 +0000 (11:36 -0400)
committerMatthew Barnes <mbarnes@redhat.com>
Fri, 16 Aug 2013 18:07:21 +0000 (14:07 -0400)
CAMEL_STORE_INFO_NAME is just a variation of the path string,
and makes no sense to use with camel_store_info_set_string().

camel/camel-store-summary.c
camel/camel-store-summary.h

index 4aff234..3134142 100644 (file)
@@ -246,12 +246,6 @@ store_summary_store_info_set_string (CamelStoreSummary *summary,
                                      gint type,
                                      const gchar *str)
 {
-       const gchar *p;
-       gchar *v;
-       gint len;
-
-       g_assert (info != NULL);
-
        switch (type) {
        case CAMEL_STORE_INFO_PATH:
                camel_store_summary_lock (summary, CAMEL_STORE_SUMMARY_SUMMARY_LOCK);
@@ -262,23 +256,6 @@ store_summary_store_info_set_string (CamelStoreSummary *summary,
                summary->flags |= CAMEL_STORE_SUMMARY_DIRTY;
                camel_store_summary_unlock (summary, CAMEL_STORE_SUMMARY_SUMMARY_LOCK);
                break;
-       case CAMEL_STORE_INFO_NAME:
-               camel_store_summary_lock (summary, CAMEL_STORE_SUMMARY_SUMMARY_LOCK);
-               g_hash_table_remove (summary->folders_path, (gchar *) camel_store_info_path (summary, info));
-               p = strrchr (info->path, '/');
-               if (p) {
-                       len = p - info->path + 1;
-                       v = g_malloc (len + strlen (str) + 1);
-                       memcpy (v, info->path, len);
-                       strcpy (v + len, str);
-               } else {
-                       v = g_strdup (str);
-               }
-               g_free (info->path);
-               info->path = v;
-               g_hash_table_insert (summary->folders_path, (gchar *) camel_store_info_path (summary, info), info);
-               camel_store_summary_unlock (summary, CAMEL_STORE_SUMMARY_SUMMARY_LOCK);
-               break;
        }
 }
 
index fd90b31..5c9959e 100644 (file)
@@ -65,7 +65,6 @@ typedef struct _CamelStoreInfo CamelStoreInfo;
 
 enum {
        CAMEL_STORE_INFO_PATH = 0,
-       CAMEL_STORE_INFO_NAME,
        CAMEL_STORE_INFO_LAST
 };