diff options
| author | Victor Kareh <[email protected]> | 2026-05-18 22:01:49 -0400 |
|---|---|---|
| committer | Victor Kareh <[email protected]> | 2026-05-27 16:03:37 -0400 |
| commit | cd9a308a23dd61b7dcab12cf3633b3f879023acd (patch) | |
| tree | 5791998d35681c1ca7da410a9574b7dc9e145a58 /src | |
| parent | a61bfefe4917665546c2957fd1d6adc1b610fa3e (diff) | |
| download | caja-cd9a308a23dd61b7dcab12cf3633b3f879023acd.tar.bz2 caja-cd9a308a23dd61b7dcab12cf3633b3f879023acd.tar.xz | |
location-bar: add trailing slash to displayed location path
When pressing Ctrl+L to show the location bar, the displayed path now
includes a trailing slash so users can immediately start typing
a subfolder name without having to press the slash key first.
Fixes #874
Diffstat (limited to 'src')
| -rw-r--r-- | src/caja-location-bar.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/caja-location-bar.c b/src/caja-location-bar.c index 14d99a6f..6f7455ae 100644 --- a/src/caja-location-bar.c +++ b/src/caja-location-bar.c @@ -579,6 +579,17 @@ caja_location_bar_set_location (CajaLocationBar *bar, g_object_unref (file); caja_location_entry_update_current_location (CAJA_LOCATION_ENTRY (bar->details->entry), formatted_location); + + /* Add trailing slash in display only so users can immediately type a subfolder */ + if (!g_str_has_suffix (formatted_location, G_DIR_SEPARATOR_S)) + { + char *display_location; + + display_location = g_strconcat (formatted_location, G_DIR_SEPARATOR_S, NULL); + caja_entry_set_text (CAJA_ENTRY (bar->details->entry), display_location); + g_free (display_location); + } + g_free (formatted_location); } |
