diff --git a/ui (gen4)/images.js b/ui (gen4)/images.js index 92f1b82d..0bc9f89f 100755 --- a/ui (gen4)/images.js +++ b/ui (gen4)/images.js @@ -275,6 +275,7 @@ module.makeImageSeqOrNameCmp = function(data, get, seq){ /*********************************************************************/ +// XXX depends on jli.quoteRegExp(..) var ImagesClassPrototype = module.ImagesClassPrototype = { // XXX populate the image doc better... @@ -284,7 +285,8 @@ module.ImagesClassPrototype = { var images = new this() // XXX stub... var i = 0 - var base_pattern = base ? RegExp('^' + base) : null + //var base_pattern = base ? RegExp('^' + base) : null + var base_pattern = base ? RegExp('^' + quoteRegExp(base)) : null data.forEach(function(path){ var gid = hash('I'+i) // XXX populate the image doc better... diff --git a/ui (gen4)/lib/jli.js b/ui (gen4)/lib/jli.js index f2ba87bb..7bcf461e 100755 --- a/ui (gen4)/lib/jli.js +++ b/ui (gen4)/lib/jli.js @@ -1193,6 +1193,10 @@ function assyncCall(func){ return _func } +// Quote a string and convert to RegExp to match self literally. +function quoteRegExp(str){ + return str.replace(/([\.\\\/\(\)\[\]\$\*\+\-\{\}\@\^\&\?\<\>])/g, '\\$1') +} /********************************************************************** diff --git a/ui (gen4)/lib/widget/browse.js b/ui (gen4)/lib/widget/browse.js index f3b56286..c6462438 100755 --- a/ui (gen4)/lib/widget/browse.js +++ b/ui (gen4)/lib/widget/browse.js @@ -36,10 +36,12 @@ var quoteWS = function(str){ // Quote a string and convert to RegExp to match self literally. +// XXX this depends on jli.quoteRegExp(..) function toRegExp(str){ return RegExp('^' // quote regular expression chars... - +str.replace(/([\.\\\/\(\)\[\]\$\*\+\-\{\}\@\^\&\?\<\>])/g, '\\$1') + +quoteRegExp(str) + //+str.replace(/([\.\\\/\(\)\[\]\$\*\+\-\{\}\@\^\&\?\<\>])/g, '\\$1') +'$') } diff --git a/ui (gen4)/viewer.js b/ui (gen4)/viewer.js index f32dd2eb..87e2ce96 100755 --- a/ui (gen4)/viewer.js +++ b/ui (gen4)/viewer.js @@ -1006,8 +1006,10 @@ actions.Actions({ // move to a more logical spot... 'max-key-repeat-rate': 0, + // Theme to set on startup... 'theme': null, + // Supported themes... 'themes': [ 'gray', 'dark', @@ -3717,7 +3719,9 @@ module.AppControl = ImageGridFeatures.Feature({ if(this.images){ var img = this.images[this.current] - win.title = 'ImageGrid.Viewer: '+ (img.name || img.path) + win.title = 'ImageGrid.Viewer: ' + + (img.name + || img.path.replace(/\.[\\\/]/, '')) } }], ],