Hello community,

here is the log from the commit of package evolution-ews for openSUSE:Factory 
checked in at 2017-10-06 10:56:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/evolution-ews (Old)
 and      /work/SRC/openSUSE:Factory/.evolution-ews.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "evolution-ews"

Fri Oct  6 10:56:28 2017 rev:77 rq:531087 version:3.26.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/evolution-ews/evolution-ews.changes      
2017-09-13 21:49:06.755678636 +0200
+++ /work/SRC/openSUSE:Factory/.evolution-ews.new/evolution-ews.changes 
2017-10-06 10:56:30.052388166 +0200
@@ -1,0 +2,7 @@
+Mon Oct  2 18:41:18 UTC 2017 - zai...@opensuse.org
+
+- Update to version 3.26.1:
+  + Escape spaces in server Categories for message Labels.
+  + Bugs fixed: bgo#786208.
+
+-------------------------------------------------------------------

Old:
----
  evolution-ews-3.26.0.tar.xz

New:
----
  evolution-ews-3.26.1.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ evolution-ews.spec ++++++
--- /var/tmp/diff_new_pack.WgKBHV/_old  2017-10-06 10:56:30.668295064 +0200
+++ /var/tmp/diff_new_pack.WgKBHV/_new  2017-10-06 10:56:30.672294459 +0200
@@ -17,10 +17,10 @@
 
 
 Name:           evolution-ews
-Version:        3.26.0
+Version:        3.26.1
+Release:        0
 # _version needs to be %{version} stripped to major.minor.micro only...
 %define _version %(echo %{version} | grep -E -o '[0-9]+\.[0-9]+\.[0-9]+')
-Release:        0
 Summary:        Exchange Connector for Evolution, compatible with Exchange 
2007 and later
 License:        LGPL-2.1
 Group:          Productivity/Networking/Email/Clients

++++++ evolution-ews-3.26.0.tar.xz -> evolution-ews-3.26.1.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/evolution-ews-3.26.0/CMakeLists.txt 
new/evolution-ews-3.26.1/CMakeLists.txt
--- old/evolution-ews-3.26.0/CMakeLists.txt     2017-09-11 09:27:51.000000000 
+0200
+++ new/evolution-ews-3.26.1/CMakeLists.txt     2017-10-02 14:33:04.000000000 
+0200
@@ -4,7 +4,7 @@
 cmake_policy(VERSION 3.1)
 
 project(evolution-ews
-       VERSION 3.26.0
+       VERSION 3.26.1
        LANGUAGES C)
 set(PROJECT_BUGREPORT 
"http://bugzilla.gnome.org/enter_bug.cgi?product=evolution-ews";)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/evolution-ews-3.26.0/NEWS 
new/evolution-ews-3.26.1/NEWS
--- old/evolution-ews-3.26.0/NEWS       2017-09-11 09:27:51.000000000 +0200
+++ new/evolution-ews-3.26.1/NEWS       2017-10-02 14:33:04.000000000 +0200
@@ -1,3 +1,12 @@
+Evolution-EWS 3.26.1 2017-10-02
+-------------------------------
+
+Bug Fixes:
+       Bug 786208 - Already opened message box doesn’t show new emails (Milan 
Crha)
+
+Miscellaneous:
+       Escape spaces in server Categories for message Labels (Milan Crha)
+
 Evolution-EWS 3.26.0 2017-09-11
 -------------------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/evolution-ews-3.26.0/src/camel/camel-ews-folder.c 
new/evolution-ews-3.26.1/src/camel/camel-ews-folder.c
--- old/evolution-ews-3.26.0/src/camel/camel-ews-folder.c       2017-09-11 
09:27:51.000000000 +0200
+++ new/evolution-ews-3.26.1/src/camel/camel-ews-folder.c       2017-10-02 
14:33:04.000000000 +0200
@@ -1748,6 +1748,7 @@
 sync_created_items (CamelEwsFolder *ews_folder,
                     EEwsConnection *cnc,
                     GSList *created_items,
+                   GHashTable *updating_summary_uids,
                    CamelFolderChangeInfo *change_info,
                     GCancellable *cancellable,
                     GError **error)
@@ -1777,6 +1778,20 @@
                        continue;
                }
 
