aboutsummaryrefslogtreecommitdiffstats
path: root/modules/addressbook
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2014-03-28 17:14:23 +0800
committerPhilip Withnall <philip.withnall@collabora.co.uk>2014-03-28 18:44:44 +0800
commit61b4bacf9a16bf69c26999dd9acac99695d23242 (patch)
tree01ec1df06524350dc665913445f14bbf8e0dad58 /modules/addressbook
parented405f45a5b870b0374f8f714023e1647a1a6701 (diff)
downloadgsoc2013-evolution-61b4bacf9a16bf69c26999dd9acac99695d23242.tar
gsoc2013-evolution-61b4bacf9a16bf69c26999dd9acac99695d23242.tar.gz
gsoc2013-evolution-61b4bacf9a16bf69c26999dd9acac99695d23242.tar.bz2
gsoc2013-evolution-61b4bacf9a16bf69c26999dd9acac99695d23242.tar.lz
gsoc2013-evolution-61b4bacf9a16bf69c26999dd9acac99695d23242.tar.xz
gsoc2013-evolution-61b4bacf9a16bf69c26999dd9acac99695d23242.tar.zst
gsoc2013-evolution-61b4bacf9a16bf69c26999dd9acac99695d23242.zip
e-util: Port to thread-safe ECategories API
This ports the following two function calls throughout Evolution: • e_categories_get_list() to e_categories_dup_list() • e_categories_get_icon_file_for() to e_categories_dup_icon_file_for() It necessarily changes some internal e-util API: • e_util_get_searchable_categories() to e_util_dup_searchable_categories() This bumps the EDS requirement to 3.13.1. https://bugzilla.gnome.org/show_bug.cgi?id=727221
Diffstat (limited to 'modules/addressbook')
-rw-r--r--modules/addressbook/e-book-shell-view-actions.c10
-rw-r--r--modules/addressbook/e-book-shell-view.c4
2 files changed, 8 insertions, 6 deletions
diff --git a/modules/addressbook/e-book-shell-view-actions.c b/modules/addressbook/e-book-shell-view-actions.c
index 491bb19b8b..ba935c3966 100644
--- a/modules/addressbook/e-book-shell-view-actions.c
+++ b/modules/addressbook/e-book-shell-view-actions.c
@@ -1366,10 +1366,10 @@ e_book_shell_view_update_search_filter (EBookShellView *book_shell_view)
/* Build the category actions. */
- list = e_util_get_searchable_categories ();
+ list = e_util_dup_searchable_categories ();
for (iter = list, ii = 0; iter != NULL; iter = iter->next, ii++) {
const gchar *category_name = iter->data;
- const gchar *filename;
+ gchar *filename;
GtkAction *action;
gchar *action_name;
@@ -1380,7 +1380,7 @@ e_book_shell_view_update_search_filter (EBookShellView *book_shell_view)
g_free (action_name);
/* Convert the category icon file to a themed icon name. */
- filename = e_categories_get_icon_file_for (category_name);
+ filename = e_categories_dup_icon_file_for (category_name);
if (filename != NULL && *filename != '\0') {
gchar *basename;
gchar *cp;
@@ -1397,6 +1397,8 @@ e_book_shell_view_update_search_filter (EBookShellView *book_shell_view)
g_free (basename);
}
+ g_free (filename);
+
gtk_radio_action_set_group (radio_action, group);
group = gtk_radio_action_get_group (radio_action);
@@ -1405,7 +1407,7 @@ e_book_shell_view_update_search_filter (EBookShellView *book_shell_view)
gtk_action_group_add_action (action_group, action);
g_object_unref (radio_action);
}
- g_list_free (list);
+ g_list_free_full (list, g_free);
book_shell_content = book_shell_view->priv->book_shell_content;
searchbar = e_book_shell_content_get_searchbar (book_shell_content);
diff --git a/modules/addressbook/e-book-shell-view.c b/modules/addressbook/e-book-shell-view.c
index 238d8fe674..85c87bd68d 100644
--- a/modules/addressbook/e-book-shell-view.c
+++ b/modules/addressbook/e-book-shell-view.c
@@ -167,9 +167,9 @@ book_shell_view_execute_search (EShellView *shell_view)
GList *categories;
const gchar *category_name;
- categories = e_util_get_searchable_categories ();
+ categories = e_util_dup_searchable_categories ();
category_name = g_list_nth_data (categories, filter_id);
- g_list_free (categories);
+ g_list_free_full (categories, g_free);
temp = g_strdup_printf (
"(and (is \"category_list\" \"%s\") %s)",