aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc/e-dateedit.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2009-10-16 02:15:31 +0800
committerMilan Crha <mcrha@redhat.com>2009-10-16 02:15:31 +0800
commit79242432b23fe7def50b7119e61d8570a3558c1c (patch)
treea5beef0f9fcdf7cdb0a457d3714469aec19db707 /widgets/misc/e-dateedit.c
parentc442d00f9325bd84f28ed5965a7b2fc512b9b3b7 (diff)
downloadgsoc2013-evolution-79242432b23fe7def50b7119e61d8570a3558c1c.tar.gz
gsoc2013-evolution-79242432b23fe7def50b7119e61d8570a3558c1c.tar.zst
gsoc2013-evolution-79242432b23fe7def50b7119e61d8570a3558c1c.zip
Bug #404227 - Over-aggressive appointment editor date check
Diffstat (limited to 'widgets/misc/e-dateedit.c')
-rw-r--r--widgets/misc/e-dateedit.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/widgets/misc/e-dateedit.c b/widgets/misc/e-dateedit.c
index 07a9fc61c4..2b0eb8acd5 100644
--- a/widgets/misc/e-dateedit.c
+++ b/widgets/misc/e-dateedit.c
@@ -109,6 +109,9 @@ struct _EDateEditPrivate {
GDestroyNotify time_callback_destroy;
gboolean twodigit_year_can_future;
+
+ /* set to TRUE when the date has been changed by typing to the entry */
+ gboolean has_been_changed;
};
enum {
@@ -356,6 +359,7 @@ date_edit_init (EDateEdit *dedit)
dedit->priv->time_callback_destroy = NULL;
dedit->priv->twodigit_year_can_future = TRUE;
+ dedit->priv->has_been_changed = FALSE;
create_children (dedit);
@@ -1681,6 +1685,12 @@ on_date_entry_focus_out (GtkEntry *entry,
return FALSE;
} else if (e_date_edit_get_date (dedit,&tmp_tm.tm_year,&tmp_tm.tm_mon,&tmp_tm.tm_mday)) {
e_date_edit_set_date (dedit,tmp_tm.tm_year,tmp_tm.tm_mon,tmp_tm.tm_mday);
+
+ if (dedit->priv->has_been_changed) {
+ /* the previous one didn't emit changed signal, but we want it even here, thus doing itself */
+ g_signal_emit (dedit, signals [CHANGED], 0);
+ dedit->priv->has_been_changed = FALSE;
+ }
} else {
dedit->priv->date_set_to_none = TRUE;
e_date_edit_update_date_entry (dedit);
@@ -1951,8 +1961,10 @@ e_date_edit_check_date_changed (EDateEdit *dedit)
tmp_tm.tm_mon,
tmp_tm.tm_mday);
- if (date_changed)
+ if (date_changed) {
+ priv->has_been_changed = TRUE;
g_signal_emit (dedit, signals[CHANGED], 0);
+ }
}
/* Parses the time, and if it is different from the current settings it