From 88d4fd5eac6bf7bcfd845f548efabc9801199cd2 Mon Sep 17 00:00:00 2001 From: Bolian Yin Date: Mon, 22 Sep 2003 03:19:00 +0000 Subject: Fixes #1245. ECalendar should be usable with the keyboard 2003-09-19 Bolian Yin Fixes #1245. ECalendar should be usable with the keyboard *misc/e-calendar-item.c (e_calendar_item_focus): new func, focus handler. (e_calendar_item_key_press_event): new func, key press event handler (e_calendar_item_selection_add_days, e_calendar_item_stop_selecting): helpers. (e_calendar_item_ensure_days_visible, e_calendar_item_set_selection_if_emission): add the flag to control if we should emit e-calendar signals. (e_calendar_item_class_init): register focus handler. (e_calendar_item_event): add code for GDK_FOCUS_CHANGE and GDK_KEY_PRESS. *misc/e-calendar.c (e_calendar_focus): new func, focus handler (e_calendar_button_has_focus): new func, if prev/next button has focus. (e_calendar_on_next_clicked, e_calendar_on_prev_clicked): click signal handler for prev/next buttons. (e_calendar_set_focusable): set if the e-calendar is focusable *misc/e-dateedit.c (e_date_edit_show_date_popup, hide_date_popup): grab/ungrab gdk keyboard. svn path=/trunk/; revision=22632 --- widgets/misc/e-dateedit.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'widgets/misc/e-dateedit.c') diff --git a/widgets/misc/e-dateedit.c b/widgets/misc/e-dateedit.c index 31b070a2e8..c6c2ad9bc7 100644 --- a/widgets/misc/e-dateedit.c +++ b/widgets/misc/e-dateedit.c @@ -1180,6 +1180,7 @@ e_date_edit_show_date_popup (EDateEdit *dedit) position_date_popup (dedit); gtk_widget_show (priv->cal_popup); + gdk_keyboard_grab (priv->cal_popup->window, TRUE, GDK_CURRENT_TIME); gtk_widget_grab_focus (priv->cal_popup); gtk_grab_add (priv->cal_popup); gdk_pointer_grab (priv->cal_popup->window, TRUE, @@ -1365,6 +1366,7 @@ hide_date_popup (EDateEdit *dedit) gtk_widget_hide (dedit->priv->cal_popup); gtk_grab_remove (dedit->priv->cal_popup); gdk_pointer_ungrab (GDK_CURRENT_TIME); + gdk_keyboard_ungrab (GDK_CURRENT_TIME); } -- cgit v1.2.3