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-day-view.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'calendar/gui/e-day-view.c') diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c index 891c378816..fde159dab1 100644 --- a/calendar/gui/e-day-view.c +++ b/calendar/gui/e-day-view.c @@ -1819,6 +1819,9 @@ e_day_view_on_top_canvas_button_press (GtkWidget *widget, e_day_view_start_selection (day_view, day, -1); } } else if (event->button == 3) { + if (!GTK_WIDGET_HAS_FOCUS (day_view)) + gtk_widget_grab_focus (GTK_WIDGET (day_view)); + e_day_view_on_event_right_click (day_view, event, -1, -1); } @@ -1923,6 +1926,9 @@ e_day_view_on_main_canvas_button_press (GtkWidget *widget, e_day_view_start_selection (day_view, day, row); } } else if (event->button == 3) { + if (!GTK_WIDGET_HAS_FOCUS (day_view)) + gtk_widget_grab_focus (GTK_WIDGET (day_view)); + e_day_view_on_event_right_click (day_view, event, -1, -1); } @@ -1950,6 +1956,9 @@ e_day_view_on_long_event_button_press (EDayView *day_view, return TRUE; } } else if (event->button == 3) { + if (!GTK_WIDGET_HAS_FOCUS (day_view)) + gtk_widget_grab_focus (GTK_WIDGET (day_view)); + e_day_view_on_event_right_click (day_view, event, E_DAY_VIEW_LONG_EVENT, event_num); @@ -1980,6 +1989,9 @@ e_day_view_on_event_button_press (EDayView *day_view, return TRUE; } } else if (event->button == 3) { + if (!GTK_WIDGET_HAS_FOCUS (day_view)) + gtk_widget_grab_focus (GTK_WIDGET (day_view)); + e_day_view_on_event_right_click (day_view, event, day, event_num); return TRUE; -- cgit