diff options
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/gui/dialogs/cal-prefs-dialog.c | 24 | ||||
-rw-r--r-- | calendar/gui/dialogs/task-editor.c | 5 |
2 files changed, 11 insertions, 18 deletions
diff --git a/calendar/gui/dialogs/cal-prefs-dialog.c b/calendar/gui/dialogs/cal-prefs-dialog.c index dd97690727..98e6da9d8a 100644 --- a/calendar/gui/dialogs/cal-prefs-dialog.c +++ b/calendar/gui/dialogs/cal-prefs-dialog.c @@ -421,24 +421,16 @@ cal_prefs_dialog_update_config (CalPrefsDialog *prefs) calendar_config_set_week_start_day (week_start_day); /* Start of Day. */ - if (e_date_edit_get_time_of_day (E_DATE_EDIT (priv->start_of_day), - &hour, &minute)) { - calendar_config_set_day_start_hour (hour); - calendar_config_set_day_start_minute (minute); - } else { - /* FIXME: Show error dialog? */ - g_warning ("Couldn't parse start of day"); - } + e_date_edit_get_time_of_day (E_DATE_EDIT (priv->start_of_day), + &hour, &minute); + calendar_config_set_day_start_hour (hour); + calendar_config_set_day_start_minute (minute); /* End of Day. */ - if (e_date_edit_get_time_of_day (E_DATE_EDIT (priv->end_of_day), - &hour, &minute)) { - calendar_config_set_day_end_hour (hour); - calendar_config_set_day_end_minute (minute); - } else { - /* FIXME: Show error dialog? */ - g_warning ("Couldn't parse end of day"); - } + e_date_edit_get_time_of_day (E_DATE_EDIT (priv->end_of_day), + &hour, &minute); + calendar_config_set_day_end_hour (hour); + calendar_config_set_day_end_minute (minute); /* 12/24 Hour Format. */ calendar_config_set_24_hour_format (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->use_24_hour))); diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c index f26bae2e09..61767b4fd1 100644 --- a/calendar/gui/dialogs/task-editor.c +++ b/calendar/gui/dialogs/task-editor.c @@ -36,6 +36,7 @@ #include <cal-util/timeutil.h> #include <cal-client/cal-client.h> #include "task-editor.h" +#include "../calendar-config.h" typedef struct { @@ -326,7 +327,7 @@ task_editor_create_date_edit (void) dedit = e_date_edit_new (); /* FIXME: Set other options. */ - e_date_edit_set_time_popup_range (E_DATE_EDIT (dedit), 8, 18); + e_date_edit_set_time_popup_range (E_DATE_EDIT (dedit), calendar_config_get_day_start_hour (), calendar_config_get_day_end_hour ()); e_date_edit_set_allow_no_date_set (E_DATE_EDIT (dedit), TRUE); return dedit; } @@ -1094,8 +1095,8 @@ completed_changed (EDateEdit *dedit, if (priv->ignore_callbacks) return; - t = e_date_edit_get_time (E_DATE_EDIT (priv->completed_date)); priv->ignore_callbacks = TRUE; + t = e_date_edit_get_time (E_DATE_EDIT (priv->completed_date)); if (t == -1) { /* If the 'Completed Date' is set to 'None', we set the status to 'Not Started' and the percent-complete to 0. |