aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--desktop/sources/scripts/lib/theme.js3
-rw-r--r--desktop/sources/scripts/source.js2
2 files changed, 2 insertions, 3 deletions
diff --git a/desktop/sources/scripts/lib/theme.js b/desktop/sources/scripts/lib/theme.js
index 4b9e3b1..7e54f4d 100644
--- a/desktop/sources/scripts/lib/theme.js
+++ b/desktop/sources/scripts/lib/theme.js
@@ -83,8 +83,7 @@ function Theme (noir, pale) {
}
this.open = function () {
- console.log('Open')
- let paths = dialog.showOpenDialog(app.win, { properties: ['openFile'] })
+ let paths = dialog.showOpenDialog(app.win, { properties: ['openFile'], filters: [{ name: 'Themes', extensions: ['svg'] }] })
if (!paths) { console.log('Nothing to load') }
fs.readFile(paths[0], 'utf8', function (err, data) {
if (err) throw err
diff --git a/desktop/sources/scripts/source.js b/desktop/sources/scripts/source.js
index b01dedd..9486b83 100644
--- a/desktop/sources/scripts/source.js
+++ b/desktop/sources/scripts/source.js
@@ -18,7 +18,7 @@ function Source (orca, terminal) {
this.open = function () {
console.log('Open')
- let paths = dialog.showOpenDialog(app.win, { properties: ['openFile'] })
+ let paths = dialog.showOpenDialog(app.win, { properties: ['openFile'], filters: [{ name: 'Orca Machines', extensions: ['orca'] }] })
if (!paths) { console.log('Nothing to load') }
this.path = paths[0]
this.read(paths[0])