Save metadata defaults after an edit.

This commit is contained in:
Damiano Galassi committed 2016-07-29 14:18:54 +02:00
1 parent 1df5f50612
commit 2c79b36e41
2 files changed
+8 -3

No files matched your search

+6 -1
View File
@@ -134,6 +134,11 @@ static void *SBMetadataPrefsViewControllerContex = &SBMetadataPrefsViewControlle
#pragma mark - Format Token Field Delegate
- (void)controlTextDidEndEditing:(NSNotification *)aNotification
{
[self save];
}
- (NSString *)tokenField:(NSTokenField *)tokenField displayStringForRepresentedObject:(id)representedObject
{
if ([representedObject rangeOfString: @"{"].location == 0) {
@@ -155,7 +160,7 @@ static void *SBMetadataPrefsViewControllerContex = &SBMetadataPrefsViewControlle
- (id)tokenField:(NSTokenField *)tokenField representedObjectForEditingString:(NSString *)editingString
{
return editingString;
return nil;
}
- (NSArray *)tokenField:(NSTokenField *)tokenField completionsForSubstring:(NSString *)substring indexOfToken:(NSInteger)tokenIndex
+2 -2
View File
@@ -101,7 +101,7 @@
<tokenFieldCell key="cell" selectable="YES" editable="YES" alignment="left" allowsEditingTextAttributes="YES" id="BaM-xn-Wzr">
<font key="font" metaFont="cellTitle"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</tokenFieldCell>
<connections>
<binding destination="5Ey-Te-51o" name="value" keyPath="objectValue.value" id="abE-Cv-9mt"/>
@@ -197,7 +197,7 @@
<rect key="frame" x="1" y="0.0" width="136" height="345"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnReordering="NO" columnSelection="YES" multipleSelection="NO" emptySelection="NO" autosaveColumns="NO" rowSizeStyle="automatic" headerView="Eh9-8P-dr0" viewBased="YES" id="nXW-oy-rtu">
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnReordering="NO" multipleSelection="NO" emptySelection="NO" autosaveColumns="NO" rowSizeStyle="automatic" headerView="Eh9-8P-dr0" viewBased="YES" id="nXW-oy-rtu">
<rect key="frame" x="0.0" y="0.0" width="136" height="322"/>
<autoresizingMask key="autoresizingMask"/>
<size key="intercellSpacing" width="3" height="2"/>