+               if (updating_summary_uids) {
+                       const gchar *pooled_uid = camel_pstring_strdup (id->id);
+                       gboolean known;
+
+                       known = g_hash_table_remove (updating_summary_uids, 
pooled_uid);
+
+                       camel_pstring_free (pooled_uid);
+
+                       if (known) {
+                               g_object_unref (item);
+                               continue;
+                       }
+               }
+
                /* created_msg_ids are items other than generic item. We fetch 
them
                 * separately since the property sets vary */
                /* FIXME: Do we need to handle any other item types
@@ -1938,6 +1953,7 @@
        CamelFolderSummary *folder_summary;
        CamelEwsFolder *ews_folder;
        CamelEwsFolderPrivate *priv;
+       GHashTable *updating_summary_uids = NULL;
        EEwsConnection *cnc;
        CamelEwsStore *ews_store;
        const gchar *full_name;
@@ -1979,6 +1995,10 @@
 
        camel_operation_push_message (cancellable, _("Refreshing folder “%s”"), 
camel_folder_get_display_name (folder));
 
+       if (camel_ews_summary_get_version (CAMEL_EWS_SUMMARY (folder_summary)) 
< CAMEL_EWS_SUMMARY_VERSION) {
+               updating_summary_uids = camel_folder_summary_get_hash 
(folder_summary);
+       }
+
        /* Sync folder items does not return the fields ToRecipients,
         * CCRecipients. With the item_type unknown, its not possible
         * to fetch the right properties which are valid for an item type.
@@ -2005,6 +2025,10 @@
                        g_free (sync_state);
                        sync_state = NULL;
                        ews_folder_forget_all_mails (ews_folder);
+                       if (updating_summary_uids) {
+                               g_hash_table_destroy (updating_summary_uids);
+                               updating_summary_uids = NULL;
+                       }
 
                        e_ews_connection_sync_folder_items_sync (cnc, 
EWS_PRIORITY_MEDIUM, NULL, id, "IdOnly", NULL, EWS_MAX_FETCH_COUNT,
                                &sync_state, &includes_last_item, 
&items_created, &items_updated, &items_deleted,
@@ -2020,7 +2044,7 @@
                        camel_ews_utils_sync_deleted_items (ews_folder, 
items_deleted, change_info);
 
                if (items_created)
-                       sync_created_items (ews_folder, cnc, items_created, 
change_info, cancellable, &local_error);
+                       sync_created_items (ews_folder, cnc, items_created, 
updating_summary_uids, change_info, cancellable, &local_error);
 
                if (local_error) {
                        if (items_updated) {
@@ -2059,6 +2083,32 @@
                }
        } while (!local_error && !includes_last_item && 
!g_cancellable_is_cancelled (cancellable));
 
+       if (updating_summary_uids) {
+               if (!local_error && !g_cancellable_is_cancelled (cancellable) &&
+                   g_hash_table_size (updating_summary_uids) > 0) {
+                       GHashTableIter iter;
+                       gpointer key;
+                       GList *removed_uids = NULL;
+
+                       g_hash_table_iter_init (&iter, updating_summary_uids);
+                       while (g_hash_table_iter_next (&iter, &key, NULL)) {
+                               const gchar *uid = key;
+
+                               camel_folder_change_info_remove_uid 
(change_info, uid);
+                               ews_data_cache_remove (ews_folder->cache, 
"cur", uid, NULL);
+
+                               removed_uids = g_list_prepend (removed_uids, 
(gpointer) uid);
+                       }
+
+                       camel_folder_summary_remove_uids (folder_summary, 
removed_uids);
+
+                       g_list_free (removed_uids);
+               }
+
+               g_hash_table_destroy (updating_summary_uids);
+               updating_summary_uids = NULL;
+       }
+
        camel_operation_pop_message (cancellable);
 
        if (camel_folder_change_info_changed (change_info)) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/evolution-ews-3.26.0/src/camel/camel-ews-summary.c 
new/evolution-ews-3.26.1/src/camel/camel-ews-summary.c
--- old/evolution-ews-3.26.0/src/camel/camel-ews-summary.c      2017-09-11 
09:27:51.000000000 +0200
+++ new/evolution-ews-3.26.1/src/camel/camel-ews-summary.c      2017-10-02 
14:33:04.000000000 +0200
@@ -34,8 +34,6 @@
 #include "camel-ews-folder.h"
 #include "camel-ews-summary.h"
 
-#define CAMEL_EWS_SUMMARY_VERSION (1)
-
 #define EXTRACT_FIRST_DIGIT(val) part ? val=strtoul (part, &part, 10) : 0;
 #define EXTRACT_DIGIT(val) part++; part ? val=strtoul (part, &part, 10) : 0;
 
@@ -122,13 +120,18 @@
        if (!CAMEL_FOLDER_SUMMARY_CLASS 
(camel_ews_summary_parent_class)->summary_header_load (s, mir))
                return FALSE;
 
+       ews_summary->priv->version = 0;
+
        part = mir->bdata;
 
        if (part)
                EXTRACT_FIRST_DIGIT (ews_summary->priv->version);
 
-       if (part && part++ && strcmp (part, "(null)")) {
+       if (part && part++ && strcmp (part, "(null)") &&
+           ews_summary->priv->version >= CAMEL_EWS_SUMMARY_VERSION) {
                camel_ews_summary_set_sync_state (ews_summary, part);
+       } else {
+               camel_ews_summary_set_sync_state (ews_summary, NULL);
        }
 
        return TRUE;
@@ -152,6 +155,8 @@
 
        g_free (sync_state);
 
+       ews_summary->priv->version = CAMEL_EWS_SUMMARY_VERSION;
+
        return fir;
 
 }
@@ -277,6 +282,14 @@
        camel_folder_summary_free_array (known_uids);
 }
 
+gint32
+camel_ews_summary_get_version (CamelEwsSummary *ews_summary)
+{
+       g_return_val_if_fail (CAMEL_IS_EWS_SUMMARY (ews_summary), -1);
+
+       return ews_summary->priv->version;
+}
+
 void
 camel_ews_summary_set_sync_state (CamelEwsSummary *ews_summary,
                                  const gchar *sync_state)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/evolution-ews-3.26.0/src/camel/camel-ews-summary.h 
new/evolution-ews-3.26.1/src/camel/camel-ews-summary.h
--- old/evolution-ews-3.26.0/src/camel/camel-ews-summary.h      2017-09-11 
09:27:51.000000000 +0200
+++ new/evolution-ews-3.26.1/src/camel/camel-ews-summary.h      2017-10-02 
14:33:04.000000000 +0200
@@ -26,6 +26,8 @@
 
 #include "camel-ews-message-info.h"
 
+#define CAMEL_EWS_SUMMARY_VERSION (2)
+
 /* Standard GObject macros */
 #define CAMEL_TYPE_EWS_SUMMARY \
        (camel_ews_summary_get_type ())
