• 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évisiona8ec31c293701a1cf9b0493e4aab5c6b2e72315c (tree)
l'heure2012-07-16 19:24:45
Auteurmasakih <masakih@user...>
Commitermasakih

Message de Log

[Mod] Deprecatedなものをリプレース

Change Summary

Modification

--- a/BSLCPreferences.m
+++ b/BSLCPreferences.m
@@ -172,19 +172,6 @@ static void bslcSwapMethod()
172172
173173 [self notifyItemDidChange];
174174 }
175-
176-- (void)openPanelDidEnd:(NSOpenPanel *)panel returnCode:(int)returnCode contextInfo:(void *)contextInfo
177-{
178- [panel orderOut:self];
179-
180- if(NSCancelButton == returnCode) return;
181-
182- NSString *filename = [panel filename];
183- filename = [filename lastPathComponent];
184- filename = [filename stringByDeletingPathExtension];
185-
186- [itemsController setValue:filename forKeyPath:@"selection.targetApplicationName"];
187-}
188175
189176 - (void)chooseApplication:(id)sender
190177 {
@@ -194,14 +181,21 @@ static void bslcSwapMethod()
194181
195182 NSOpenPanel *panel = [NSOpenPanel openPanel];
196183 [panel setAllowsMultipleSelection:NO];
197-
198- [panel beginSheetForDirectory:@"/Applications/"
199- file:@""
200- types:[NSArray arrayWithObject:@"app"]
201- modalForWindow:[sender window]
202- modalDelegate:self didEndSelector:@selector(openPanelDidEnd:returnCode:contextInfo:)
203- contextInfo:NULL];
204-
184+ [panel setResolvesAliases:YES];
185+ [panel setDirectoryURL:[NSURL fileURLWithPath:@"/Applications/"]];
186+ [panel setAllowedFileTypes:[NSArray arrayWithObject:@"app"]];
187+ [panel beginSheetModalForWindow:[sender window]
188+ completionHandler:^(NSInteger result) {
189+ [panel orderOut:self];
190+
191+ if(NSCancelButton == result) return;
192+
193+ NSURL *fileURL = [panel URL];
194+ NSString *filename = [fileURL lastPathComponent];
195+ filename = [filename stringByDeletingPathExtension];
196+
197+ [itemsController setValue:filename forKeyPath:@"selection.targetApplicationName"];
198+ }];
205199 }
206200 - (IBAction)menuDidChange:(id)sender
207201 {
--- a/BSLinkConductor.h
+++ b/BSLinkConductor.h
@@ -19,7 +19,7 @@
1919
2020 NSMutableArray *items;
2121
22- PreviewerSelector *previewSelector;
22+ PreviewerSelector<PSPreviewerInterface> *previewSelector;
2323 NSArray *previewers;
2424
2525 HMTemporaryFolder *tempFolder;
--- a/BSLinkConductor.m
+++ b/BSLinkConductor.m
@@ -22,6 +22,10 @@ static NSString *const BSLCSavedItemsKey = @"com.masakih.BSLinkConductor.BSLCSav
2222
2323 BSLinkConductor* BSLinkC;
2424
25+@interface BSLinkConductor () <NSURLDownloadDelegate>
26+
27+@end
28+
2529 @interface BSLinkConductor (BSLCPrivate)
2630 - (BOOL)openLink:(NSURL *)anURL withItem:(BSLinkConductorItem *)item;
2731
--- a/BSLinkConductor.xcodeproj/project.pbxproj
+++ b/BSLinkConductor.xcodeproj/project.pbxproj
@@ -9,7 +9,7 @@
99 /* Begin PBXBuildFile section */
1010 8D5B49B0048680CD000E48DA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; };
1111 8D5B49B4048680CD000E48DA /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */; };
12- F4058754146AC4E3008A4304 /* CocoaOniguruma.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F4058753146AC4E3008A4304 /* CocoaOniguruma.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
12+ F4058754146AC4E3008A4304 /* CocoaOniguruma.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F4058753146AC4E3008A4304 /* CocoaOniguruma.framework */; settings = {ATTRIBUTES = (Required, ); }; };
1313 F4A2F3FE0F43170F00A84E18 /* BSLinkConductor.m in Sources */ = {isa = PBXBuildFile; fileRef = F4A2F3FD0F43170F00A84E18 /* BSLinkConductor.m */; };
1414 F4A2F4020F4317A800A84E18 /* BSLinkConductorItem.m in Sources */ = {isa = PBXBuildFile; fileRef = F4A2F4010F4317A800A84E18 /* BSLinkConductorItem.m */; };
1515 F4A2F5880F444E3000A84E18 /* BSLinkConductor.xib in Resources */ = {isa = PBXBuildFile; fileRef = F4A2F5860F444E3000A84E18 /* BSLinkConductor.xib */; };
@@ -39,7 +39,7 @@
3939 8D5B49B6048680CD000E48DA /* BSLinkConductor.plugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BSLinkConductor.plugin; sourceTree = BUILT_PRODUCTS_DIR; };
4040 8D5B49B7048680CD000E48DA /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
4141 D2F7E65807B2D6F200F64583 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
42- F4058753146AC4E3008A4304 /* CocoaOniguruma.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CocoaOniguruma.framework; path = "/Users/masaki/Projects/External Project/CocoaOniguruma/framework/build/Release/CocoaOniguruma.framework"; sourceTree = "<absolute>"; };
42+ F4058753146AC4E3008A4304 /* CocoaOniguruma.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CocoaOniguruma.framework; path = /Users/masaki/Projects/ExternalProject/CocoaOniguruma/framework/build/Release/CocoaOniguruma.framework; sourceTree = "<absolute>"; };
4343 F4A2F3FC0F43170F00A84E18 /* BSLinkConductor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BSLinkConductor.h; sourceTree = "<group>"; };
4444 F4A2F3FD0F43170F00A84E18 /* BSLinkConductor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BSLinkConductor.m; sourceTree = "<group>"; };
4545 F4A2F3FF0F43175300A84E18 /* BSImagePreviewerInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BSImagePreviewerInterface.h; sourceTree = "<group>"; };
@@ -226,7 +226,7 @@
226226 );
227227 runOnlyForDeploymentPostprocessing = 0;
228228 shellPath = /bin/sh;
229- shellScript = "dest=\"/Users/masaki/Library/Application support/BathyScaphe/PlugIns/\"\nsrcname=${PRODUCT_NAME}.${WRAPPER_EXTENSION}\n\ncp -r ${CONFIGURATION_BUILD_DIR}/${srcname} \"${dest}\"\n";
229+ shellScript = "app=BathyScaphe\n\ndest=$HOME/Library/Application\\ Support/$app/PlugIns/\nsrc=$BUILT_PRODUCTS_DIR/$PRODUCT_NAME.plugin\n\nif [ -d \"$dest/$PRODUCT_NAME.plugin\" ] ; then\nrm -fr \"$dest/$PRODUCT_NAME.plugin\"\nfi\n\necho \"Copy\"\ncp -R $src \"$dest\"";
230230 showEnvVarsInLog = 0;
231231 };
232232 /* End PBXShellScriptBuildPhase section */
@@ -318,11 +318,11 @@
318318 1DEB913F08733D840010E9CD /* Debug */ = {
319319 isa = XCBuildConfiguration;
320320 buildSettings = {
321+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
321322 GCC_OPTIMIZATION_LEVEL = 0;
322323 GCC_WARN_ABOUT_RETURN_TYPE = YES;
323324 GCC_WARN_UNUSED_VARIABLE = YES;
324325 MACOSX_DEPLOYMENT_TARGET = 10.6;
325- ONLY_ACTIVE_ARCH = YES;
326326 SDKROOT = macosx10.7;
327327 };
328328 name = Debug;
--- a/HMTemporaryFolder.m
+++ b/HMTemporaryFolder.m
@@ -39,7 +39,7 @@
3939 _path = [tmpDir stringByAppendingPathComponent:folderName];
4040
4141 if( ![fm fileExistsAtPath:_path] &&
42- [fm createDirectoryAtPath:_path attributes:nil] ) {
42+ [fm createDirectoryAtPath:_path withIntermediateDirectories:NO attributes:nil error:NULL]) {
4343 created = YES;
4444 }
4545 } while( !created );