• 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

Révision387da867d557898247a73cb36f27e381dfd5cf04 (tree)
l'heure2012-07-02 23:19:56
Auteurmasakih <masakih@user...>
Commitermasakih

Message de Log

[Mod] ソースコード整理

Change Summary

Modification

--- a/application/source/KakuriNoMiya/KMBSLogViewController.m
+++ b/application/source/KakuriNoMiya/KMBSLogViewController.m
@@ -13,7 +13,6 @@
1313
1414 #import "CMRThreadView.h"
1515
16-#import <SGAppKit/BSLayoutManager.h>
1716 #import "CMRMainMenuManager.h"
1817 #import "AppDefaults.h"
1918 #import "CMRMessageAttributesTemplate.h"
@@ -21,10 +20,7 @@
2120 #import "CMRThreadAttributes.h"
2221 #import "CMRThreadSignature.h"
2322
24-#import <SGAppKit/BSTitleRulerAppearance.h>
25-#import <SGAppKit/BSTitleRulerView.h>
26-#import <SGAppKit/NSTextView-SGExtensions.h>
27-#import <SGAppKit/NSWorkspace-SGExtensions.h>
23+#import <SGAppKit/SGAppKit.h>
2824
2925 #import "CMRThreadMessageBufferReader.h"
3026 #import "CMRThreadComposingTask.h"
@@ -43,17 +39,11 @@ NSString *const CMRThreadViewerRunSpamFilterNotification = @"CMRThreadViewerRunS
4339 NSString *const BSThreadViewerWillStartFindingNotification = @"BSThreadViewerWillStartFindingNotification";
4440 NSString *const BSThreadViewerDidEndFindingNotification = @"BSThreadViewerDidEndFindingNotification";
4541
46-
47-#define APP_TVIEW_LOCALIZABLE_FILE @"ThreadViewer"
48-
49-
50-
5142 @interface KMBSLogViewController()
5243 @property (assign, readwrite) NSLayoutManager *layoutManager;
5344 @property (assign, readwrite) NSTextContainer *textContainer;
5445 @property (nonatomic, retain, readwrite) NSCountedSet *countedSet;
5546
56-
5747 @property (readonly) KMReplyMessenger *messenger;
5848 @property (nonatomic, retain) NSTextStorage *privateTextStorage;
5949 @property (nonatomic, retain) KMHistoryStack *histories;
@@ -64,7 +54,6 @@ NSString *const BSThreadViewerDidEndFindingNotification = @"BSThreadViewerDidEnd
6454 @property (readonly) NSWindow *window;
6555
6656 - (void)composeDocumentMessage:(id)sender;
67-
6857 @end
6958
7059 @interface KMBSLogViewController(BuildViews)
@@ -128,6 +117,7 @@ static void KMClearRangesFromIndex(KMBSLogViewController *obj, NSUInteger index)
128117
129118 + (NSString *)localizableStringsTableName
130119 {
120+#define APP_TVIEW_LOCALIZABLE_FILE @"ThreadViewer"
131121 return APP_TVIEW_LOCALIZABLE_FILE;
132122 }
133123
@@ -381,6 +371,7 @@ static void KMClearRangesFromIndex(KMBSLogViewController *obj, NSUInteger index)
381371 }
382372
383373 finish:
374+ // lock in -composeDocumentMessage: method.
384375 [updatingLock unlock];
385376 }
386377 - (void)threadComposingDidFinish:(NSMutableAttributedString *)aTextBuffer
@@ -413,14 +404,10 @@ finish:
413404 }
414405 @end
415406
416-
417407 #import "CMRThreadMessage.h"
418408 #import "CMRThreadMessageBuffer.h"
419409 #import "CMRAttributedMessageComposer.h"
420-
421410 @implementation KMBSLogViewController(CMRThreadLayout_Dummy)
422-#pragma mark CMRThreadLayout ?
423-
424411 - (CMRThreadLayout *)threadLayout
425412 {
426413 return (CMRThreadLayout *)self;
@@ -1269,9 +1256,6 @@ typedef NSUInteger NSEventSwipeTrackingOptions;
12691256 }
12701257 - (void)scrollWheel:(NSEvent *)event
12711258 {
1272- // NSScrollView is instructed to only forward horizontal scroll gesture events (see code above). However, depending
1273- // on where your controller is in the responder chain, it may receive other scrollWheel events that we don't want
1274- // to track as a fluid swipe because the event wasn't routed though an NSScrollView first.
12751259 if (floor(NSAppKitVersionNumber) <= NSAppKitVersionNumber10_6) {
12761260 return;
12771261 }
@@ -1285,19 +1269,12 @@ typedef NSUInteger NSEventSwipeTrackingOptions;
12851269 if (fabsf(foo) <= fabsf(bar)) { // Not horizontal
12861270 return;
12871271 }
1288- // If the user has disabled tracking scrolls as fluid swipes in system preferences, we should respect that.
1289- // NSScrollView will do this check for us, however, depending on where your controller is in the responder chain,
1290- // it may scrollWheel events that are not filtered by an NSScrollView.
12911272 if (![NSEvent isSwipeTrackingFromScrollEventsEnabled]) {
12921273 return;
12931274 }
12941275
12951276 BOOL goForward = (foo < 0);
1296- // Released by the tracking handler once the gesture is complete.
1297- HistoryOverlayController* historyOverlay =
1298- [[HistoryOverlayController alloc]
1299- initForMode:goForward ? kHistoryOverlayModeForward :
1300- kHistoryOverlayModeBack];
1277+ HistoryOverlayController* historyOverlay = [[HistoryOverlayController alloc] initForMode:goForward ? kHistoryOverlayModeForward : kHistoryOverlayModeBack];
13011278
13021279 [event trackSwipeEventWithOptions:NSEventSwipeTrackingClampGestureAmount
13031280 dampenAmountThresholdMin:([self.histories canForward] ? -1 : 0)
@@ -1330,7 +1307,6 @@ typedef NSUInteger NSEventSwipeTrackingOptions;
13301307 }
13311308 @end
13321309
1333-
13341310 #import "KMThreadDeleteCenter.h"
13351311 @interface KMBSLogViewController(KMThreadDeleteCenterDelegate) <KMThreadDeleteCenterDelegate>
13361312 @end
@@ -1341,7 +1317,6 @@ typedef NSUInteger NSEventSwipeTrackingOptions;
13411317 }
13421318 @end
13431319
1344-
13451320 #import "BSLabelMenuItemView.h"
13461321 @interface KMBSLogViewController(BSLabelMenuItemViewValidation) <BSLabelMenuItemViewValidation>
13471322 - (BOOL)validateLabelMenuItem:(BSLabelMenuItemView *)item;
@@ -1374,10 +1349,8 @@ typedef NSUInteger NSEventSwipeTrackingOptions;
13741349 }
13751350 @end
13761351
1377-
13781352 @implementation KMBSLogViewController(Actions)
13791353 #import "CMRFavoritesManager+KMAddition.h"
1380-#import <SGAppKit/SGAppKit.h>
13811354
13821355 #define kReplyItemKey @"Reply..."
13831356 #define kReplyToItemKey @"Reply 2..."
@@ -1387,7 +1360,6 @@ typedef NSUInteger NSEventSwipeTrackingOptions;
13871360
13881361 /*** アクション・メニュー ***/
13891362 #define kActionMenuItemTag (100) /* 「アクション」 */
1390-
13911363 #define kActionSpamHeader (111) /* 「迷惑レス」ヘッダ */
13921364 #define kActionAAHeader (222) /* 「AA」ヘッダ */
13931365 #define kActionBookmarkHeader (333) /* 「ブックマーク」ヘッダ */
@@ -1703,8 +1675,6 @@ static NSInteger messageMaskForTag(NSInteger tag)
17031675
17041676 #import "BSDateFormatter.h"
17051677 #import "BSIndexPanelController.h"
1706-
1707-
17081678 @implementation KMBSLogViewController (MoveAction)
17091679 /* 最初/最後のレス */
17101680 - (IBAction)scrollFirstMessage:(id)sender
@@ -1834,7 +1804,6 @@ static NSInteger messageMaskForTag(NSInteger tag)
18341804 }
18351805 @end
18361806
1837-
18381807 @implementation KMBSLogViewController (MoveActionValidation)
18391808 - (BOOL)canScrollToMessage
18401809 {