diff options
-rw-r--r-- | Source/SPConnectionController.m | 2 | ||||
-rw-r--r-- | Source/SPConstants.h | 1 | ||||
-rw-r--r-- | Source/SPConstants.m | 1 | ||||
-rw-r--r-- | Source/SPPreferenceController.m | 14 |
4 files changed, 10 insertions, 8 deletions
diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m index d6779050..fb357f17 100644 --- a/Source/SPConnectionController.m +++ b/Source/SPConnectionController.m @@ -100,7 +100,7 @@ if ([prefs boolForKey:SPSelectLastFavoriteUsed] == YES) { tableRow = [prefs integerForKey:SPLastFavoriteIndex] + 1; } else { - tableRow = [prefs integerForKey:@"DefaultFavorite"] + 1; + tableRow = [prefs integerForKey:SPDefaultFavorite] + 1; } if (tableRow < [favorites count]) { previousType = [[[favorites objectAtIndex:tableRow] objectForKey:@"type"] intValue]; diff --git a/Source/SPConstants.h b/Source/SPConstants.h index 1a56e000..8043f4ba 100644 --- a/Source/SPConstants.h +++ b/Source/SPConstants.h @@ -124,3 +124,4 @@ extern NSString *SPTableColumnWidths; extern NSString *SPQueryHistory; extern NSString *SPDocumentTaskStartNotification; extern NSString *SPDocumentTaskEndNotification; +extern NSString *SPDefaultFavorite; diff --git a/Source/SPConstants.m b/Source/SPConstants.m index 39d0d705..6e990cf4 100644 --- a/Source/SPConstants.m +++ b/Source/SPConstants.m @@ -94,3 +94,4 @@ NSString *SPTableColumnWidths = @"tableColumnWidths"; NSString *SPQueryHistory = @"queryHistory"; NSString *SPDocumentTaskStartNotification = @"DocumentTaskStarted"; NSString *SPDocumentTaskEndNotification = @"DocumentTaskEnded"; +NSString *SPDefaultFavorite = @"DefaultFavorite"; diff --git a/Source/SPPreferenceController.m b/Source/SPPreferenceController.m index d9fd38eb..51211043 100644 --- a/Source/SPPreferenceController.m +++ b/Source/SPPreferenceController.m @@ -346,8 +346,8 @@ } // Reset default favorite - if ([favoritesTableView selectedRow] == [prefs integerForKey:@"DefaultFavorite"]) { - [prefs setInteger:[prefs integerForKey:SPLastFavoriteIndex] forKey:@"DefaultFavorite"]; + if ([favoritesTableView selectedRow] == [prefs integerForKey:SPDefaultFavorite]) { + [prefs setInteger:[prefs integerForKey:SPLastFavoriteIndex] forKey:SPDefaultFavorite]; } [favoritesController removeObjectAtArrangedObjectIndex:[favoritesTableView selectedRow]]; @@ -423,7 +423,7 @@ [prefs setBool:NO forKey:SPSelectLastFavoriteUsed]; // Minus 2 from index to account for the "Last Used" and separator items - [prefs setInteger:[defaultFavoritePopup indexOfSelectedItem]-2 forKey:@"DefaultFavorite"]; + [prefs setInteger:[defaultFavoritePopup indexOfSelectedItem]-2 forKey:SPDefaultFavorite]; } } @@ -470,7 +470,7 @@ // Set the default favorite popup back to preference if (sender == [defaultFavoritePopup lastItem]) { if (![prefs boolForKey:SPSelectLastFavoriteUsed]) { - [defaultFavoritePopup selectItemAtIndex:[prefs integerForKey:@"DefaultFavorite"]+2]; + [defaultFavoritePopup selectItemAtIndex:[prefs integerForKey:SPDefaultFavorite]+2]; } else { [defaultFavoritePopup selectItemAtIndex:0]; } @@ -603,8 +603,8 @@ } // Update default favorite to take on new value - if ([prefs integerForKey:@"DefaultFavorite"] == originalRow) { - [prefs setInteger:destinationRow forKey:@"DefaultFavorite"]; + if ([prefs integerForKey:SPDefaultFavorite] == originalRow) { + [prefs setInteger:destinationRow forKey:SPDefaultFavorite]; } [self updateDefaultFavoritePopup]; @@ -1002,7 +1002,7 @@ // Select the default favorite from prefs if (![prefs boolForKey:SPSelectLastFavoriteUsed]) { - [defaultFavoritePopup selectItemAtIndex:[prefs integerForKey:@"DefaultFavorite"] + 2]; + [defaultFavoritePopup selectItemAtIndex:[prefs integerForKey:SPDefaultFavorite] + 2]; } else { [defaultFavoritePopup selectItemAtIndex:0]; } |