summaryrefslogtreecommitdiff
path: root/src/folders
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2023-11-20 18:26:07 +0100
committerJörg Frings-Fürst <debian@jff.email>2023-11-20 18:26:07 +0100
commit445dc18bf3e37044e17083fe76f76c17ceb6a0d7 (patch)
tree315f7cf2a7934b0ecf45ac2caa3c87949a90dfc4 /src/folders
parent918f560d56129ed03f19d843ea2efd7cb4b23821 (diff)
parent394326a81d1248bbc5b1a35a8ae623c65ef6a9ea (diff)
Merge branch 'feature/upstream' into develop
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() {