diff --git a/ui/editor.js b/ui/editor.js
new file mode 100755
index 00000000..95b30019
--- /dev/null
+++ b/ui/editor.js
@@ -0,0 +1,49 @@
+/**********************************************************************
+*
+*
+*
+**********************************************************************/
+
+//var DEBUG = DEBUG != null ? DEBUG : true
+
+
+/*********************************************************************/
+
+// ImageGrid-specific editor setup...
+function setupEditor(){
+ // build the editor...
+ if($('.panel').length == 0){
+ $('.viewer')
+ .append(makeEditorControls('.current.image')
+ .addClass('noScroll'))
+
+ // setup the event to update the editor...
+ .on('focusingImage', function(){
+ if($('.panel').css('display') != 'none'){
+ reloadControls('.current.image')
+ }
+ })
+
+ reloadControls('.current.image')
+
+ // toggle the editor...
+ // XXX do we need a real mode for this?
+ } else {
+ var ed = $('.panel')
+
+ // show...
+ if(ed.css('display') == 'none'){
+ reloadControls('.current.image')
+ ed.show()
+
+ // hide...
+ } else {
+ ed.hide()
+ }
+ }
+}
+
+
+
+/**********************************************************************
+* vim:set ts=4 sw=4 : */
diff --git a/ui/index.html b/ui/index.html
index 76a13d3d..826900d3 100755
--- a/ui/index.html
+++ b/ui/index.html
@@ -37,6 +37,7 @@
+
diff --git a/ui/keybindings.js b/ui/keybindings.js
index 6c81c1c7..ec2a55d9 100755
--- a/ui/keybindings.js
+++ b/ui/keybindings.js
@@ -702,28 +702,8 @@ var KEYBOARD_CONFIG = {
E: {
default: doc('Open image in external software', openImage),
- ctrl: doc('Open preview editor panel (Experimental)',
- function(){
- if($('.panel').length == 0){
- $('.viewer')
- .append(makeControls('.current.image')
- .addClass('noScroll'))
- .on('focusingImage', function(){
- if($('.panel').css('display') != 'none'){
- reloadControls('.current.image')
- }
- })
- reloadControls('.current.image')
- } else {
- var ed = $('.panel')
- if(ed.css('display') == 'none'){
- reloadControls('.current.image')
- ed.show()
- } else {
- ed.hide()
- }
- }
- }),
+ // XXX Experimental
+ ctrl: doc('Open preview editor panel (Experimental)', setupEditor),
},
// XXX make F4 a default editor and E a default viewer...
F4: 'E',
diff --git a/ui/lib/editor.js b/ui/lib/editor.js
index ba1db64c..9204a573 100755
--- a/ui/lib/editor.js
+++ b/ui/lib/editor.js
@@ -4,6 +4,7 @@
**********************************************************************/
var DEFAULT_FILTER_ORDER = [
+// 'gamma',
'brightness',
'contrast',
'saturate',
@@ -235,7 +236,7 @@ function makeLogRange(text, filter, target){
}
-function makeControls(target){
+function makeEditorControls(target){
// tool panel...
var panel = $('