aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/SPConnectionController.m4
-rw-r--r--Source/SPConstants.h1
2 files changed, 4 insertions, 1 deletions
diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m
index 0a75c4d2..a06637e5 100644
--- a/Source/SPConnectionController.m
+++ b/Source/SPConnectionController.m
@@ -521,7 +521,7 @@ static NSComparisonResult compareFavoritesUsingKey(id favorite1, id favorite2, v
// Perform sorting
[self _sortFavorites];
- if ((NSInteger)previousSortItem > -1) [[[sender menu] itemAtIndex:previousSortItem] setState:NSOffState];
+ if (previousSortItem > SPFavoritesSortUnsorted) [[[sender menu] itemAtIndex:previousSortItem] setState:NSOffState];
[[[sender menu] itemAtIndex:currentSortItem] setState:NSOnState];
}
@@ -1184,6 +1184,8 @@ static NSComparisonResult compareFavoritesUsingKey(id favorite1, id favorite2, v
case SPFavoritesSortTypeItem:
sortKey = SPFavoriteTypeKey;
break;
+ case SPFavoritesSortUnsorted:
+ break;
}
[self _sortTreeNode:[[favoritesRoot childNodes] objectAtIndex:0] usingKey:sortKey];
diff --git a/Source/SPConstants.h b/Source/SPConstants.h
index 3a15f71c..8e9c31b5 100644
--- a/Source/SPConstants.h
+++ b/Source/SPConstants.h
@@ -129,6 +129,7 @@ typedef enum
// Sort by constants
typedef enum
{
+ SPFavoritesSortUnsorted = -1,
SPFavoritesSortNameItem = 0,
SPFavoritesSortHostItem = 1,
SPFavoritesSortTypeItem = 2