[Folder View] show script execution prompt when clicking item
ClosedPublic

Authored by broulik on Jan 31 2017, 2:00 PM.

Details

Summary

When clicking a file in FolderView, we should ask for whether to open or run a script depending on user settings.
This is what Dolphin does.

BUG: 375793
FIXED-IN: 5.8.6

Test Plan

Created an .sh file, clicked it in FolderView, got a prompt. Selected multiple .sh files got a prompt for each one of them.

I just noticed that for multiple items Dolphin actually does

KFileItemActions fileItemActions(this);
fileItemActions.runPreferredApplications(items, QString());

instead of going through KRun, ie. in Dolphin selecting two script files and hitting return will actually open them in Kate rather than execute them both. This needs to be addressed separately.

This particular patch only applies to 5.9 branch since in 5.8 we didn't have execution of multiple files, (updated the patch now) let's make a fix for 5.8 and then also address the runPreferredApplications thing for 5.9 and then we have everything amazing.

Diff Detail

Repository
R119 Plasma Desktop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik retitled this revision from to [Folder View] show script execution prompt.Jan 31 2017, 2:00 PM
broulik updated this object.
broulik edited the test plan for this revision. (Show Details)
broulik added reviewers: Plasma, hein.
broulik set the repository for this revision to R119 Plasma Desktop.
Restricted Application added a project: Plasma. · View Herald TranscriptJan 31 2017, 2:00 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik edited the test plan for this revision. (Show Details)Jan 31 2017, 2:02 PM
broulik edited the test plan for this revision. (Show Details)
broulik updated this revision to Diff 10762.Jan 31 2017, 2:05 PM
broulik edited the test plan for this revision. (Show Details)
  • Rebased patch for 5.8
broulik retitled this revision from [Folder View] show script execution prompt to [Folder View] show script execution prompt when clicking item.Jan 31 2017, 2:05 PM
davidedmundson accepted this revision.Jan 31 2017, 2:05 PM
davidedmundson added a reviewer: davidedmundson.
This revision is now accepted and ready to land.Jan 31 2017, 2:05 PM
This revision was automatically updated to reflect the committed changes.