Hello community,

here is the log from the commit of package geary for openSUSE:Factory checked 
in at 2019-01-21 10:57:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/geary (Old)
 and      /work/SRC/openSUSE:Factory/.geary.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "geary"

Mon Jan 21 10:57:01 2019 rev:42 rq:666338 version:0.12.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/geary/geary.changes      2018-12-27 
00:29:53.811638235 +0100
+++ /work/SRC/openSUSE:Factory/.geary.new.28833/geary.changes   2019-01-21 
10:57:18.943512550 +0100
@@ -1,0 +2,6 @@
+Fri Jan 11 23:54:15 UTC 2019 - [email protected]
+
+- Add geary-hide-gmail-main.patch: Hide [gmail] folder from tags
+  view (bgo#712902).
+
+-------------------------------------------------------------------

New:
----
  geary-hide-gmail-main.patch

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

Other differences:
------------------
++++++ geary.spec ++++++
--- /var/tmp/diff_new_pack.yy1cD4/_old  2019-01-21 10:57:20.799510122 +0100
+++ /var/tmp/diff_new_pack.yy1cD4/_new  2019-01-21 10:57:20.799510122 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package geary
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -28,6 +28,8 @@
 Patch0:         geary-javascript-fixes.patch
 # PATCH-FIX-UPSTREAM geary-Fix-variable-check-for-IOError.CANCELLED.patch -- 
Actually use error variable to check for IOError.CANCELLED
 Patch1:         geary-Fix-variable-check-for-IOError.CANCELLED.patch
+# PATCH-FIX-UPSTREAM geary-hide-gmail-main.patch bgo#712902 -- Hide [gmail] 
folder from tags view
+Patch2:         geary-hide-gmail-main.patch
 
 BuildRequires:  cmake
 BuildRequires:  fdupes

++++++ geary-hide-gmail-main.patch ++++++
>From 1ecd6b65b2a01478fa849be5b90d2a4b5d0a9507 Mon Sep 17 00:00:00 2001
From: Gautier Pelloux-Prayer <[email protected]>
Date: Thu, 2 Mar 2017 12:35:39 +0100
Subject: [PATCH v2] Do not add non openable folders entry in sidemenu. Bug
 712902

---
 src/client/application/geary-controller.vala | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/src/client/application/geary-controller.vala 
b/src/client/application/geary-controller.vala
index b859fd80..d92ac9c0 100644
--- a/src/client/application/geary-controller.vala
+++ b/src/client/application/geary-controller.vala
@@ -1636,10 +1636,31 @@ public class GearyController : Geary.BaseObject {
         return null;
     }
     
+    private bool should_add_folder(Gee.List<Geary.Folder>? all, Geary.Folder 
folder) {
+        // if folder is openable, add it
+        if (folder.properties.is_openable != Geary.Trillian.FALSE)
+            return true;
+        else if (folder.properties.has_children == Geary.Trillian.FALSE)
+            return false;
+
+        // if folder contains children, we must ensure that there is at least 
one of the same type
+        Geary.SpecialFolderType type = folder.special_folder_type;
+        foreach (Geary.Folder other in all) {
+            if (other.special_folder_type == type && other.path.get_parent() 
== folder.path)
+                return true;
+        }
+
+        return false;
+    }
+
     private void on_folders_available_unavailable(Gee.List<Geary.Folder>? 
available,
         Gee.List<Geary.Folder>? unavailable) {
         if (available != null && available.size > 0) {
             foreach (Geary.Folder folder in available) {
+                if (!should_add_folder(available, folder)) {
+                    continue;
+                }
+
                 main_window.folder_list.add_folder(folder);
                 if (folder.account == current_account) {
                     if 
(!main_window.main_toolbar.copy_folder_menu.has_folder(folder))
-- 
2.11.0


Reply via email to