aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc/e-dateedit.c
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/misc/e-dateedit.c')
-rw-r--r--widgets/misc/e-dateedit.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/widgets/misc/e-dateedit.c b/widgets/misc/e-dateedit.c
index f865a25c34..09ba1ad2d9 100644
--- a/widgets/misc/e-dateedit.c
+++ b/widgets/misc/e-dateedit.c
@@ -798,6 +798,34 @@ e_date_edit_set_time_of_day (EDateEdit *dedit,
date_edit_signals [CHANGED]);
}
+void
+e_date_edit_set_date_and_time_of_day (EDateEdit *dedit,
+ gint year,
+ gint month,
+ gint day,
+ gint hour,
+ gint minute)
+{
+ EDateEditPrivate *priv;
+ gboolean date_changed, time_changed;
+
+ g_return_if_fail (E_IS_DATE_EDIT (dedit));
+
+ priv = dedit->priv;
+
+ date_changed = e_date_edit_set_date_internal (dedit, TRUE, FALSE,
+ year - 1900, month - 1, day);
+ time_changed = e_date_edit_set_time_internal (dedit, TRUE, FALSE,
+ hour, minute);
+
+ e_date_edit_update_date_entry (dedit);
+ e_date_edit_update_time_entry (dedit);
+ e_date_edit_update_time_combo_state (dedit);
+
+ if (date_changed || time_changed)
+ gtk_signal_emit (GTK_OBJECT (dedit),
+ date_edit_signals [CHANGED]);
+}
/**
* e_date_edit_get_show_date: