From d847c51de4d285dffa9ccdf83320576e23d23047 Mon Sep 17 00:00:00 2001 From: Damon Chaplin Date: Mon, 5 Jun 2000 20:02:55 +0000 Subject: allow the right button to popup the menu, even when the event is being 2000-06-05 Damon Chaplin * gui/e-week-view-event-item.c (e_week_view_event_item_button_press): allow the right button to popup the menu, even when the event is being edited. * gui/e-week-view.c: * gui/e-day-view.c: Set the keyboard focus to the EDayView/EWeekView when the right button is clicked, so that any event being edited is saved before any action (e.g. opening the Event Editor dialog) is started. Note that this won't work if we switch to asynchronous notification. svn path=/trunk/; revision=3427 --- calendar/gui/e-week-view-event-item.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'calendar/gui/e-week-view-event-item.c') diff --git a/calendar/gui/e-week-view-event-item.c b/calendar/gui/e-week-view-event-item.c index c50acabadf..8b4aea1d2d 100644 --- a/calendar/gui/e-week-view-event-item.c +++ b/calendar/gui/e-week-view-event-item.c @@ -653,11 +653,11 @@ e_week_view_event_item_button_press (EWeekViewEventItem *wveitem, week_view->pressed_event_num = wveitem->event_num; week_view->pressed_span_num = wveitem->span_num; - /* Ignore clicks on the event while editing. */ - if (E_TEXT (span->text_item)->editing) - return FALSE; - if (bevent->button.button == 1) { + /* Ignore clicks on the event while editing. */ + if (E_TEXT (span->text_item)->editing) + return FALSE; + /* Remember the item clicked and the mouse position, so we can start a drag if the mouse moves. */ week_view->drag_event_x = bevent->button.x; @@ -666,6 +666,8 @@ e_week_view_event_item_button_press (EWeekViewEventItem *wveitem, /* FIXME: Remember the day offset from the start of the event. */ } else if (bevent->button.button == 3) { + if (!GTK_WIDGET_HAS_FOCUS (week_view)) + gtk_widget_grab_focus (GTK_WIDGET (week_view)); e_week_view_show_popup_menu (week_view, (GdkEventButton*) bevent, wveitem->event_num); -- cgit v1.2.3