Fixed ugly message dialog on Compare by Content error
ClosedPublic

Authored by gengisdave on May 15 2018, 7:20 PM.

Details

Summary

Change KmessageBox::detailedError dialog type to KmessageBox::error for a better view.

When the dialog is created the details are hidden. The detail text is not that long that it couldn't be shown directly.

More, the new dialog box could be ::sorry, it changes the caption from "error" to "sorry" and the icon from the red error to the yellow warning

FIXED: [ 383567 ] Details section is empty in 'Do not know which files to compare.' window
BUG: 383567

Test Plan

Simply select ".." in one of the two panels and click "Compare by content"

Diff Detail

Repository
R167 Krusader
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
gengisdave requested review of this revision.May 15 2018, 7:20 PM
gengisdave created this revision.
gengisdave edited the summary of this revision. (Show Details)
martinkostolny added a subscriber: martinkostolny.

I like this change, thanks Davide! I think ::sorry dialog is even better for this scenario but that's a matter of taste :).

This revision is now accepted and ready to land.May 16 2018, 7:29 PM
nmel accepted this revision.May 17 2018, 5:07 AM
nmel added a subscriber: nmel.

Thanks Davide. I'm fine with any of error and sorry.

nmel added a comment.May 17 2018, 5:11 AM

Just one minor suggestion: rename "Ugly message dialog on Compare by Content error" with "Fixed ugly message dialog on Compare by Content error" so others will know you haven't introduced anything ugly :)

asensi accepted this revision.EditedMay 17 2018, 8:54 PM
asensi added a subscriber: asensi.

For my part, my performed tests went alright!

I like this change, thanks Davide! I think ::sorry dialog is even better for this scenario but that's a matter of taste :).

In https://api.kde.org/frameworks/kwidgetsaddons/html/namespaceKMessageBox.html#ac799ff6b0a491b1356981777c99c7551 it says that about KMessageBox::error :

Your program messed up and now it's time to inform the user. To be used for important things like "Sorry, I deleted your hard disk."
[...]

In https://api.kde.org/frameworks/kwidgetsaddons/html/namespaceKMessageBox.html#a02dfebea27d2b3e28199aa543a4d012c it says that about KMessageBox::sorry :

Either your program messed up and asks for understanding or your user did something stupid.
To be used for small problems like "Sorry, I can't find the file you specified."
[...]

So I would use KMessageBox::sorry, as Martin wrote :-)

Thanks for those improvements, Davide!

Just one minor suggestion: rename "Ugly message dialog on Compare by Content error" with "Fixed ugly message dialog on Compare by Content error" so others will know you haven't introduced anything ugly :)

I agree, too :-)

safaalfulaij added inline comments.
krusader/krslots.cpp
176

Why the puzzle string?
Why not using KUIT?

And I don't think we need <qt> anymore after Qt3

Thank you for your interest, Safa. Patches are welcome :-)

nmel added inline comments.May 21 2018, 6:30 AM
krusader/krslots.cpp
176

I think this CR is good enough as a bug fix. For the <qt>, KUIT or other refactoring, it should go to a separate CR that updates all the corresponding places in the project.

gengisdave retitled this revision from Ugly message dialog on Compare by Content error to Fixed ugly message dialog on Compare by Content error.May 22 2018, 4:48 AM

I tried to break as less things as possible. I have a little knowledge of i18n but I think that merging the text will require a new strings translation; from my point of view, translations magically appear when I compile. I can put a comment in the final commit to let others to know that it can be refactored.

nmel added a comment.May 28 2018, 5:31 AM

Please push this.

This revision was automatically updated to reflect the committed changes.