• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

BathyScapheで画像のインラインプレビューを可能にするプラグイン


Commit MetaInfo

Revision4d81fe5fecc591ba8dcfedbc3718f09582e0e1b8 (tree)
Time2012-05-20 13:04:57
Authormasakih <masakih@user...>
Commitermasakih

Log Message

[Refactor] プロパティ名変更

Change Summary

Incremental Difference

--- a/Ex/BSIPEReplacer.h
+++ b/Ex/BSIPEReplacer.h
@@ -16,7 +16,7 @@
1616 NSTextView *_textView;
1717 BSInlinePreviewerEx *_owner;
1818
19- NSUInteger _selfAwaking;
19+ NSUInteger _selfNotified;
2020 }
2121 @property (retain) NSTextView *textView;
2222 @property (assign) BSInlinePreviewerEx *owner;
--- a/Ex/BSIPEReplacer.m
+++ b/Ex/BSIPEReplacer.m
@@ -16,7 +16,7 @@
1616
1717 @interface BSIPEReplacer ()
1818 // 画像挿入によって引き起こしたNSTextStorageDidProcessEditingNotificationの回数
19-@property NSUInteger selfAwaking;
19+@property NSUInteger selfNotified;
2020
2121 @end
2222
@@ -24,7 +24,7 @@
2424 @synthesize textView = _textView;
2525 @synthesize owner = _owner;
2626
27-@synthesize selfAwaking = _selfAwaking;
27+@synthesize selfNotified = _selfNotified;
2828
2929
3030 static NSMutableDictionary *instances = nil;
@@ -121,19 +121,20 @@ NSRange fixRange(NSRange range, NSTextStorage *ts)
121121 range:range];
122122
123123 [ts insertAttributedString:newInsertion atIndex:range.location];
124- self.selfAwaking++;
124+ self.selfNotified++;
125125 }
126126 [ts endEditing];
127127 }
128128 - (void)textDidChange:(NSNotification *)no
129129 {
130130 NSUInteger length = [[self.textView textStorage] length];
131+ // スレッド変更チェック
131132 if(length == 0) {
132- self.selfAwaking = 0;
133+ self.selfNotified = 0;
133134 return;
134135 }
135- if(self.selfAwaking > 0) {
136- self.selfAwaking--;
136+ if(self.selfNotified > 0) {
137+ self.selfNotified--;
137138 return;
138139 }
139140
@@ -142,7 +143,6 @@ NSRange fixRange(NSRange range, NSTextStorage *ts)
142143
143144 [lock lock];
144145
145-
146146 NSMutableArray *links = [NSMutableArray array];
147147
148148 [ts enumerateAttribute:NSLinkAttributeName