• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqt誰得cocoapythonrubywindowsphpgameguibathyscaphec翻訳omegatframework計画中(planning stage)twitterdombtronvb.nettestarduinodirectxpreviewerゲームエンジン

BathyScapheの中身をぐちゃぐちゃに


Commit MetaInfo

Révision347416b0bd5c54293c1590a828e8eeb3d9cabcbc (tree)
l'heure2012-07-15 17:59:39
Auteurmasakih <masakih@user...>
Commitermasakih

Message de Log

Merge ../gitsvn/BathyScaphe

Change Summary

Modification

--- a/application/BathyScaphe.xcodeproj/project.pbxproj
+++ b/application/BathyScaphe.xcodeproj/project.pbxproj
@@ -115,7 +115,6 @@
115115 87259E94143CB93B00FEA58D /* CMRReplyControllerTbItems.xib in Resources */ = {isa = PBXBuildFile; fileRef = 87259E92143CB93B00FEA58D /* CMRReplyControllerTbItems.xib */; };
116116 872A51FD139BD3C400EEC288 /* AppDefaults-BoardWarrior.m in Sources */ = {isa = PBXBuildFile; fileRef = 872A51FC139BD3C400EEC288 /* AppDefaults-BoardWarrior.m */; };
117117 872AE3EF13C77F120085F7FD /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 872AE3EE13C77F120085F7FD /* CoreServices.framework */; };
118- 872C33D70BB21AF00044890C /* ThreadViewerDefaultTheme.plist in Resources */ = {isa = PBXBuildFile; fileRef = 872C33D60BB21AF00044890C /* ThreadViewerDefaultTheme.plist */; };
119118 872E53F11217EB67000F4452 /* LabelsPrefController.h in Headers */ = {isa = PBXBuildFile; fileRef = 872E53EF1217EB67000F4452 /* LabelsPrefController.h */; };
120119 872E53F21217EB67000F4452 /* LabelsPrefController.m in Sources */ = {isa = PBXBuildFile; fileRef = 872E53F01217EB67000F4452 /* LabelsPrefController.m */; };
121120 872E53FA1217EB9D000F4452 /* LabelsPreferences.xib in Resources */ = {isa = PBXBuildFile; fileRef = 872E53F81217EB9D000F4452 /* LabelsPreferences.xib */; };
@@ -582,7 +581,6 @@
582581 F473627D0AFF8758009B6189 /* ThreadsList.strings in Resources */ = {isa = PBXBuildFile; fileRef = 872999510832618100CBD740 /* ThreadsList.strings */; };
583582 F473627E0AFF8758009B6189 /* ThreadViewer.strings in Resources */ = {isa = PBXBuildFile; fileRef = 872999540832618100CBD740 /* ThreadViewer.strings */; };
584583 F47362810AFF8758009B6189 /* appIcon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 87299A07083261F200CBD740 /* appIcon.icns */; };
585- F47362850AFF8758009B6189 /* DraggingBadge.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 87299A11083261F200CBD740 /* DraggingBadge.tiff */; };
586584 F473629B0AFF8758009B6189 /* ReplyDocument.icns in Resources */ = {isa = PBXBuildFile; fileRef = 87299A31083261F200CBD740 /* ReplyDocument.icns */; };
587585 F47362A20AFF8758009B6189 /* ThreadDocument.icns in Resources */ = {isa = PBXBuildFile; fileRef = 87299A3C083261F200CBD740 /* ThreadDocument.icns */; };
588586 F47362A30AFF8758009B6189 /* BrowserKeyBindings.plist in Resources */ = {isa = PBXBuildFile; fileRef = 87299AF60832622100CBD740 /* BrowserKeyBindings.plist */; };
@@ -975,7 +973,6 @@
975973 8729997F0832618900CBD740 /* Japanese */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = Japanese; path = Japanese.lproj/ThreadsList.strings; sourceTree = "<group>"; };
976974 872999800832618900CBD740 /* Japanese */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = Japanese; path = Japanese.lproj/ThreadViewer.strings; sourceTree = "<group>"; };
977975 87299A07083261F200CBD740 /* appIcon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = appIcon.icns; sourceTree = "<group>"; };
978- 87299A11083261F200CBD740 /* DraggingBadge.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = DraggingBadge.tiff; sourceTree = "<group>"; };
979976 87299A31083261F200CBD740 /* ReplyDocument.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = ReplyDocument.icns; sourceTree = "<group>"; };
980977 87299A3C083261F200CBD740 /* ThreadDocument.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = ThreadDocument.icns; sourceTree = "<group>"; };
981978 87299AF60832622100CBD740 /* BrowserKeyBindings.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = BrowserKeyBindings.plist; sourceTree = "<group>"; };
@@ -986,7 +983,6 @@
986983 87299C09083266F700CBD740 /* BathyScaphe.mdimporter */ = {isa = PBXFileReference; explicitFileType = "wrapper.plug-in"; name = BathyScaphe.mdimporter; path = ../metadataimporter/BathyScaphe/build/Deployment/BathyScaphe.mdimporter; sourceTree = SOURCE_ROOT; };
987984 872A51FC139BD3C400EEC288 /* AppDefaults-BoardWarrior.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "AppDefaults-BoardWarrior.m"; sourceTree = "<group>"; };
988985 872AE3EE13C77F120085F7FD /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = System/Library/Frameworks/CoreServices.framework; sourceTree = SDKROOT; };
989- 872C33D60BB21AF00044890C /* ThreadViewerDefaultTheme.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = ThreadViewerDefaultTheme.plist; sourceTree = "<group>"; };
990986 872E53EF1217EB67000F4452 /* LabelsPrefController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LabelsPrefController.h; sourceTree = "<group>"; };
991987 872E53F01217EB67000F4452 /* LabelsPrefController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LabelsPrefController.m; sourceTree = "<group>"; };
992988 872E53F91217EB9D000F4452 /* Japanese */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Japanese; path = Japanese.lproj/LabelsPreferences.xib; sourceTree = "<group>"; };
@@ -2010,9 +2006,8 @@
20102006 87D7325D1439F3CD00F4D866 /* DeleteTemplate.pdf */,
20112007 87D7325E1439F3CD00F4D866 /* ReloadThreadTemplate.pdf */,
20122008 87AADE191434A35D005F17F3 /* BoardListItemIcon */,
2013- 87299A07083261F200CBD740 /* appIcon.icns */,
2014- 87299A11083261F200CBD740 /* DraggingBadge.tiff */,
20152009 875E77A214A5F051001B15DB /* lastUpdatedHeader.pdf */,
2010+ 87299A07083261F200CBD740 /* appIcon.icns */,
20162011 87299A31083261F200CBD740 /* ReplyDocument.icns */,
20172012 87299A3C083261F200CBD740 /* ThreadDocument.icns */,
20182013 );
@@ -2529,7 +2524,6 @@
25292524 children = (
25302525 874245F5128E656200EB505A /* Labels_Finder.plist */,
25312526 875FF5C50C7FFA960034E371 /* BSTitleRulerAppearance.plist */,
2532- 872C33D60BB21AF00044890C /* ThreadViewerDefaultTheme.plist */,
25332527 8724A6DB09127E69009CC855 /* board_default.plist */,
25342528 878D961C1216FE91005D5A97 /* Labels.plist */,
25352529 );
@@ -3892,7 +3886,6 @@
38923886 F473627D0AFF8758009B6189 /* ThreadsList.strings in Resources */,
38933887 F473627E0AFF8758009B6189 /* ThreadViewer.strings in Resources */,
38943888 F47362810AFF8758009B6189 /* appIcon.icns in Resources */,
3895- F47362850AFF8758009B6189 /* DraggingBadge.tiff in Resources */,
38963889 F473629B0AFF8758009B6189 /* ReplyDocument.icns in Resources */,
38973890 F47362A20AFF8758009B6189 /* ThreadDocument.icns in Resources */,
38983891 F47362A30AFF8758009B6189 /* BrowserKeyBindings.plist in Resources */,
@@ -3912,7 +3905,6 @@
39123905 F4FEFB470AFF9CFC0099853B /* ConditionTypes.plist in Resources */,
39133906 F4D8CB680B33021C00B8FDB7 /* SmartBoardListItemEditor.strings in Resources */,
39143907 87DB9C7F0BA32CE00090090A /* SoftwareUpdate.strings in Resources */,
3915- 872C33D70BB21AF00044890C /* ThreadViewerDefaultTheme.plist in Resources */,
39163908 87FC678A0C682E9A00A4C72C /* DownloadableLinkTypes.plist in Resources */,
39173909 875FF5C60C7FFA960034E371 /* BSTitleRulerAppearance.plist in Resources */,
39183910 8785B7440D18F7B70081F4EB /* BoardListEditor.strings in Resources */,
--- a/application/Info-bathyscaphe.plist
+++ b/application/Info-bathyscaphe.plist
@@ -89,7 +89,7 @@
8989 </dict>
9090 </array>
9191 <key>CFBundleVersion</key>
92- <string>329</string>
92+ <string>334</string>
9393 <key>NSAppleScriptEnabled</key>
9494 <true/>
9595 <key>NSMainNibFile</key>
--- a/application/Info-previewer.plist
+++ b/application/Info-previewer.plist
@@ -23,7 +23,7 @@
2323 <key>CFBundleSignature</key>
2424 <string>????</string>
2525 <key>CFBundleVersion</key>
26- <string>118</string>
26+ <string>120</string>
2727 <key>NSHumanReadableCopyright</key>
2828 <string>© 2005-2012 tsawada2 &amp; BathyScaphe Project</string>
2929 <key>NSMainNibFile</key>
--- a/application/Resources/Japanese.lproj/Acknowledgments.rtf
+++ b/application/Resources/Japanese.lproj/Acknowledgments.rtf
@@ -1,4 +1,4 @@
1-{\rtf1\ansi\ansicpg932\cocoartf1138\cocoasubrtf320
1+{\rtf1\ansi\ansicpg932\cocoartf1138\cocoasubrtf470
22 \readonlydoc1{\fonttbl\f0\fnil\fcharset128 HiraKakuPro-W3;\f1\fnil\fcharset0 LucidaGrande;\f2\fnil\fcharset128 HiraKakuProN-W3;
33 \f3\fnil\fcharset0 Menlo-Regular;}
44 {\colortbl;\red255\green255\blue255;\red76\green76\blue76;\red102\green102\blue102;\red0\green116\blue0;
@@ -441,7 +441,7 @@ IN NO EVENT SHALL MATT GEMMELL OR MAGIC AUBERGINE BE LIABLE FOR ANY SPECIAL, IND
441441
442442 \b0\fs22 \cf0 BathyScaphe
443443 \f0 \'83\'76\'83\'8d\'83\'57\'83\'46\'83\'4e\'83\'67\'83\'81\'83\'93\'83\'6f\'81\'5b\'81\'46
444-\f1 masakih, nmatz, imait, and tsawada2\
444+\f1 masakih, nmatz, imait, 1024jp, and tsawada2\
445445 BathyScaphe
446446 \f0 \'83\'77\'83\'8b\'83\'76
447447 \f1
@@ -452,17 +452,12 @@ BathyScaphe
452452 \f1 BathyScaphe
453453 \f0 \'82\'cc\'83\'41\'83\'76\'83\'8a\'83\'50\'81\'5b\'83\'56\'83\'87\'83\'93\'83\'41\'83\'43\'83\'52\'83\'93\'81\'69\'83\'6f\'81\'5b\'83\'57\'83\'87\'83\'93
454454 \f1 1.7
455-\f0 \'82\'dc\'82\'c5\'81\'6a\'81\'45\'8b\'79\'82\'d1\'82\'bb\'82\'cc\'91\'bc\'82\'cc\'8a\'65\'8e\'ed\'83\'41\'83\'43\'83\'52\'83\'93\'97\'de\'82\'cd\'81\'41
455+\f0 \'82\'dc\'82\'c5\'81\'6a\'81\'45\'8b\'79\'82\'d1\'82\'bb\'82\'cc\'91\'bc\'82\'cc\'8a\'65\'8e\'ed\'83\'41\'83\'43\'83\'52\'83\'93\'97\'de\'81\'69\'83\'6f\'81\'5b\'83\'57\'83\'87\'83\'93
456+\f1 2.0.5
457+\f0 \'82\'dc\'82\'c5\'81\'6a\'82\'cd\'81\'41
456458 \f1 109@1st thread
457459 \f0 \'8e\'81\'82\'cc\'92\'f1\'8b\'9f\'82\'c9\'82\'e6\'82\'e9\'82\'e0\'82\'cc\'82\'c5\'82\'b7\'81\'42\
458-
459-\f1 BathyScaphe
460-\f0 \'82\'cc\'83\'41\'83\'76\'83\'8a\'83\'50\'81\'5b\'83\'56\'83\'87\'83\'93\'83\'41\'83\'43\'83\'52\'83\'93\'81\'45\'8b\'79\'82\'d1\'82\'bb\'82\'cc\'91\'bc\'82\'cc\'8a\'65\'8e\'ed\'83\'41\'83\'43\'83\'52\'83\'93\'97\'de\'81\'69\'83\'6f\'81\'5b\'83\'57\'83\'87\'83\'93
461-\f1 2.1
462-\f0 \'88\'c8\'8d\'7e\'81\'6a\'82\'cd\'81\'41
463-\f1 1024jp <{\field{\*\fldinst{HYPERLINK "http://wolfrosch.com/"}}{\fldrslt http://wolfrosch.com/}}>
464-\f0 \'8e\'81\'82\'cc\'92\'f1\'8b\'9f\'82\'c9\'82\'e6\'82\'e9\'82\'e0\'82\'cc\'82\'c5\'82\'b7\'81\'42\
465460 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\sl480\slmult1
466461
467-\f1 \cf0 2012-04 BathyScaphe\
462+\f1 \cf0 2012-07 BathyScaphe\
468463 }
\ No newline at end of file
Binary files a/application/Resources/Japanese.lproj/SoftwareUpdate.strings and b/application/Resources/Japanese.lproj/SoftwareUpdate.strings differ
Binary files a/application/Resources/Japanese.lproj/Themes/default_solarized.plist and b/application/Resources/Japanese.lproj/Themes/default_solarized.plist differ
Binary files a/application/Resources/Japanese.lproj/board_default.plist and b/application/Resources/Japanese.lproj/board_default.plist differ
--- a/application/source/CMRExports.h
+++ b/application/source/CMRExports.h
@@ -93,6 +93,11 @@ typedef NSInteger NSScrollElasticity;
9393 @end
9494 #endif
9595
96+@interface NSObject(MountainLionStub)
97+- (id)initWithItems:(NSArray *)items;
98+- (void)showRelativeToRect:(NSRect)rect ofView:(NSView *)view preferredEdge:(NSRectEdge)preferredEdge;
99+@end
100+
96101
97102 #ifdef __cplusplus
98103 } /* End of the 'extern "C"' block */
--- a/application/source/browser/BSBoardListItemHEADCheckTask.m
+++ b/application/source/browser/BSBoardListItemHEADCheckTask.m
@@ -152,7 +152,10 @@ static BOOL shouldCheckItemHeader(id dict);
152152 id pool2 = [[NSAutoreleasePool alloc] init];
153153 [loop runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
154154 [pool2 release];
155- if(self.isInterrupted) return;
155+ if (self.isInterrupted) {
156+ [checker autorelease];
157+ return;
158+ }
156159 }
157160 if (!(checker.lastError) && checker.isUpdated) {
158161 [updatedThreads addObject:thread];
--- a/application/source/thread/CMRThreadViewer-Action.m
+++ b/application/source/thread/CMRThreadViewer-Action.m
@@ -28,11 +28,6 @@
2828 #define UTIL_DEBUGGING 0
2929 #import "UTILDebugging.h"
3030
31-@interface NSObject(MountainLionStub)
32-- (id)initWithItems:(NSArray *)items;
33-- (void)showRelativeToRect:(NSRect)rect ofView:(NSView *)view preferredEdge:(NSRectEdge)preferredEdge;
34-@end
35-
3631
3732 @implementation CMRThreadViewer(ActionSupport)
3833 - (CMRReplyMessenger *)replyMessenger
@@ -216,20 +211,22 @@
216211 NSArray *array_ = [self targetThreadsForAction:_cmd sender:sender];
217212
218213 NSMutableString *tmp;
219- NSURL *url_ = nil;
214+// NSURL *url_ = nil;
220215 NSPasteboard *pboard_ = [NSPasteboard generalPasteboard];
221- NSArray *types_;
216+// NSArray *types_;
222217
223218 tmp = SGTemporaryString();
224219
225220 [CMRThreadAttributes fillBuffer:tmp withThreadInfoForCopying:array_];
226- url_ = [CMRThreadAttributes threadURLFromDictionary:[array_ lastObject]];
221+// url_ = [CMRThreadAttributes threadURLFromDictionary:[array_ lastObject]];
227222
228- types_ = [NSArray arrayWithObjects:NSURLPboardType, NSStringPboardType, nil];
229- [pboard_ declareTypes:types_ owner:nil];
223+// types_ = [NSArray arrayWithObjects:NSURLPboardType, NSStringPboardType, nil];
224+// [pboard_ declareTypes:types_ owner:nil];
230225
231- [url_ writeToPasteboard:pboard_];
232- [pboard_ setString:tmp forType:NSStringPboardType];
226+// [url_ writeToPasteboard:pboard_];
227+// [pboard_ setString:tmp forType:NSStringPboardType];
228+ [pboard_ clearContents];
229+ [pboard_ writeObjects:[NSArray arrayWithObject:tmp]];
233230
234231 [tmp deleteCharactersInRange:[tmp range]];
235232 }
@@ -401,17 +398,50 @@
401398
402399 - (IBAction)shareThreadInfo:(id)sender
403400 {
404- NSArray *array_ = [self selectedThreads];
401+ if (![sender respondsToSelector:@selector(bounds)]) {
402+ return; // 「テキストのみ」ツールバー対策、暫定
403+ }
404+ NSArray *array_ = [self targetThreadsForAction:_cmd sender:sender];
405405
406406 NSMutableString *tmp = [NSMutableString string];
407407 [CMRThreadAttributes fillBuffer:tmp withThreadInfoForCopying:array_];
408408
409409 NSArray *items = [NSArray arrayWithObject:tmp];
410410 id picker = [[[NSClassFromString(@"NSSharingServicePicker") alloc] initWithItems:items] autorelease];
411-// [picker setDelegate:self];
411+ [picker setDelegate:self];
412412 [picker showRelativeToRect:[sender bounds] ofView:sender preferredEdge:NSMinYEdge];
413413 }
414414
415+- (NSWindow *)sharingService:(id)sharingService sourceWindowForShareItems:(NSArray *)items sharingContentScope:(NSInteger *)sharingContentScope
416+{
417+ *sharingContentScope = 2;
418+ return [self window];
419+}
420+
421+- (id)sharingServicePicker:(id)sharingServicePicker delegateForSharingService:(id)sharingService
422+{
423+ return self;
424+}
425+/*
426+- (NSRect)sharingService:(id)sharingService sourceFrameOnScreenForShareItem:(id<NSPasteboardWriting>)item
427+{
428+ NSRect imageViewBounds = [[self scrollView] bounds];
429+ NSRect frame = [[self scrollView] convertRect:imageViewBounds toView:nil];
430+ frame.origin = [[[self scrollView] window] convertBaseToScreen:frame.origin];
431+ return frame;
432+}
433+
434+- (NSImage *)sharingService:(id)sharingService
435+transitionImageForShareItem:(id <NSPasteboardWriting>)item
436+ contentRect:(NSRect *)contentRect
437+{
438+ NSBitmapImageRep* bitmap = [[self scrollView] bitmapImageRepForCachingDisplayInRect:[[self scrollView] bounds]];
439+ [[self scrollView] cacheDisplayInRect:[[self scrollView] bounds] toBitmapImageRep:bitmap];
440+ NSImage *image = [[NSImage alloc] init];
441+ [image addRepresentation:bitmap];
442+ return [image autorelease];
443+}
444+*/
415445 // Available in Twincam Angel and later.
416446 - (void)checkIfUsesCorpusOptionOn
417447 {
--- a/application/source/view/CMRThreadView.m
+++ b/application/source/view/CMRThreadView.m
@@ -1033,15 +1033,26 @@ ErrNoSelection:
10331033 @implementation CMRThreadView(NSServicesRequests)
10341034 - (BOOL)writeSelectionToPasteboard:(NSPasteboard *)pboard types:(NSArray *)types
10351035 {
1036- NSAttributedString *contents_;
1037-
10381036 // 元々渡される types には NSRTFDPboardType が含まれる。しかしこれが受け渡し時に問題を引き起こすようだ
10391037 NSArray *newTypes = [NSArray arrayWithObjects:NSRTFPboardType, NSStringPboardType, nil]; // NSRTFDPboardType を含まない別の array にすり替える
1040- [pboard declareTypes:newTypes owner:nil];
1041-
1042- contents_ = [[self textStorage] attributedSubstringFromRange:[self selectedRange]];
1038+ return [super writeSelectionToPasteboard:pboard types:newTypes];
1039+}
10431040
1044- [contents_ writeToPasteboard:pboard];
1045- return YES;
1041+- (BOOL)writeSelectionToPasteboard:(NSPasteboard *)pboard type:(NSString *)type
1042+{
1043+ BOOL superResult = [super writeSelectionToPasteboard:pboard type:type];
1044+
1045+ if (!superResult) {
1046+ return NO;
1047+ }
1048+
1049+ if ([type isEqualToString:NSStringPboardType]) {
1050+ NSString *hacking = [pboard stringForType:type];
1051+ if ([hacking hasPrefix:@"http://"] || [hacking hasPrefix:@"https://"]) {
1052+ NSString *string2 = [hacking stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
1053+ superResult = [pboard setString:string2 forType:type]; // 強引
1054+ }
1055+ }
1056+ return superResult;
10461057 }
10471058 @end
--- a/application/source/window/CMRThreadViewerTbDelegate.m
+++ b/application/source/window/CMRThreadViewerTbDelegate.m
@@ -187,8 +187,7 @@ static NSString *const st_toolbar_identifier = @"Thread Window Toolbar";
187187 NSToolbarItem *item_;
188188 NSWindowController *wcontroller_;
189189
190- BOOL loadNibSuccess = [NSBundle loadNibNamed:@"CMRThreadViewerTbItems" owner:self];
191- NSAssert(loadNibSuccess, @"Fail to load CMRThreadViewerTbItems.nib!");
190+ [NSBundle loadNibNamed:@"CMRThreadViewerTbItems" owner:self];
192191
193192 wcontroller_ = [aWindow windowController];
194193 UTILAssertNotNil(wcontroller_);
@@ -256,6 +255,7 @@ static NSString *const st_toolbar_identifier = @"Thread Window Toolbar";
256255 toolTip:st_shareItemToolTipKey
257256 action:@selector(shareThreadInfo:)
258257 customizable:NO];
258+ [m_sharingServiceButton sendActionOn:NSLeftMouseDownMask];
259259
260260 item_ = [self appendButton:m_thunderButton
261261 withIdentifier:[self toggleOnlineModeIdentifier]
--- a/application/subproj/previewer/BSIPIHistoryManager.h
+++ b/application/subproj/previewer/BSIPIHistoryManager.h
@@ -65,7 +65,5 @@
6565
6666 - (NSString *)toolTipStringAtIndex:(NSUInteger)index;
6767
68-- (BOOL)appendDataForTokenAtIndexes:(NSIndexSet *)indexes
69- toPasteboard:(NSPasteboard *)pboard
70- withFilenamesPboardType:(BOOL)filenamesType;
68+- (BOOL)writeTokensAtIndexes:(NSIndexSet *)indexes toPasteboard:(NSPasteboard *)pboard;
7169 @end
--- a/application/subproj/previewer/BSIPIHistoryManager.m
+++ b/application/subproj/previewer/BSIPIHistoryManager.m
@@ -517,33 +517,14 @@ void fsevents_callback(ConstFSEventStreamRef streamRef,
517517 return string ? string : [[NSBundle bundleForClass:[self class]] localizedStringForKey:@"No Exif data available" value:@"" table:nil];
518518 }
519519
520-- (BOOL)appendDataForTokenAtIndexes:(NSIndexSet *)indexes toPasteboard:(NSPasteboard *)pboard withFilenamesPboardType:(BOOL)filenamesType
521-{
522- // TODO あとで大幅に書き換える
523- NSArray *tokens_ = [self cachedTokensArrayAtIndexes:indexes];
524- if (filenamesType) {
525- NSMutableArray *pathAry_ = [NSArray arrayWithArray:[tokens_ valueForKey:@"downloadedFilePath"]];
526- [pathAry_ removeObjectIdenticalTo:[NSNull null]];
527- if ([pathAry_ count] == 0) {
528- return NO;
529- }
530- NSMutableArray *finalArray_ = [NSMutableArray arrayWithCapacity:[pathAry_ count]];
531- for (NSString *filePath in pathAry_) {
532- [finalArray_ addObject:[NSURL fileURLWithPath:filePath isDirectory:NO]];
533- }
534-
535- [pboard clearContents];
536- [pboard writeObjects:finalArray_];
537- } else {
538- NSArray *finalArray_ = [NSArray arrayWithArray:[tokens_ valueForKey:@"sourceURL"]];
539- [pboard clearContents];
540- [pboard writeObjects:finalArray_];
541- }
542- return YES;
520+- (BOOL)writeTokensAtIndexes:(NSIndexSet *)indexes toPasteboard:(NSPasteboard *)pboard
521+{
522+ [pboard clearContents];
523+ return [pboard writeObjects:[self cachedTokensArrayAtIndexes:indexes]];
543524 }
544525
545-- (BOOL)tableView:(NSTableView *)aTableView writeRowsWithIndexes:(NSIndexSet *)rowIndexes toPasteboard:(NSPasteboard*)pboard
526+- (BOOL)tableView:(NSTableView *)aTableView writeRowsWithIndexes:(NSIndexSet *)rowIndexes toPasteboard:(NSPasteboard *)pboard
546527 {
547- return [self appendDataForTokenAtIndexes:rowIndexes toPasteboard:pboard withFilenamesPboardType:YES];
528+ return [self writeTokensAtIndexes:rowIndexes toPasteboard:pboard];
548529 }
549530 @end
--- a/application/subproj/previewer/BSIPIToken.h
+++ b/application/subproj/previewer/BSIPIToken.h
@@ -11,7 +11,7 @@
1111
1212 @class BSURLDownload;
1313
14-@interface BSIPIToken : NSObject {
14+@interface BSIPIToken : NSObject<NSPasteboardWriting> {
1515 @private
1616 NSURL *ipit_sourceURL;
1717 NSString *ipit_downloadedFilePath;
--- a/application/subproj/previewer/BSIPIToken.m
+++ b/application/subproj/previewer/BSIPIToken.m
@@ -486,4 +486,46 @@ NSString *const BSIPITokenDownloadDidFinishNotification = @"jp.tsawada2.BathySca
486486 [self setCurrentDownload:nil];
487487 [self postErrorNotification:NO];
488488 }
489+
490+#pragma mark NSPasteboardWriting
491+- (NSArray *)writableTypesForPasteboard:(NSPasteboard *)pasteboard
492+{
493+ NSString *name = [pasteboard name];
494+
495+ if ([name isEqualToString:NSGeneralPboard]) {
496+ static NSArray *writableTypesForGeneral = nil;
497+ if (!writableTypesForGeneral) {
498+ writableTypesForGeneral = [[NSArray alloc] initWithObjects:NSPasteboardTypeString, (NSString *)kUTTypeURL, nil];
499+ }
500+ return writableTypesForGeneral;
501+ } else if ([name isEqualToString:NSDragPboard]) {
502+ static NSArray *writableTypesForDrag = nil;
503+ if (!writableTypesForDrag) {
504+ writableTypesForDrag = [[NSArray alloc] initWithObjects:(NSString *)kUTTypeFileURL, NSPasteboardTypeString, nil];
505+ }
506+ return writableTypesForDrag;
507+ }
508+ return nil;
509+}
510+
511+- (id)pasteboardPropertyListForType:(NSString *)type
512+{
513+
514+ if ([type isEqualToString:(NSString *)kUTTypeFileURL]) {
515+ if (![self downloadedFilePath]) {
516+ return nil;
517+ }
518+ return [[NSURL fileURLWithPath:[self downloadedFilePath] isDirectory:NO] pasteboardPropertyListForType:type];
519+ }
520+
521+ if ([type isEqualToString:(NSString *)kUTTypeURL]) {
522+ return [[self sourceURL] pasteboardPropertyListForType:type];
523+ }
524+
525+ if ([type isEqualToString:NSPasteboardTypeString]) {
526+ return [[self sourceURL] absoluteString];
527+ }
528+
529+ return nil;
530+}
489531 @end
--- a/application/subproj/previewer/BSImagePreviewInspector.m
+++ b/application/subproj/previewer/BSImagePreviewInspector.m
@@ -132,9 +132,7 @@ static NSString *const kIPIPrefsNibFileNameKey = @"BSIPIPreferences";
132132
133133 - (IBAction)copyURL:(id)sender
134134 {
135- [[self historyManager] appendDataForTokenAtIndexes:[self validIndexesForAction:sender]
136- toPasteboard:[NSPasteboard generalPasteboard]
137- withFilenamesPboardType:NO];
135+ [[self historyManager] writeTokensAtIndexes:[self validIndexesForAction:sender] toPasteboard:[NSPasteboard generalPasteboard]];
138136 }
139137
140138 - (IBAction)openImage:(id)sender
@@ -431,9 +429,7 @@ static NSString *const kIPIPrefsNibFileNameKey = @"BSIPIPreferences";
431429 #pragma mark BSIPIImageView Delegate
432430 - (BOOL)imageView:(BSIPIImageView *)aImageView writeSomethingToPasteboard:(NSPasteboard *)pboard
433431 {
434- return [[self historyManager] appendDataForTokenAtIndexes:[[self tripleGreenCubes] selectionIndexes]
435- toPasteboard:pboard
436- withFilenamesPboardType:YES];
432+ return [[self historyManager] writeTokensAtIndexes:[[self tripleGreenCubes] selectionIndexes] toPasteboard:pboard];
437433 }
438434
439435 - (void)imageView:(BSIPIImageView *)aImageView mouseDoubleClicked:(NSEvent *)theEvent
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,3 +1,32 @@
1+2012-07-15 tsawada2 <tsawada2@users.sourceforge.jp>
2+ * application/source/browser/BSBoardListItemHEADCheckTask.m
3+ メモリリークの恐れがあった箇所の修正。
4+ * application/Resources/Japanese.lproj/SoftwareUpdate.strings
5+ ダイアログの文言の一部修正。
6+ * application/Resources/Japanese.lproj/Themes/default_solarized.plist
7+ Solarized テーマの調整。
8+2012-07-14 tsawada2 <tsawada2@users.sourceforge.jp>
9+ * application/BathyScaphe.xcodeproj/project.pbxproj
10+ いくつかの不要なファイルがビルド時にコピーされていた問題を修正。
11+ * application/Resources/Japanese.lproj/Acknowledgments.rtf
12+ * application/Resources/Japanese.lproj/board_default.plist
13+ それぞれ、最新の内容に更新。
14+2012-07-13 tsawada2 <tsawada2@users.sourceforge.jp>
15+ * application/source/CMRExports.h
16+ * application/source/thread/CMRThreadViewer-Action.m
17+ * application/source/window/CMRThreadViewerTbDelegate.m
18+ [Mountain Lion] 「共有」ボタンの挙動を調整した。視覚効果を付けた。
19+ ツールバーが「テキストのみ」モードのときに共有ボタンをクリックすると動作しないのは 2.2 では仕様。
20+ コンソールにエラーを吐かないようにした。
21+ * application/source/view/CMRThreadView.m
22+ サービスメニュー経由で他のアプリケーションに「http://」または「https://」で始まる文字列を渡す時は
23+ 文字列をパーセントエスケープするようにした。これで「http://ja.wikipedia.org/wiki/卵かけご飯」も
24+ サービスメニュー経由で開けるようになる。
25+ * application/subproj/previewer/BSIPIToken.m
26+ * application/subproj/previewer/BSIPIHistoryManager.m
27+ * application/subproj/previewer/BSImagePreviewInspector.m
28+ プレビューインスペクタ:ドラッグ&ドロップで URL をペーストしたりファイルをコピーする処理を最適化した。
29+=================================================
130 2012-07-11 tsawada2 <tsawada2@users.sourceforge.jp>
231 * application/subproj/previewer/BSIPIArrayController.m
332 * application/subproj/previewer/Japanese.lproj/BSImagePreviewInspector3.xib