aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc
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
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')
-rw-r--r--widgets/misc/ChangeLog8
-rw-r--r--widgets/misc/e-dateedit.c28
-rw-r--r--widgets/misc/e-dateedit.h7
3 files changed, 43 insertions, 0 deletions
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog
index a9c6d0eacd..7647180d75 100644
--- a/widgets/misc/ChangeLog
+++ b/widgets/misc/ChangeLog
@@ -1,3 +1,11 @@
+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
+
2001-11-05 Christopher James Lahey <clahey@ximian.com>
Based on a patch by Damon Chaplin <damon@ximian.com>
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:
diff --git a/widgets/misc/e-dateedit.h b/widgets/misc/e-dateedit.h
index 49ea443235..8e307c5d45 100644
--- a/widgets/misc/e-dateedit.h
+++ b/widgets/misc/e-dateedit.h
@@ -119,6 +119,13 @@ void e_date_edit_set_time_of_day (EDateEdit *dedit,
gint hour,
gint minute);
+void e_date_edit_set_date_and_time_of_day (EDateEdit *dedit,
+ gint year,
+ gint month,
+ gint day,
+ gint hour,
+ gint minute);
+
/* Whether we show the date field. */
gboolean e_date_edit_get_show_date (EDateEdit *dedit);
void e_date_edit_set_show_date (EDateEdit *dedit,