diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-08-30 09:59:23 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-08-30 09:59:23 +0200 |
commit | 0897d830fedc81ea1c8092fbaf1c63295be19421 (patch) | |
tree | d4de894acb954ba1960447184a3ef0f7a40cdbc6 /platform/linuxbsd | |
parent | 909629d9f9a16c26d8e5b4d9cfa0f4eb85c5eab9 (diff) | |
parent | ace603bcb9409bf3b939ab6e9c8e5772936b157c (diff) | |
download | redot-engine-0897d830fedc81ea1c8092fbaf1c63295be19421.tar.gz |
Merge pull request #96204 from bruvzg/fd_no_case
[Linux] Make file filters case insensitive.
Diffstat (limited to 'platform/linuxbsd')
-rw-r--r-- | platform/linuxbsd/freedesktop_portal_desktop.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/platform/linuxbsd/freedesktop_portal_desktop.cpp b/platform/linuxbsd/freedesktop_portal_desktop.cpp index 2b98fda0d5..94a748e414 100644 --- a/platform/linuxbsd/freedesktop_portal_desktop.cpp +++ b/platform/linuxbsd/freedesktop_portal_desktop.cpp @@ -210,7 +210,15 @@ void FreeDesktopPortalDesktop::append_dbus_dict_filters(DBusMessageIter *p_iter, append_dbus_string(&struct_iter, p_filter_names[i]); dbus_message_iter_open_container(&struct_iter, DBUS_TYPE_ARRAY, "(us)", &array_iter); - const String &flt = p_filter_exts[i]; + const String &flt_orig = p_filter_exts[i]; + String flt; + for (int j = 0; j < flt_orig.length(); j++) { + if (is_unicode_letter(flt_orig[j])) { + flt += vformat("[%c%c]", String::char_lowercase(flt_orig[j]), String::char_uppercase(flt_orig[j])); + } else { + flt += flt_orig[j]; + } + } int filter_slice_count = flt.get_slice_count(","); for (int j = 0; j < filter_slice_count; j++) { dbus_message_iter_open_container(&array_iter, DBUS_TYPE_STRUCT, nullptr, &array_struct_iter); |