evolution-scalix r85 - in trunk: . calendar eplugin m4



Author: psuwalski
Date: Sun Jun  8 02:28:23 2008
New Revision: 85
URL: http://svn.gnome.org/viewvc/evolution-scalix?rev=85&view=rev

Log:
Copying from SCALIX branch commit #84. Adds Gnome 2.22, Evolution 2.22, 
and libical memory management support.


Modified:
   trunk/ChangeLog
   trunk/calendar/e-cal-backend-scalix.c
   trunk/calendar/fb-utils.c
   trunk/configure.in
   trunk/eplugin/scalix-account-setup.c
   trunk/m4/intltool.m4

Modified: trunk/calendar/e-cal-backend-scalix.c
==============================================================================
--- trunk/calendar/e-cal-backend-scalix.c	(original)
+++ trunk/calendar/e-cal-backend-scalix.c	Sun Jun  8 02:28:23 2008
@@ -616,6 +616,10 @@
     scalix_container_set_freebusy (priv->container, calobj);
     g_free (account_address);
 
+#ifdef HANDLE_LIBICAL_MEMORY
+    g_free (calobj);
+#endif
+
     priv->fb_is_updating = FALSE;
 }
 
@@ -1121,6 +1125,7 @@
     ScalixObject *old_object = NULL, *new_object;
     struct icaltimetype current;
     icaltimezone *zone = NULL;
+    char *icalstring;
 #if EAPI_CHECK_VERSION (2,6)
     ECalComponentId *id = NULL;
 #endif
@@ -1160,10 +1165,14 @@
         icalcomponent_get_first_component (toplevel_comp,
                                            ICAL_VTIMEZONE_COMPONENT);
     while (subcomp) {
-        add_timezone (backend, cal, icalcomponent_as_ical_string (subcomp));
+        icalstring = icalcomponent_as_ical_string (subcomp);
+        add_timezone (backend, cal, icalstring);
         subcomp =
             icalcomponent_get_next_component (toplevel_comp,
                                               ICAL_VTIMEZONE_COMPONENT);
+#ifdef HANDLE_LIBICAL_MEMORY
+        g_free (icalstring);
+#endif
     }
 
     /* create a list of components we can remove */
@@ -1365,6 +1374,10 @@
   error:
     g_object_unref (old_object);
     g_list_free (comps);
+
+#ifdef HANDLE_LIBICAL_MEMORY
+    g_free (toplevel_comp_str);
+#endif
     
 #if EAPI_CHECK_VERSION (2,6)
     if (id != NULL) {
@@ -1431,6 +1444,10 @@
     response = scalix_container_get_freebusy (priv->container, request);
     icalcomponent_free (fb_comp);
 
+#ifdef HANDLE_LIBICAL_MEMORY
+    g_free (request);
+#endif
+
     if (response == NULL) {
         return GNOME_Evolution_Calendar_OtherError;
     }
@@ -1477,6 +1494,10 @@
         entry = icalcomponent_as_ical_string (subcomp);
         *freebusy = g_list_prepend (*freebusy, g_strdup (entry));
         subcomp = icalcomponent_get_next_component (fb_comp, kind);
+
+#ifdef HANDLE_LIBICAL_MEMORY
+        g_free (entry);
+#endif
     }
 
     g_free (account_address);
@@ -1525,7 +1546,11 @@
         return GNOME_Evolution_Calendar_InvalidObject;
     }
 
-    *object = g_strdup (icalcomponent_as_ical_string (icalcomp));
+    out = icalcomponent_as_ical_string (icalcomp);
+    *object = g_strdup (out);
+#ifdef HANDLE_LIBICAL_MEMORY
+    g_free (out);
+#endif
 
     return GNOME_Evolution_Calendar_Success;
 }
@@ -1562,6 +1587,10 @@
                                          g_strdup (tzid), g_strdup (zstr));
                     res = GNOME_Evolution_Calendar_Success;
                 }
+
+#ifdef HANDLE_LIBICAL_MEMORY
+                g_free (zstr);
+#endif
             }
             icaltimezone_free (zone, TRUE);
         }
@@ -1608,6 +1637,10 @@
     if (tzid && zstr) {
         g_hash_table_insert (timezones, g_strdup (tzid), g_strdup (zstr));
     }
+
+#ifdef HANDLE_LIBICAL_MEMORY
+    g_free (zstr);
+#endif
 }
 
 static gpointer

Modified: trunk/calendar/fb-utils.c
==============================================================================
--- trunk/calendar/fb-utils.c	(original)
+++ trunk/calendar/fb-utils.c	Sun Jun  8 02:28:23 2008
@@ -69,6 +69,7 @@
     icalparameter_fbtype fbtype;
     struct icalperiodtype ipt;
     int i, j, len;
+    char *temp;
 
     fb_entries = g_array_new (FALSE, FALSE, sizeof (struct FBEntry));
     fb_entries_new = g_array_new (FALSE, FALSE, sizeof (struct FBEntry));
@@ -258,11 +259,17 @@
         else
             param = NULL;       /* FIXME (carsten) */
 
-        period_string = g_string_new (icaltime_as_ical_string (fb_entry.start));
+        temp = icaltime_as_ical_string (fb_entry.start);
+        period_string = g_string_new (temp);
+#ifdef HANDLE_LIBICAL_MEMORY
+        g_free (temp);
+#endif
         period_string = g_string_append (period_string, "/");
-        period_string =
-            g_string_append (period_string,
-                             icaltime_as_ical_string (fb_entry.end));
+        temp = icaltime_as_ical_string (fb_entry.end);
+        period_string = g_string_append (period_string, temp);
+#ifdef HANDLE_LIBICAL_MEMORY
+        g_free (temp);
+#endif
         ipt = icalperiodtype_from_string (period_string->str);
         g_string_free (period_string, TRUE);
 

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Sun Jun  8 02:28:23 2008
@@ -106,6 +106,15 @@
 	EDS_API_VERSION=1.2
 	;;
 
