[evolution-data-server/email-factory] Bug #639483 - Category list includes weather information (cherry picked from commit 8f847c4672a559d4



commit ce4a01cf78daa455b55a7660caf4045cc47e52aa
Author: hao.h.li <hao h li intel com>
Date:   Fri Feb 18 14:40:52 2011 +0100

    Bug #639483 - Category list includes weather information
    (cherry picked from commit 8f847c4672a559d4a0523c691f262d769337a910)

 libedataserverui/e-categories-dialog.c    |    4 ++++
 libedataserverui/e-category-completion.c  |    6 ++++++
 libedataserverui/e-name-selector-dialog.c |    8 +++++++-
 3 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/libedataserverui/e-categories-dialog.c b/libedataserverui/e-categories-dialog.c
index ebbcc59..ecfaf58 100644
--- a/libedataserverui/e-categories-dialog.c
+++ b/libedataserverui/e-categories-dialog.c
@@ -235,6 +235,10 @@ categories_dialog_build_model (ECategoriesDialog *dialog)
 		GtkTreeIter iter;
 		gboolean active;
 
+		/* Only add user-visible categories. */
+		if (!e_categories_is_searchable (category_name))
+			continue;
+
 		active = (g_hash_table_lookup (
 			dialog->priv->selected_categories,
 			category_name) != NULL);
diff --git a/libedataserverui/e-category-completion.c b/libedataserverui/e-category-completion.c
index 463d955..cabf872 100644
--- a/libedataserverui/e-category-completion.c
+++ b/libedataserverui/e-category-completion.c
@@ -69,6 +69,12 @@ category_completion_build_model (GtkEntryCompletion *completion)
 		GdkPixbuf *pixbuf = NULL;
 		GtkTreeIter iter;
 
+		/* Only add user-visible categories. */
+		if (!e_categories_is_searchable (category)) {
+			list = g_list_delete_link (list, list);
+			continue;
+		}
+
 		filename = e_categories_get_icon_file_for (category);
 		if (filename != NULL && *filename != '\0')
 			pixbuf = gdk_pixbuf_new_from_file (filename, NULL);
diff --git a/libedataserverui/e-name-selector-dialog.c b/libedataserverui/e-name-selector-dialog.c
index c2de2be..4fbb8a7 100644
--- a/libedataserverui/e-name-selector-dialog.c
+++ b/libedataserverui/e-name-selector-dialog.c
@@ -119,9 +119,15 @@ e_name_selector_dialog_populate_categories (ENameSelectorDialog *name_selector_d
 
 	/* Categories are already sorted. */
 	category_list = e_categories_get_list ();
-	for (iter = category_list; iter != NULL; iter = iter->next)
+	for (iter = category_list; iter != NULL; iter = iter->next) {
+		/* Only add user-visible categories. */
+		if (!e_categories_is_searchable (iter->data))
+			continue;
+
 		gtk_combo_box_append_text (
 			GTK_COMBO_BOX (combo_box), iter->data);
+	}
+
 	g_list_free (category_list);
 
 	g_signal_connect_swapped (



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]