[Xfce4-commits] <orage:master> 4.8.3.1: Fixed Bug 8525 Orage keeps notifying every second on "All day events"

Juha Kautto noreply at xfce.org
Sun Mar 4 13:14:01 CET 2012


Updating branch refs/heads/master
         to 9759f4fdaf49ba03b916a2d93221794d9ff02917 (commit)
       from e9c671a6a9eed4a09d2724ac38390a17c4a9dbe1 (commit)

commit 9759f4fdaf49ba03b916a2d93221794d9ff02917
Author: Juha Kautto <juha at xfce.org>
Date:   Sun Mar 4 14:11:49 2012 +0200

    4.8.3.1: Fixed Bug 8525 Orage keeps notifying every second on "All day events"
    
    There was a bug in handling full day alarms.

 configure.in.in |    2 +-
 src/ical-code.c |   22 ++++++++++++++++++++++
 2 files changed, 23 insertions(+), 1 deletions(-)

diff --git a/configure.in.in b/configure.in.in
index a98eb44..061f7c4 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -9,7 +9,7 @@ dnl Written for Xfce by Juha Kautto <juha at xfce.org>
 dnl
 
 dnl Version information
-m4_define([orage_version], [4.8.3.0-git])
+m4_define([orage_version], [4.8.3.1-git])
 
 m4_define([gtk_minimum_version], [2.10.0])
 m4_define([xfce_minimum_version], [4.6.0])
diff --git a/src/ical-code.c b/src/ical-code.c
index 70181bf..95fce2a 100644
--- a/src/ical-code.c
+++ b/src/ical-code.c
@@ -2720,6 +2720,17 @@ static alarm_struct *process_alarm_trigger(icalcomponent *c
     per = ic_get_period(c, TRUE);
     next_alarm_time = count_first_alarm_time(per, trg.duration, rel);
     alarm_start_diff = icaltime_subtract(next_alarm_time, per.stime);
+    /* Due to the hack in date time calculation in count_first_alarm_time,
+       we need to set next_alarm_time to local timezone so that 
+       icaltime_compare works. Fix for Bug 8525
+     */
+    if (icaltime_is_date(per.stime)) {
+        if (local_icaltimezone != utc_icaltimezone) {
+            next_alarm_time.is_utc        = 0;
+            next_alarm_time.is_daylight   = 0;
+            next_alarm_time.zone          = local_icaltimezone;
+        }
+    }
     /*
 orage_message(120, P_N "current %s %s", icaltime_as_ical_string(cur_time), icaltime_get_tzid(cur_time));
 orage_message(120, P_N "Start %s %s", icaltime_as_ical_string(per.stime), icaltime_get_tzid(per.stime));
@@ -2791,6 +2802,17 @@ orage_message(120, P_N "Alarm rec loop next_start:%s next_alarm:%s per.stime:%s"
 */
         }
         icalrecur_iterator_free(ri);
+        /* Due to the hack in date time calculation in count_first_alarm_time,
+           we need to set next_alarm_time to local timezone so that 
+           icaltime_compare works. Fix for Bug 8525
+         */
+        if (icaltime_is_date(per.stime)) {
+            if (local_icaltimezone != utc_icaltimezone) {
+                next_alarm_time.is_utc        = 0;
+                next_alarm_time.is_daylight   = 0;
+                next_alarm_time.zone          = local_icaltimezone;
+            }
+        }
         if (icaltime_compare(cur_time, next_alarm_time) <= 0) {
             trg_active = TRUE;
         }


More information about the Xfce4-commits mailing list