diff options
Diffstat (limited to 'widgets/misc')
-rw-r--r-- | widgets/misc/e-dateedit.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/widgets/misc/e-dateedit.c b/widgets/misc/e-dateedit.c index 58962c2cb7..b27d1778c6 100644 --- a/widgets/misc/e-dateedit.c +++ b/widgets/misc/e-dateedit.c @@ -181,6 +181,9 @@ static void on_date_edit_time_selected (GtkList *list, static gint on_time_entry_key_press (GtkWidget *widget, GdkEventKey *event, EDateEdit *dedit); +static gint on_time_entry_key_release (GtkWidget *widget, + GdkEventKey *event, + EDateEdit *dedit); static gint on_date_entry_focus_out (GtkEntry *entry, GdkEventFocus *event, EDateEdit *dedit); @@ -375,6 +378,10 @@ create_children (EDateEdit *dedit) "key_press_event", G_CALLBACK (on_time_entry_key_press), dedit); + g_signal_connect (GTK_COMBO (priv->time_combo)->entry, + "key_release_event", + G_CALLBACK (on_time_entry_key_release), + dedit); g_signal_connect_after (GTK_COMBO (priv->time_combo)->entry, "focus_out_event", G_CALLBACK (on_time_entry_focus_out), @@ -1577,6 +1584,21 @@ on_time_entry_key_press (GtkWidget *widget, return FALSE; } +static gint +on_time_entry_key_release (GtkWidget *widget, + GdkEventKey *event, + EDateEdit *dedit) +{ + if (event->keyval == GDK_Up || event->keyval == GDK_Down) { + g_signal_stop_emission_by_name (widget, + "key_release_event"); + e_date_edit_check_time_changed (dedit); + return TRUE; + } + + return FALSE; +} + static gint on_date_entry_focus_out (GtkEntry *entry, |