From 9ab4c3e6cdd2e87612543698e56f5b00d77a415c Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Tue, 6 Nov 2001 00:05:54 +0000 Subject: set both the date and the time of day in one call, creating only a single 2001-11-05 JP Rosevear * e-dateedit.c (e_date_edit_set_date_and_time_of_day): set both the date and the time of day in one call, creating only a single changed signal * e-dateedit.h: add proto svn path=/trunk/; revision=14602 --- widgets/misc/e-dateedit.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'widgets/misc/e-dateedit.c') 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: -- cgit