diff options
author | stuconnolly <stuart02@gmail.com> | 2010-03-31 18:01:50 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2010-03-31 18:01:50 +0000 |
commit | ea5088aa123745243ea6d93f684d0471be83b324 (patch) | |
tree | fa733fa620b9078753ef903dce36c3337da18e21 /Source/SPPreferenceController.m | |
parent | bb70e8aac1d86585e1cb2ad56c440f0298858c9f (diff) | |
download | sequelpro-ea5088aa123745243ea6d93f684d0471be83b324.tar.gz sequelpro-ea5088aa123745243ea6d93f684d0471be83b324.tar.bz2 sequelpro-ea5088aa123745243ea6d93f684d0471be83b324.zip |
Tidy up imports and fix 'Reverse Sort Order' when sorting connection favorites (Thanks Hans).
Diffstat (limited to 'Source/SPPreferenceController.m')
-rw-r--r-- | Source/SPPreferenceController.m | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/SPPreferenceController.m b/Source/SPPreferenceController.m index bdb3ff5e..a960c555 100644 --- a/Source/SPPreferenceController.m +++ b/Source/SPPreferenceController.m @@ -29,7 +29,6 @@ #import "SPKeychain.h" #import "TableDocument.h" #import "SPConnectionController.h" -#import "SPConstants.h" @interface SPPreferenceController (PrivateAPI) @@ -1303,10 +1302,10 @@ NSSortDescriptor *sortDescriptor = nil; if (currentSortItem == SPFavoritesSortTypeItem) { - sortDescriptor = [[[NSSortDescriptor alloc] initWithKey:sortKey ascending:reverseFavoritesSort] autorelease]; + sortDescriptor = [[[NSSortDescriptor alloc] initWithKey:sortKey ascending:(!reverseFavoritesSort)] autorelease]; } else { - sortDescriptor = [[[NSSortDescriptor alloc] initWithKey:sortKey ascending:reverseFavoritesSort selector:@selector(caseInsensitiveCompare:)] autorelease]; + sortDescriptor = [[[NSSortDescriptor alloc] initWithKey:sortKey ascending:(!reverseFavoritesSort) selector:@selector(caseInsensitiveCompare:)] autorelease]; } [favoritesController setSortDescriptors:[NSArray arrayWithObject:sortDescriptor]]; |