+	2.22)
+	EVOLUTION_API_VERSION=2.22
+	EAPI_MAJOR_VERSION=2
+	EAPI_MINOR_VERSION=22
+	CAMEL_API_VERSION=1.2
+	EDS_API_VERSION=1.2
+	CFLAGS="$CFLAGS -DHANDLE_LIBICAL_MEMORY"
+	;;
+
 esac
 
 AC_SUBST(EVOLUTION_VERSION)
@@ -255,7 +264,7 @@
 AC_SUBST(LIBXML_CFLAGS)
 
 dnl === Timezone checks ===============
-dnl stolen form e-d-s
+dnl stolen from e-d-s
 AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,
 	AC_TRY_COMPILE([
 		#include <time.h>

Modified: trunk/eplugin/scalix-account-setup.c
==============================================================================
--- trunk/eplugin/scalix-account-setup.c	(original)
+++ trunk/eplugin/scalix-account-setup.c	Sun Jun  8 02:28:23 2008
@@ -44,6 +44,8 @@
 #include <libedataserver/e-account-list.h>
 #include <libedataserverui/e-passwords.h>
 
+/* FIXME: Evolution still uses GnomeDruid. This is considered deprecated. */
+#undef GNOME_DISABLE_DEPRECATED
 #include <libgnomeui/gnome-druid.h>
 #include <libgnomeui/gnome-druid-page-standard.h>
 

Modified: trunk/m4/intltool.m4
==============================================================================
--- trunk/m4/intltool.m4	(original)
+++ trunk/m4/intltool.m4	Sun Jun  8 02:28:23 2008
@@ -23,7 +23,7 @@
 ## the same distribution terms that you use for the rest of that program.
 
 dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
-# serial 35 IT_PROG_INTLTOOL
+# serial 36 IT_PROG_INTLTOOL
 AC_DEFUN([IT_PROG_INTLTOOL],
 [AC_PREREQ([2.50])dnl
 
@@ -36,7 +36,7 @@
 esac
 
 if test -n "$1"; then
-    AC_MSG_CHECKING(for intltool >= $1)
+    AC_MSG_CHECKING([for intltool >= $1])
 
     INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
     INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`
@@ -65,6 +65,7 @@
   INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
     INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
     INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+   INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
 
 AC_SUBST(INTLTOOL_DESKTOP_RULE)
 AC_SUBST(INTLTOOL_DIRECTORY_RULE)
@@ -84,6 +85,21 @@
 AC_SUBST(INTLTOOL_SCHEMAS_RULE)
 AC_SUBST(INTLTOOL_THEME_RULE)
 AC_SUBST(INTLTOOL_SERVICE_RULE)
+AC_SUBST(INTLTOOL_POLICY_RULE)
+
+# Check the gettext tools to make sure they are GNU
+AC_PATH_PROG(XGETTEXT, xgettext)
+AC_PATH_PROG(MSGMERGE, msgmerge)
+AC_PATH_PROG(MSGFMT, msgfmt)
+if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
+    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
+fi
+xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
+mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
+mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
+if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
+    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
+fi
 
 # Use the tools built into the package, not the ones that are installed.
 AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract')
@@ -106,19 +122,16 @@
    fi
 fi
 
-AC_PATH_PROG(INTLTOOL_ICONV, iconv, iconv)
-AC_PATH_PROG(INTLTOOL_MSGFMT, msgfmt, msgfmt)
-AC_PATH_PROG(INTLTOOL_MSGMERGE, msgmerge, msgmerge)
-AC_PATH_PROG(INTLTOOL_XGETTEXT, xgettext, xgettext)
-
 # Substitute ALL_LINGUAS so we can use it in po/Makefile
 AC_SUBST(ALL_LINGUAS)
 
 # Set DATADIRNAME correctly if it is not set yet
 # (copied from glib-gettext.m4)
 if test -z "$DATADIRNAME"; then
-  AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
-                 return _nl_msg_cat_cntr],
+  AC_LINK_IFELSE(
+    [AC_LANG_PROGRAM([[]],
+                     [[extern int _nl_msg_cat_cntr;
+                       return _nl_msg_cat_cntr]])],
     [DATADIRNAME=share],
     [case $host in
     *-*-solaris*)
@@ -159,10 +172,6 @@
 for file in intltool-extract intltool-merge intltool-update; do
   sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
       -e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
-      -e "s|@INTLTOOL_ICONV@|${INTLTOOL_ICONV}|g" \
-      -e "s|@INTLTOOL_MSGFMT@|${INTLTOOL_MSGFMT}|g" \
-      -e "s|@INTLTOOL_MSGMERGE@|${INTLTOOL_MSGMERGE}|g" \
-      -e "s|@INTLTOOL_XGETTEXT@|${INTLTOOL_XGETTEXT}|g" \
       -e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
 	< ${ac_aux_dir}/${file}.in > ${file}.out
   if cmp -s ${file} ${file}.out 2>/dev/null; then
@@ -177,9 +186,7 @@
 ],
 [INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
 prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir" 
-INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' INTLTOOL_ICONV='${INTLTOOL_ICONV}'
-INTLTOOL_MSGFMT='${INTLTOOL_MSGFMT}' INTLTOOL_MSGMERGE='${INTLTOOL_MSGMERGE}'
-INTLTOOL_XGETTEXT='${INTLTOOL_XGETTEXT}'])
+INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}'])
 
 ])
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]