aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Interfaces/English.lproj/Console.xib47
-rw-r--r--Source/SPDatabaseDocument.m15
2 files changed, 57 insertions, 5 deletions
diff --git a/Interfaces/English.lproj/Console.xib b/Interfaces/English.lproj/Console.xib
index 340c4f3b..fb852146 100644
--- a/Interfaces/English.lproj/Console.xib
+++ b/Interfaces/English.lproj/Console.xib
@@ -147,6 +147,9 @@
<tableHeaderView key="headerView" id="112">
<rect key="frame" x="0.0" y="0.0" width="576" height="17"/>
<autoresizingMask key="autoresizingMask"/>
+ <connections>
+ <outlet property="menu" destination="DCA-JR-zjw" id="2UH-9N-pS2"/>
+ </connections>
</tableHeaderView>
</scrollView>
<progressIndicator hidden="YES" horizontalHuggingPriority="750" verticalHuggingPriority="750" minValue="16" maxValue="100" doubleValue="16" bezeled="NO" indeterminate="YES" controlSize="small" style="spinning" id="62">
@@ -164,7 +167,7 @@
<action selector="clearConsole:" target="-2" id="75"/>
</connections>
</button>
- <popUpButton id="77">
+ <popUpButton id="77" userLabel="Gear Menu Button">
<rect key="frame" x="-2" y="0.0" width="36" height="23"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<popUpButtonCell key="cell" type="bevel" bezelStyle="regularSquare" imagePosition="right" alignment="center" lineBreakMode="truncatingTail" inset="2" pullsDown="YES" arrowPosition="noArrow" selectedItem="80" id="78">
@@ -272,7 +275,7 @@
</button>
</subviews>
</customView>
- <menu id="64">
+ <menu id="64" userLabel="Table Row Context Menu">
<items>
<menuItem title="Copy" id="65">
<modifierMask key="keyEquivalentModifierMask"/>
@@ -283,6 +286,46 @@
</items>
</menu>
<userDefaultsController representsSharedInstance="YES" id="89"/>
+ <menu id="DCA-JR-zjw" userLabel="Table Header Context Menu">
+ <items>
+ <menuItem title="Time" state="on" id="Eqs-r2-Xz7">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="toggleShowTimeStamps:" target="-2" id="OMU-jP-CeY"/>
+ <binding destination="89" name="value" keyPath="values.ConsoleShowTimestamps" id="62b-Yd-Tlr">
+ <dictionary key="options">
+ <bool key="NSConditionallySetsEnabled" value="NO"/>
+ </dictionary>
+ </binding>
+ </connections>
+ </menuItem>
+ <menuItem title="Connection" state="on" id="xEF-YU-b4J">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="toggleShowConnections:" target="-2" id="Hhw-0n-qWg"/>
+ <binding destination="89" name="value" keyPath="values.ConsoleShowConnections" id="YKo-wm-6u8">
+ <dictionary key="options">
+ <bool key="NSConditionallySetsEnabled" value="NO"/>
+ </dictionary>
+ </binding>
+ </connections>
+ </menuItem>
+ <menuItem title="Database" state="on" id="kNX-td-f8A">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="toggleShowDatabases:" target="-2" id="1z7-qp-tCQ"/>
+ <binding destination="89" name="value" keyPath="values.ConsoleShowDatabases" id="0w1-96-uH9">
+ <dictionary key="options">
+ <bool key="NSConditionallySetsEnabled" value="NO"/>
+ </dictionary>
+ </binding>
+ </connections>
+ </menuItem>
+ <menuItem title="Query" state="on" enabled="NO" id="VWx-bC-aFb">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ </menuItem>
+ </items>
+ </menu>
</objects>
<resources>
<image name="button_action" width="30" height="22"/>
diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m
index 08b2737d..bc1acb22 100644
--- a/Source/SPDatabaseDocument.m
+++ b/Source/SPDatabaseDocument.m
@@ -427,7 +427,10 @@ static int64_t SPDatabaseDocumentInstanceCounter = 0;
#ifndef SP_CODA
// Set the fileURL and init the preferences (query favs, filters, and history) if available for that URL
- [self setFileURL:[[SPQueryController sharedQueryController] registerDocumentWithFileURL:[self fileURL] andContextInfo:spfPreferences]];
+ NSURL *newURL = [[SPQueryController sharedQueryController] registerDocumentWithFileURL:[self fileURL] andContextInfo:spfPreferences];
+#warning debug code for #2266
+ if(!newURL) NSLog(@"#2266: Trying to set nil fileURL in %s from queryController=%@ oldFileURL=%@ contextInfo=%@", __func__, [SPQueryController sharedQueryController], [self fileURL], spfPreferences);
+ [self setFileURL:newURL];
// ...but hide the icon while the document is temporary
if ([self isUntitled]) [[parentWindow standardWindowButton:NSWindowDocumentIconButton] setImage:nil];
@@ -3534,7 +3537,10 @@ static int64_t SPDatabaseDocumentInstanceCounter = 0;
[preferences setObject:[spfStructure objectForKey:SPContentFilters] forKey:SPContentFilters];
[[SPQueryController sharedQueryController] registerDocumentWithFileURL:[NSURL fileURLWithPath:fileName] andContextInfo:preferences];
- [self setFileURL:[NSURL fileURLWithPath:fileName]];
+ NSURL *newURL = [NSURL fileURLWithPath:fileName];
+#warning debug code for #2266
+ if(!newURL) NSLog(@"#2266: Trying to set nil fileURL in %s from fileName=%@", __func__, fileName);
+ [self setFileURL:newURL];
[[NSDocumentController sharedDocumentController] noteNewRecentDocumentURL:[NSURL fileURLWithPath:fileName]];
[self updateWindowTitle:self];
@@ -5088,7 +5094,10 @@ static int64_t SPDatabaseDocumentInstanceCounter = 0;
}
if (![self isSaveInBundle]) {
- [self setFileURL:[NSURL fileURLWithPath:path]];
+ NSURL *newURL = [NSURL fileURLWithPath:path];
+#warning debug code for #2266
+ if(!newURL) NSLog(@"#2266: Trying to set nil fileURL in %s from path=%@", __func__, path);
+ [self setFileURL:newURL];
}
[spfDocData setObject:[NSNumber numberWithBool:([[data objectForKey:@"connection"] objectForKey:@"password"]) ? YES : NO] forKey:@"save_password"];