• 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

Revisión943ab3b550c97934db7d799ea01c720789c04fce (tree)
Tiempo2012-05-05 23:49:01
Autormasakih <masakih@user...>
Commitermasakih

Log Message

[Mod] baordName, threadTitleプロパティ

Cambiar Resumen

Diferencia incremental

--- a/application/source/KakuriNoMiya/KMBrowser.m
+++ b/application/source/KakuriNoMiya/KMBrowser.m
@@ -85,6 +85,22 @@
8585 bsview, threadList, boardList, progressView, nil];
8686 }
8787
88++ (NSSet *)keyPathsForValuesAffectingBoardName
89+{
90+ return [NSSet setWithObjects:@"doc", @"window.firstResponder", @"boardList.selection", nil];
91+}
92+- (NSString *)boardName
93+{
94+ NSResponder *responder = [[self window] firstResponder];
95+ while(responder) {
96+ if(responder == bsview ) {
97+ return [super boardName];
98+ }
99+ responder = [responder nextResponder];
100+ }
101+ return [boardList.selection representName];
102+}
103+
88104 - (void)setDocument:(NSDocument *)document
89105 {
90106 if([self.document windowControllers].count == 1) {
--- a/application/source/KakuriNoMiya/KMLogDocumentWindowController.h
+++ b/application/source/KakuriNoMiya/KMLogDocumentWindowController.h
@@ -25,6 +25,8 @@
2525
2626 @property (readonly) KMDocument *doc;
2727 @property (readonly) KMLogViewController *logViewController;
28+@property (readonly) NSString *boardName;
29+@property (readonly) NSString *threadTitle;
2830
2931 // KMDocument
3032 @property (readonly) NSNumber *numberMessages;
--- a/application/source/KakuriNoMiya/KMLogDocumentWindowController.m
+++ b/application/source/KakuriNoMiya/KMLogDocumentWindowController.m
@@ -90,6 +90,22 @@ static NSMutableArray *_windowControllers = nil;
9090 if(num == 0) return nil;
9191 return [NSNumber numberWithUnsignedInteger:num];
9292 }
93++ (NSSet *)keyPathsForValuesAffectingBoardName
94+{
95+ return [NSSet setWithObject:@"doc"];
96+}
97+- (NSString *)boardName
98+{
99+ return self.doc.boardName;
100+}
101++ (NSSet *)keyPathsForValuesAffectingThreadTitle
102+{
103+ return [NSSet setWithObject:@"doc"];
104+}
105+- (NSString *)threadTitle
106+{
107+ return self.doc.threadTitle;
108+}
93109
94110 - (void)setDocument:(NSDocument *)document
95111 {