Add preferences page

* For now, the prefs page has just a single option, Downloads Folder
* For now, you can't type in a folder, you must use the chooser
* Further fixes coming om master
* Written by @ChrisMorrisOrg and @grunjol, rebased by @dcposch
This commit is contained in:
grunjol
2016-04-14 22:02:24 -03:00
committed by DC
parent 455c9c02b9
commit 12f9709601
8 changed files with 395 additions and 9 deletions

View File

@@ -116,6 +116,11 @@ function decreasePlaybackRate () {
}
}
// Open the preferences window
function showPreferences () {
windows.main.send('dispatch', 'preferences')
}
function onWindowShow () {
log('onWindowShow')
getMenuItem('Full Screen').enabled = true
@@ -269,6 +274,14 @@ function getAppMenuTemplate () {
label: 'Select All',
accelerator: 'CmdOrCtrl+A',
role: 'selectall'
},
{
type: 'separator'
},
{
label: 'Preferences',
accelerator: 'CmdOrCtrl+,',
click: () => showPreferences()
}
]
},
@@ -411,6 +424,14 @@ function getAppMenuTemplate () {
{
type: 'separator'
},
{
label: 'Preferences',
accelerator: 'Cmd+,',
click: () => showPreferences()
},
{
type: 'separator'
},
{
label: 'Services',
role: 'services',