added inline states for togglers in action list/tree...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2016-03-12 02:16:32 +03:00
parent 128ba44778
commit d6f1e40844
2 changed files with 11 additions and 2 deletions

View File

@ -349,6 +349,7 @@ module.URLHistoryFSWriter = core.ImageGridFeatures.Feature({
],
config: {
// XXX should we add a toggler action to toggle this?
'url-history-push-to-top-on-save': false,
},

View File

@ -38,7 +38,11 @@ var makeActionLister = function(list, filter, pre_order){
pre_order = typeof(filter) == typeof(true) ? filter : pre_order
filter = typeof(filter) == typeof(true) ? null : filter
return function(path){
return function(path, inline_state){
inline_state = inline_state == null ?
that.config['actions-list-show-toggler-state-inline']
: inline_state
var that = this
var paths = this.getPath()
var actions = {}
@ -91,7 +95,9 @@ var makeActionLister = function(list, filter, pre_order){
}
states.forEach(function(state){
actions[k +'/'+ state + (cur == state ? ' *': '')] =
//actions[k +'/'+ state + (cur == state ? ' *': '')] =
actions[k +(inline_state ? (' ('+ cur +')') : '')
+'/'+ state + (cur == state ? ' *': '')] =
function(){
that[n](state)
}
@ -138,6 +144,8 @@ var BrowseActionsActions = actions.Actions({
'Navigate/',
],
'actions-list-show-toggler-state-inline': true,
'browse-actions-settings': {
showDisabled: false,
},