From 0b4ee446f7052f964f704d8dfabe53103733325b Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Sat, 27 Mar 2010 15:34:31 +0000 Subject: Add the ability to sort the connection favorites table view in the preferences. Sort options are by name, host or type as well as the option to be sorted in reverse order. This implements issue #490. --- Source/TableDocument.m | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Source/TableDocument.m') diff --git a/Source/TableDocument.m b/Source/TableDocument.m index d73fa943..2a95c158 100644 --- a/Source/TableDocument.m +++ b/Source/TableDocument.m @@ -3148,6 +3148,12 @@ return ([[tablesListInstance valueForKeyPath:@"tables"] count] > 1); } + + // If validation for the sort favorites tableview items reaches here then the preferences window isn't + // open return NO. + if (([menuItem action] == @selector(sortFavorites:)) || ([menuItem action] == @selector(reverseFavoritesSortOrder:))) { + return NO; + } return [super validateMenuItem:menuItem]; } -- cgit v1.2.3