Use a regular dialog rather than a list dialog when trashing or deleting a single file
ClosedPublic

Authored by ngraham on Apr 21 2018, 8:42 PM.

Details

Summary

This patch uses a regular-style dialog instead of a list-style dialog when the user is trying to trash or delete only a single item. It looks a bit nicer than showing a dialog that has a list with only a single item in it.

Also change the string "Trash" to "Move to Trash", to prevent ambiguity in languages where the word can be either a noun or a verb.

Depends on D12420

Test Plan

Made sure that trash and deletion operations all still work. Here's how it looks:

Delete a single file:

Delete multiple files:

Trash a single file:

Trash multiple files:

Diff Detail

Repository
R241 KIO
Branch
prettier-trach-and-delete-dialogs-for-single-items
Lint
No Linters Available
Unit
No Unit Test Coverage
ngraham requested review of this revision.Apr 21 2018, 8:42 PM
ngraham created this revision.
ngraham edited the summary of this revision. (Show Details)Apr 21 2018, 8:44 PM
ngraham edited the test plan for this revision. (Show Details)
ngraham set the repository for this revision to R241 KIO.
Restricted Application added a project: Frameworks. · View Herald TranscriptApr 21 2018, 8:44 PM
ngraham updated this revision to Diff 32747.Apr 21 2018, 9:09 PM

Move the warnings to their own line so they're not missed, and also to improve the presentation

ngraham edited the test plan for this revision. (Show Details)Apr 21 2018, 9:11 PM
ngraham updated this revision to Diff 33075.Apr 25 2018, 2:35 PM

Use correct formatting

ngraham edited the test plan for this revision. (Show Details)Apr 25 2018, 2:36 PM
ngraham updated this revision to Diff 33552.May 3 2018, 2:35 PM

Use two line break

cfeck added a subscriber: cfeck.May 3 2018, 5:49 PM

I agree it looks nicer, but the actual file that is being deleted now is somewhat hidden in a text. I think it's the most important information the user wants to read (did I select the right file for deletion?). Could the file be made more prominent, e.g. starting at a new line, or bold, or italic or whatever?

cfeck added a comment.May 3 2018, 5:52 PM

Maybe even mimic the old list but not using a separate widget:

Do you really want to move this item to the trash?
/my/path/file.txt

<b>Warning blabla</b>

Move to Trash | Cancel

ngraham planned changes to this revision.May 3 2018, 5:54 PM

That makes a lot of sense, Christoph. I'll do that.

ngraham updated this revision to Diff 33571.May 3 2018, 7:03 PM

Put filename on a new line

ngraham edited the summary of this revision. (Show Details)May 3 2018, 7:03 PM
ngraham edited the test plan for this revision. (Show Details)
cfeck added inline comments.May 3 2018, 7:17 PM
src/widgets/jobuidelegate.cpp
230

%1? -> %1

ngraham edited the test plan for this revision. (Show Details)May 3 2018, 8:34 PM
cfeck added a comment.EditedMay 3 2018, 9:12 PM

Sorry, no. I really meant %1? -> %1

The other question mark was okey.

Urg, I need to turn my brain on...

ngraham updated this revision to Diff 33580.May 3 2018, 9:27 PM

Fix the prior change

elvisangelaccio added inline comments.
src/widgets/jobuidelegate.cpp
230

Please wrap %1 with the <filename> tag

ngraham updated this revision to Diff 33582.May 3 2018, 9:35 PM

Wrap filenames in <filename> tags

ngraham edited the test plan for this revision. (Show Details)May 3 2018, 9:36 PM
ngraham marked 2 inline comments as done.
elvisangelaccio added inline comments.May 5 2018, 4:28 PM
src/widgets/jobuidelegate.cpp
253

Please also mention this change in the commit message.

ngraham edited the summary of this revision. (Show Details)May 5 2018, 5:13 PM
This revision is now accepted and ready to land.May 5 2018, 5:20 PM
ngraham updated this revision to Diff 33685.May 5 2018, 5:42 PM

Merge master

ngraham marked an inline comment as done.May 5 2018, 5:43 PM
ngraham closed this revision.May 5 2018, 6:42 PM