Skip to content

kcms/keys: add a "Choose" button to command adding sheet

This makes it easier for users to choose script files, so they don't have to type out the full path themselves, which is error-prone.

Some code is adjusted accordingly; for example to make addCommand() accept URLs (which are what the file dialog gives us) and convert them to local paths, increase the dialog width to accommodate a new button, and rename an existing dialog to make its purpose clear, now that there are two dialogs.

There is no error-checking to make sure that the script file exists, doesn't live at a remote location, is executable, and has a shebang. But those are all pre-existing issues and will be fixed in another MR, probably copying code from the autostart KCM which handles these cases.

Testing done

Tested to make sure that these use cases still worked:

  • Add raw command to the text field
  • Type local file path into the text field
  • Type URL into the text field
  • Use the open dialog to select a file

image

@bharadwaj-raju @teams/usability @teams/vdg

Merge request reports