[Pkg-xfce-commits] r2936 - in desktop/trunk/orage/debian: . patches

corsac at alioth.debian.org corsac at alioth.debian.org
Sat Mar 7 17:24:12 UTC 2009


Author: corsac
Date: 2009-03-07 17:24:12 +0000 (Sat, 07 Mar 2009)
New Revision: 2936

Added:
   desktop/trunk/orage/debian/patches/01-dont-duplicate.patch
Modified:
   desktop/trunk/orage/debian/changelog
Log:
* Upload to unstable, mark fixed bugs as such:
  - orage now appears in xfce4-settings.                      closes: #493638
* debian/patches:
  - 01-dont-duplicate added, don't import duplicate events.   closes: #517548

Modified: desktop/trunk/orage/debian/changelog
===================================================================
--- desktop/trunk/orage/debian/changelog	2009-03-07 17:19:16 UTC (rev 2935)
+++ desktop/trunk/orage/debian/changelog	2009-03-07 17:24:12 UTC (rev 2936)
@@ -1,3 +1,12 @@
+orage (4.6.0-2) UNRELEASED; urgency=low
+
+  * Upload to unstable, mark fixed bugs as such:
+    - orage now appears in xfce4-settings.                      closes: #493638
+  * debian/patches:
+    - 01-dont-duplicate added, don't import duplicate events.   closes: #517548
+
+ -- Yves-Alexis Perez <corsac at debian.org>  Sat, 07 Mar 2009 18:22:52 +0100
+
 orage (4.6.0-1) experimental; urgency=low
 
   [ Yves-Alexis Perez ]

Added: desktop/trunk/orage/debian/patches/01-dont-duplicate.patch
===================================================================
--- desktop/trunk/orage/debian/patches/01-dont-duplicate.patch	                        (rev 0)
+++ desktop/trunk/orage/debian/patches/01-dont-duplicate.patch	2009-03-07 17:24:12 UTC (rev 2936)
@@ -0,0 +1,76 @@
+--- src/ical-code.c	2009-03-01 21:30:23.000000000 +0100
++++ src/ical-code.c.new	2009-03-01 22:03:31.000000000 +0100
+@@ -3919,14 +3919,50 @@
+     return(TRUE);
+ }
+ 
++icalcomponent *component_with_uid(char *uid)
++{
++    icalcomponent *c1;
++    const char *text;
++
++    if (xfical_file_open(FALSE)) {
++        for (c1 = icalcomponent_get_first_component(ical, ICAL_VEVENT_COMPONENT);
++             c1 != 0;
++             c1 = icalcomponent_get_next_component(ical, ICAL_VEVENT_COMPONENT)) {
++             text = icalcomponent_get_uid(c1);
++
++             if ((ORAGE_STR_EXISTS(text) && strcmp(text, uid) == 0)
++                 && ((icalcomponent_isa(c1) == ICAL_VEVENT_COMPONENT)
++                 || (icalcomponent_isa(c1) == ICAL_VTODO_COMPONENT)
++                 || (icalcomponent_isa(c1) == ICAL_VJOURNAL_COMPONENT))) {
++                     return (c1);
++             }
++        }
++     }
++
++    return (NULL);
++}
++
++icaltimetype component_lmtime(icalcomponent *c)
++{
++    icalproperty *p = NULL;
++    
++for (p = icalcomponent_get_first_property(c, ICAL_ANY_PROPERTY);
++         p != 0;
++         p = icalcomponent_get_next_property(c, ICAL_ANY_PROPERTY)) {
++         if (icalproperty_isa(p) == ICAL_LASTMODIFIED_PROPERTY)
++         return icalvalue_get_datetime(icalproperty_get_value(p));
++         }
++}
++
+ gboolean xfical_import_file(char *file_name)
+ {
+ #undef P_N
+ #define P_N "xfical_import_file: "
+     icalset *file_ical = NULL;
+-    char *ical_file_name = NULL;
+-    icalcomponent *c1, *c2;
++    char *ical_file_name = NULL, *uid = NULL;
++    icalcomponent *c1, *c2, *c3;
+     int cnt1 = 0, cnt2 = 0;
++    icaltimetype ilmtime, elmtime;
+ 
+ #ifdef ORAGE_DEBUG
+     orage_message(-100, P_N);
+@@ -3951,8 +3987,19 @@
+                 if ((icalcomponent_isa(c2) == ICAL_VEVENT_COMPONENT)
+                 ||  (icalcomponent_isa(c2) == ICAL_VTODO_COMPONENT)
+                 ||  (icalcomponent_isa(c2) == ICAL_VJOURNAL_COMPONENT)) {
++                    uid = icalcomponent_get_uid(c2);
++                    c3 = component_with_uid(uid);
+                     cnt2++;
+-                    add_event(c2);
++                    if ( c3 == NULL)
++                        add_event(c2);
++                    else {
++                        ilmtime = component_lmtime(c3);
++                        elmtime = component_lmtime(c2);
++                        if (icaltime_compare(ilmtime, elmtime) < 0) {
++                            xfical_appt_del(g_strconcat("O00.", uid, NULL));   
++                            add_event(c2);
++                        }
++                    }
+                 }
+                 /* we ignore TIMEZONE component; Orage only uses internal
+                  * timezones from libical */




More information about the Pkg-xfce-commits mailing list