diff --git a/AppKit/CPTextView/CPTextView.j b/AppKit/CPTextView/CPTextView.j index e251fe5d4..3d5b66fef 100644 --- a/AppKit/CPTextView/CPTextView.j +++ b/AppKit/CPTextView/CPTextView.j @@ -1773,7 +1773,9 @@ var kDelegateRespondsTo_textShouldBeginEditing @end -var CPTextViewContainerKey = @"CPTextViewContainerKey", +var CPTextViewAllowsUndoKey = @"CPTextViewAllowsUndoKey", + CPTextViewUsesFontPanelKey = @"CPTextViewUsesFontPanelKey", + CPTextViewContainerKey = @"CPTextViewContainerKey", CPTextViewLayoutManagerKey = @"CPTextViewLayoutManagerKey", CPTextViewTextStorageKey = @"CPTextViewTextStorageKey", CPTextViewInsertionPointColorKey = @"CPTextViewInsertionPointColorKey", @@ -1801,6 +1803,9 @@ var CPTextViewContainerKey = @"CPTextViewContainerKey", while (key = [enumerator nextObject]) [_selectedTextAttributes setObject:[selectedTextAttributes valueForKey:key] forKey:key]; + + [self setAllowsUndo:[aCoder decodeBoolForKey:CPTextViewAllowsUndoKey]]; + [self setUsesFontPanel:[aCoder decodeBoolForKey:CPTextViewUsesFontPanelKey]]; } return self; @@ -1812,6 +1817,8 @@ var CPTextViewContainerKey = @"CPTextViewContainerKey", [aCoder encodeObject:_textContainer forKey:CPTextViewContainerKey]; [aCoder encodeObject:_insertionPointColor forKey:CPTextViewInsertionPointColorKey]; [aCoder encodeObject:_selectedTextAttributes forKey:CPTextViewSelectedTextAttributesKey]; + [aCoder encodeBool:_allowsUndo forKey:CPTextViewAllowsUndoKey]; + [aCoder encodeBool:_usesFontPanel forKey:CPTextViewUsesFontPanelKey]; } @end diff --git a/Tools/nib2cib/NSTextView.j b/Tools/nib2cib/NSTextView.j index 480ca5a3c..df8487f7c 100644 --- a/Tools/nib2cib/NSTextView.j +++ b/Tools/nib2cib/NSTextView.j @@ -37,6 +37,8 @@ [self setEditable:[aTextViewSharedData isEditable]]; [self setSelectable:[aTextViewSharedData isSelectable]]; [self setRichText:[aTextViewSharedData isRichText]]; + [self setAllowsUndo:[aTextViewSharedData allowsUndo]]; + [self setUsesFontPanel:[aTextViewSharedData usesFontPanel]]; [self setBackgroundColor:[aTextViewSharedData backgroundColor]]; [self setInsertionPointColor:[aTextViewSharedData insertionColor]]; diff --git a/Tools/nib2cib/NSTextViewSharedData.j b/Tools/nib2cib/NSTextViewSharedData.j index ace26107f..471b47811 100644 --- a/Tools/nib2cib/NSTextViewSharedData.j +++ b/Tools/nib2cib/NSTextViewSharedData.j @@ -27,9 +27,11 @@ @implementation CPTextViewSharedData : CPObject { + BOOL _allowsUndo @accessors(getter=allowsUndo); BOOL _editable @accessors(getter=isEditable); BOOL _richText @accessors(getter=isRichText); BOOL _selectable @accessors(getter=isSelectable); + BOOL _usesFontPanel @accessors(getter=usesFontPanel); CPColor _backgroundColor @accessors(getter=backgroundColor); CPColor _insertionColor @accessors(getter=insertionColor); CPDictionary _selectedTextAttributes @accessors(getter=selectedTextAttributes); @@ -56,9 +58,11 @@ { var flags = [aCoder decodeIntForKey:@"NSFlags"]; - _selectable = flags & 0x00000001 ? YES : NO; - _editable = flags & 0x00000002 ? YES : NO; - _richText = flags & 0x00000004 ? YES : NO; + _allowsUndo = (flags & 0x0000400) ? YES : NO; + _editable = (flags & 0x00000002) ? YES : NO; + _richText = (flags & 0x00000004) ? YES : NO; + _selectable = (flags & 0x00000001) ? YES : NO; + _usesFontPanel = (flags & 0x00000020) ? YES : NO; _backgroundColor = [aCoder decodeObjectForKey:@"NSBackgroundColor"]; _insertionColor = [aCoder decodeObjectForKey:@"NSInsertionColor"];