「プロジェクト終了」 BathyScapheのプレビューアプラグインを複数使用出来るようにするプラグイン
Revision | 254bbd08c6e22f96230a7a74123a161627702745 (tree) |
---|---|
Time | 2012-07-13 19:58:31 |
Author | masakih <masakih@user...> |
Commiter | masakih |
[Mod] ソースコード整理
@@ -4,10 +4,6 @@ | ||
4 | 4 | #import "PSPreviewerItem.h" |
5 | 5 | |
6 | 6 | |
7 | -@interface PSPreference(PSPrivate) | |
8 | -- (id)privateInit; | |
9 | -@end | |
10 | - | |
11 | 7 | @implementation PSPreference |
12 | 8 | |
13 | 9 | static NSString *const PSPItemPastboardType = @"PSPItemPastboardType"; |
@@ -29,14 +29,9 @@ static NSMutableDictionary *previewerInfo = nil; | ||
29 | 29 | { |
30 | 30 | static BOOL isFirst = YES; |
31 | 31 | if(isFirst) { |
32 | - @synchronized(self) { | |
33 | - if(isFirst) { | |
34 | - isFirst = NO; | |
35 | - | |
36 | - previewerInfo = [[NSMutableDictionary alloc] init]; | |
37 | -// NSLog(@"Initialize."); | |
38 | - } | |
39 | - } | |
32 | + isFirst = NO; | |
33 | + | |
34 | + previewerInfo = [[NSMutableDictionary alloc] init]; | |
40 | 35 | } |
41 | 36 | } |
42 | 37 |
@@ -175,10 +175,9 @@ final: | ||
175 | 175 | |
176 | 176 | - (NSMenuItem *)preferenceMenuItem |
177 | 177 | { |
178 | - id res; | |
179 | 178 | NSString *title = PSLocalizedString(@"Preference...", @"Preference Menu Item."); |
180 | 179 | |
181 | - res = [[[NSMenuItem alloc] initWithTitle:title action:Nil keyEquivalent:@""] autorelease]; | |
180 | + id res = [[[NSMenuItem alloc] initWithTitle:title action:Nil keyEquivalent:@""] autorelease]; | |
182 | 181 | [res setAction:@selector(openPSPreference:)]; |
183 | 182 | [res setTarget:self]; |
184 | 183 |
@@ -188,8 +187,7 @@ final: | ||
188 | 187 | - (NSMenuItem *)previewMenuItemForLink:(id)link |
189 | 188 | { |
190 | 189 | NSURL *url = [NSURL URLWithString:link]; |
191 | - id res; | |
192 | - res = [[[NSMenuItem alloc] initWithTitle:@"" action:Nil keyEquivalent:@""] autorelease]; | |
190 | + id res = [[[NSMenuItem alloc] initWithTitle:@"" action:Nil keyEquivalent:@""] autorelease]; | |
193 | 191 | |
194 | 192 | id submenu = [[[NSMenu alloc] initWithTitle:@""] autorelease]; |
195 | 193 | [res setSubmenu:submenu]; |