summaryrefslogtreecommitdiff
path: root/libcaja-private/caja-file.c
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2025-09-21 19:09:14 +0000
committerGitHub <[email protected]>2025-09-21 19:09:14 +0000
commitf3998312f42dbd8b76eba71b976015b0813769f7 (patch)
tree41b4fd62889a774b2d1e4d19e2a86c3acb14ab07 /libcaja-private/caja-file.c
parentf093cfa7e4cbb27280576d39d63e5000df9f0d7c (diff)
downloadcaja-f3998312f42dbd8b76eba71b976015b0813769f7.tar.bz2
caja-f3998312f42dbd8b76eba71b976015b0813769f7.tar.xz
File search improvements (#1851)
* search: Respect hidden files setting when searching When starting a search, check the current window's hidden files mode and apply the same setting to search results. This ensures search results match the visibility of files in the current directory view. * search: Add support for globs Add globbing when searching for files. Caja will autodetect if the query contains a glob and change its search to use that instead of substrings. Example: - "*.txt" finds all text files - "photo-?.jpg" finds numbered photo files - "data[0-9]*.csv" finds numbered data files * search: Add location tooltips for search results Display file location in tooltips when hovering over search results in both icon and list views. This can help users tell where files are located since search happens across subdirectories.
Diffstat (limited to 'libcaja-private/caja-file.c')
-rw-r--r--libcaja-private/caja-file.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/libcaja-private/caja-file.c b/libcaja-private/caja-file.c
index faea7993..2fc9c030 100644
--- a/libcaja-private/caja-file.c
+++ b/libcaja-private/caja-file.c
@@ -149,7 +149,8 @@ static GQuark attribute_name_q,
attribute_where_q,
attribute_link_target_q,
attribute_volume_q,
- attribute_free_space_q;
+ attribute_free_space_q,
+ attribute_location_q;
static void caja_file_info_iface_init (CajaFileInfoIface *iface);
static char * caja_file_get_owner_as_string (CajaFile *file,
@@ -6504,7 +6505,7 @@ caja_file_get_deep_directory_count_as_string (CajaFile *file)
* set includes "name", "type", "mime_type", "size", "size_on_disk", "deep_size", "deep_size_on_disk",
* "deep_directory_count", "deep_file_count", "deep_total_count", "date_modified", "date_changed",
* "date_accessed", "date_permissions", "owner", "group", "permissions", "octal_permissions", "uri", "where",
- * "link_target", "volume", "free_space", "selinux_context", "trashed_on", "trashed_orig_path"
+ * "link_target", "location", "volume", "free_space", "selinux_context", "trashed_on", "trashed_orig_path"
*
* Returns: Newly allocated string ready to display to the user, or NULL
* if the value is unknown or @attribute_name is not supported.
@@ -6605,6 +6606,9 @@ caja_file_get_string_attribute_q (CajaFile *file, GQuark attribute_q)
if (attribute_q == attribute_link_target_q) {
return caja_file_get_symbolic_link_target_path (file);
}
+ if (attribute_q == attribute_location_q) {
+ return caja_file_get_parent_uri_for_display (file);
+ }
if (attribute_q == attribute_volume_q) {
return caja_file_get_volume_name (file);
}
@@ -8624,6 +8628,7 @@ caja_file_class_init (CajaFileClass *class)
attribute_link_target_q = g_quark_from_static_string ("link_target");
attribute_volume_q = g_quark_from_static_string ("volume");
attribute_free_space_q = g_quark_from_static_string ("free_space");
+ attribute_location_q = g_quark_from_static_string ("location");
G_OBJECT_CLASS (class)->finalize = finalize;
G_OBJECT_CLASS (class)->constructor = caja_file_constructor;