[gnome-calendar] year-view: don't cancel selection while dragging
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] year-view: don't cancel selection while dragging
- Date: Sat, 21 May 2016 01:23:15 +0000 (UTC)
commit 9c150de822dd98edbd3113ace9ae4e3930aad58e
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Fri May 20 22:14:05 2016 -0300
year-view: don't cancel selection while dragging
This breaks the users' expectations that the navigator
will keep the selected dates. The old behavior was hazardous
for users with disabilities.
https://bugzilla.gnome.org/show_bug.cgi?id=762462
src/gcal-year-view.c | 18 ++++++------------
1 files changed, 6 insertions(+), 12 deletions(-)
---
diff --git a/src/gcal-year-view.c b/src/gcal-year-view.c
index abb9533..86772ec 100644
--- a/src/gcal-year-view.c
+++ b/src/gcal-year-view.c
@@ -1076,14 +1076,14 @@ navigator_motion_notify_cb (GcalYearView *year_view,
gint day, month;
gboolean is_title = FALSE;
+ /* Cancel the hover when selecting a date range */
+ year_view->selected_data->hovered_day = -1;
+ year_view->selected_data->hovered_month = -1;
+
if (calculate_day_month_for_coord (year_view, event->x, event->y, &day, &month, &is_title))
{
if (year_view->button_pressed)
{
- /* Cancel the hover when selecting a date range */
- year_view->selected_data->hovered_day = -1;
- year_view->selected_data->hovered_month = -1;
-
if (is_title)
day = g_date_get_days_in_month (month + 1, year_view->date->year);
@@ -1103,16 +1103,10 @@ navigator_motion_notify_cb (GcalYearView *year_view,
return GDK_EVENT_PROPAGATE;
}
}
- else
- {
- /* Reset the end day */
- year_view->selected_data->end_day = year_view->selected_data->start_day;
- year_view->selected_data->end_month = year_view->selected_data->start_month;
- gtk_widget_queue_draw (widget);
+ gtk_widget_queue_draw (widget);
- return GDK_EVENT_STOP;
- }
+ return GDK_EVENT_STOP;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]