mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-10-31 03:10:07 +00:00 
			
		
		
		
	more tweaking...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									903105efb7
								
							
						
					
					
						commit
						aab3a04cb6
					
				| @ -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...
 | ||||
|  | ||||
| @ -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') | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| /********************************************************************** | ||||
|  | ||||
| @ -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')
 | ||||
| 		+'$') | ||||
| } | ||||
| 
 | ||||
|  | ||||
| @ -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(/\.[\\\/]/, '')) | ||||
| 				} | ||||
| 			}], | ||||
| 	], | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user