diff --git a/ui (gen4)/features/ui-widgets.js b/ui (gen4)/features/ui-widgets.js index 6376b5ee..4633bb8b 100755 --- a/ui (gen4)/features/ui-widgets.js +++ b/ui (gen4)/features/ui-widgets.js @@ -387,6 +387,8 @@ module.WidgetTest = core.ImageGridFeatures.Feature({ // - pretty name // - shortcut key // - image type to open +// XXX add root button... +// XXX disable the remove button on "System default" // XXX move this to a separate feature... var ExternalEditorActions = actions.Actions({ @@ -461,8 +463,6 @@ module.ExternalEditor = core.ImageGridFeatures.Feature({ var ExternalEditorUIActions = actions.Actions({ - // XXX add root button... - // XXX disable the remove button on "System default" listExtenalEditors: ['Edit/List external editors', function(){ var that = this @@ -529,15 +529,35 @@ var ExternalEditorUIActions = actions.Actions({ // move to top... ['♦', function(p){ - var top = this.filter('*', false).first() + var target = this.filter(0, false) var cur = this.filter('"'+p+'"', false) var i = _getEditor(p) - if(!top.is(cur)){ - top.before(cur) + if(!target.is(cur)){ + target.before(cur) editors.splice(0, 0, editors.splice(i, 1)[0]) + that.config['external-editors'] = editors + } + }], + // set secondary editor... + // XXX make a simpler icon.... + ['♦♦', + function(p){ + var target = this.filter(1, false) + var cur = this.filter('"'+p+'"', false) + + var i = _getEditor(p) + + if(!target.is(cur)){ + if(target.prev().is(cur)){ + target.after(cur) + } else { + target.before(cur) + } + editors.splice(1, 0, editors.splice(i, 1)[0]) + that.config['external-editors'] = editors } }], @@ -582,6 +602,7 @@ var ExternalEditorUIActions = actions.Actions({ }) }) + o.client.select(0) o.client.dom.addClass('editor-list') return o diff --git a/ui (gen4)/index.html b/ui (gen4)/index.html index 7df73555..07736d2f 100755 --- a/ui (gen4)/index.html +++ b/ui (gen4)/index.html @@ -125,12 +125,18 @@ body { .browse-widget.editor-list .list div:first-child .text:after { - content: "(default)"; + content: "(primary)"; margin-left: 5px; opacity: 0.5; font-style: italic; } -.browse-widget.editor-list .list div:last-child { +.browse-widget.editor-list .list div:nth-child(2) .text:after { + content: "(secondary)"; + margin-left: 5px; + opacity: 0.5; + font-style: italic; +} +.browse-widget.editor-list .list div:last-child .text { font-style: italic; } .browse-widget.editor-list .list div:last-child .button { diff --git a/ui (gen4)/ui.js b/ui (gen4)/ui.js index 82f0de21..e28acadf 100755 --- a/ui (gen4)/ui.js +++ b/ui (gen4)/ui.js @@ -230,6 +230,7 @@ module.GLOBAL_KEYBOARD = { }, E: { default: 'openInExtenalEditor', + shift: 'openInExtenalEditor: 1', alt: 'listExtenalEditors', }, C: 'browseActions: "/Crop/"',