BathyScapheのthreadファイルをSpotlightを用いて検索する
Révision | 4e835d88d5c12884f0e787dc00d5ac25a86cf819 (tree) |
---|---|
l'heure | 2011-02-21 21:39:54 |
Auteur | masakih <masakih@user...> |
Commiter | masakih |
[Mod] 高速列挙を使用するようにした
[Mod] Makefileをgit用にした
[Mod] ターゲットOSを10.5に変更
@@ -14,7 +14,6 @@ | ||
14 | 14 | - (BOOL)tableView:(NSTableView *)tv writeRowsWithIndexes:(NSIndexSet *)rowIndexes toPasteboard:(NSPasteboard*)pboard |
15 | 15 | { |
16 | 16 | NSArray *dragedObjects = [self arrangedObjects]; |
17 | - NSEnumerator *dragedEnum; | |
18 | 17 | id obj; |
19 | 18 | NSMutableArray *filenames = [NSMutableArray array]; |
20 | 19 | BOOL result = NO; |
@@ -23,8 +22,7 @@ | ||
23 | 22 | owner:self]; |
24 | 23 | |
25 | 24 | dragedObjects = [dragedObjects objectsAtIndexes:rowIndexes]; |
26 | - dragedEnum = [dragedObjects objectEnumerator]; | |
27 | - while(obj = [dragedEnum nextObject]) { | |
25 | + for(obj in dragedObjects) { | |
28 | 26 | id value = [obj valueForAttribute:(NSString *)kMDItemPath]; |
29 | 27 | |
30 | 28 | [filenames addObject:value]; |
@@ -197,25 +197,23 @@ static NSString *CustomTableViewStateKey = @"CustomTableViewState"; | ||
197 | 197 | // turn off state all menu items. |
198 | 198 | { |
199 | 199 | NSArray *items = [menu itemArray]; |
200 | - id enume = [items objectEnumerator]; | |
201 | 200 | id obj; |
202 | 201 | |
203 | - while(obj = [enume nextObject]) { | |
202 | + for(obj in items) { | |
204 | 203 | [obj setState:NSOffState]; |
205 | 204 | } |
206 | 205 | } |
207 | 206 | |
208 | 207 | NSArray *columns = [mTableView tableColumns]; |
209 | - id enume = [columns objectEnumerator]; | |
210 | 208 | id obj; |
211 | 209 | |
212 | - while(obj = [enume nextObject]) { | |
210 | + for(obj in columns) { | |
213 | 211 | id title = [[obj headerCell] title]; |
214 | 212 | id item = [menu itemWithTitle:title]; |
215 | 213 | [item setState:NSOnState]; |
216 | 214 | } |
217 | 215 | } |
218 | -- (BOOL)validateMenuItem:(id <NSMenuItem>)menuItem | |
216 | +- (BOOL)validateMenuItem:(NSMenuItem *)menuItem | |
219 | 217 | { |
220 | 218 | SEL selector = [menuItem action]; |
221 | 219 |
@@ -277,11 +275,9 @@ static NSString *CustomTableViewStateKey = @"CustomTableViewState"; | ||
277 | 275 | - (void)clearHeaderViews |
278 | 276 | { |
279 | 277 | NSArray *columns; |
280 | - id enume, obj; | |
281 | 278 | |
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) { | |
285 | 281 | [mTableView removeTableColumn:obj]; |
286 | 282 | } |
287 | 283 | } |
@@ -354,10 +350,9 @@ static NSString *CustomTableViewStateKey = @"CustomTableViewState"; | ||
354 | 350 | } |
355 | 351 | |
356 | 352 | NSArray *array = [self headerViewIdentifiers]; |
357 | - id enume = [array objectEnumerator]; | |
358 | 353 | id obj; |
359 | 354 | |
360 | - while(obj = [enume nextObject]) { | |
355 | + for(obj in array) { | |
361 | 356 | id name = [self headerTitleForIdentifier:obj]; |
362 | 357 | |
363 | 358 | id item = [[NSMenuItem alloc] initWithTitle:name |
@@ -3,7 +3,7 @@ | ||
3 | 3 | archiveVersion = 1; |
4 | 4 | classes = { |
5 | 5 | }; |
6 | - objectVersion = 42; | |
6 | + objectVersion = 44; | |
7 | 7 | objects = { |
8 | 8 | |
9 | 9 | /* Begin PBXBuildFile section */ |
@@ -19,6 +19,7 @@ | ||
19 | 19 | F467924B0B72285A001B0001 /* NSAppleEventDescriptor-Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = F467924A0B72285A001B0001 /* NSAppleEventDescriptor-Extensions.m */; }; |
20 | 20 | F46792640B722A16001B0001 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F46792630B722A16001B0001 /* ApplicationServices.framework */; }; |
21 | 21 | F467926F0B722A81001B0001 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F467926E0B722A81001B0001 /* Carbon.framework */; }; |
22 | + F46FF0151312935200302C84 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = F46FF0141312935200302C84 /* InfoPlist.strings */; }; | |
22 | 23 | F4B235F40B0B6F2200456346 /* BSSpotlighter.icns in Resources */ = {isa = PBXBuildFile; fileRef = F4B235F30B0B6F2200456346 /* BSSpotlighter.icns */; }; |
23 | 24 | F4B5D6810B189F3C0015F530 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = F4B5D6800B189F3C0015F530 /* Credits.rtf */; }; |
24 | 25 | F4D8CDF70B343F0A00B8FDB7 /* BSSUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = F4D8CDF60B343F0A00B8FDB7 /* BSSUtil.m */; }; |
@@ -51,6 +52,7 @@ | ||
51 | 52 | F467924A0B72285A001B0001 /* NSAppleEventDescriptor-Extensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSAppleEventDescriptor-Extensions.m"; sourceTree = "<group>"; }; |
52 | 53 | F46792630B722A16001B0001 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = "<absolute>"; }; |
53 | 54 | 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>"; }; | |
54 | 56 | F4B235F30B0B6F2200456346 /* BSSpotlighter.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = BSSpotlighter.icns; sourceTree = "<group>"; }; |
55 | 57 | F4B5D6800B189F3C0015F530 /* Credits.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; path = Credits.rtf; sourceTree = "<group>"; }; |
56 | 58 | F4D8CDF50B343F0A00B8FDB7 /* BSSUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BSSUtil.h; sourceTree = "<group>"; }; |
@@ -148,6 +150,7 @@ | ||
148 | 150 | F418D5170A1B741600C1475D /* HeaderViewMenuItems.plist */, |
149 | 151 | F427505A0A17340F001040BD /* MainMenu.nib */, |
150 | 152 | 8D1107310486CEB800E47090 /* Info.plist */, |
153 | + F46FF0141312935200302C84 /* InfoPlist.strings */, | |
151 | 154 | ); |
152 | 155 | name = Resources; |
153 | 156 | sourceTree = "<group>"; |
@@ -206,8 +209,15 @@ | ||
206 | 209 | 29B97313FDCFA39411CA2CEA /* Project object */ = { |
207 | 210 | isa = PBXProject; |
208 | 211 | buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "BSSpotlighter" */; |
209 | - compatibilityVersion = "Xcode 2.4"; | |
212 | + compatibilityVersion = "Xcode 3.0"; | |
213 | + developmentRegion = English; | |
210 | 214 | hasScannedForEncodings = 1; |
215 | + knownRegions = ( | |
216 | + English, | |
217 | + Japanese, | |
218 | + French, | |
219 | + German, | |
220 | + ); | |
211 | 221 | mainGroup = 29B97314FDCFA39411CA2CEA /* BSSpotlighter */; |
212 | 222 | projectDirPath = ""; |
213 | 223 | projectRoot = ""; |
@@ -227,6 +237,7 @@ | ||
227 | 237 | F418F7A50A20448700944FB0 /* tokenCharacter.txt in Resources */, |
228 | 238 | F4B235F40B0B6F2200456346 /* BSSpotlighter.icns in Resources */, |
229 | 239 | F4B5D6810B189F3C0015F530 /* Credits.rtf in Resources */, |
240 | + F46FF0151312935200302C84 /* InfoPlist.strings in Resources */, | |
230 | 241 | ); |
231 | 242 | runOnlyForDeploymentPostprocessing = 0; |
232 | 243 | }; |
@@ -250,6 +261,17 @@ | ||
250 | 261 | }; |
251 | 262 | /* End PBXSourcesBuildPhase section */ |
252 | 263 | |
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 | + | |
253 | 275 | /* Begin XCBuildConfiguration section */ |
254 | 276 | C01FCF4B08A954540054247B /* Debug */ = { |
255 | 277 | isa = XCBuildConfiguration; |
@@ -268,7 +290,7 @@ | ||
268 | 290 | GCC_WARN_UNUSED_LABEL = YES; |
269 | 291 | INFOPLIST_FILE = Info.plist; |
270 | 292 | INSTALL_PATH = "$(HOME)/Applications"; |
271 | - MACOSX_DEPLOYMENT_TARGET = 10.4; | |
293 | + MACOSX_DEPLOYMENT_TARGET = 10.5; | |
272 | 294 | PRODUCT_NAME = BSSpotlighter; |
273 | 295 | WRAPPER_EXTENSION = app; |
274 | 296 | ZERO_LINK = YES; |
@@ -294,7 +316,7 @@ | ||
294 | 316 | GCC_WARN_UNUSED_LABEL = YES; |
295 | 317 | INFOPLIST_FILE = Info.plist; |
296 | 318 | INSTALL_PATH = "$(HOME)/Applications"; |
297 | - MACOSX_DEPLOYMENT_TARGET = 10.4; | |
319 | + MACOSX_DEPLOYMENT_TARGET = 10.5; | |
298 | 320 | PRODUCT_NAME = BSSpotlighter; |
299 | 321 | WRAPPER_EXTENSION = app; |
300 | 322 | }; |
@@ -311,7 +333,7 @@ | ||
311 | 333 | GCC_WARN_ABOUT_RETURN_TYPE = YES; |
312 | 334 | GCC_WARN_UNUSED_VARIABLE = YES; |
313 | 335 | PREBINDING = NO; |
314 | - SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; | |
336 | + SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk"; | |
315 | 337 | }; |
316 | 338 | name = Debug; |
317 | 339 | }; |
@@ -322,7 +344,7 @@ | ||
322 | 344 | GCC_WARN_ABOUT_RETURN_TYPE = YES; |
323 | 345 | GCC_WARN_UNUSED_VARIABLE = YES; |
324 | 346 | PREBINDING = NO; |
325 | - SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; | |
347 | + SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk"; | |
326 | 348 | }; |
327 | 349 | name = Release; |
328 | 350 | }; |
@@ -2,11 +2,11 @@ | ||
2 | 2 | <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
3 | 3 | <plist version="1.0"> |
4 | 4 | <dict> |
5 | + <key>BSPreviewerDisplayName</key> | |
6 | + <string>BSSpotlighter</string> | |
5 | 7 | <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> | |
9 | 9 | <key>NSHumanReadableCopyright</key> |
10 | - <string>© copyright 2006-2007 by masakih</string> | |
10 | + <string>© copyright 2006-2007,2009,2011 by masakih</string> | |
11 | 11 | </dict> |
12 | 12 | </plist> |
@@ -6,8 +6,6 @@ | ||
6 | 6 | <string>Japanese</string> |
7 | 7 | <key>CFBundleExecutable</key> |
8 | 8 | <string>${EXECUTABLE_NAME}</string> |
9 | - <key>CFBundleGetInfoString</key> | |
10 | - <string>BSSpotlighter 1.3</string> | |
11 | 9 | <key>CFBundleIconFile</key> |
12 | 10 | <string>BSSpotlighter</string> |
13 | 11 | <key>CFBundleIdentifier</key> |
@@ -24,8 +22,6 @@ | ||
24 | 22 | <string>????</string> |
25 | 23 | <key>CFBundleVersion</key> |
26 | 24 | <string>%%%%REVISION%%%%</string> |
27 | - <key>NSHumanReadableCopyright</key> | |
28 | - <string>© copyright 2006-2007,2009 by masakih</string> | |
29 | 25 | <key>NSMainNibFile</key> |
30 | 26 | <string>MainMenu</string> |
31 | 27 | <key>NSPrincipalClass</key> |
@@ -1,7 +1,5 @@ | ||
1 | 1 | // encoding=utf-8 |
2 | 2 | PRODUCT_NAME=BSSpotlighter |
3 | -VERSION=1.3 | |
4 | -REV_CORRECT=14 | |
5 | 3 | PRODUCT_EXTENSION=app |
6 | 4 | BUILD_PATH=./build |
7 | 5 | DEPLOYMENT=Release |
@@ -9,20 +7,17 @@ APP_BUNDLE=$(PRODUCT_NAME).$(PRODUCT_EXTENSION) | ||
9 | 7 | APP=$(BUILD_PATH)/$(DEPLOYMENT)/$(APP_BUNDLE) |
10 | 8 | APP_NAME=$(BUILD_PATH)/$(DEPLOYMENT)/$(PRODUCT_NAME) |
11 | 9 | INFO_PLIST=Info.plist |
12 | -COPYLIGHT=© copyright 2006-2008 by masakih | |
13 | 10 | |
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)) | |
17 | 13 | |
18 | 14 | all: |
19 | 15 | @echo do nothig. |
20 | 16 | @echo use target tagging |
21 | 17 | |
22 | -tagging: update_svn | |
18 | +tagging: | |
23 | 19 | @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)}'`; \ | |
26 | 21 | echo svn copy $(HEAD) $(TAGS_DIR)/release-$(VERSION).$${REV} |
27 | 22 | |
28 | 23 | release: updateRevision |
@@ -30,22 +25,18 @@ release: updateRevision | ||
30 | 25 | $(MAKE) restorInfoPlist |
31 | 26 | |
32 | 27 | 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)}'`; \ | |
35 | 29 | ditto -ck -rsrc --keepParent $(APP) $(APP_NAME)-$(VERSION)-$${REV}.zip |
36 | 30 | |
37 | 31 | Info.plist: Info.plist.template |
38 | - sed -e "s/%%RELEASE%%/$(VERSION)/" -e "s/%%COPYLIGHT%%/$(COPYLIGHT)/" $< > $@ | |
32 | + sed -e "s/%%RELEASE%%/$(VERSION)/" $< > $@ | |
39 | 33 | |
40 | -updateRevision: Info.plist update_svn | |
34 | +updateRevision: Info.plist | |
41 | 35 | 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)}'`; \ | |
44 | 37 | sed -e "s/%%%%REVISION%%%%/$${REV}/" $(INFO_PLIST) > $(INFO_PLIST).r ; \ |
45 | 38 | mv -f $(INFO_PLIST).r $(INFO_PLIST) ; |
46 | 39 | |
47 | 40 | 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 | |
49 | 42 | |
50 | -update_svn: | |
51 | - svn up |