commit evolution-ews for openSUSE:Factory
From 6a5a2d75a9484b482546d4ed51fa6488d7e2c95a Mon Sep 17 00:00:00 2001 From: Milan Crha
Date: Fri, 12 Dec 2014 11:14:05 +0100 Subject: Bug 695754 - Reuse existing ESourceRegistry from EMailSession, if
Hello community, here is the log from the commit of package evolution-ews for openSUSE:Factory checked in at 2014-12-17 19:15:42 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/evolution-ews (Old) and /work/SRC/openSUSE:Factory/.evolution-ews.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "evolution-ews" Changes: -------- --- /work/SRC/openSUSE:Factory/evolution-ews/evolution-ews.changes 2014-11-18 22:47:15.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.evolution-ews.new/evolution-ews.changes 2014-12-17 19:14:50.000000000 +0100 @@ -1,0 +2,10 @@ +Sun Dec 14 06:23:48 UTC 2014 - badshah400@gmail.com + +- Update to version 3.12.9: + + Set max-width-chars to wrapped GtkLabel-s. + + Bugs fixed: bgo#738945, bgo#738093, bgo#734747, bgo#740772. +- Add post-release fix from upstream: + + evolution-ews-reuse-from-EmailSession.patch: Reuse existing + ESourceRegistry from EMailSession, if possible (bgo#695754). + +------------------------------------------------------------------- Old: ---- evolution-ews-3.12.8.tar.xz New: ---- evolution-ews-3.12.9.tar.xz evolution-ews-reuse-from-EmailSession.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ evolution-ews.spec ++++++ --- /var/tmp/diff_new_pack.0jFSfP/_old 2014-12-17 19:14:51.000000000 +0100 +++ /var/tmp/diff_new_pack.0jFSfP/_new 2014-12-17 19:14:51.000000000 +0100 @@ -19,13 +19,15 @@ Name: evolution-ews # This should be updated upon major version changes; it should match BASE_VERSION as defined in configure.in. %define evolution_base_version 3.12 -Version: 3.12.8 +Version: 3.12.9 Release: 0 Summary: Exchange Connector for Evolution, compatible with Exchange 2007 and later License: LGPL-2.1 Group: Productivity/Networking/Email/Clients Url: http://projects.gnome.org/evolution/ Source: http://download.gnome.org/sources/evolution-ews/3.12/%{name}-%{version}.tar.xz +# PATCH-FIX-UPSTREAM evolution-ews-reuse-from-EmailSession.patch bgo#695754 badshah400@gmail.com -- Reuse existing ESourceRegistry from EMailSession, if possible; patch taken from upstream git +Patch0: evolution-ews-reuse-from-EmailSession.patch BuildRequires: fdupes BuildRequires: intltool BuildRequires: translation-update-upstream @@ -85,6 +87,7 @@ %lang_package %prep %setup -q +%patch0 -p1 translation-update-upstream %build ++++++ evolution-ews-3.12.8.tar.xz -> evolution-ews-3.12.9.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/evolution-ews-3.12.8/NEWS new/evolution-ews-3.12.9/NEWS --- old/evolution-ews-3.12.8/NEWS 2014-11-10 08:19:24.000000000 +0100 +++ new/evolution-ews-3.12.9/NEWS 2014-12-08 07:25:24.000000000 +0100 @@ -1,3 +1,15 @@ +Evolution-EWS 3.12.9 2014-12-08 +------------------------------- + +Bug Fixes: + Bug 738945 - Missing folder changed notify after message append (Milan Crha) + Bug 738093 - Show folder names with slash properly (Milan Crha) + Bug 734747 - Fails to provide "Eastern Standard Time" timezone (Milan Crha) + Bug 740772 - Use-after-free when adding attachments to events (Milan Crha) + +Miscellaneous: + Set max-width-chars to wrapped GtkLabel-s (Milan Crha) + Evolution-EWS 3.12.8 2014-11-10 ------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/evolution-ews-3.12.8/configure new/evolution-ews-3.12.9/configure --- old/evolution-ews-3.12.8/configure 2014-11-10 08:20:20.000000000 +0100 +++ new/evolution-ews-3.12.9/configure 2014-12-08 07:26:03.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for evolution-ews 3.12.8. +# Generated by GNU Autoconf 2.69 for evolution-ews 3.12.9. # # Report bugs to http://bugzilla.gnome.org/browse.cgi?product=evolution-ews. # @@ -591,8 +591,8 @@ # Identity of this package. PACKAGE_NAME='evolution-ews' PACKAGE_TARNAME='evolution-ews' -PACKAGE_VERSION='3.12.8' -PACKAGE_STRING='evolution-ews 3.12.8' +PACKAGE_VERSION='3.12.9' +PACKAGE_STRING='evolution-ews 3.12.9' PACKAGE_BUGREPORT='http://bugzilla.gnome.org/browse.cgi?product=evolution-ews' PACKAGE_URL='' @@ -1499,7 +1499,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures evolution-ews 3.12.8 to adapt to many kinds of systems. +\`configure' configures evolution-ews 3.12.9 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1569,7 +1569,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of evolution-ews 3.12.8:";; + short | recursive ) echo "Configuration of evolution-ews 3.12.9:";; esac cat <<\_ACEOF @@ -1768,7 +1768,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -evolution-ews configure 3.12.8 +evolution-ews configure 3.12.9 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2137,7 +2137,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by evolution-ews $as_me 3.12.8, which was +It was created by evolution-ews $as_me 3.12.9, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3000,7 +3000,7 @@ # Define the identity of the package. PACKAGE='evolution-ews' - VERSION='3.12.8' + VERSION='3.12.9' cat >>confdefs.h <<_ACEOF @@ -3197,11 +3197,11 @@ # precisely one minor behind [ews_version], then allow building against *that* # version of EDS and Evo. read x NEWSVER y < NEWS -PREVVER=3.12.$(expr 8 - 1) +PREVVER=3.12.$(expr 9 - 1) if test "$PREVVER" = "$NEWSVER"; then EVOREQVER=$PREVVER else - EVOREQVER=3.12.8 + EVOREQVER=3.12.9 fi @@ -16705,7 +16705,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by evolution-ews $as_me 3.12.8, which was +This file was extended by evolution-ews $as_me 3.12.9, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16771,7 +16771,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -evolution-ews config.status 3.12.8 +evolution-ews config.status 3.12.9 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/evolution-ews-3.12.8/configure.ac new/evolution-ews-3.12.9/configure.ac --- old/evolution-ews-3.12.8/configure.ac 2014-10-14 15:47:12.000000000 +0200 +++ new/evolution-ews-3.12.9/configure.ac 2014-11-10 08:23:34.000000000 +0100 @@ -1,7 +1,7 @@ dnl Evolution-EWS version m4_define([ews_major_version], [3]) m4_define([ews_minor_version], [12]) -m4_define([ews_micro_version], [8]) +m4_define([ews_micro_version], [9]) m4_define([ews_version], [ews_major_version.ews_minor_version.ews_micro_version]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/evolution-ews-3.12.8/src/calendar/e-cal-backend-ews-utils.c new/evolution-ews-3.12.9/src/calendar/e-cal-backend-ews-utils.c --- old/evolution-ews-3.12.8/src/calendar/e-cal-backend-ews-utils.c 2014-05-28 13:24:49.000000000 +0200 +++ new/evolution-ews-3.12.9/src/calendar/e-cal-backend-ews-utils.c 2014-11-27 12:55:54.000000000 +0100 @@ -123,13 +123,19 @@ tokens = g_strsplit ((gchar *) ical, " ", 0); tokens_len = g_strv_length (tokens); if (tokens_len == 1) { - g_hash_table_insert (msdn_to_ical, g_strdup ((gchar *) msdn), g_strdup ((gchar *) ical)); - g_hash_table_insert (ical_to_msdn, g_strdup ((gchar *) ical), g_strdup ((gchar *) msdn)); + if (!g_hash_table_lookup (msdn_to_ical, msdn)) + g_hash_table_insert (msdn_to_ical, g_strdup ((gchar *) msdn), g_strdup ((gchar *) ical)); + + if (!g_hash_table_lookup (ical_to_msdn, ical)) + g_hash_table_insert (ical_to_msdn, g_strdup ((gchar *) ical), g_strdup ((gchar *) msdn)); } else { gint j; for (j = 0; j < tokens_len; j++) { - g_hash_table_insert (msdn_to_ical, g_strdup ((gchar *) msdn), g_strdup (tokens[j])); - g_hash_table_insert (ical_to_msdn, g_strdup (tokens[j]), g_strdup ((gchar *) msdn)); + if (!g_hash_table_lookup (msdn_to_ical, msdn)) + g_hash_table_insert (msdn_to_ical, g_strdup ((gchar *) msdn), g_strdup (tokens[j])); + + if (!g_hash_table_lookup (ical_to_msdn, tokens[j])) + g_hash_table_insert (ical_to_msdn, g_strdup (tokens[j]), g_strdup ((gchar *) msdn)); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/evolution-ews-3.12.8/src/calendar/e-cal-backend-ews.c new/evolution-ews-3.12.9/src/calendar/e-cal-backend-ews.c --- old/evolution-ews-3.12.8/src/calendar/e-cal-backend-ews.c 2014-11-06 14:28:31.000000000 +0100 +++ new/evolution-ews-3.12.9/src/calendar/e-cal-backend-ews.c 2014-11-27 12:56:11.000000000 +0100 @@ -443,6 +443,41 @@ edad); } +static gchar * +cal_backend_ews_get_builtin_zone_object (const gchar *tzid) +{ + icalcomponent *icalcomp = NULL, *free_comp = NULL; + icaltimezone *zone; + gchar *object = NULL; + + zone = icaltimezone_get_builtin_timezone (tzid); + if (!zone) { + icalcomp = free_comp = icaltzutil_fetch_timezone (tzid); + } + + if (zone) + icalcomp = icaltimezone_get_component (zone); + + if (icalcomp) { + icalcomponent *clone = icalcomponent_new_clone (icalcomp); + icalproperty *prop; + + prop = icalcomponent_get_first_property (clone, ICAL_TZID_PROPERTY); + if (prop) { + /* change tzid to our, because the component has the buildin tzid */ + icalproperty_set_tzid (prop, tzid); + + object = icalcomponent_as_ical_string_r (clone); + } + icalcomponent_free (clone); + } + + if (free_comp) + icalcomponent_free (free_comp); + + return object; +} + static void e_cal_backend_ews_get_timezone (ECalBackend *backend, EDataCal *cal, @@ -476,37 +511,21 @@ slashes++; } - if (slashes == 1) { - icalcomponent *icalcomp = NULL, *free_comp = NULL; - - icaltimezone *zone = icaltimezone_get_builtin_timezone (tzid); - if (!zone) { - icalcomp = free_comp = icaltzutil_fetch_timezone (tzid); - } - - if (zone) - icalcomp = icaltimezone_get_component (zone); - - if (icalcomp) { - icalcomponent *clone = icalcomponent_new_clone (icalcomp); - icalproperty *prop; - - prop = icalcomponent_get_first_property (clone, ICAL_TZID_PROPERTY); - if (prop) { - /* change tzid to our, because the component has the buildin tzid */ - icalproperty_set_tzid (prop, tzid); + if (slashes == 1) + object = cal_backend_ews_get_builtin_zone_object (tzid); - object = icalcomponent_as_ical_string_r (clone); - g_clear_error (&error); - } - icalcomponent_free (clone); + if (!object) { + /* The timezone can be sometimes the Windows zone, try to convert it to libical */ + const gchar *ical_location = e_cal_backend_ews_tz_util_get_ical_equivalent (tzid); + if (ical_location) { + object = cal_backend_ews_get_builtin_zone_object (ical_location); } - - if (free_comp) - icalcomponent_free (free_comp); } } + if (!object && !error) + g_propagate_error (&error, e_data_cal_create_error (ObjectNotFound, NULL)); + convert_error_to_edc_error (&error); e_data_cal_respond_get_timezone (cal, context, error, object); g_free (object); @@ -1300,6 +1319,8 @@ if (error != NULL) g_clear_error (&error); + e_cal_backend_ews_async_data_free (create_data); + return; } @@ -1345,7 +1366,7 @@ modify_data->extra_comp = g_object_ref (create_data->extra_comp); modify_data->cal = g_object_ref (create_data->cal); modify_data->context = create_data->context; - modify_data->item_id = create_data->item_id; + modify_data->item_id = g_strdup (create_data->item_id); convert_data.connection = create_data->cbews->priv->cnc; convert_data.user_email = create_data->cbews->priv->user_email; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/evolution-ews-3.12.8/src/calendar/windowsZones.xml new/evolution-ews-3.12.9/src/calendar/windowsZones.xml --- old/evolution-ews-3.12.8/src/calendar/windowsZones.xml 2014-03-24 10:28:36.000000000 +0100 +++ new/evolution-ews-3.12.9/src/calendar/windowsZones.xml 2014-11-27 12:55:54.000000000 +0100 @@ -471,7 +471,7 @@ <mapZone other="Pakistan Standard Time" territory="PK" type="Asia/Karachi"/> <!-- (UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi --> - <mapZone other="India Standard Time" territory="001" type="Asia/Calcutta"/> + <mapZone other="India Standard Time" territory="001" type="Asia/Kolkata"/> <mapZone other="India Standard Time" territory="IN" type="Asia/Calcutta"/> <!-- (UTC+05:30) Sri Jayawardenepura --> @@ -648,13 +648,6 @@ <!-- (UTC+13:00) Samoa --> <mapZone other="Samoa Standard Time" territory="001" type="Pacific/Apia"/> <mapZone other="Samoa Standard Time" territory="WS" type="Pacific/Apia"/> - - <!-- Internal fixes --> - <mapZone other="Argentina Standard Time" territory="AR" type="America/Argentina/Buenos_Aires America/Argentina/Cordoba America/Argentina/Jujuy America/Argentina/Catamarca America/Argentina/Mendoza"/> - <mapZone other="India Standard Time" territory="IN" type="Asia/Kolkata"/> - <mapZone other="Nepal Standard Time" territory="NP" type="Asia/Kathmandu"/> - <mapZone other="Eastern Standard Time" territory="US" type="America/Kentucky/Louisville"/> - <mapZone other="US Eastern Standard Time" territory="US" type="America/Indiana/Indianapolis"/> </mapTimezones> </windowsZones> </supplementalData> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/evolution-ews-3.12.8/src/camel/camel-ews-folder.c new/evolution-ews-3.12.9/src/camel/camel-ews-folder.c --- old/evolution-ews-3.12.8/src/camel/camel-ews-folder.c 2014-09-01 15:54:39.000000000 +0200 +++ new/evolution-ews-3.12.9/src/camel/camel-ews-folder.c 2014-11-11 16:10:15.000000000 +0100 @@ -1884,7 +1884,18 @@ e_ews_folder_id_free (fid); g_free (folder_id); - camel_ews_summary_add_message (folder->summary, itemid, changekey, info, message); + if (camel_ews_summary_add_message (folder->summary, itemid, changekey, info, message)) { + CamelFolderChangeInfo *changes; + + changes = camel_folder_change_info_new (); + + camel_folder_change_info_add_uid (changes, itemid); + + if (camel_folder_change_info_changed (changes)) + camel_folder_changed (folder, changes); + + camel_folder_change_info_free (changes); + } if (appended_uid) *appended_uid = itemid; @@ -2008,8 +2019,8 @@ clone = camel_message_info_clone (info); - camel_ews_summary_add_message (destination->summary, id->id, id->change_key, clone, message); - camel_folder_change_info_add_uid (changes, id->id); + if (camel_ews_summary_add_message (destination->summary, id->id, id->change_key, clone, message)) + camel_folder_change_info_add_uid (changes, id->id); camel_message_info_unref (clone); camel_message_info_unref (info); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/evolution-ews-3.12.8/src/camel/camel-ews-store-summary.c new/evolution-ews-3.12.9/src/camel/camel-ews-store-summary.c --- old/evolution-ews-3.12.8/src/camel/camel-ews-store-summary.c 2014-09-01 16:50:38.000000000 +0200 +++ new/evolution-ews-3.12.9/src/camel/camel-ews-store-summary.c 2014-11-19 19:06:36.000000000 +0100 @@ -14,7 +14,7 @@ #define S_UNLOCK(x) (g_rec_mutex_unlock(&(x)->priv->s_lock)) #define STORE_GROUP_NAME "##storepriv" -#define CURRENT_SUMMARY_VERSION 1 +#define CURRENT_SUMMARY_VERSION 2 struct _CamelEwsStoreSummaryPrivate { GKeyFile *key_file; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/evolution-ews-3.12.8/src/camel/camel-ews-store.c new/evolution-ews-3.12.9/src/camel/camel-ews-store.c --- old/evolution-ews-3.12.8/src/camel/camel-ews-store.c 2014-08-11 09:12:45.000000000 +0200 +++ new/evolution-ews-3.12.9/src/camel/camel-ews-store.c 2014-11-19 19:06:36.000000000 +0100 @@ -1982,7 +1982,7 @@ g_return_val_if_fail (folder != NULL, NULL); g_return_val_if_fail (folders_by_id != NULL, NULL); - full_name = g_string_new (e_ews_folder_get_name (folder)); + full_name = g_string_new (e_ews_folder_get_escaped_name (folder)); while (folder) { parent_fid = e_ews_folder_get_parent_id (folder); if (!parent_fid || !parent_fid->id) @@ -1991,7 +1991,7 @@ folder = g_hash_table_lookup (folders_by_id, parent_fid->id); if (folder) { g_string_prepend (full_name, "/"); - g_string_prepend (full_name, e_ews_folder_get_name (folder)); + g_string_prepend (full_name, e_ews_folder_get_escaped_name (folder)); } } @@ -3248,10 +3248,10 @@ g_return_val_if_fail (parent_name != NULL, FALSE); - tmp = g_strconcat (parent_name, "/", e_ews_folder_get_name (folder), NULL); + tmp = g_strconcat (parent_name, "/", e_ews_folder_get_escaped_name (folder), NULL); g_free (parent_name); } else { - tmp = g_strconcat (EWS_PUBLIC_FOLDER_ROOT_DISPLAY_NAME, "/", e_ews_folder_get_name (folder), NULL); + tmp = g_strconcat (EWS_PUBLIC_FOLDER_ROOT_DISPLAY_NAME, "/", e_ews_folder_get_escaped_name (folder), NULL); } if (e_ews_folder_get_folder_type (folder) != E_EWS_FOLDER_TYPE_MAILBOX) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/evolution-ews-3.12.8/src/camel/camel-ews-summary.c new/evolution-ews-3.12.9/src/camel/camel-ews-summary.c --- old/evolution-ews-3.12.8/src/camel/camel-ews-summary.c 2014-03-26 17:01:45.000000000 +0100 +++ new/evolution-ews-3.12.9/src/camel/camel-ews-summary.c 2014-11-11 16:10:15.000000000 +0100 @@ -273,7 +273,7 @@ return CAMEL_FOLDER_SUMMARY_CLASS (camel_ews_summary_parent_class)->info_set_flags (info, flags, set); } -void +gboolean camel_ews_summary_add_message (CamelFolderSummary *summary, const gchar *uid, const gchar *change_key, @@ -284,13 +284,13 @@ const CamelFlag *flag; const CamelTag *tag; - g_return_if_fail (uid != NULL); - g_return_if_fail (info != NULL); - g_return_if_fail (message != NULL); + g_return_val_if_fail (uid != NULL, FALSE); + g_return_val_if_fail (info != NULL, FALSE); + g_return_val_if_fail (message != NULL, FALSE); /* Create summary entry */ mi = (CamelEwsMessageInfo *) camel_folder_summary_info_new_from_message (summary, message, NULL); - g_return_if_fail (mi != NULL); + g_return_val_if_fail (mi != NULL, FALSE); /* Set the change_key */ mi->change_key = g_strdup (change_key); @@ -317,6 +317,8 @@ camel_folder_summary_add (summary, (CamelMessageInfo *) mi); camel_folder_summary_touch (summary); camel_folder_summary_save_to_db (summary, NULL); + + return TRUE; } static gboolean diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/evolution-ews-3.12.8/src/camel/camel-ews-summary.h new/evolution-ews-3.12.9/src/camel/camel-ews-summary.h --- old/evolution-ews-3.12.8/src/camel/camel-ews-summary.h 2014-05-07 12:49:13.000000000 +0200 +++ new/evolution-ews-3.12.9/src/camel/camel-ews-summary.h 2014-11-11 16:10:15.000000000 +0100 @@ -88,7 +88,8 @@ CamelMessageInfo *info, guint32 server_flags, CamelFlag *server_user_flags); -void camel_ews_summary_add_message (CamelFolderSummary *summary, +gboolean + camel_ews_summary_add_message (CamelFolderSummary *summary, const gchar *uid, const gchar *change_key, CamelMessageInfo *info, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/evolution-ews-3.12.8/src/camel/camel-ews-utils.c new/evolution-ews-3.12.9/src/camel/camel-ews-utils.c --- old/evolution-ews-3.12.8/src/camel/camel-ews-utils.c 2014-09-01 15:54:39.000000000 +0200 +++ new/evolution-ews-3.12.9/src/camel/camel-ews-utils.c 2014-11-19 19:06:36.000000000 +0100 @@ -48,6 +48,7 @@ { CamelEwsStoreSummary *ews_summary = store->summary; CamelFolderInfo *fi; + gchar *folder_name; fi = camel_folder_info_new (); fi->full_name = camel_ews_store_summary_get_folder_full_name ( @@ -60,14 +61,14 @@ return NULL; } - fi->display_name = camel_ews_store_summary_get_folder_name ( - ews_summary, fid, NULL); - fi->flags = camel_ews_store_summary_get_folder_flags ( - ews_summary, fid, NULL); - fi->unread = camel_ews_store_summary_get_folder_unread ( - ews_summary, fid, NULL); - fi->total = camel_ews_store_summary_get_folder_total ( - ews_summary, fid, NULL); + folder_name = camel_ews_store_summary_get_folder_name (ews_summary, fid, NULL); + + fi->display_name = e_ews_folder_utils_unescape_name (folder_name); + fi->flags = camel_ews_store_summary_get_folder_flags (ews_summary, fid, NULL); + fi->unread = camel_ews_store_summary_get_folder_unread (ews_summary, fid, NULL); + fi->total = camel_ews_store_summary_get_folder_total (ews_summary, fid, NULL); + + g_free (folder_name); if (!(fi->flags & CAMEL_FOLDER_TYPE_MASK)) { switch (camel_ews_store_summary_get_folder_type (ews_summary, fid, NULL)) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/evolution-ews-3.12.8/src/configuration/e-ews-subscribe-foreign-folder.c new/evolution-ews-3.12.9/src/configuration/e-ews-subscribe-foreign-folder.c --- old/evolution-ews-3.12.8/src/configuration/e-ews-subscribe-foreign-folder.c 2014-03-24 10:28:36.000000000 +0100 +++ new/evolution-ews-3.12.9/src/configuration/e-ews-subscribe-foreign-folder.c 2014-11-19 19:06:36.000000000 +0100 @@ -124,8 +124,11 @@ CAMEL_FOLDER_SUBSCRIBED, e_ews_folder_get_total_count (folder), TRUE, FALSE); } else { const gchar *displayname; + gchar *escaped_name; - fullname = g_strdup_printf ("%s/%s/%s", EWS_FOREIGN_FOLDER_ROOT_DISPLAY_NAME, mailbox, display_foldername); + escaped_name = e_ews_folder_utils_escape_name (display_foldername); + fullname = g_strdup_printf ("%s/%s/%s", EWS_FOREIGN_FOLDER_ROOT_DISPLAY_NAME, mailbox, escaped_name); + g_free (escaped_name); /* make sure the path is unique */ camel_ews_store_ensure_unique_path (ews_store, &fullname); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/evolution-ews-3.12.8/src/configuration/e-mail-config-ews-delegates-page.c new/evolution-ews-3.12.9/src/configuration/e-mail-config-ews-delegates-page.c --- old/evolution-ews-3.12.8/src/configuration/e-mail-config-ews-delegates-page.c 2014-07-24 09:01:11.000000000 +0200 +++ new/evolution-ews-3.12.9/src/configuration/e-mail-config-ews-delegates-page.c 2014-11-25 08:30:58.000000000 +0100 @@ -1123,6 +1123,7 @@ "responding to meeting requests. If you want to grant folder " "permissions without giving send-on-behalf-of permissions, close this " "dialog box, right-click the folder, click Permissions and change the options there.")); + gtk_label_set_max_width_chars (GTK_LABEL (widget), 80); gtk_label_set_line_wrap (GTK_LABEL (widget), TRUE); gtk_misc_set_alignment (GTK_MISC (widget), 0.0, 0.5); gtk_grid_attach (grid, widget, 0, row, 2, 1); @@ -1170,6 +1171,7 @@ widget = gtk_label_new ( _("Deliver meeting requests addressed to me and responses to meeting " "requests where I am the organizer to:")); + gtk_label_set_max_width_chars (GTK_LABEL (widget), 80); gtk_label_set_line_wrap (GTK_LABEL (widget), TRUE); gtk_misc_set_alignment (GTK_MISC (widget), 0.0, 0.5); gtk_grid_attach (grid, widget, 0, row, 2, 1); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/evolution-ews-3.12.8/src/configuration/e-mail-config-ews-ooo-page.c new/evolution-ews-3.12.9/src/configuration/e-mail-config-ews-ooo-page.c --- old/evolution-ews-3.12.8/src/configuration/e-mail-config-ews-ooo-page.c 2014-10-10 10:50:17.000000000 +0200 +++ new/evolution-ews-3.12.9/src/configuration/e-mail-config-ews-ooo-page.c 2014-11-25 08:30:58.000000000 +0100 @@ -448,6 +448,7 @@ text = _("The messages specified below will be automatically sent to " "each internal and external person who sends a mail to you."); widget = gtk_label_new (text); + gtk_label_set_max_width_chars (GTK_LABEL (widget), 80); gtk_label_set_line_wrap (GTK_LABEL (widget), TRUE); gtk_misc_set_alignment (GTK_MISC (widget), 0.0, 0.5); gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/evolution-ews-3.12.8/src/server/e-ews-folder.c new/evolution-ews-3.12.9/src/server/e-ews-folder.c --- old/evolution-ews-3.12.8/src/server/e-ews-folder.c 2014-09-01 16:50:38.000000000 +0200 +++ new/evolution-ews-3.12.9/src/server/e-ews-folder.c 2014-11-19 19:06:36.000000000 +0100 @@ -38,6 +38,7 @@ struct _EEwsFolderPrivate { GError *error; gchar *name; + gchar *escaped_name; EwsFolderId *fid; EwsFolderId *parent_fid; EEwsFolderType folder_type; @@ -75,6 +76,9 @@ priv->name = NULL; } + g_free (priv->escaped_name); + priv->escaped_name = NULL; + if (priv->fid) { g_free (priv->fid->id); g_free (priv->fid->change_key); @@ -184,8 +188,10 @@ } subparam = e_soap_parameter_get_first_child_by_name (node, "DisplayName"); - if (subparam) + if (subparam) { priv->name = e_soap_parameter_get_string_value (subparam); + priv->escaped_name = e_ews_folder_utils_escape_name (priv->name); + } subparam = e_soap_parameter_get_first_child_by_name (node, "UnreadCount"); if (subparam) @@ -381,7 +387,18 @@ priv = folder->priv; g_free (priv->name); + g_free (priv->escaped_name); + priv->name = g_strdup (new_name); + priv->escaped_name = e_ews_folder_utils_escape_name (priv->name); +} + +const gchar * +e_ews_folder_get_escaped_name (const EEwsFolder *folder) +{ + g_return_val_if_fail (E_IS_EWS_FOLDER (folder), NULL); + + return folder->priv->escaped_name; } const EwsFolderId * @@ -486,6 +503,70 @@ folder->priv->foreign = is_foreign; } +/* escapes backslashes with \5C and forward slashes with \2F */ +gchar * +e_ews_folder_utils_escape_name (const gchar *folder_name) +{ + gint ii, jj, count = 0; + gchar *res; + + if (!folder_name) + return NULL; + + for (ii = 0; folder_name[ii]; ii++) { + if (folder_name[ii] == '\\' || folder_name[ii] == '/') + count++; + } + + if (!count) + return g_strdup (folder_name); + + res = g_malloc0 (sizeof (gchar *) * (1 + ii + (2 * count))); + for (ii = 0, jj = 0; folder_name[ii]; ii++, jj++) { + if (folder_name[ii] == '\\') { + res[jj] = '\\'; + res[jj + 1] = '5'; + res[jj + 2] = 'C'; + jj += 2; + } else if (folder_name[ii] == '/') { + res[jj] = '\\'; + res[jj + 1] = '2'; + res[jj + 2] = 'F'; + jj += 2; + } else { + res[jj] = folder_name[ii]; + } + } + + res[jj] = '\0'; + + return res; +} + +/* reverses e_ews_folder_utils_escape_name() processing */ +gchar * +e_ews_folder_utils_unescape_name (const gchar *escaped_folder_name) +{ + gchar *res = g_strdup (escaped_folder_name); + gint ii, jj; + + if (!res) + return res; + + for (ii = 0, jj = 0; res[ii]; ii++, jj++) { + if (res[ii] == '\\' && g_ascii_isxdigit (res[ii + 1]) && g_ascii_isxdigit (res[ii + 2])) { + res[jj] = ((g_ascii_xdigit_value (res[ii + 1]) & 0xF) << 4) | (g_ascii_xdigit_value (res[ii + 2]) & 0xF); + ii += 2; + } else if (ii != jj) { + res[jj] = res[ii]; + } + } + + res[jj] = '\0'; + + return res; +} + gchar * e_ews_folder_utils_pick_color_spec (gint move_by, gboolean around_middle) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/evolution-ews-3.12.8/src/server/e-ews-folder.h new/evolution-ews-3.12.9/src/server/e-ews-folder.h --- old/evolution-ews-3.12.8/src/server/e-ews-folder.h 2014-03-24 10:28:36.000000000 +0100 +++ new/evolution-ews-3.12.9/src/server/e-ews-folder.h 2014-11-19 19:06:36.000000000 +0100 @@ -63,6 +63,7 @@ const GError * e_ews_folder_get_error (const EEwsFolder *folder); const gchar * e_ews_folder_get_name (const EEwsFolder *folder); void e_ews_folder_set_name (EEwsFolder *folder, const gchar *new_name); +const gchar * e_ews_folder_get_escaped_name (const EEwsFolder *folder); void e_ews_folder_set_parent_id (EEwsFolder *folder, EwsFolderId *fid); const EwsFolderId * e_ews_folder_get_parent_id (const EEwsFolder *folder); @@ -87,6 +88,9 @@ const EwsFolderId *b, gboolean check_change_key); +gchar * e_ews_folder_utils_escape_name (const gchar *folder_name); +gchar * e_ews_folder_utils_unescape_name (const gchar *escaped_folder_name); + typedef enum { E_EWS_ESOURCE_FLAG_NONE = 0, E_EWS_ESOURCE_FLAG_INCLUDE_SUBFOLDERS = 1 << 0, ++++++ evolution-ews-reuse-from-EmailSession.patch ++++++ possible Using a new ESourceRegistry and freeing is slightly afterwards could left some unfinished operations in the sourec registry's main_context. A change for this lands in evolution-data-server, but better to change also evolution-ews, to not create the source registry when not necessary. diff --git a/src/camel/camel-ews-store.c b/src/camel/camel-ews-store.c index ad82405..5cd46dc 100644 --- a/src/camel/camel-ews-store.c +++ b/src/camel/camel-ews-store.c @@ -1603,12 +1603,19 @@ static void ews_store_maybe_update_sent_and_drafts (CamelEwsStore *ews_store, /* const */ GSList *ews_folders) { + CamelSession *session; ESourceRegistry *registry; ESource *sibling, *source = NULL; g_return_if_fail (CAMEL_IS_EWS_STORE (ews_store)); - registry = e_source_registry_new_sync (NULL, NULL); + session = camel_service_ref_session (CAMEL_SERVICE (ews_store)); + if (session && E_IS_MAIL_SESSION (session)) + registry = g_object_ref (e_mail_session_get_registry (E_MAIL_SESSION (session))); + else + registry = e_source_registry_new_sync (NULL, NULL); + g_clear_object (&session); + g_return_if_fail (registry != NULL); sibling = e_source_registry_ref_source (registry, camel_service_get_uid (CAMEL_SERVICE (ews_store))); -- cgit v0.10.1 -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de