[geary/gnumdk/stable] components: update patch



commit 7b47d673fb8bfb81911e05ea2ba53d634406fadd
Author: Cédric Bellegarde <cedric bellegarde adishatz org>
Date:   Fri Jul 22 23:58:47 2022 +0200

    components: update patch

 src/client/components/folder-popover-row.vala | 29 ++++++++++++---------------
 1 file changed, 13 insertions(+), 16 deletions(-)
---
diff --git a/src/client/components/folder-popover-row.vala b/src/client/components/folder-popover-row.vala
index 0eccd9948..98033bcdf 100644
--- a/src/client/components/folder-popover-row.vala
+++ b/src/client/components/folder-popover-row.vala
@@ -11,25 +11,22 @@ public class FolderPopoverRow : Gtk.ListBoxRow {
     [GtkChild] private unowned Gtk.Label label;
 
     public FolderPopoverRow(Application.FolderContext context, Gee.HashMap<string,string> map) {
-        Geary.Folder folder = context.folder;
-        string path = folder.path.to_string().substring(1);
-        string[] split_path = path.split(">");
+        string[] as_array = context.folder.path.as_array();
 
-        if (split_path.length > 0) {
-            if (map.has_key(split_path[0])) {
-                split_path[0] = map[split_path[0]];
-            }
-            path = string.joinv(">", split_path);
+        if (map.has_key(as_array[0])) {
+            as_array[0] = map[as_array[0]];
         }
 
-        this.set_data("folder", folder);
+        var i = 0;
+        foreach (string name in as_array) {
+            as_array[i] = GLib.Markup.escape_text(name);
+            i += 1;
+        }
+
+        this.set_data("folder", context.folder);
         this.image.icon_name = context.icon_name;
-        this.label.set_markup(
-            path.replace(
-                ">",
-                "<span alpha='30%'> / </span>"
-            )
-        );
-        this.label.query_tooltip.connect(Util.Gtk.query_tooltip);
+
+        this.label.set_markup(string.joinv("<span alpha='30%'> / </span>", as_array));
+        this.label.query_tooltip.connect(Util.Gtk.query_tooltip_label);
     }
 }


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