Synchronizer: Set the focus on the Compare button after selecting a profile
ClosedPublic

Authored by asensi on Jan 17 2020, 10:24 PM.

Details

Summary

When a Krusader user launches Synchronizer, the Compare button is the default one, therefore the user only has to press Return to start the comparison.
However, if then the user selects a Synchronizer profile, the focus switches from the Compare button to the Close button, therefore pressing Return closes Synchronizer ("but I have selected a profile for something, haven't I?"). This proposal solves that.

Test Plan

Open Synchronizer, create two profiles. Select one, press Return and see that the comparison starts. Do the same with the other profile.

Additionally, a useraction can also be made and executed, one like:

%_Sync("one_profile")% %_Sync("another_profile")%

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.
asensi requested review of this revision.Jan 17 2020, 10:24 PM
asensi created this revision.
yurchor accepted this revision as: yurchor.Sat, Jan 18, 12:45 PM
yurchor added a subscriber: yurchor.

Works as expected. Thanks.

This revision is now accepted and ready to land.Sat, Jan 18, 12:45 PM
abika accepted this revision as: abika.Mon, Jan 27, 3:10 PM
abika added a subscriber: abika.

Thanks Toni. Works as expected.
But i still would recommend to either use btnCompareDirs->setFocus(); directly instead, or to add a short comment that syncList is focused to have the compare dirs button (which is set as default) being executed on pressing "Enter".
Otherwise it is a bit confusing why the empty tree widget is focused.

asensi updated this revision to Diff 74467.Mon, Jan 27, 10:57 PM

Previously, syncList->setFocus(); was utilized as it was used in three other places in the same file, although with btnCompareDirs->setFocus(); the intentions becomes clearer. Thanks, Alex! (and Yuri :-)

This revision was automatically updated to reflect the committed changes.