diff options
author | Milan Crha <mcrha@redhat.com> | 2010-11-03 23:35:02 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2010-11-03 23:35:02 +0800 |
commit | bad8aff04f274c58c584bd5f7e8a396918aa9fb4 (patch) | |
tree | 5f6ce51b7135bb15fbf3806585592b61877f1045 /calendar/gui/tag-calendar.c | |
parent | 7ce11c62eae2c3b27cb8d2c00c00f9d2a50ac560 (diff) | |
download | gsoc2013-evolution-bad8aff04f274c58c584bd5f7e8a396918aa9fb4.tar gsoc2013-evolution-bad8aff04f274c58c584bd5f7e8a396918aa9fb4.tar.gz gsoc2013-evolution-bad8aff04f274c58c584bd5f7e8a396918aa9fb4.tar.bz2 gsoc2013-evolution-bad8aff04f274c58c584bd5f7e8a396918aa9fb4.tar.lz gsoc2013-evolution-bad8aff04f274c58c584bd5f7e8a396918aa9fb4.tar.xz gsoc2013-evolution-bad8aff04f274c58c584bd5f7e8a396918aa9fb4.tar.zst gsoc2013-evolution-bad8aff04f274c58c584bd5f7e8a396918aa9fb4.zip |
Bug #612181 - Show recurring events in italic in date navigator
Diffstat (limited to 'calendar/gui/tag-calendar.c')
-rw-r--r-- | calendar/gui/tag-calendar.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/calendar/gui/tag-calendar.c b/calendar/gui/tag-calendar.c index f700da5a3b..0af271e1de 100644 --- a/calendar/gui/tag-calendar.c +++ b/calendar/gui/tag-calendar.c @@ -29,6 +29,8 @@ #endif #include <libecal/e-cal-time-util.h> +#include "shell/e-shell.h" +#include "shell/e-shell-settings.h" #include "calendar-config.h" #include "tag-calendar.h" @@ -39,6 +41,7 @@ struct calendar_tag_closure { time_t end_time; gboolean skip_transparent_events; + gboolean recur_events_italic; }; /* Clears all the tags in a calendar and fills a closure structure with the @@ -108,6 +111,8 @@ tag_calendar_cb (ECalComponent *comp, return TRUE; style = E_CALENDAR_ITEM_MARK_ITALIC; + } else if (c->recur_events_italic && e_cal_component_is_instance (comp)) { + style = E_CALENDAR_ITEM_MARK_ITALIC; } else { style = E_CALENDAR_ITEM_MARK_BOLD; } @@ -124,6 +129,18 @@ tag_calendar_cb (ECalComponent *comp, return TRUE; } +static gboolean +get_recur_events_italic (void) +{ + EShell *shell; + EShellSettings *shell_settings; + + shell = e_shell_get_default (); + shell_settings = e_shell_get_shell_settings (shell); + + return e_shell_settings_get_boolean (shell_settings, "cal-recur-events-italic"); +} + /** * tag_calendar_by_client: * @ecal: Calendar widget to tag. @@ -152,6 +169,7 @@ tag_calendar_by_client (ECalendar *ecal, return; c.skip_transparent_events = TRUE; + c.recur_events_italic = get_recur_events_italic (); e_cal_generate_instances ( client, c.start_time, c.end_time, tag_calendar_cb, &c); @@ -202,7 +220,8 @@ tag_calendar_by_comp (ECalendar *ecal, ECal *client, icaltimezone *display_zone, gboolean clear_first, - gboolean comp_is_on_server) + gboolean comp_is_on_server, + gboolean can_recur_events_italic) { struct calendar_tag_closure c; @@ -217,6 +236,7 @@ tag_calendar_by_comp (ECalendar *ecal, return; c.skip_transparent_events = FALSE; + c.recur_events_italic = can_recur_events_italic && get_recur_events_italic (); if (comp_is_on_server) e_cal_generate_instances_for_object ( |