diff options
author | JP Rosevear <jpr@ximian.com> | 2002-09-12 04:34:48 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2002-09-12 04:34:48 +0800 |
commit | 5ee24ecb73357537623089e04bc38423c8ec3351 (patch) | |
tree | 6110c9cb76355a8bb233ffc64494eb26fdaf11d7 /calendar/gui/e-week-view.c | |
parent | 75455ef4a1650dddfec7b0ac79ec6584f51cc6f8 (diff) | |
download | gsoc2013-evolution-5ee24ecb73357537623089e04bc38423c8ec3351.tar.gz gsoc2013-evolution-5ee24ecb73357537623089e04bc38423c8ec3351.tar.zst gsoc2013-evolution-5ee24ecb73357537623089e04bc38423c8ec3351.zip |
keep the selection if we right click in it (but not on an appointment)
2002-09-11 JP Rosevear <jpr@ximian.com>
* gui/e-day-view.c (e_day_view_on_top_canvas_button_press): keep
the selection if we right click in it (but not on an appointment)
(e_day_view_on_main_canvas_button_press): ditto
* gui/e-week-view.c (e_week_view_on_button_press): sam
svn path=/trunk/; revision=18046
Diffstat (limited to 'calendar/gui/e-week-view.c')
-rw-r--r-- | calendar/gui/e-week-view.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index 756689b176..9d7d75d711 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -1468,7 +1468,7 @@ e_week_view_set_selected_time_range_visible (EWeekView *week_view, g_return_if_fail (E_IS_WEEK_VIEW (week_view)); time_to_gdate_with_zone (&date, start_time, week_view->zone); - + /* Set the selection to the given days. */ week_view->selection_start_day = g_date_julian (&date) - g_date_julian (&week_view->first_day_shown); @@ -2258,13 +2258,15 @@ e_week_view_on_button_press (GtkWidget *widget, if (!GTK_WIDGET_HAS_FOCUS (week_view)) gtk_widget_grab_focus (GTK_WIDGET (week_view)); - week_view->selection_start_day = day; - week_view->selection_end_day = day; - week_view->selection_drag_pos = E_WEEK_VIEW_DRAG_NONE; - - /* FIXME: Optimise? */ - gtk_widget_queue_draw (week_view->main_canvas); + if (day < week_view->selection_start_day || day > week_view->selection_end_day) { + week_view->selection_start_day = day; + week_view->selection_end_day = day; + week_view->selection_drag_pos = E_WEEK_VIEW_DRAG_NONE; + /* FIXME: Optimise? */ + gtk_widget_queue_draw (week_view->main_canvas); + } + e_week_view_show_popup_menu (week_view, event, -1); } |