@@ -78,6 +80,7 @@
                                         CamelMimeMessage *message);
 void   ews_summary_clear               (CamelFolderSummary *summary,
                                         gboolean uncache);
+gint32 camel_ews_summary_get_version   (CamelEwsSummary *ews_summary);
 void   camel_ews_summary_set_sync_state(CamelEwsSummary *ews_summary,
                                         const gchar *sync_state);
 gchar *        camel_ews_summary_dup_sync_state(CamelEwsSummary *ews_summary);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/evolution-ews-3.26.0/src/camel/camel-ews-utils.c 
new/evolution-ews-3.26.1/src/camel/camel-ews-utils.c
--- old/evolution-ews-3.26.0/src/camel/camel-ews-utils.c        2017-09-11 
09:27:51.000000000 +0200
+++ new/evolution-ews-3.26.1/src/camel/camel-ews-utils.c        2017-10-02 
14:33:04.000000000 +0200
@@ -447,7 +447,26 @@
                if (ews_utils_is_system_user_flag (n))
                        continue;
 
-               out_user_flags = g_slist_prepend (out_user_flags, g_strdup (n));
+               if (strchr (n, '_')) {
+                       GString *str = g_string_sized_new (strlen (n));
+
+                       while (*n) {
+                               if (*n == '_') {
+                                       if (n[1] == '_')
+                                               g_string_append_c (str, '_');
+                                       else
+                                               g_string_append_c (str, ' ');
+                               } else {
+                                       g_string_append_c (str, *n);
+                               }
+
+                               n++;
+                       }
+
+                       out_user_flags = g_slist_prepend (out_user_flags, 
g_string_free (str, FALSE));
+               } else {
+                       out_user_flags = g_slist_prepend (out_user_flags, 
g_strdup (n));
+               }
        }
 
        camel_message_info_property_unlock (mi);
@@ -487,7 +506,33 @@
 
        /* now transfer over all the categories */
        for (p = e_ews_item_get_categories (item); p; p = p->next) {
-               camel_message_info_set_user_flag (mi, ews_utils_rename_label 
(p->data, TRUE), TRUE);
+               const gchar *flag = ews_utils_rename_label (p->data, 1);
+               gchar *underscored = NULL;
+
+               if (!flag || !*flag)
+                       continue;
+
+               if (strchr (flag, ' ')) {
+                       GString *str;
+
+                       str = g_string_sized_new (strlen (flag) + 16);
+
+                       while (*flag) {
+                               if (*flag == '_')
+                                       g_string_append_c (str, '_');
+
+                               g_string_append_c (str, *flag == ' ' ? '_' : 
*flag);
+
+                               flag++;
+                       }
+
+                       underscored = g_string_free (str, FALSE);
+                       flag = underscored;
+               }
+
+               camel_message_info_set_user_flag (mi, flag, TRUE);
+
+               g_free (underscored);
        }
 
        camel_message_info_thaw_notifications (mi);


Reply via email to