use config settings.
* gui/dialogs/task-editor.c (task_editor_create_date_edit): use config settings. * gui/dialogs/cal-prefs-dialog.c (cal_prefs_dialog_update_config): updated EDateEdit calls. svn path=/trunk/; revision=6673
This commit is contained in:
@@ -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)));
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user