[evolution-data-server] Rename "name" field of CamelFolderInfo to "display_name".
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Rename "name" field of CamelFolderInfo to "display_name".
- Date: Sat, 7 May 2011 15:27:15 +0000 (UTC)
commit b349f64e894a236398873fcc15a67c4a9a6614fe
Author: Matthew Barnes <mbarnes redhat com>
Date: Sat May 7 09:21:44 2011 -0400
Rename "name" field of CamelFolderInfo to "display_name".
Long as I'm already breaking the CamelFolderInfo struct, this helps
clarify the "name" field's intended purpose.
camel/camel-store.c | 18 +++++++++---------
camel/camel-store.h | 2 +-
camel/camel-vee-store.c | 6 +++---
camel/providers/imap/camel-imap-store.c | 16 ++++++++--------
camel/providers/imapx/camel-imapx-store.c | 16 ++++++++--------
camel/providers/local/camel-local-store.c | 2 +-
camel/providers/local/camel-maildir-store.c | 6 +++---
camel/providers/local/camel-mbox-store.c | 8 ++++----
camel/providers/local/camel-mh-store.c | 2 +-
camel/providers/local/camel-spool-store.c | 8 ++++----
camel/providers/nntp/camel-nntp-store.c | 22 +++++++++++-----------
docs/reference/camel/tmpl/camel-store.sgml | 2 +-
12 files changed, 54 insertions(+), 54 deletions(-)
---
diff --git a/camel/camel-store.c b/camel/camel-store.c
index 608a761..95e4017 100644
--- a/camel/camel-store.c
+++ b/camel/camel-store.c
@@ -1625,8 +1625,8 @@ add_special_info (CamelStore *store,
/* We're going to replace the physical Trash/Junk
* folder with our vTrash/vJunk folder. */
vinfo = fi;
- g_free (vinfo->name);
g_free (vinfo->full_name);
+ g_free (vinfo->display_name);
} else {
/* There wasn't a Trash/Junk folder so create a new
* folder entry. */
@@ -1646,7 +1646,7 @@ add_special_info (CamelStore *store,
/* Fill in the new fields */
vinfo->flags |= flags;
vinfo->full_name = g_strdup (name);
- vinfo->name = g_strdup (translated);
+ vinfo->display_name = g_strdup (translated);
if (!unread_count)
vinfo->unread = -1;
@@ -1735,8 +1735,8 @@ camel_folder_info_free (CamelFolderInfo *fi)
if (fi != NULL) {
camel_folder_info_free (fi->next);
camel_folder_info_free (fi->child);
- g_free (fi->name);
g_free (fi->full_name);
+ g_free (fi->display_name);
g_slice_free (CamelFolderInfo, fi);
}
}
@@ -1829,13 +1829,13 @@ camel_folder_info_build (GPtrArray *folders,
pfi = camel_folder_info_new ();
if (short_names) {
- pfi->name = strrchr (pname, separator);
- if (pfi->name)
- pfi->name = g_strdup (pfi->name + 1);
+ pfi->display_name = strrchr (pname, separator);
+ if (pfi->display_name != NULL)
+ pfi->display_name = g_strdup (pfi->display_name + 1);
else
- pfi->name = g_strdup (pname);
+ pfi->display_name = g_strdup (pname);
} else
- pfi->name = g_strdup (pname);
+ pfi->display_name = g_strdup (pname);
pfi->full_name = g_strdup (pname);
@@ -1886,8 +1886,8 @@ folder_info_clone_rec (CamelFolderInfo *fi,
info = camel_folder_info_new ();
info->parent = parent;
- info->name = g_strdup (fi->name);
info->full_name = g_strdup (fi->full_name);
+ info->display_name = g_strdup (fi->display_name);
info->unread = fi->unread;
info->flags = fi->flags;
diff --git a/camel/camel-store.h b/camel/camel-store.h
index cc18e46..8b3309a 100644
--- a/camel/camel-store.h
+++ b/camel/camel-store.h
@@ -156,8 +156,8 @@ typedef struct _CamelFolderInfo {
struct _CamelFolderInfo *parent;
struct _CamelFolderInfo *child;
- gchar *name;
gchar *full_name;
+ gchar *display_name;
CamelFolderInfoFlags flags;
gint32 unread;
diff --git a/camel/camel-vee-store.c b/camel/camel-vee-store.c
index d82a449..e78f645 100644
--- a/camel/camel-vee-store.c
+++ b/camel/camel-vee-store.c
@@ -73,7 +73,7 @@ change_folder (CamelStore *store,
tmp = name;
else
tmp++;
- fi->name = g_strdup (tmp);
+ fi->display_name = g_strdup (tmp);
fi->unread = count;
fi->flags = CAMEL_FOLDER_VIRTUAL;
if (!(flags & CHANGE_DELETE))
@@ -241,8 +241,8 @@ vee_store_get_folder_info_sync (CamelStore *store,
CAMEL_FOLDER (folder));
info = camel_folder_info_new ();
- info->name = g_strdup (name);
info->full_name = g_strdup (full_name);
+ info->display_name = g_strdup (name);
info->unread = unread;
info->flags =
CAMEL_FOLDER_NOCHILDREN |
@@ -294,8 +294,8 @@ vee_store_get_folder_info_sync (CamelStore *store,
/* FIXME[disk-summary] comment it out well */
if ((top == NULL || top[0] == 0 || strncmp (top, CAMEL_UNMATCHED_NAME, strlen (CAMEL_UNMATCHED_NAME)) == 0)) {
info = camel_folder_info_new ();
- info->name = g_strdup (_("Unmatched"));
info->full_name = g_strdup (CAMEL_UNMATCHED_NAME);
+ info->display_name = g_strdup (_("Unmatched"));
info->unread = -1;
info->flags =
CAMEL_FOLDER_NOCHILDREN |
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index cc1dd16..8fdf0b7 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -1411,18 +1411,18 @@ imap_build_folder_info (CamelImapStore *imap_store, const gchar *folder_name)
else
name++;
if (!g_ascii_strcasecmp (fi->full_name, "INBOX"))
- fi->name = g_strdup (_("Inbox"));
+ fi->display_name = g_strdup (_("Inbox"));
/* Do not localize the rest, these are from a server, thus shouldn't be localized */
/*else if (!g_ascii_strcasecmp (fi->full_name, "Drafts"))
- fi->name = g_strdup (_("Drafts"));
+ fi->display_name = g_strdup (_("Drafts"));
else if (!g_ascii_strcasecmp (fi->full_name, "Sent"))
- fi->name = g_strdup (_("Sent"));
+ fi->display_name = g_strdup (_("Sent"));
else if (!g_ascii_strcasecmp (fi->full_name, "Templates"))
- fi->name = g_strdup (_("Templates"));
+ fi->display_name = g_strdup (_("Templates"));
else if (!g_ascii_strcasecmp (fi->full_name, "Trash"))
- fi->name = g_strdup (_("Trash"));*/
+ fi->display_name = g_strdup (_("Trash"));*/
else
- fi->name = g_strdup (name);
+ fi->display_name = g_strdup (name);
return fi;
}
@@ -2495,9 +2495,9 @@ parse_list_response_as_folder_info (CamelImapStore *imap_store,
fi->full_name = g_strdup (camel_store_info_path (imap_store->summary, si));
if (!g_ascii_strcasecmp(fi->full_name, "inbox")) {
flags |= CAMEL_FOLDER_SYSTEM|CAMEL_FOLDER_TYPE_INBOX;
- fi->name = g_strdup (_("Inbox"));
+ fi->display_name = g_strdup (_("Inbox"));
} else
- fi->name = g_strdup (camel_store_info_name (imap_store->summary, si));
+ fi->display_name = g_strdup (camel_store_info_name (imap_store->summary, si));
/* HACK: some servers report noinferiors for all folders (uw-imapd)
We just translate this into nochildren, and let the imap layer enforce
diff --git a/camel/providers/imapx/camel-imapx-store.c b/camel/providers/imapx/camel-imapx-store.c
index 4f24edd..3929871 100644
--- a/camel/providers/imapx/camel-imapx-store.c
+++ b/camel/providers/imapx/camel-imapx-store.c
@@ -350,18 +350,18 @@ imapx_build_folder_info (CamelIMAPXStore *imapx_store, const gchar *folder_name)
else
name++;
if (!g_ascii_strcasecmp (fi->full_name, "INBOX"))
- fi->name = g_strdup (_("Inbox"));
+ fi->display_name = g_strdup (_("Inbox"));
/* Do not localize the rest, these are from a server, thus shouldn't be localized */
/*else if (!g_ascii_strcasecmp (fi->full_name, "Drafts"))
- fi->name = g_strdup (_("Drafts"));
+ fi->display_name = g_strdup (_("Drafts"));
else if (!g_ascii_strcasecmp (fi->full_name, "Sent"))
- fi->name = g_strdup (_("Sent"));
+ fi->display_name = g_strdup (_("Sent"));
else if (!g_ascii_strcasecmp (fi->full_name, "Templates"))
- fi->name = g_strdup (_("Templates"));
+ fi->display_name = g_strdup (_("Templates"));
else if (!g_ascii_strcasecmp (fi->full_name, "Trash"))
- fi->name = g_strdup (_("Trash"));*/
+ fi->display_name = g_strdup (_("Trash"));*/
else
- fi->name = g_strdup (name);
+ fi->display_name = g_strdup (name);
return fi;
}
@@ -769,9 +769,9 @@ add_folders_to_summary (CamelIMAPXStore *istore, CamelIMAPXServer *server, GPtrA
fi->full_name = g_strdup (camel_store_info_path (istore->summary, si));
if (!g_ascii_strcasecmp(fi->full_name, "inbox")) {
li->flags |= CAMEL_FOLDER_SYSTEM|CAMEL_FOLDER_TYPE_INBOX;
- fi->name = g_strdup (_("Inbox"));
+ fi->display_name = g_strdup (_("Inbox"));
} else
- fi->name = g_strdup (camel_store_info_name (istore->summary, si));
+ fi->display_name = g_strdup (camel_store_info_name (istore->summary, si));
/* HACK: some servers report noinferiors for all folders (uw-imapd)
We just translate this into nochildren, and let the imap layer enforce
diff --git a/camel/providers/local/camel-local-store.c b/camel/providers/local/camel-local-store.c
index 427f7d8..cef2bea 100644
--- a/camel/providers/local/camel-local-store.c
+++ b/camel/providers/local/camel-local-store.c
@@ -538,7 +538,7 @@ local_store_delete_folder_sync (CamelStore *store,
fi = camel_folder_info_new ();
fi->full_name = g_strdup (folder_name);
- fi->name = g_path_get_basename (folder_name);
+ fi->display_name = g_path_get_basename (folder_name);
fi->unread = -1;
camel_store_folder_deleted (store, fi);
diff --git a/camel/providers/local/camel-maildir-store.c b/camel/providers/local/camel-maildir-store.c
index 427c6fc..6383ea0 100644
--- a/camel/providers/local/camel-maildir-store.c
+++ b/camel/providers/local/camel-maildir-store.c
@@ -414,7 +414,7 @@ scan_fi (CamelStore *store,
fi = camel_folder_info_new ();
fi->full_name = g_strdup (full);
- fi->name = g_strdup (name);
+ fi->display_name = g_strdup (name);
fi->unread = -1;
fi->total = -1;
@@ -868,7 +868,7 @@ scan_old_dir_info (CamelStore *store, CamelFolderInfo *topfi, GError **error)
fi = camel_folder_info_new ();
fi->full_name = full;
- fi->name = g_strdup (d->d_name);
+ fi->display_name = g_strdup (d->d_name);
snew->fi = fi;
last->next = snew->fi;
@@ -934,7 +934,7 @@ maildir_migrate_hierarchy (CamelMaildirStore *mstore, GCancellable *cancellable,
topfi = camel_folder_info_new ();
topfi->full_name = g_strdup (".");
- topfi->name = g_strdup ("Inbox");
+ topfi->display_name = g_strdup ("Inbox");
if (scan_old_dir_info ((CamelStore *) mstore, topfi, error) == -1) {
g_warning ("Failed to scan the old folder info \n");
diff --git a/camel/providers/local/camel-mbox-store.c b/camel/providers/local/camel-mbox-store.c
index afd75c3..fd3bc9d 100644
--- a/camel/providers/local/camel-mbox-store.c
+++ b/camel/providers/local/camel-mbox-store.c
@@ -209,8 +209,8 @@ scan_dir (CamelStore *store,
fi = camel_folder_info_new ();
fi->parent = parent;
- fi->name = short_name;
fi->full_name = full_name;
+ fi->display_name = short_name;
fi->unread = -1;
fi->total = -1;
@@ -226,7 +226,7 @@ scan_dir (CamelStore *store,
tail = fi;
- g_hash_table_insert (folder_hash, fi->name, fi);
+ g_hash_table_insert (folder_hash, fi->display_name, fi);
}
if (!S_ISDIR (st.st_mode)) {
@@ -470,8 +470,8 @@ mbox_store_get_folder_info_sync (CamelStore *store,
fi = camel_folder_info_new ();
fi->parent = NULL;
- fi->name = basename;
fi->full_name = g_strdup (top);
+ fi->display_name = basename;
fi->unread = -1;
fi->total = -1;
@@ -727,7 +727,7 @@ mbox_store_delete_folder_sync (CamelStore *store,
fi = camel_folder_info_new ();
fi->full_name = g_strdup (folder_name);
- fi->name = g_path_get_basename (folder_name);
+ fi->display_name = g_path_get_basename (folder_name);
fi->unread = -1;
camel_store_folder_deleted (store, fi);
diff --git a/camel/providers/local/camel-mh-store.c b/camel/providers/local/camel-mh-store.c
index eda699f..0b56280 100644
--- a/camel/providers/local/camel-mh-store.c
+++ b/camel/providers/local/camel-mh-store.c
@@ -208,7 +208,7 @@ folder_info_new (CamelStore *store,
/* Build the folder info structure. */
fi = camel_folder_info_new ();
fi->full_name = g_strdup (path);
- fi->name = g_strdup (base?base+1:path);
+ fi->display_name = g_strdup (base?base+1:path);
fill_fi (store, fi, flags, cancellable);
return fi;
diff --git a/camel/providers/local/camel-spool-store.c b/camel/providers/local/camel-spool-store.c
index c1ccd7f..9a786c7 100644
--- a/camel/providers/local/camel-spool-store.c
+++ b/camel/providers/local/camel-spool-store.c
@@ -89,7 +89,7 @@ spool_new_fi (CamelStore *store,
fi = camel_folder_info_new ();
fi->full_name = g_strdup (full);
- fi->name = g_strdup (name);
+ fi->display_name = g_strdup (name);
fi->unread = -1;
fi->total = -1;
fi->flags = flags;
@@ -289,8 +289,8 @@ get_folder_info_mbox (CamelStore *store,
if (top == NULL || strcmp(top, "INBOX") == 0) {
fi = spool_new_fi(store, NULL, &fip, "INBOX", CAMEL_FOLDER_NOINFERIORS|CAMEL_FOLDER_NOCHILDREN|CAMEL_FOLDER_SYSTEM);
- g_free (fi->name);
- fi->name = g_strdup(_("Inbox"));
+ g_free (fi->display_name);
+ fi->display_name = g_strdup(_("Inbox"));
spool_fill_fi (store, fi, flags, cancellable);
}
@@ -321,8 +321,8 @@ spool_store_free_folder_info (CamelStore *store,
CamelFolderInfo *fi)
{
if (fi) {
- g_free (fi->name);
g_free (fi->full_name);
+ g_free (fi->display_name);
g_slice_free (CamelFolderInfo, fi);
}
}
diff --git a/camel/providers/nntp/camel-nntp-store.c b/camel/providers/nntp/camel-nntp-store.c
index 12dc6f3..c21b13b 100644
--- a/camel/providers/nntp/camel-nntp-store.c
+++ b/camel/providers/nntp/camel-nntp-store.c
@@ -685,9 +685,9 @@ nntp_folder_info_from_store_info (CamelNNTPStore *store,
fi->full_name = g_strdup (si->path);
if (short_notation)
- fi->name = nntp_newsgroup_name_short (si->path);
+ fi->display_name = nntp_newsgroup_name_short (si->path);
else
- fi->name = g_strdup (si->path);
+ fi->display_name = g_strdup (si->path);
fi->unread = si->unread;
fi->total = si->total;
@@ -707,9 +707,9 @@ nntp_folder_info_from_name (CamelNNTPStore *store,
fi->full_name = g_strdup (name);
if (short_notation)
- fi->name = nntp_newsgroup_name_short (name);
+ fi->display_name = nntp_newsgroup_name_short (name);
else
- fi->name = g_strdup (name);
+ fi->display_name = g_strdup (name);
fi->unread = -1;
@@ -894,7 +894,7 @@ nntp_push_to_hierarchy (CamelNNTPStore *store,
if (!kfi) {
fi = camel_folder_info_new ();
fi->full_name = g_strdup (pfi->full_name);
- fi->name = g_strdup (name);
+ fi->display_name = g_strdup (name);
fi->unread = 0;
fi->total = 0;
@@ -913,8 +913,8 @@ nntp_push_to_hierarchy (CamelNNTPStore *store,
name = dot + 1;
}
- g_free (pfi->name);
- pfi->name = g_strdup (name);
+ g_free (pfi->display_name);
+ pfi->display_name = g_strdup (name);
return tree_insert (root, last, pfi);
}
@@ -951,8 +951,8 @@ nntp_store_get_cached_folder_info (CamelNNTPStore *store,
if (!fi)
continue;
if (store->folder_hierarchy_relative) {
- g_free (fi->name);
- fi->name = g_strdup (si->path + ((toplen == 1) ? 0 : toplen));
+ g_free (fi->display_name);
+ fi->display_name = g_strdup (si->path + ((toplen == 1) ? 0 : toplen));
}
} else {
/* apparently, this is an indirect subitem. if it's not a subitem of
@@ -969,8 +969,8 @@ nntp_store_get_cached_folder_info (CamelNNTPStore *store,
fi->flags |= CAMEL_FOLDER_NOSELECT;
if (store->folder_hierarchy_relative) {
- g_free (fi->name);
- fi->name = g_strdup (tmpname + ((toplen==1) ? 0 : toplen));
+ g_free (fi->display_name);
+ fi->display_name = g_strdup (tmpname + ((toplen==1) ? 0 : toplen));
}
g_free (tmpname);
} else {
diff --git a/docs/reference/camel/tmpl/camel-store.sgml b/docs/reference/camel/tmpl/camel-store.sgml
index ba13e75..4c31ced 100644
--- a/docs/reference/camel/tmpl/camel-store.sgml
+++ b/docs/reference/camel/tmpl/camel-store.sgml
@@ -134,8 +134,8 @@ CamelStore
@next:
@parent:
@child:
- name:
@full_name:
+ display_name:
@flags:
@unread:
@total:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]