notes and some tweaks...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2017-02-09 02:11:28 +03:00
parent 405a3886b4
commit 009943e793
2 changed files with 11 additions and 2 deletions

View File

@ -490,6 +490,7 @@ var URLHistoryUIActions = actions.Actions({
// - [ 'open', 'close' ] - explicitly select event // - [ 'open', 'close' ] - explicitly select event
// //
// XXX do we need this??? // XXX do we need this???
// XXX used only in .listURLHistoryOld(..)
'url-history-list-clear': ['open', 'close'], 'url-history-list-clear': ['open', 'close'],
// If true pushing the pin item button will also focus the item // If true pushing the pin item button will also focus the item
@ -748,7 +749,7 @@ var URLHistoryUIActions = actions.Actions({
to_remove = [] to_remove = []
// sort history... // sort history...
that.sortURLHistory(to_sort) that.sortURLHistory(to_sort, true)
// toggle pins... // toggle pins...
pins pins
.concat(orig_pins || []) .concat(orig_pins || [])
@ -848,6 +849,10 @@ var URLHistoryUIActions = actions.Actions({
.on('close', function(){ .on('close', function(){
save() save()
}) })
.on('pin_button', function(evt, p, e){
that.config['url-history-focus-on-pin']
&& dialog.select(e)
})
.on('to_top_button', function(evt, p, e){ .on('to_top_button', function(evt, p, e){
to_sort.splice(0, 0, p) to_sort.splice(0, 0, p)
}) })

View File

@ -1067,7 +1067,11 @@ function(list, pins, options){
} }
// XXX this is slow... // XXX this is slow...
that.dialog.update() that.dialog
.update()
.then(function(){
that.dialog.trigger('pin_button', p, cur)
})
}] }]
;[buttons, pins_buttons] ;[buttons, pins_buttons]
.forEach(function(b){ .forEach(function(b){