[patch] Save file dialog directories, delete and interaction
Moderator: Committer
[patch] Save file dialog directories, delete and interaction
In response to some user reactions,
this patch adds a few tweaks the save file dialog.
* Return to inline directory browsing
* Add a delete button (local only)
* Add confirmation prompts for deletion and overriding
* Color folder edit red when folder is invalid (local only)
Deleting non-local seems unnecessary dangerous (and troublesome to implement),
folder coloring on remote on the other hand is very feasible, since we have the list of valid subdirectories,
but I don't have the time to do that just now, and I anticipate needing to iterate after comments anyways,
so I'm posting this version without that.
this patch adds a few tweaks the save file dialog.
* Return to inline directory browsing
* Add a delete button (local only)
* Add confirmation prompts for deletion and overriding
* Color folder edit red when folder is invalid (local only)
Deleting non-local seems unnecessary dangerous (and troublesome to implement),
folder coloring on remote on the other hand is very feasible, since we have the list of valid subdirectories,
but I don't have the time to do that just now, and I anticipate needing to iterate after comments anyways,
so I'm posting this version without that.
- Attachments
-
- faulty_dir.png (80.9 KiB) Viewed 1174 times
-
- delete_confirmation.png (66.57 KiB) Viewed 1174 times
-
[The extension patch has been deactivated and can no longer be displayed.]
Any code by me in this post is released under GPL 2.0 or later.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: [patch] Save file dialog directories, delete and interac
[..] should probably be at the top of the list.
The scrollwheel increment should be adjusted to about 3 save file rows. Currently it sometimes increments a small enough amount that the scrollbar moving one tick doesn't actually scroll the list.
In-game text needs to all be gotten by UserString, not hard coded (including "Yes" or "Cancel").
I haven't checked, but does the dialog respond well to write-protected files, or changes to the directory contents while it's open?
The scrollwheel increment should be adjusted to about 3 save file rows. Currently it sometimes increments a small enough amount that the scrollbar moving one tick doesn't actually scroll the list.
In-game text needs to all be gotten by UserString, not hard coded (including "Yes" or "Cancel").
I haven't checked, but does the dialog respond well to write-protected files, or changes to the directory contents while it's open?
Re: [patch] Save file dialog directories, delete and interac
* Sort directories differently from saves
* Increased scrollwheel increment
* Translate yes and cancel
* Color invalid directory also against remote server
and getting notifications of a folder's changes does not seem to be within boost's powers.
Ok, if there is an easy way to get notified when the application loses and regains focus,
reloading the folder every time that happens might be a potentially useful approximation.
* Increased scrollwheel increment
* Translate yes and cancel
* Color invalid directory also against remote server
No and no. Based on a quick search, neither seems worth the trouble. The best way to find out if a file is writable is to write it;I haven't checked, but does the dialog respond well to write-protected files, or changes to the directory contents while it's open?
and getting notifications of a folder's changes does not seem to be within boost's powers.
Ok, if there is an easy way to get notified when the application loses and regains focus,
reloading the folder every time that happens might be a potentially useful approximation.
- Attachments
-
[The extension patch has been deactivated and can no longer be displayed.]
Any code by me in this post is released under GPL 2.0 or later.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: [patch] Save file dialog directories, delete and interac
HumanClientApp has a FocusChangedSignal.Mitten.O wrote:...if there is an easy way to get notified when the application loses and regains focus...
A couple issues:
* yes/no text is broken and only says yes.
* randomly odd-sized directory rows when going up a directory.
- Attachments
-
- broken text
- error_text.png (4.7 KiB) Viewed 1161 times
-
- row sizes are odd
- dir_size.png (21.07 KiB) Viewed 1161 times
Re: [patch] Save file dialog directories, delete and interac
Excellent. I made the list get updated on focus change. Should cover most use cases.HumanClientApp has a FocusChangedSignal.
Makes the selection and scrolling be lost, though.
Fixed.* yes/no text is broken and only says yes.
GiGi's word wrapping text can be a bit tricky. Should be better now, I gave it more explicit space.* randomly odd-sized directory rows when going up a directory.
- Attachments
-
[The extension patch has been deactivated and can no longer be displayed.]
Any code by me in this post is released under GPL 2.0 or later.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: [patch] Save file dialog directories, delete and interac
ListBox has a SetVScrollWheelIncrement function that would be better to use than your overridden MouseWheel function.
Can't follow this comment...
I still get seemingly-random double or triple-tall directory rows.
The usual minor code formatting nitpicks.
Otherwise seems OK.
Can't follow this comment...
Code: Select all
+ /// Sorts row alphabetically, to sort correctly byt ht time stamps,
+ /// But but puts anything wrappend in PATH_DELIM_BEGIN and PATH_DELIM_END
+ /// first, in alphabetical order, to put directories first
The usual minor code formatting nitpicks.
Otherwise seems OK.
Re: [patch] Save file dialog directories, delete and interac
Done.ListBox has a SetVScrollWheelIncrement function that would be better to use than your overridden MouseWheel function.
I disabled line breaking for directory rows entirely. That should make them behave more consistently.I still get seemingly-random double or triple-tall directory rows.
I would expect directory names wider than the dialog to be very rare.
Fixed a couple if(:s again.The usual minor code formatting nitpicks.
- Attachments
-
[The extension patch has been deactivated and can no longer be displayed.]
Any code by me in this post is released under GPL 2.0 or later.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich