some tweaking...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2016-01-05 04:48:24 +03:00
parent 8819df20a5
commit 5e030222af
3 changed files with 30 additions and 3 deletions

View File

@ -125,7 +125,7 @@ var LifeCycleActions = actions.Actions({
// nw...
if(this.__nw_stop_handler && this.runtime == 'nw'){
var gui = requirejs('nw.gui')
gui.Window.get().off('close', this.__nw_stop_handler)
//gui.Window.get().off('close', this.__nw_stop_handler)
delete this.__nw_stop_handler
}

View File

@ -24,6 +24,8 @@ var browse = require('lib/widget/browse')
var overlay = require('lib/widget/overlay')
var drawer = require('lib/widget/drawer')
var browseWalk = require('lib/widget/browse-walk')
/*********************************************************************/
@ -467,10 +469,29 @@ var ExternalEditorUIActions = actions.Actions({
}
})
var closingPrevented = false
// XXX STUB: use a top button...
// XXX this must not close the overlay...
list['Add new editor...'] = function(){
closingPrevented = true
// XXX open 'new editor...' dialog...
var b = overlay.Overlay(that.ribbons.viewer,
browseWalk.makeWalk(
null, '/',
// XXX
'*+(exe|cmd|ps1|sh)',
{})
// path selected...
.open(function(evt, path){
// XXX
//this.parent.close()
b.close()
}))
.close(function(){
o.focus()
})
return b
}
// build the dialog...
@ -511,14 +532,19 @@ var ExternalEditorUIActions = actions.Actions({
}],
] })
.open(function(evt){
o.close()
if(!closingPrevented){
o.close()
}
closingPrevented = false
}))
.close(function(){
})
// XXX STUB...
// XXX do this someplace like an update handler (for some
// reason not working yet)...
var b = o.client.filter(-1)
// XXX do this with CSS...
b.find('.button').remove()
b.find('.text').css({fontStyle: 'italic'})

View File

@ -162,6 +162,7 @@ var ContainerPrototype = {
options = options || {}
this.client = client
client.parent = this
// merge options...
var opts = Object.create(this.options)