aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc/e-dateedit.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2001-11-06 08:05:54 +0800
committerJP Rosevear <jpr@src.gnome.org>2001-11-06 08:05:54 +0800
commit9ab4c3e6cdd2e87612543698e56f5b00d77a415c (patch)
treec8259248acf9618676c7d6541c3fc784db18aef7 /widgets/misc/e-dateedit.c
parent748fba56030267900cef03332ad4a57b3db2085c (diff)
downloadgsoc2013-evolution-9ab4c3e6cdd2e87612543698e56f5b00d77a415c.tar.gz
gsoc2013-evolution-9ab4c3e6cdd2e87612543698e56f5b00d77a415c.tar.zst
gsoc2013-evolution-9ab4c3e6cdd2e87612543698e56f5b00d77a415c.zip
set both the date and the time of day in one call, creating only a single
2001-11-05 JP Rosevear <jpr@ximian.com> * 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
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: