• 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のthreadファイルをSpotlightを用いて検索する


Commit MetaInfo

Révision4e835d88d5c12884f0e787dc00d5ac25a86cf819 (tree)
l'heure2011-02-21 21:39:54
Auteurmasakih <masakih@user...>
Commitermasakih

Message de Log

[Mod] 高速列挙を使用するようにした
[Mod] Makefileをgit用にした
[Mod] ターゲットOSを10.5に変更

Change Summary

Modification

--- a/BSSArrayController.m
+++ b/BSSArrayController.m
@@ -14,7 +14,6 @@
1414 - (BOOL)tableView:(NSTableView *)tv writeRowsWithIndexes:(NSIndexSet *)rowIndexes toPasteboard:(NSPasteboard*)pboard
1515 {
1616 NSArray *dragedObjects = [self arrangedObjects];
17- NSEnumerator *dragedEnum;
1817 id obj;
1918 NSMutableArray *filenames = [NSMutableArray array];
2019 BOOL result = NO;
@@ -23,8 +22,7 @@
2322 owner:self];
2423
2524 dragedObjects = [dragedObjects objectsAtIndexes:rowIndexes];
26- dragedEnum = [dragedObjects objectEnumerator];
27- while(obj = [dragedEnum nextObject]) {
25+ for(obj in dragedObjects) {
2826 id value = [obj valueForAttribute:(NSString *)kMDItemPath];
2927
3028 [filenames addObject:value];
--- a/BSSpotlighter.m
+++ b/BSSpotlighter.m
@@ -197,25 +197,23 @@ static NSString *CustomTableViewStateKey = @"CustomTableViewState";
197197 // turn off state all menu items.
198198 {
199199 NSArray *items = [menu itemArray];
200- id enume = [items objectEnumerator];
201200 id obj;
202201
203- while(obj = [enume nextObject]) {
202+ for(obj in items) {
204203 [obj setState:NSOffState];
205204 }
206205 }
207206
208207 NSArray *columns = [mTableView tableColumns];
209- id enume = [columns objectEnumerator];
210208 id obj;
211209
212- while(obj = [enume nextObject]) {
210+ for(obj in columns) {
213211 id title = [[obj headerCell] title];
214212 id item = [menu itemWithTitle:title];
215213 [item setState:NSOnState];
216214 }
217215 }
218-- (BOOL)validateMenuItem:(id <NSMenuItem>)menuItem
216+- (BOOL)validateMenuItem:(NSMenuItem *)menuItem
219217 {
220218 SEL selector = [menuItem action];
221219
@@ -277,11 +275,9 @@ static NSString *CustomTableViewStateKey = @"CustomTableViewState";
277275 - (void)clearHeaderViews
278276 {
279277 NSArray *columns;
280- id enume, obj;
281278
282- columns = [mTableView tableColumns];
283- enume = [columns objectEnumerator];
284- while(obj = [enume nextObject]) {
279+ columns = [NSArray arrayWithArray:[mTableView tableColumns]];
280+ for(id obj in columns) {
285281 [mTableView removeTableColumn:obj];
286282 }
287283 }
@@ -354,10 +350,9 @@ static NSString *CustomTableViewStateKey = @"CustomTableViewState";
354350 }
355351
356352 NSArray *array = [self headerViewIdentifiers];
357- id enume = [array objectEnumerator];
358353 id obj;
359354
360- while(obj = [enume nextObject]) {
355+ for(obj in array) {
361356 id name = [self headerTitleForIdentifier:obj];
362357
363358 id item = [[NSMenuItem alloc] initWithTitle:name
--- a/BSSpotlighter.xcodeproj/project.pbxproj
+++ b/BSSpotlighter.xcodeproj/project.pbxproj
@@ -3,7 +3,7 @@
33 archiveVersion = 1;
44 classes = {
55 };
6- objectVersion = 42;
6+ objectVersion = 44;
77 objects = {
88
99 /* Begin PBXBuildFile section */
@@ -19,6 +19,7 @@
1919 F467924B0B72285A001B0001 /* NSAppleEventDescriptor-Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = F467924A0B72285A001B0001 /* NSAppleEventDescriptor-Extensions.m */; };
2020 F46792640B722A16001B0001 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F46792630B722A16001B0001 /* ApplicationServices.framework */; };
2121 F467926F0B722A81001B0001 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F467926E0B722A81001B0001 /* Carbon.framework */; };
22+ F46FF0151312935200302C84 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = F46FF0141312935200302C84 /* InfoPlist.strings */; };
2223 F4B235F40B0B6F2200456346 /* BSSpotlighter.icns in Resources */ = {isa = PBXBuildFile; fileRef = F4B235F30B0B6F2200456346 /* BSSpotlighter.icns */; };
2324 F4B5D6810B189F3C0015F530 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = F4B5D6800B189F3C0015F530 /* Credits.rtf */; };
2425 F4D8CDF70B343F0A00B8FDB7 /* BSSUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = F4D8CDF60B343F0A00B8FDB7 /* BSSUtil.m */; };
@@ -51,6 +52,7 @@
5152 F467924A0B72285A001B0001 /* NSAppleEventDescriptor-Extensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSAppleEventDescriptor-Extensions.m"; sourceTree = "<group>"; };
5253 F46792630B722A16001B0001 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = "<absolute>"; };
5354 F467926E0B722A81001B0001 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
55+ F46FF0121312930300302C84 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
5456 F4B235F30B0B6F2200456346 /* BSSpotlighter.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = BSSpotlighter.icns; sourceTree = "<group>"; };
5557 F4B5D6800B189F3C0015F530 /* Credits.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; path = Credits.rtf; sourceTree = "<group>"; };
5658 F4D8CDF50B343F0A00B8FDB7 /* BSSUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BSSUtil.h; sourceTree = "<group>"; };
@@ -148,6 +150,7 @@
148150 F418D5170A1B741600C1475D /* HeaderViewMenuItems.plist */,
149151 F427505A0A17340F001040BD /* MainMenu.nib */,
150152 8D1107310486CEB800E47090 /* Info.plist */,
153+ F46FF0141312935200302C84 /* InfoPlist.strings */,
151154 );
152155 name = Resources;
153156 sourceTree = "<group>";
@@ -206,8 +209,15 @@
206209 29B97313FDCFA39411CA2CEA /* Project object */ = {
207210 isa = PBXProject;
208211 buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "BSSpotlighter" */;
209- compatibilityVersion = "Xcode 2.4";
212+ compatibilityVersion = "Xcode 3.0";
213+ developmentRegion = English;
210214 hasScannedForEncodings = 1;
215+ knownRegions = (
216+ English,
217+ Japanese,
218+ French,
219+ German,
220+ );
211221 mainGroup = 29B97314FDCFA39411CA2CEA /* BSSpotlighter */;
212222 projectDirPath = "";
213223 projectRoot = "";
@@ -227,6 +237,7 @@
227237 F418F7A50A20448700944FB0 /* tokenCharacter.txt in Resources */,
228238 F4B235F40B0B6F2200456346 /* BSSpotlighter.icns in Resources */,
229239 F4B5D6810B189F3C0015F530 /* Credits.rtf in Resources */,
240+ F46FF0151312935200302C84 /* InfoPlist.strings in Resources */,
230241 );
231242 runOnlyForDeploymentPostprocessing = 0;
232243 };
@@ -250,6 +261,17 @@
250261 };
251262 /* End PBXSourcesBuildPhase section */
252263
264+/* Begin PBXVariantGroup section */
265+ F46FF0141312935200302C84 /* InfoPlist.strings */ = {
266+ isa = PBXVariantGroup;
267+ children = (
268+ F46FF0121312930300302C84 /* English */,
269+ );
270+ name = InfoPlist.strings;
271+ sourceTree = "<group>";
272+ };
273+/* End PBXVariantGroup section */
274+
253275 /* Begin XCBuildConfiguration section */
254276 C01FCF4B08A954540054247B /* Debug */ = {
255277 isa = XCBuildConfiguration;
@@ -268,7 +290,7 @@
268290 GCC_WARN_UNUSED_LABEL = YES;
269291 INFOPLIST_FILE = Info.plist;
270292 INSTALL_PATH = "$(HOME)/Applications";
271- MACOSX_DEPLOYMENT_TARGET = 10.4;
293+ MACOSX_DEPLOYMENT_TARGET = 10.5;
272294 PRODUCT_NAME = BSSpotlighter;
273295 WRAPPER_EXTENSION = app;
274296 ZERO_LINK = YES;
@@ -294,7 +316,7 @@
294316 GCC_WARN_UNUSED_LABEL = YES;
295317 INFOPLIST_FILE = Info.plist;
296318 INSTALL_PATH = "$(HOME)/Applications";
297- MACOSX_DEPLOYMENT_TARGET = 10.4;
319+ MACOSX_DEPLOYMENT_TARGET = 10.5;
298320 PRODUCT_NAME = BSSpotlighter;
299321 WRAPPER_EXTENSION = app;
300322 };
@@ -311,7 +333,7 @@
311333 GCC_WARN_ABOUT_RETURN_TYPE = YES;
312334 GCC_WARN_UNUSED_VARIABLE = YES;
313335 PREBINDING = NO;
314- SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
336+ SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
315337 };
316338 name = Debug;
317339 };
@@ -322,7 +344,7 @@
322344 GCC_WARN_ABOUT_RETURN_TYPE = YES;
323345 GCC_WARN_UNUSED_VARIABLE = YES;
324346 PREBINDING = NO;
325- SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
347+ SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
326348 };
327349 name = Release;
328350 };
--- a/English.lproj/InfoPlist.strings
+++ b/English.lproj/InfoPlist.strings
@@ -2,11 +2,11 @@
22 <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33 <plist version="1.0">
44 <dict>
5+ <key>BSPreviewerDisplayName</key>
6+ <string>BSSpotlighter</string>
57 <key>CFBundleGetInfoString</key>
6- <string>BSSpotlighter 1.3</string>
7- <key>CFBundleShortVersionString</key>
8- <string>1.3</string>
8+ <string>BSSpotlighter 1.3© copyright 2006-2007,2009,2011 by masakih</string>
99 <key>NSHumanReadableCopyright</key>
10- <string>© copyright 2006-2007 by masakih</string>
10+ <string>© copyright 2006-2007,2009,2011 by masakih</string>
1111 </dict>
1212 </plist>
--- a/Info.plist
+++ b/Info.plist
@@ -6,8 +6,6 @@
66 <string>Japanese</string>
77 <key>CFBundleExecutable</key>
88 <string>${EXECUTABLE_NAME}</string>
9- <key>CFBundleGetInfoString</key>
10- <string>BSSpotlighter 1.3</string>
119 <key>CFBundleIconFile</key>
1210 <string>BSSpotlighter</string>
1311 <key>CFBundleIdentifier</key>
@@ -24,8 +22,6 @@
2422 <string>????</string>
2523 <key>CFBundleVersion</key>
2624 <string>%%%%REVISION%%%%</string>
27- <key>NSHumanReadableCopyright</key>
28- <string>© copyright 2006-2007,2009 by masakih</string>
2925 <key>NSMainNibFile</key>
3026 <string>MainMenu</string>
3127 <key>NSPrincipalClass</key>
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,5 @@
11 // encoding=utf-8
22 PRODUCT_NAME=BSSpotlighter
3-VERSION=1.3
4-REV_CORRECT=14
53 PRODUCT_EXTENSION=app
64 BUILD_PATH=./build
75 DEPLOYMENT=Release
@@ -9,20 +7,17 @@ APP_BUNDLE=$(PRODUCT_NAME).$(PRODUCT_EXTENSION)
97 APP=$(BUILD_PATH)/$(DEPLOYMENT)/$(APP_BUNDLE)
108 APP_NAME=$(BUILD_PATH)/$(DEPLOYMENT)/$(PRODUCT_NAME)
119 INFO_PLIST=Info.plist
12-COPYLIGHT=© copyright 2006-2008 by masakih
1310
14-URL_BSSpotlighter = svn+ssh://macmini/usr/local/svnrepos/BSSpotlighter
15-HEAD = $(URL_BSSpotlighter)/BSSpotlighter
16-TAGS_DIR = $(URL_BSSpotlighter)/tags
11+VER_CMD=grep -A1 'CFBundleShortVersionString' $(INFO_PLIST) | tail -1 | tr -d "'\t</string>"
12+VERSION=$(shell $(VER_CMD))
1713
1814 all:
1915 @echo do nothig.
2016 @echo use target tagging
2117
22-tagging: update_svn
18+tagging:
2319 @echo "Tagging the $(VERSION) (x) release of BSSpotlighter project."
24- REV=`LC_ALL=C svn info | awk '/Revision/ {print $$2}'` ; \
25- REV=`expr $$REV + $(REV_CORRECT)` ; \
20+ REV=`git show | head -1 | awk '{printf("%.7s\n", $$2)}'`; \
2621 echo svn copy $(HEAD) $(TAGS_DIR)/release-$(VERSION).$${REV}
2722
2823 release: updateRevision
@@ -30,22 +25,18 @@ release: updateRevision
3025 $(MAKE) restorInfoPlist
3126
3227 package: release
33- REV=`LC_ALL=C svn info | awk '/Revision/ {print $$2}'`; \
34- REV=`expr $$REV + $(REV_CORRECT)` ; \
28+ REV=`git show | head -1 | awk '{printf("%.7s\n", $$2)}'`; \
3529 ditto -ck -rsrc --keepParent $(APP) $(APP_NAME)-$(VERSION)-$${REV}.zip
3630
3731 Info.plist: Info.plist.template
38- sed -e "s/%%RELEASE%%/$(VERSION)/" -e "s/%%COPYLIGHT%%/$(COPYLIGHT)/" $< > $@
32+ sed -e "s/%%RELEASE%%/$(VERSION)/" $< > $@
3933
40-updateRevision: Info.plist update_svn
34+updateRevision: Info.plist
4135 if [ ! -f $(INFO_PLIST).bak ] ; then cp $(INFO_PLIST) $(INFO_PLIST).bak ; fi ; \
42- REV=`LC_ALL=C svn info | awk '/Revision/ {print $$2}'` ; \
43- REV=`expr $$REV + $(REV_CORRECT)` ; \
36+ REV=`git show | head -1 | awk '{printf("%.7s\n", $$2)}'`; \
4437 sed -e "s/%%%%REVISION%%%%/$${REV}/" $(INFO_PLIST) > $(INFO_PLIST).r ; \
4538 mv -f $(INFO_PLIST).r $(INFO_PLIST) ;
4639
4740 restorInfoPlist:
48- if [ -f $(INFO_PLIST).bak ] ; then cp -f $(INFO_PLIST).bak $(INFO_PLIST) ; fi
41+ if [ -f $(INFO_PLIST).bak ] ; then mv -f $(INFO_PLIST).bak $(INFO_PLIST) ; fi
4942
50-update_svn:
51- svn up