diff --git a/Viewer/css/experimenting.css b/Viewer/css/experimenting.css index 9bd0f343..d6a86bbe 100755 --- a/Viewer/css/experimenting.css +++ b/Viewer/css/experimenting.css @@ -159,6 +159,12 @@ body { /* XXX this does not work in chrome + local file... */ /*filter: url(filters.svg#EdgeDetect);*/ } +.image-shadows-and-highlights { + filter: url(#ShadowsAndHilights); +} +.image-gamma-shadows { + filter: url(#GammaShadows); +} diff --git a/Viewer/css/filters.svg b/Viewer/css/filters.svg index ebe2e00f..6ac3b494 100755 --- a/Viewer/css/filters.svg +++ b/Viewer/css/filters.svg @@ -2,8 +2,31 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/Viewer/doc/NOTES b/Viewer/doc/NOTES index 7218a09b..7372c899 100755 --- a/Viewer/doc/NOTES +++ b/Viewer/doc/NOTES @@ -37,3 +37,23 @@ This seems a bit confusing, so at least the naming convention should be revised. +Entry points +============ + +The current state of things is far from optimal -- we have "three" +"different" entry points: + + - index.html - Browser + - e.js - electron + -> electron.html - electron-specific html + - ig.js - node + -> e.js - node can spawn an electron app + + +The goal is to simplify this by merging the electron/node entry points +and merging the html files into one. + + + + + diff --git a/Viewer/e.js b/Viewer/e.js index 18e757f9..383db5b8 100644 --- a/Viewer/e.js +++ b/Viewer/e.js @@ -4,40 +4,24 @@ * ImageGrid.Viewer Electron entry point... * * +* NOTE: this is kept as simple as possible to speed up initial loading. +* **********************************************************************/ //require('v8-compile-cache') var electron = require('electron') -var app = electron.app -var BrowserWindow = electron.BrowserWindow var path = require('path') var url = require('url') -//var fs = require('fs') - -var argv = require('ig-argv') var VERSION = require('./version').version //--------------------------------------------------------------------- -//require('./cfg/requirejs') - -//var _require = require -//require = requirejs - - -/*********************************************************************/ - -// XXX process args... -// ...might be a good idea to process args in two stages: -// 1) process pre-start args: -// splash screen opts -// debug stuff (dev tools etc) -// start mode (ui vs cli ...) -// 2) process the rest of the args within the started context... +var app = electron.app +var BrowserWindow = electron.BrowserWindow @@ -45,13 +29,10 @@ var VERSION = require('./version').version var win -// XXX move this to splash.js (or an electron-specific variant of it) -// and use both here and in app.js... -// ...another way would be to make this module importable... +// XXX might be nice to show load progress on splash... function createSplash(){ // NOTE: this is done here as this does not depend on code loading, // thus showing the splash significantly faster... - // XXX also show load progress here... var splash = global.splash = new BrowserWindow({ // let the window to get ready before we show it to the user... show: false, @@ -73,8 +54,6 @@ function createSplash(){ autoHideMenuBar: true, }) splash.loadURL(url.format({ - // XXX unify this with index.html - //pathname: path.join(__dirname, 'index.html'), pathname: path.join(__dirname, 'splash.html'), protocol: 'file:', slashes: true @@ -93,9 +72,10 @@ function createSplash(){ disabled ? splash.destroy() : splash.show() }) }) - return splash -} + return splash } +// XXX get initial settings from config... +// XXX unify index.html and electron.html function createWindow(){ // Create the browser window. win = new BrowserWindow({ @@ -105,14 +85,11 @@ function createWindow(){ enableRemoteModule: true, }, - // let the window to get ready before we show it to the user... + // let the window get ready before we show it to the user... show: false, - // XXX get from config... (???) - // XXX for some reason this shows as black... backgroundColor: '#333333', - width: 800, height: 600, @@ -122,38 +99,23 @@ function createWindow(){ }) // disable default menu... win.setMenu(null) - - //win.openDevTools() - - - // and load the index.html of the app. win.loadURL(url.format({ - // XXX unify this with index.html - //pathname: path.join(__dirname, 'index.html'), - pathname: path.join(__dirname, 'electron.html'), + pathname: path.join(__dirname, 'index.html'), + //pathname: path.join(__dirname, 'electron.html'), protocol: 'file:', slashes: true })) + // XXX HACK: pass this in a formal way... (???) + win.once('ready-to-show', + function(){ global.readyToShow = true }) + win.on('closed', + function(){ win = null }) - // XXX HACK: pass this in a formal way... - win.once('ready-to-show', function(){ - global.readyToShow = true - }) - - // Open the DevTools. + // devtools for different windows... //win.webContents.openDevTools() + //win.openDevTools() - // Emitted when the window is closed. - win.on('closed', () => { - // Dereference the window object, usually you would store windows - // in an array if your app supports multi windows, this is the time - // when you should delete the corresponding element. - win = null - }) - - - return win -} + return win } @@ -182,5 +144,6 @@ app.on('activate', function(){ + /********************************************************************** * vim:set ts=4 sw=4 : */ diff --git a/Viewer/electron.html b/Viewer/electron.html deleted file mode 100755 index 2b91416d..00000000 --- a/Viewer/electron.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - diff --git a/Viewer/features/all.js b/Viewer/features/all.js index 55ef2c1f..753e393a 100755 --- a/Viewer/features/all.js +++ b/Viewer/features/all.js @@ -28,13 +28,9 @@ require('features/ui') // XXX require('features/ui-blank-render') require('features/ui-ribbons') -//require('features/ui-preact-render') -//require('features/ui-virtual-dom') -//require('features/ui-react') // XXX require('features/ui-partial-ribbons-precache') require('features/ui-partial-ribbons-2') -//require('features/ui-partial-ribbons-vdom') require('features/ui-single-image') require('features/ui-chrome') require('features/ui-progress') diff --git a/Viewer/features/cli.js b/Viewer/features/cli.js index 3360bc0a..311a4dfa 100755 --- a/Viewer/features/cli.js +++ b/Viewer/features/cli.js @@ -122,7 +122,7 @@ var CLIActions = actions.Actions({ }], // handle logger progress... - // XXX this is a copy from ui-progress -- need to reuse... + // XXX this is a copy from ui-progress -- need to reuse if possible... handleLogItem: ['- System/', function(logger, path, status, ...rest){ var msg = path.join(': ') @@ -230,7 +230,7 @@ var CLIActions = actions.Actions({ || global.ig.isStopped()) && process.exit() }) this.__keep_running = true }], - // XXX + /*/ XXX startWorker: ['- System/Start as worker', {cli: '-worker'}, function(){ @@ -239,7 +239,7 @@ var CLIActions = actions.Actions({ // Actions... // - /*/ XXX + // XXX // XXX this should be a nested parser... // args: // from=PATH @@ -305,13 +305,13 @@ var CLIActions = actions.Actions({ doc: 'Include virtual blocks', arg: '| include-virtual', type: 'bool', - value: true, + //value: true, default: true, }, '-clean-target': { doc: 'Cleanup target before export (backup)', arg: '| clean-target', type: 'bool', - value: true, + //value: true, default: true, }, '-no-*': { doc: 'Negate boolean option value', diff --git a/Viewer/features/keyboard.js b/Viewer/features/keyboard.js index 453a40b9..804ef3a9 100755 --- a/Viewer/features/keyboard.js +++ b/Viewer/features/keyboard.js @@ -456,8 +456,8 @@ module.GLOBAL_KEYBOARD = { // filters... // NOTE: Esc will also clear the filter (see "Preview filter" mode above)... shift_F: 'browseActions: "/Image/Preview filter/" -- Preview filters...', - ';': 'togglePreviewFilter: "Show shadows" -- Preview shadows', - ':': 'togglePreviewFilter: "Show highlights" -- Preview highlights', + ';': 'togglePreviewFilter: "Show clipping" -- Preview clipping', + ':': 'togglePreviewFilter: "Show shadows" -- Preview shadows', 'caps+:': ':', '"': 'togglePreviewFilter: "Black and white" -- Preview black and white', "'": 'togglePreviewFilter: "Edge detect" -- Show edges', diff --git a/Viewer/features/ui.js b/Viewer/features/ui.js index 66f8d9f0..83eac6a8 100755 --- a/Viewer/features/ui.js +++ b/Viewer/features/ui.js @@ -2220,13 +2220,16 @@ module.PreviewFilters = core.ImageGridFeatures.Feature({ config: { 'preview-filters': { // exposure aids... - 'Show shadows': 'image-show-shadows', - 'Show highlights': 'image-show-highlights', + //'Show shadows': 'image-show-shadows', + //'Show highlights': 'image-show-highlights', + 'Show clipping': 'image-shadows-and-highlights', + 'Show shadows': 'image-gamma-shadows', // sharpness aids... 'Black and white': 'image-bw', 'Edge detect': 'image-edge-detect', + 'No filters': 'none', }, }, diff --git a/Viewer/ig.js b/Viewer/ig.js index 259d321e..589b9189 100755 --- a/Viewer/ig.js +++ b/Viewer/ig.js @@ -25,27 +25,23 @@ global.requirejs = -//--------------------------------------------------------------------- +/*********************************************************************/ -// XXX need to automate this... var core = require('features/core') -var base = require('features/base') +// XXX for some reason if this is not loaded here things break in CLI... +// ...setting priority does not help... var cli = require('features/cli') - var meta = require('features/meta') -/*********************************************************************/ +//--------------------------------------------------------------------- // NOTE: this is here to simplify importing... var ImageGridFeatures = module.ImageGridFeatures = core.ImageGridFeatures - -//--------------------------------------------------------------------- - // setup actions and start... ImageGridFeatures .setup([ @@ -56,5 +52,6 @@ ImageGridFeatures + /********************************************************************** * vim:set ts=4 sw=4 : */ diff --git a/Viewer/imagegrid/file.js b/Viewer/imagegrid/file.js index 48de0d84..0d384e89 100755 --- a/Viewer/imagegrid/file.js +++ b/Viewer/imagegrid/file.js @@ -26,7 +26,6 @@ var data = require('imagegrid/data') var images = require('imagegrid/images') var util = require('lib/util') -var tasks = require('lib/tasks') @@ -735,8 +734,6 @@ function(base, pattern, previews, index_dir, absolute_path){ var copyPreviews = module.copyPreviews = function(){ - var q = tasks.Queue.clone() - // XXX } diff --git a/Viewer/index.html b/Viewer/index.html index 075a957c..55221ac6 100755 --- a/Viewer/index.html +++ b/Viewer/index.html @@ -1,15 +1,13 @@ - - - +ImageGrid.Viewer - + @@ -20,20 +18,18 @@ - - + - - - + + - - - - + + - - - - - - - - - - - - - - - + - - - + - - - - + + - - + - - - + - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - +
diff --git a/Viewer/splash.html b/Viewer/splash.html index 022eaa5c..704525dd 100644 --- a/Viewer/splash.html +++ b/Viewer/splash.html @@ -46,7 +46,7 @@ body { } - +
ImageGrid.Viewer