BathyScapheで画像のインラインプレビューを可能にするプラグイン
| Revision | 1b492dd894a15f1640b2bd530d67806cdc1f9ded (tree) |
|---|---|
| Time | 2012-05-19 02:03:29 |
| Author | masakih <masakih@user...> |
| Commiter | masakih |
[Mod] 不要になった部分を削除
| @@ -16,7 +16,6 @@ | ||
| 16 | 16 | NSTextView *_textView; |
| 17 | 17 | BSInlinePreviewerEx *_owner; |
| 18 | 18 | |
| 19 | - BOOL _newStorage; | |
| 20 | 19 | NSUInteger _selfAwaking; |
| 21 | 20 | } |
| 22 | 21 | @property (retain) NSTextView *textView; |
| @@ -8,8 +8,6 @@ | ||
| 8 | 8 | |
| 9 | 9 | #import "BSIPEReplacer.h" |
| 10 | 10 | |
| 11 | -@interface BSIPEReplacer () | |
| 12 | -@property BOOL newStorage; | |
| 13 | 11 | |
| 14 | 12 | // 画像挿入によって引き起こしたNSTextStorageDidProcessEditingNotificationの回数 |
| 15 | 13 | @property NSUInteger selfAwaking; |
| @@ -20,7 +18,6 @@ | ||
| 20 | 18 | @synthesize textView = _textView; |
| 21 | 19 | @synthesize owner = _owner; |
| 22 | 20 | |
| 23 | -@synthesize newStorage = _newStorage; | |
| 24 | 21 | @synthesize selfAwaking = _selfAwaking; |
| 25 | 22 | |
| 26 | 23 |
| @@ -51,7 +48,7 @@ id keyForTextView(NSTextView *view) | ||
| 51 | 48 | - (void)setTextView:(NSTextView *)textView |
| 52 | 49 | { |
| 53 | 50 | NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; |
| 54 | - [nc removeObserver:self name:nil object:nil]; | |
| 51 | + [nc removeObserver:self]; | |
| 55 | 52 | |
| 56 | 53 | @synchronized(self) { |
| 57 | 54 | [_textView release]; |
| @@ -126,7 +123,6 @@ NSRange fixRange(NSRange range, NSTextStorage *ts) | ||
| 126 | 123 | { |
| 127 | 124 | NSUInteger length = [[self.textView textStorage] length]; |
| 128 | 125 | if(length == 0) { |
| 129 | - self.newStorage = YES; | |
| 130 | 126 | self.selfAwaking = 0; |
| 131 | 127 | return; |
| 132 | 128 | } |