aboutsummaryrefslogtreecommitdiffstats
path: root/TableDocument.m
diff options
context:
space:
mode:
Diffstat (limited to 'TableDocument.m')
-rw-r--r--TableDocument.m8
1 files changed, 7 insertions, 1 deletions
diff --git a/TableDocument.m b/TableDocument.m
index ad7644df..35aa550e 100644
--- a/TableDocument.m
+++ b/TableDocument.m
@@ -53,6 +53,10 @@ NSString *TableDocumentFavoritesControllerSelectionIndexDidChange = @"TableDocum
// register selection did change handler for favorites controller (used in connect sheet)
[favoritesController addObserver:self forKeyPath:@"selectionIndex" options:NSKeyValueChangeInsertion context:TableDocumentFavoritesControllerSelectionIndexDidChange];
+ // register double click for the favorites view (double click favorite to connect)
+ [connectFavoritesTableView setTarget:self];
+ [connectFavoritesTableView setDoubleAction:@selector(connect:)];
+
// find the Database -> Database Encoding menu (it's not in our nib, so we can't use interface builder)
selectEncodingMenu = [[[[[NSApp mainMenu] itemWithTag:1] submenu] itemWithTag:1] submenu];
@@ -311,7 +315,9 @@ reused when user hits the close button of the variablseSheet or of the createTab
{
NSEnumerator *enumerator = [favorites objectEnumerator];
id favorite;
- NSString *favoriteName = [NSString stringWithFormat:@"%@@%@/%@", user, host, database];
+ NSString *favoriteName = [NSString stringWithFormat:@"%@@%@", user, host];
+ if (![database isEqualToString:@""])
+ favoriteName = [NSString stringWithFormat:@"%@ %@", database, favoriteName];
// test if host and socket are not nil
if ([host isEqualToString:@""] && [socket isEqualToString:@""]) {