Implement Shift+Del to remove cruft from the history of: the "Command line switches" comboBox on the "Pack" dialog
ClosedPublic

Authored by asensi on Apr 19 2020, 11:15 PM.

Details

Summary

When Krusader users utilize the "Command line switches" comboBox on the "Pack"
dialog: they often see bad entries because there are obsolete ones, mistakes and
so on, but normal Krusader users can't remove those entries. For example, web
browsers have Shift+Del in order to remove the thwarting entries.

With a KrHistoryComboBox, Krusader users are able to delete wrong entries from
history lists, and therefore they can remove those bad suggestions that they
were seeing.

Test Plan

Open Krusader. Over a file: press Alt+Shift+P to open the "Pack" dialog. Choose
the "zip" format. Press the "Advanced >>" button. Using the "Command line
switches" comboBox: add a new switch (for example: -r), press OK to compress
the file with that switch. Check that the file is correctly created. Close
Krusader. Check that in the ~/.config/krusaderrc file: after `Command Line
Switches=` the previously typed switch can be found.

Open Krusader again. Over a file: press Alt+Shift+P to open the "Pack" dialog
again. Press the "Advanced >>" button. Delete the previously typed switch from
the comboBox:
a) using Shift+Del when the popup list is seen;
b) or using the arrow keys and Shift+Del when the popup list is not visible.

Try to delete all the switches until the list is empty, press Shift+Del again.
Monitor the changes in the ~/.config/krusaderrc file.

Perform similar experiments having more than one switch (for example -r and
-v) in the comboBox.

Note: Those changes are designed to be tried after applying the ones
described in https://phabricator.kde.org/D28998

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.Apr 19 2020, 11:15 PM
asensi created this revision.
asensi edited the summary of this revision. (Show Details)Apr 21 2020, 10:34 PM
asensi edited the test plan for this revision. (Show Details)
gengisdave accepted this revision.Apr 30 2020, 9:47 AM
gengisdave added a subscriber: gengisdave.

Compiled and tested, no problems found

This revision is now accepted and ready to land.Apr 30 2020, 9:47 AM
This revision was automatically updated to reflect the committed changes.