[evolution/gnome-3-32] I#286 - Double click on month/year in minicalendar switches view to Day View
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-3-32] I#286 - Double click on month/year in minicalendar switches view to Day View
- Date: Mon, 11 Mar 2019 10:56:50 +0000 (UTC)
commit 6945e08798efc4f5f32cad62702f3a1720de6f8d
Author: Milan Crha <mcrha redhat com>
Date: Mon Mar 11 11:54:54 2019 +0100
I#286 - Double click on month/year in minicalendar switches view to Day View
Closes https://gitlab.gnome.org/GNOME/evolution/issues/286
src/modules/calendar/e-cal-shell-content.c | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/src/modules/calendar/e-cal-shell-content.c b/src/modules/calendar/e-cal-shell-content.c
index 6def72f0ec..25b876d6d8 100644
--- a/src/modules/calendar/e-cal-shell-content.c
+++ b/src/modules/calendar/e-cal-shell-content.c
@@ -599,8 +599,15 @@ cal_shell_content_datepicker_button_press_cb (ECalendar *calendar,
if (event->type == GDK_2BUTTON_PRESS) {
ECalendarItem *calitem = e_calendar_get_item (calendar);
+ gdouble xwin = 0.0, ywin = 0.0;
GDate sel_start, sel_end;
+ /* Do that only if the double-click was above a day cell */
+ if (!gdk_event_get_coords (event, &xwin, &ywin) ||
+ !e_calendar_item_convert_position_to_date (calitem, xwin, ywin, &sel_start)) {
+ return FALSE;
+ }
+
g_date_clear (&sel_start, 1);
g_date_clear (&sel_end, 1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]