Fix for spotlight crash.
parent
2a6d847f70
commit
ae469a43ec
|
@ -8,12 +8,12 @@
|
|||
<string key="IBDocument.HIToolboxVersion">352.00</string>
|
||||
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<integer value="21"/>
|
||||
<integer value="1324"/>
|
||||
<integer value="513"/>
|
||||
<integer value="1063"/>
|
||||
<integer value="463"/>
|
||||
<integer value="419"/>
|
||||
<integer value="1063"/>
|
||||
<integer value="21"/>
|
||||
<integer value="513"/>
|
||||
<integer value="463"/>
|
||||
<integer value="1324"/>
|
||||
</object>
|
||||
<object class="NSArray" key="IBDocument.PluginDependencies">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
|
@ -5575,7 +5575,7 @@ MDA4AA</bytes>
|
|||
<reference ref="9"/>
|
||||
<reference ref="9"/>
|
||||
<reference ref="9"/>
|
||||
<integer value="1" id="5"/>
|
||||
<reference ref="9"/>
|
||||
<string>NSIsNil</string>
|
||||
</object>
|
||||
</object>
|
||||
|
@ -5611,7 +5611,7 @@ MDA4AA</bytes>
|
|||
<string/>
|
||||
<string/>
|
||||
<string>Not Playing</string>
|
||||
<reference ref="5"/>
|
||||
<reference ref="9"/>
|
||||
</object>
|
||||
</object>
|
||||
<int key="NSNibBindingConnectorVersion">2</int>
|
||||
|
@ -5646,7 +5646,7 @@ MDA4AA</bytes>
|
|||
<string/>
|
||||
<string/>
|
||||
<string>Not Playing</string>
|
||||
<reference ref="5"/>
|
||||
<reference ref="9"/>
|
||||
</object>
|
||||
</object>
|
||||
<int key="NSNibBindingConnectorVersion">2</int>
|
||||
|
@ -5682,7 +5682,7 @@ MDA4AA</bytes>
|
|||
<reference ref="8"/>
|
||||
<reference ref="8"/>
|
||||
<reference ref="8"/>
|
||||
<reference ref="5"/>
|
||||
<reference ref="9"/>
|
||||
<string>NSIsNotNil</string>
|
||||
</object>
|
||||
</object>
|
||||
|
@ -5719,7 +5719,7 @@ MDA4AA</bytes>
|
|||
<reference ref="8"/>
|
||||
<reference ref="8"/>
|
||||
<reference ref="8"/>
|
||||
<reference ref="5"/>
|
||||
<reference ref="9"/>
|
||||
<string>NSIsNotNil</string>
|
||||
</object>
|
||||
</object>
|
||||
|
@ -5756,7 +5756,7 @@ MDA4AA</bytes>
|
|||
<reference ref="8"/>
|
||||
<reference ref="8"/>
|
||||
<reference ref="8"/>
|
||||
<reference ref="5"/>
|
||||
<reference ref="9"/>
|
||||
<string>NSIsNotNil</string>
|
||||
</object>
|
||||
</object>
|
||||
|
@ -5828,7 +5828,7 @@ MDA4AA</bytes>
|
|||
<reference ref="8"/>
|
||||
<reference ref="8"/>
|
||||
<reference ref="8"/>
|
||||
<reference ref="5"/>
|
||||
<reference ref="9"/>
|
||||
<string>NSIsNotNil</string>
|
||||
</object>
|
||||
</object>
|
||||
|
@ -5837,6 +5837,22 @@ MDA4AA</bytes>
|
|||
</object>
|
||||
<int key="connectionID">2107</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">searchByArtist:</string>
|
||||
<reference key="source" ref="710316598"/>
|
||||
<reference key="destination" ref="351894471"/>
|
||||
</object>
|
||||
<int key="connectionID">2118</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">searchByAlbum:</string>
|
||||
<reference key="source" ref="710316598"/>
|
||||
<reference key="destination" ref="565843521"/>
|
||||
</object>
|
||||
<int key="connectionID">2119</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
<object class="NSArray" key="orderedObjects">
|
||||
|
@ -8803,7 +8819,7 @@ MDA4AA</bytes>
|
|||
</object>
|
||||
</object>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">2117</int>
|
||||
<int key="maxID">2119</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
|
|
|
@ -74,6 +74,19 @@ static NSPredicate * musicOnlyPredicate = nil;
|
|||
|
||||
// hook my query transformer up to me
|
||||
[PausingQueryTransformer setSearchController:self];
|
||||
|
||||
[self registerDefaults];
|
||||
|
||||
// We want to bind the query's search scope to the user default that is
|
||||
// set from the NSPathControl.
|
||||
NSDictionary *bindOptions =
|
||||
[NSDictionary dictionaryWithObject:@"StringToSearchScopeTransformer"
|
||||
forKey:NSValueTransformerNameBindingOption];
|
||||
|
||||
[self.query bind:@"searchScopes"
|
||||
toObject:[NSUserDefaultsController sharedUserDefaultsController]
|
||||
withKeyPath:@"values.spotlightSearchPath"
|
||||
options:bindOptions];
|
||||
}
|
||||
|
||||
return self;
|
||||
|
@ -81,18 +94,6 @@ static NSPredicate * musicOnlyPredicate = nil;
|
|||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
[self registerDefaults];
|
||||
|
||||
// We want to bind the query's search scope to the user default that is
|
||||
// set from the NSPathControl.
|
||||
NSDictionary *bindOptions =
|
||||
[NSDictionary dictionaryWithObject:@"StringToSearchScopeTransformer"
|
||||
forKey:NSValueTransformerNameBindingOption];
|
||||
|
||||
[self.query bind:@"searchScopes"
|
||||
toObject:[NSUserDefaultsController sharedUserDefaultsController]
|
||||
withKeyPath:@"values.spotlightSearchPath"
|
||||
options:bindOptions];
|
||||
}
|
||||
|
||||
- (IBAction)toggleWindow:(id)sender
|
||||
|
|
Loading…
Reference in New Issue