aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2011-03-06 15:37:06 +0000
committerstuconnolly <stuart02@gmail.com>2011-03-06 15:37:06 +0000
commit915a3831525bf3a9350648d82f86dd54ae366292 (patch)
tree4369c8a48d129011ad615960a740f2fb26eb330c
parent755287031cdc15298155a5dbffe43476801d97b3 (diff)
downloadsequelpro-915a3831525bf3a9350648d82f86dd54ae366292.tar.gz
sequelpro-915a3831525bf3a9350648d82f86dd54ae366292.tar.bz2
sequelpro-915a3831525bf3a9350648d82f86dd54ae366292.zip
Comments.
-rw-r--r--Source/SPConnectionController.m6
-rw-r--r--Source/SPConnectionControllerDelegate.m6
2 files changed, 7 insertions, 5 deletions
diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m
index 258d442a..d3c75e16 100644
--- a/Source/SPConnectionController.m
+++ b/Source/SPConnectionController.m
@@ -1021,7 +1021,7 @@ static NSComparisonResult compareFavoritesUsingKey(id favorite1, id favorite2, v
*/
- (void)sheetDidEnd:(id)sheet returnCode:(NSInteger)returnCode contextInfo:(NSString *)contextInfo
{
- // Remove the current favorite/group
+ // Remove the current favorite/group node
if ([contextInfo isEqualToString:SPRemoveNode]) {
if (returnCode == NSAlertDefaultReturn) {
@@ -1052,7 +1052,7 @@ static NSComparisonResult compareFavoritesUsingKey(id favorite1, id favorite2, v
[prefs setInteger:0 forKey:SPLastFavoriteID];
}
- // Reset default favorite
+ // If required, reset the default favorite
if ([[favorite objectForKey:SPFavoriteIDKey] integerValue] == [prefs integerForKey:SPDefaultFavorite]) {
[prefs setInteger:[prefs integerForKey:SPLastFavoriteID] forKey:SPDefaultFavorite];
}
@@ -1272,7 +1272,7 @@ static NSComparisonResult compareFavoritesUsingKey(id favorite1, id favorite2, v
[self setHost:@""];
}
- // Update the name for newly added favorites if not already touched by the user, by trigger a KVO update
+ // Update the name for newly added favorites if not already touched by the user, by triggering a KVO update
if (!favoriteNameFieldWasTouched) {
[self setName:[NSString stringWithFormat:@"%@@%@",
([favorite objectForKey:SPFavoriteUserKey]) ? [favorite objectForKey:SPFavoriteUserKey] : @"",
diff --git a/Source/SPConnectionControllerDelegate.m b/Source/SPConnectionControllerDelegate.m
index 897c86ff..4bff297a 100644
--- a/Source/SPConnectionControllerDelegate.m
+++ b/Source/SPConnectionControllerDelegate.m
@@ -30,6 +30,8 @@
#define CELL(cell) (SPTableTextFieldCell *)cell
+static const NSString *SPDatabaseImage = @"database-small";
+
@implementation SPConnectionController (SPConnectionControllerDelegate)
#pragma mark -
@@ -98,7 +100,7 @@
[CELL(cell) setImage:nil];
}
else {
- [CELL(cell) setImage:(![node isGroup]) ? [NSImage imageNamed:@"database-small"] : folderImage];
+ [CELL(cell) setImage:(![node isGroup]) ? [NSImage imageNamed:SPDatabaseImage] : folderImage];
}
}
@@ -277,7 +279,7 @@
if (nameFieldIsEmpty || (!favoriteNameFieldWasTouched && field == socketUserField)) {
[socketNameField setStringValue:[NSString stringWithFormat:@"%@@localhost", [socketUserField stringValue]]];
-
+
// Trigger KVO update
[self setName:[socketNameField stringValue]];