zodern/Silk — pull request #7 by zodern (2014-11-19 15:43:25+00:00)
Title: Default apps to open files

File types a program can open are stored in `window.json`. The server stores the default file types in `core/settings/app-defaults.json`. A program can list a file type as `*` which is used when there is no programs available for the specified mime.

The defaults and available programs are stored in Silk.defaults on the server. The method `Silk/appDefaults` returns the default and available programs for the mime.
- If there is a default app, that is used.
- If there is only one app available and the returned mime is not `*`, then that app is used.
- otherwise a box is shown to allow the user to choose a program and set it as the default.

The method `Silk/setDefault` sets the specified app as the default for the mime.