-
Notifications
You must be signed in to change notification settings - Fork 274
Commit 92bd4eb
committed
commander: small improvement on listing and panel width
When working with different directories that have some common files
that have long full path names, it's hard to find the right file from
the list. This is because the panel's width is 500 and the full path may
not be shown completely within the panel as below
```
<-------- visible to user --------> <----- invisible to users ------------------->
/-----------------------------------\
| /foo/bar/directory/with/very/long-|/path/name1/sample.txt
| Files -> Recent Files -> /foo/bar/|directory/with/very/long-/path1/name/sample.txt
| /foo/bar/directory/with/very/long-|/path/name2/sample.txt
| Files -> Recent Files -> /foo/bar/|directory/with/very/long-/path2/name/sample.txt
\-----------------------------------/
```
In this illustration, when looking up `sample.txt`, the user has no
idea about the directory information (both `path/name1` and
`path/name2` do matching)
- [ ] The panel's width is one half of the width of the Geany window
when this amount is greater than or equals to 250
- [ ] Otherwise the panel's width defaults to the width of the Geany window
- [ ] For labels, don't display full names; only display the parent
directory's basename and the file name
The previous illustration now becomes
```
/-----------------------------------\
| name1/sample.txt |
| Files -> Recent Files -> /foo/bar/|directory/with/very/long-/path/name1/sample.txt
| name2/sample.txt |
| Files -> Recent Files -> /foo/bar/|directory/with/very/long-/path/name2/sample.txt
\-----------------------------------/
```
and this helps user to quickly find the right files.
Of course this doesn't solve all edge cases when there are a few more
levels of duplication in full path names.1 parent 63750a5 commit 92bd4ebCopy full SHA for 92bd4eb
1 file changed
+112
-89
lines changed
0 commit comments