[dates] Correctly handle date selection when the week crosses months
- From: Ross Burton <rburton src gnome org>
- To: svn-commits-list gnome org
- Subject: [dates] Correctly handle date selection when the week crosses months
- Date: Wed, 15 Jul 2009 12:00:11 +0000 (UTC)
commit e0eaf1f339356ece3b26e976f5c84cd3678a814a
Author: Long Bu <long bu intel com>
Date: Wed Jul 15 12:59:17 2009 +0100
Correctly handle date selection when the week crosses months
Signed-off-by: Ross Burton <ross linux intel com>
src/dates_view.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/src/dates_view.c b/src/dates_view.c
index bb93204..78b409e 100644
--- a/src/dates_view.c
+++ b/src/dates_view.c
@@ -3681,13 +3681,23 @@ dates_view_main_button_press (GtkWidget *widget,
}
if (in_region && (priv->operation == DATES_VIEW_NONE)) {
+ icaltimetype normal_date;
+ icaltimetype raw_date = {0};
+
+ raw_date.month = month;
+ raw_date.day = day;
+ normal_date = icaltime_normalize (raw_date);
+
+ month = normal_date.month;
+ day = normal_date.day;
+
new_date.month = month;
+ new_date.day = day;
if (day != G_MAXINT) {
if ((priv->dragbox) && (priv->months == 0)) {
priv->select_day = day;
priv->operation = DATES_VIEW_SEL;
- } else
- new_date.day = day;
+ }
}
dates_view_set_date (view, &new_date);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]