• R/O
  • SSH
  • HTTPS

iphotouploader: Commit


Commit MetaInfo

Revision30 (tree)
Zeit2008-06-14 00:41:37
Autoritok

Log Message

iPhoto v5 のメソッド対応

Ändern Zusammenfassung

Diff

--- trunk/include/ExportMgr.h (revision 29)
+++ trunk/include/ExportMgr.h (revision 30)
@@ -34,6 +34,7 @@
3434 - (unsigned long)originalImageFormatAtIndex:(unsigned int)fp8;
3535 - (BOOL)originalIsRawAtIndex:(unsigned int)fp8;
3636 - (BOOL)originalIsMovieAtIndex:(unsigned int)fp8;
37+- (id)imageCaptionAtIndex:(unsigned int)fp8;
3738 - (id)imageTitleAtIndex:(unsigned int)fp8;
3839 - (id)imageCommentsAtIndex:(unsigned int)fp8;
3940 - (float)imageRotationAtIndex:(unsigned int)fp8;
--- trunk/src/common/PUPhoto.m (revision 29)
+++ trunk/src/common/PUPhoto.m (revision 30)
@@ -40,7 +40,13 @@
4040 photo = [[PUPhoto alloc] init];
4141
4242 [photo setValue:[mgr imagePathAtIndex:i] forKey:@"path"];
43- [photo setValue:[mgr imageTitleAtIndex:i] forKey:@"title"];
43+ if ([mgr respondsToSelector:@selector(imageCaptionAtIndex:)]) {
44+ // iPhoto v5
45+ [photo setValue:[mgr imageCaptionAtIndex:i] forKey:@"title"];
46+ } else if ([mgr respondsToSelector:@selector(imageTitleAtIndex:)]) {
47+ // iPhoto v7
48+ [photo setValue:[mgr imageTitleAtIndex:i] forKey:@"title"];
49+ }
4450 [photo setValue:[mgr imageCommentsAtIndex:i] forKey:@"comment"];
4551 [photo setValue:[mgr imageKeywordsAtIndex:i] forKey:@"keyword"];
4652 [photos addObject:photo];
Show on old repository browser