summaryrefslogtreecommitdiff
path: root/src/folders
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2023-11-20 18:25:30 +0100
committerJörg Frings-Fürst <debian@jff.email>2023-11-20 18:25:30 +0100
commit87ba373882f475f02a524a120b59ea9fcccf14e5 (patch)
tree9ad3592a2dc3561b9919408869e38b07247ee9e3 /src/folders
parentd0aaad443a88968dc61172c050084d3d9faa7602 (diff)
New upstream version 0.32.3upstream/0.32.3
Diffstat (limited to 'src/folders')
-rw-r--r--src/folders/FoldersBranch.vala10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/folders/FoldersBranch.vala b/src/folders/FoldersBranch.vala
index 5de7082..49b2d97 100644
--- a/src/folders/FoldersBranch.vala
+++ b/src/folders/FoldersBranch.vala
@@ -168,11 +168,15 @@ public class Folders.SidebarEntry : Sidebar.SimplePageEntry, Sidebar.ExpandableE
public SidebarEntry(File dir) {
this.dir = dir;
- collation = dir.get_path().collate_key_for_filename();
+ collation = to_string().collate_key_for_filename();
}
public override string get_sidebar_name() {
- return dir.get_basename();
+ try {
+ return dir.query_info(FileAttribute.STANDARD_DISPLAY_NAME, FileQueryInfoFlags.NONE, null).get_display_name();
+ } catch (Error err) {
+ return this.to_string();
+ }
}
public override string? get_sidebar_icon() {
@@ -180,7 +184,7 @@ public class Folders.SidebarEntry : Sidebar.SimplePageEntry, Sidebar.ExpandableE
}
public override string to_string() {
- return dir.get_path();
+ return Filename.display_name(dir.get_path());
}
public bool expand_on_select() {