mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 02:10:08 +00:00
cleanup and some fixes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
b3bb2076d4
commit
8946daaa88
@ -28,23 +28,13 @@ var browseWalk = require('lib/widget/browse-walk')
|
||||
/*********************************************************************/
|
||||
// External editor...
|
||||
// XXX need to get the resulting (edited) file and add it to the index...
|
||||
// XXX make a UI for adding new editors:
|
||||
// - enter path / browse (done)
|
||||
// - pretty name
|
||||
// - shortcut key
|
||||
// - image type to open
|
||||
// XXX add root button...
|
||||
// XXX disable the remove button on "System default"
|
||||
// XXX move the CSS out of index.html and into a correct CSS file...
|
||||
// XXX move this to a separate feature...
|
||||
|
||||
var ExternalEditorActions = actions.Actions({
|
||||
config: {
|
||||
// XXX do we actually need this????
|
||||
'external-editor-default': 'System default',
|
||||
|
||||
// XXX should this be a dict???
|
||||
// ...a list is simpler for sorting...
|
||||
'external-editors': [
|
||||
{
|
||||
// NOTE: empty means use app name...
|
||||
@ -55,14 +45,6 @@ var ExternalEditorActions = actions.Actions({
|
||||
arguments: '',
|
||||
target: '',
|
||||
},
|
||||
/*
|
||||
{
|
||||
title: 'IrfanView',
|
||||
path: 'C:/Program Files (x86)/IrfanView/i_view32.exe',
|
||||
arguments: '',
|
||||
target: '',
|
||||
},
|
||||
*/
|
||||
],
|
||||
|
||||
// XXX this is not used yet...
|
||||
@ -150,9 +132,6 @@ module.ExternalEditor = core.ImageGridFeatures.Feature({
|
||||
//---------------------------------------------------------------------
|
||||
|
||||
var ExternalEditorUIActions = actions.Actions({
|
||||
// XXX get editor data...
|
||||
// XXX set editor data...
|
||||
// XXX revise editor format...
|
||||
// XXX empty title -- use app name without ext...
|
||||
externalEditorDialog: ['- Edit/',
|
||||
function(editor){
|
||||
@ -273,7 +252,6 @@ var ExternalEditorUIActions = actions.Actions({
|
||||
|
||||
return o
|
||||
}],
|
||||
// XXX use .externalEditorDialog(..)
|
||||
// XXX need to support $TARGET in args...
|
||||
// ...append if not present...
|
||||
listExtenalEditors: ['Edit/List external editors',
|
||||
@ -307,7 +285,6 @@ var ExternalEditorUIActions = actions.Actions({
|
||||
make(['Add new editor...'])
|
||||
.on('open', function(){
|
||||
closingPrevented = true
|
||||
// XXX open 'new editor...' dialog...
|
||||
var b = overlay.Overlay(that.ribbons.viewer,
|
||||
browseWalk.makeWalk(
|
||||
null, '/',
|
||||
@ -316,21 +293,16 @@ var ExternalEditorUIActions = actions.Actions({
|
||||
{})
|
||||
// path selected...
|
||||
.open(function(evt, path){
|
||||
// XXX
|
||||
//this.parent.close()
|
||||
|
||||
// add a pretty name...
|
||||
editors.push({
|
||||
path: path,
|
||||
})
|
||||
that.config['external-editors'] = editors
|
||||
|
||||
// XXX update the editor list...
|
||||
|
||||
// is this the correct way to do this???
|
||||
b.close()
|
||||
o.close()
|
||||
that.listExtenalEditors()
|
||||
o.client.update()//.close()
|
||||
//that.listExtenalEditors()
|
||||
}))
|
||||
.close(function(){
|
||||
o.focus()
|
||||
|
||||
@ -158,7 +158,7 @@ body {
|
||||
.browse-widget.editor-list .list>div:first-child .button:nth-child(4) {
|
||||
opacity: 0.1;
|
||||
}
|
||||
.browse-widget.editor-list .list>div:nth-child(2) .text:after {
|
||||
.browse-widget.editor-list .list>div:nth-child(2):not(:last-child) .text:after {
|
||||
content: "(secondary)";
|
||||
margin-left: 5px;
|
||||
opacity: 0.5;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user