[evolution] Remove display_name from EMFolderTreeModelStoreInfo.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Remove display_name from EMFolderTreeModelStoreInfo.
- Date: Sat, 28 May 2011 13:51:31 +0000 (UTC)
commit 765d58d5285f6c18b2b091bd42dd3592b2f06560
Author: Matthew Barnes <mbarnes redhat com>
Date: Sat May 28 08:49:26 2011 -0400
Remove display_name from EMFolderTreeModelStoreInfo.
It was only being used to look up an EAccount UID, but we already had
the CamelStore, and the CamelStore UID is the same as the EAccount UID.
mail/em-folder-tree-model.c | 2 --
mail/em-folder-tree-model.h | 2 --
mail/em-folder-tree.c | 15 +++------------
3 files changed, 3 insertions(+), 16 deletions(-)
---
diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c
index 1a04a34..6d019ee 100644
--- a/mail/em-folder-tree-model.c
+++ b/mail/em-folder-tree-model.c
@@ -108,7 +108,6 @@ store_info_free (EMFolderTreeModelStoreInfo *si)
g_signal_handler_disconnect (si->store, si->subscribed_id);
g_signal_handler_disconnect (si->store, si->unsubscribed_id);
- g_free (si->display_name);
g_object_unref (si->store);
gtk_tree_row_reference_free (si->row);
g_hash_table_destroy (si->full_hash);
@@ -1048,7 +1047,6 @@ em_folder_tree_model_add_store (EMFolderTreeModel *model,
reference = gtk_tree_row_reference_new (GTK_TREE_MODEL (model), path);
si = g_new (EMFolderTreeModelStoreInfo, 1);
- si->display_name = g_strdup (display_name);
si->store = g_object_ref (store);
si->account = account;
si->row = gtk_tree_row_reference_copy (reference);
diff --git a/mail/em-folder-tree-model.h b/mail/em-folder-tree-model.h
index 77b2d26..367f90d 100644
--- a/mail/em-folder-tree-model.h
+++ b/mail/em-folder-tree-model.h
@@ -84,8 +84,6 @@ struct _EMFolderTreeModelStoreInfo {
GHashTable *full_hash;
EAccount *account;
- gchar *display_name;
-
guint created_id;
guint deleted_id;
guint renamed_id;
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index ab1273a..1a04599 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -551,11 +551,10 @@ folder_tree_maybe_expand_row (EMFolderTreeModel *model,
EMFolderTree *folder_tree)
{
EMFolderTreePrivate *priv = folder_tree->priv;
- struct _EMFolderTreeModelStoreInfo *si;
CamelStore *store;
- EAccount *account;
gchar *full_name;
gchar *key;
+ const gchar *uid;
struct _selected_uri *u;
gtk_tree_model_get (
@@ -563,16 +562,8 @@ folder_tree_maybe_expand_row (EMFolderTreeModel *model,
COL_STRING_FULL_NAME, &full_name,
COL_POINTER_CAMEL_STORE, &store, -1);
- si = em_folder_tree_model_lookup_store_info (model, store);
- if ((account = e_get_account_by_name (si->display_name))) {
- key = g_strdup_printf ("%s/%s", account->uid, full_name ? full_name : "");
- } else if (CAMEL_IS_VEE_STORE (store)) {
- /* vfolder store */
- key = g_strdup_printf ("vfolder/%s", full_name ? full_name : "");
- } else {
- /* local store */
- key = g_strdup_printf ("local/%s", full_name ? full_name : "");
- }
+ uid = camel_service_get_uid (CAMEL_SERVICE (store));
+ key = g_strdup_printf ("%s/%s", uid, full_name ? full_name : "");
u = g_hash_table_lookup (priv->select_uris_table, key);
if (u) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]