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