diff options
author | Milan Crha <mcrha@redhat.com> | 2011-12-14 21:48:34 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2011-12-14 21:48:34 +0800 |
commit | 017f373b5284b4d7177c19e5ac2a142a5362a15c (patch) | |
tree | d180e617b7b080cf9a324154a5c49fdc2294b3d1 /modules | |
parent | 10ee75dfdfd41fc35e6307619e891915b6f3cafe (diff) | |
download | gsoc2013-evolution-017f373b5284b4d7177c19e5ac2a142a5362a15c.tar.gz gsoc2013-evolution-017f373b5284b4d7177c19e5ac2a142a5362a15c.tar.zst gsoc2013-evolution-017f373b5284b4d7177c19e5ac2a142a5362a15c.zip |
Bug #582649 - Toggle for coloring today and overdue tasks
Diffstat (limited to 'modules')
-rw-r--r-- | modules/calendar/e-cal-config-model.c | 10 | ||||
-rw-r--r-- | modules/calendar/e-cal-shell-settings.c | 10 | ||||
-rw-r--r-- | modules/calendar/e-calendar-preferences.c | 22 | ||||
-rw-r--r-- | modules/calendar/e-calendar-preferences.ui | 18 |
4 files changed, 52 insertions, 8 deletions
diff --git a/modules/calendar/e-cal-config-model.c b/modules/calendar/e-cal-config-model.c index 9898942bf9..f7a0e162af 100644 --- a/modules/calendar/e-cal-config-model.c +++ b/modules/calendar/e-cal-config-model.c @@ -111,11 +111,21 @@ cal_config_model_constructed (GObject *object) if (E_IS_CAL_MODEL_TASKS (extensible)) { g_object_bind_property ( + shell_settings, "cal-tasks-highlight-due-today", + extensible, "highlight-due-today", + G_BINDING_SYNC_CREATE); + + g_object_bind_property ( shell_settings, "cal-tasks-color-due-today", extensible, "color-due-today", G_BINDING_SYNC_CREATE); g_object_bind_property ( + shell_settings, "cal-tasks-highlight-overdue", + extensible, "highlight-overdue", + G_BINDING_SYNC_CREATE); + + g_object_bind_property ( shell_settings, "cal-tasks-color-overdue", extensible, "color-overdue", G_BINDING_SYNC_CREATE); diff --git a/modules/calendar/e-cal-shell-settings.c b/modules/calendar/e-cal-shell-settings.c index 88b961e64f..9810d816e6 100644 --- a/modules/calendar/e-cal-shell-settings.c +++ b/modules/calendar/e-cal-shell-settings.c @@ -633,11 +633,21 @@ e_cal_shell_backend_init_settings (EShell *shell) "show-week-numbers"); e_shell_settings_install_property_for_key ( + "cal-tasks-highlight-due-today", + CALENDAR_SCHEMA, + "task-due-today-highlight"); + + e_shell_settings_install_property_for_key ( "cal-tasks-color-due-today", CALENDAR_SCHEMA, "task-due-today-color"); e_shell_settings_install_property_for_key ( + "cal-tasks-highlight-overdue", + CALENDAR_SCHEMA, + "task-overdue-highlight"); + + e_shell_settings_install_property_for_key ( "cal-tasks-color-overdue", CALENDAR_SCHEMA, "task-overdue-color"); diff --git a/modules/calendar/e-calendar-preferences.c b/modules/calendar/e-calendar-preferences.c index 5578f39a2c..55a91acd70 100644 --- a/modules/calendar/e-calendar-preferences.c +++ b/modules/calendar/e-calendar-preferences.c @@ -797,6 +797,13 @@ calendar_preferences_construct (ECalendarPreferences *prefs, G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE); + widget = e_builder_get_widget (prefs->builder, "tasks_due_today_highlight"); + g_object_bind_property ( + shell_settings, "cal-tasks-highlight-due-today", + widget, "active", + G_BINDING_BIDIRECTIONAL | + G_BINDING_SYNC_CREATE); + widget = e_builder_get_widget (prefs->builder, "tasks_due_today_color"); g_object_bind_property_full ( shell_settings, "cal-tasks-color-due-today", @@ -806,6 +813,17 @@ calendar_preferences_construct (ECalendarPreferences *prefs, e_binding_transform_string_to_color, e_binding_transform_color_to_string, NULL, (GDestroyNotify) NULL); + g_object_bind_property ( + shell_settings, "cal-tasks-highlight-due-today", + widget, "sensitive", + G_BINDING_SYNC_CREATE); + + widget = e_builder_get_widget (prefs->builder, "tasks_overdue_highlight"); + g_object_bind_property ( + shell_settings, "cal-tasks-highlight-overdue", + widget, "active", + G_BINDING_BIDIRECTIONAL | + G_BINDING_SYNC_CREATE); widget = e_builder_get_widget (prefs->builder, "tasks_overdue_color"); g_object_bind_property_full ( @@ -816,6 +834,10 @@ calendar_preferences_construct (ECalendarPreferences *prefs, e_binding_transform_string_to_color, e_binding_transform_color_to_string, (GDestroyNotify) NULL, NULL); + g_object_bind_property ( + shell_settings, "cal-tasks-highlight-overdue", + widget, "sensitive", + G_BINDING_SYNC_CREATE); widget = e_builder_get_widget (prefs->builder, "tasks_hide_completed"); g_object_bind_property ( diff --git a/modules/calendar/e-calendar-preferences.ui b/modules/calendar/e-calendar-preferences.ui index 44ffc19100..5cbc82fbf4 100644 --- a/modules/calendar/e-calendar-preferences.ui +++ b/modules/calendar/e-calendar-preferences.ui @@ -1032,12 +1032,13 @@ <property name="visible">True</property> <property name="spacing">12</property> <child> - <object class="GtkLabel" id="label21"> + <object class="GtkCheckButton" id="tasks_due_today_highlight"> + <property name="label" translatable="yes">Highlight t_asks due today</property> <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">T_asks due today:</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> <property name="use_underline">True</property> - <property name="mnemonic_widget">tasks_due_today_color</property> + <property name="draw_indicator">True</property> </object> <packing> <property name="expand">False</property> @@ -1071,12 +1072,13 @@ <property name="visible">True</property> <property name="spacing">12</property> <child> - <object class="GtkLabel" id="label22"> + <object class="GtkCheckButton" id="tasks_overdue_highlight"> + <property name="label" translatable="yes">Highlight _overdue tasks</property> <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">_Overdue tasks:</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> <property name="use_underline">True</property> - <property name="mnemonic_widget">tasks_overdue_color</property> + <property name="draw_indicator">True</property> </object> <packing> <property name="expand">False</property> |