aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/modules/e-cal-shell-view-actions.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/modules/e-cal-shell-view-actions.c')
-rw-r--r--calendar/modules/e-cal-shell-view-actions.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/calendar/modules/e-cal-shell-view-actions.c b/calendar/modules/e-cal-shell-view-actions.c
index 0631b6e088..c63d3c8315 100644
--- a/calendar/modules/e-cal-shell-view-actions.c
+++ b/calendar/modules/e-cal-shell-view-actions.c
@@ -1006,6 +1006,7 @@ e_cal_shell_view_update_search_filter (ECalShellView *cal_shell_view)
list = e_categories_get_list ();
for (iter = list, ii = 0; iter != NULL; iter = iter->next, ii++) {
const gchar *category_name = iter->data;
+ const gchar *filename;
GtkAction *action;
gchar *action_name;
@@ -1015,6 +1016,24 @@ e_cal_shell_view_update_search_filter (ECalShellView *cal_shell_view)
action_name, category_name, NULL, NULL, ii);
g_free (action_name);
+ /* Convert the category icon file to a themed icon name. */
+ filename = e_categories_get_icon_file_for (category_name);
+ if (filename != NULL && *filename != '\0') {
+ gchar *basename;
+ gchar *cp;
+
+ basename = g_path_get_basename (filename);
+
+ /* Lose the file extension. */
+ if ((cp = strrchr (basename, '.')) != NULL)
+ *cp = '\0';
+
+ g_object_set (
+ radio_action, "icon-name", basename, NULL);
+
+ g_free (basename);
+ }
+
gtk_radio_action_set_group (radio_action, group);
group = gtk_radio_action_get_group (radio_action);