Revision: 2545
http://skim-app.svn.sourceforge.net/skim-app/?rev=2545&view=rev
Author: hofman
Date: 2007-07-23 04:58:31 -0700 (Mon, 23 Jul 2007)
Log Message:
-----------
Sort note contents case insensitive and numerically, in case someone wants to
label notes with some description including numbers.
Modified Paths:
--------------
trunk/NSArray_SKExtensions.m
trunk/SKMainWindowController.m
Modified: trunk/NSArray_SKExtensions.m
===================================================================
--- trunk/NSArray_SKExtensions.m 2007-07-23 11:34:12 UTC (rev 2544)
+++ trunk/NSArray_SKExtensions.m 2007-07-23 11:58:31 UTC (rev 2545)
@@ -59,7 +59,7 @@
}
- (NSArray *)arraySortedByContents {
- return [self sortedArrayUsingDescriptors:[NSArray
arrayWithObject:[[[NSSortDescriptor alloc] initWithKey:@"contents"
ascending:YES selector:@selector(caseInsensitiveCompare:)] autorelease]]];
+ return [self sortedArrayUsingDescriptors:[NSArray
arrayWithObject:[[[NSSortDescriptor alloc] initWithKey:@"contents"
ascending:YES selector:@selector(caseInsensitiveNumericCompare:)]
autorelease]]];
}
- (NSArray *)arraySortedByTypeAndContents {
Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m 2007-07-23 11:34:12 UTC (rev 2544)
+++ trunk/SKMainWindowController.m 2007-07-23 11:58:31 UTC (rev 2545)
@@ -3150,9 +3150,9 @@
NSSortDescriptor *boundsSortDescriptor = [[[NSSortDescriptor
alloc] initWithKey:@"bounds" ascending:ascending
selector:@selector(boundsCompare:)] autorelease];
NSMutableArray *sds = [NSMutableArray
arrayWithObjects:pageIndexSortDescriptor, boundsSortDescriptor, nil];
if ([tcID isEqualToString:@"type"]) {
- [sds insertObject:[[[NSSortDescriptor alloc]
initWithKey:@"noteType" ascending:YES] autorelease] atIndex:0];
+ [sds insertObject:[[[NSSortDescriptor alloc]
initWithKey:@"noteType" ascending:YES
selector:@selector(caseInsensitiveCompare:)] autorelease] atIndex:0];
} else if ([tcID isEqualToString:@"note"]) {
- [sds insertObject:[[[NSSortDescriptor alloc]
initWithKey:@"contents" ascending:YES
selector:@selector(caseInsensitiveCompare:)] autorelease] atIndex:0];
+ [sds insertObject:[[[NSSortDescriptor alloc]
initWithKey:@"contents" ascending:YES
selector:@selector(caseInsensitiveNumericCompare:)] autorelease] atIndex:0];
} else if ([tcID isEqualToString:@"page"]) {
if (oldTableColumn == nil)
ascending = NO;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit