• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

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

BathyScaphe用次スレ候補検索プラグイン


Commit MetaInfo

Revision49461f3719f87af0341e6f5f09df639ee9f57f10 (tree)
Time2011-12-03 17:16:33
Authormasakih <masakih@user...>
Commitermasakih

Log Message

Treat source code.

不要なコメントアウトを削除。

Change Summary

Incremental Difference

--- a/NextThreadFinder.m
+++ b/NextThreadFinder.m
@@ -52,10 +52,10 @@ const NSInteger kScriptMenuTag = 8;
5252 nil,
5353 [NSBundle bundleForClass:[self class]],
5454 @"Menu title");
55-
55+
5656 serachMenuItem = [[[NSMenuItem alloc] initWithTitle:itemTitle
57- action:@selector(findNextThread:)
58- keyEquivalent:@""] autorelease];
57+ action:@selector(findNextThread:)
58+ keyEquivalent:@""] autorelease];
5959
6060 mainMenu = [NSApp mainMenu];
6161 scriptMenuIndex = [mainMenu indexOfItemWithTag:kScriptMenuTag];
@@ -108,7 +108,6 @@ const NSInteger kScriptMenuTag = 8;
108108 CFRange range = CFStringTokenizerGetCurrentTokenRange(tokenizer);
109109 if(range.location != kCFNotFound) {
110110 NSString *token = [title substringWithRange:NSMakeRange(range.location, range.length)];
111-// fprintf(stderr, "\t%s\n", [token UTF8String]);
112111 [tokens addObject:token];
113112 }
114113 }
@@ -117,7 +116,6 @@ const NSInteger kScriptMenuTag = 8;
117116 CFRelease(locale);
118117
119118 return tokens;
120-
121119 }
122120
123121 - (NSString *)searchStringWithTitle:(NSString *)title
@@ -136,29 +134,13 @@ const NSInteger kScriptMenuTag = 8;
136134 }
137135 - (IBAction)findNextThread:(id)sender
138136 {
139-// NSWindow *mainWindow = [NSApp mainWindow];
140-// Class browserClass = NSClassFromString(@"CMRBrowser");
141-// Class threadViewerClass = NSClassFromString(@"CMRThreadViewer");
142-// Class threadDocumentClass = NSClassFromString(@"CMRThreadDocument");
143-// Class browserDocClass = NSClassFromString(@"Browser");
144-
145-// NSLog(@"main Window is %@", [mainWindow windowController]);
146- NSDocumentController *dc = [NSDocumentController sharedDocumentController];
147-// NSLog(@"current Document is %@ <%@>", [dc currentDocument], [[dc currentDocument] displayName]);
148-
149-// NSLog(@"obj responds threadAttributes --- %@", [[dc currentDocument] respondsToSelector:@selector(threadAttributes)] ? @"YES" : @"NO");
150-// NSLog(@"Thread title --- %@", [[[dc currentDocument] threadAttributes] threadTitle]);
151-
152-
153137 id cmrBrowser = [self findCMRBrowser];
154138 id browser = [cmrBrowser document];
155-// NSLog(@"Browser is %@", browser);
156- id threadAttributes = [[dc currentDocument] threadAttributes];
139+ id threadAttributes = [[[NSDocumentController sharedDocumentController] currentDocument] threadAttributes];
157140 [cmrBrowser showThreadsListWithBoardName:[threadAttributes boardName]];
158141 [cmrBrowser selectRowOfName:[threadAttributes boardName] forceReload:NO];
159142 [browser setSearchString:[self searchStringWithTitle:[threadAttributes threadTitle]]];
160143 [cmrBrowser synchronizeWithSearchField];
161144 [cmrBrowser showWindow:nil];
162-
163145 }
164146 @end