Revision: 1599
Author:
dw...@karelia.com
Date: Mon Dec 3 10:36:32 2012
Log: Deleting everything since this is so so old now.
http://code.google.com/p/imedia/source/detail?r=1599
Deleted:
/trunk/CC
/trunk/Credits.html
/trunk/Flickr.png
/trunk/IMBApertureAudioParser.h
/trunk/IMBApertureAudioParser.m
/trunk/IMBApertureHeaderView.xib
/trunk/IMBApertureHeaderViewController.h
/trunk/IMBApertureHeaderViewController.m
/trunk/IMBApertureParser.h
/trunk/IMBApertureParser.m
/trunk/IMBApertureVideoParser.h
/trunk/IMBApertureVideoParser.m
/trunk/IMBAppleMediaParser.h
/trunk/IMBAppleMediaParser.m
/trunk/IMBAudioFolderParser.h
/trunk/IMBAudioFolderParser.m
/trunk/IMBAudioView.xib
/trunk/IMBAudioViewController.h
/trunk/IMBAudioViewController.m
/trunk/IMBButtonObject.h
/trunk/IMBButtonObject.m
/trunk/IMBComboTableView.h
/trunk/IMBComboTableView.m
/trunk/IMBComboTextCell.h
/trunk/IMBComboTextCell.m
/trunk/IMBComboViewTemplate.pdf
/trunk/IMBCommon.h
/trunk/IMBCommon.m
/trunk/IMBConfig.h
/trunk/IMBConfig.m
/trunk/IMBDisableTitleToColorTransformer.h
/trunk/IMBDisableTitleToColorTransformer.m
/trunk/IMBDynamicTableView.h
/trunk/IMBDynamicTableView.m
/trunk/IMBFNSubscribeFileWatcher.h
/trunk/IMBFNSubscribeFileWatcher.m
/trunk/IMBFSEventsWatcher.h
/trunk/IMBFSEventsWatcher.m
/trunk/IMBFaceObjectViewController.h
/trunk/IMBFaceObjectViewController.m
/trunk/IMBFileWatcher.h
/trunk/IMBFileWatcher.m
/trunk/IMBFireFoxParser.h
/trunk/IMBFireFoxParser.m
/trunk/IMBFlickrHeaderView.xib
/trunk/IMBFlickrHeaderViewController.h
/trunk/IMBFlickrHeaderViewController.m
/trunk/IMBFlickrNode.h
/trunk/IMBFlickrNode.m
/trunk/IMBFlickrObject.h
/trunk/IMBFlickrObject.m
/trunk/IMBFlickrParser.h
/trunk/IMBFlickrParser.m
/trunk/IMBFolderParser.h
/trunk/IMBFolderParser.m
/trunk/IMBGarageBandParser.h
/trunk/IMBGarageBandParser.m
/trunk/IMBHoverButton.h
/trunk/IMBHoverButton.m
/trunk/IMBIconCache.h
/trunk/IMBIconCache.m
/trunk/IMBImageBrowserCell.h
/trunk/IMBImageBrowserCell.m
/trunk/IMBImageBrowserView.h
/trunk/IMBImageBrowserView.m
/trunk/IMBImageCaptureParser.h
/trunk/IMBImageCaptureParser.m
/trunk/IMBImageFolderParser.h
/trunk/IMBImageFolderParser.m
/trunk/IMBImageItem.h
/trunk/IMBImageItem.m
/trunk/IMBImageKit.h
/trunk/IMBImageView.xib
/trunk/IMBImageViewController.h
/trunk/IMBImageViewController.m
/trunk/IMBKQueue.h
/trunk/IMBKQueue.m
/trunk/IMBLibraryController.h
/trunk/IMBLibraryController.m
/trunk/IMBLibraryView.xib
/trunk/IMBLightroom1Parser.h
/trunk/IMBLightroom1Parser.m
/trunk/IMBLightroom2Parser.h
/trunk/IMBLightroom2Parser.m
/trunk/IMBLightroom3Parser.h
/trunk/IMBLightroom3Parser.m
/trunk/IMBLightroom3VideoParser.h
/trunk/IMBLightroom3VideoParser.m
/trunk/IMBLightroomParser.h
/trunk/IMBLightroomParser.m
/trunk/IMBLinkView.xib
/trunk/IMBLinkViewController.h
/trunk/IMBLinkViewController.m
/trunk/IMBLoadMoreObject.h
/trunk/IMBLoadMoreObject.m
/trunk/IMBMainThreadProxy.h
/trunk/IMBMainThreadProxy.m
/trunk/IMBMetadataTransformer.h
/trunk/IMBMetadataTransformer.m
/trunk/IMBMovieFolderParser.h
/trunk/IMBMovieFolderParser.m
/trunk/IMBMovieObject.h
/trunk/IMBMovieObject.m
/trunk/IMBMovieView.xib
/trunk/IMBMovieViewController.h
/trunk/IMBMovieViewController.m
/trunk/IMBNode.h
/trunk/IMBNode.m
/trunk/IMBNodeCell.h
/trunk/IMBNodeCell.m
/trunk/IMBNodeObject.h
/trunk/IMBNodeObject.m
/trunk/IMBNodeTreeController.h
/trunk/IMBNodeTreeController.m
/trunk/IMBNodeViewController.h
/trunk/IMBNodeViewController.m
/trunk/IMBObject.h
/trunk/IMBObject.m
/trunk/IMBObjectArrayController.h
/trunk/IMBObjectArrayController.m
/trunk/IMBObjectFifoCache.h
/trunk/IMBObjectFifoCache.m
/trunk/IMBObjectThumbnailLoadOperation.h
/trunk/IMBObjectThumbnailLoadOperation.m
/trunk/IMBObjectViewController.h
/trunk/IMBObjectViewController.m
/trunk/IMBObjectsPromise.h
/trunk/IMBObjectsPromise.m
/trunk/IMBOmniWebParser.h
/trunk/IMBOmniWebParser.m
/trunk/IMBOperationQueue.h
/trunk/IMBOperationQueue.m
/trunk/IMBOrderedDictionary.h
/trunk/IMBOrderedDictionary.m
/trunk/IMBOutlineView.h
/trunk/IMBOutlineView.m
/trunk/IMBPanel.h
/trunk/IMBPanel.m
/trunk/IMBPanel.xib
/trunk/IMBPanelController.h
/trunk/IMBPanelController.m
/trunk/IMBParser.h
/trunk/IMBParser.m
/trunk/IMBParserController.h
/trunk/IMBParserController.m
/trunk/IMBProgress.xib
/trunk/IMBProgressWindowController.h
/trunk/IMBProgressWindowController.m
/trunk/IMBProject.xcconfig
/trunk/IMBPyramidObjectPromise.h
/trunk/IMBPyramidObjectPromise.m
/trunk/IMBQLPreviewPanel.h
/trunk/IMBSafariBookmarkParser.h
/trunk/IMBSafariBookmarkParser.m
/trunk/IMBSkimmableObjectViewController.h
/trunk/IMBSkimmableObjectViewController.m
/trunk/IMBSmartFolderNodeObject.h
/trunk/IMBSmartFolderNodeObject.m
/trunk/IMBTableView.h
/trunk/IMBTableView.m
/trunk/IMBTargetDebug.xcconfig
/trunk/IMBTargetRelease.xcconfig
/trunk/IMBTargetTest.xcconfig
/trunk/IMBTestApp.xib
/trunk/IMBTestAppDelegate.h
/trunk/IMBTestAppDelegate.m
/trunk/IMBTestFaceBrowserCell.h
/trunk/IMBTestFaceBrowserCell.m
/trunk/IMBTestFacesBackgroundLayer.h
/trunk/IMBTestFacesBackgroundLayer.m
/trunk/IMBTestiPhotoEventBrowserCell.h
/trunk/IMBTestiPhotoEventBrowserCell.m
/trunk/IMBTextFieldCell.h
/trunk/IMBTextFieldCell.m
/trunk/IMBTimecodeTransformer.h
/trunk/IMBTimecodeTransformer.m
/trunk/IMBURLDownload.h
/trunk/IMBURLDownload.m
/trunk/IMBURLDownloadOperation.h
/trunk/IMBURLDownloadOperation.m
/trunk/IMBURLGetSizeOperation.h
/trunk/IMBURLGetSizeOperation.m
/trunk/IMBXBELParser.h
/trunk/IMBXBELParser.m
/trunk/IMBiPhotoEventNodeObject.h
/trunk/IMBiPhotoEventNodeObject.m
/trunk/IMBiPhotoEventObjectViewController.h
/trunk/IMBiPhotoEventObjectViewController.m
/trunk/IMBiPhotoObjectPromise.h
/trunk/IMBiPhotoObjectPromise.m
/trunk/IMBiPhotoParser.h
/trunk/IMBiPhotoParser.m
/trunk/IMBiPhotoVideoParser.h
/trunk/IMBiPhotoVideoParser.m
/trunk/IMBiTunesParser.h
/trunk/IMBiTunesParser.m
/trunk/IMBiTunesVideoParser.h
/trunk/IMBiTunesVideoParser.m
/trunk/Info.plist
/trunk/LICENSE
/trunk/NSData+SKExtensions.h
/trunk/NSData+SKExtensions.m
/trunk/NSDictionary+iMedia.h
/trunk/NSDictionary+iMedia.m
/trunk/NSFileManager+iMedia.h
/trunk/NSFileManager+iMedia.m
/trunk/NSImage+iMedia.h
/trunk/NSImage+iMedia.m
/trunk/NSString+iMedia.h
/trunk/NSString+iMedia.m
/trunk/NSURL+iMedia.h
/trunk/NSURL+iMedia.m
/trunk/NSView+iMedia.h
/trunk/NSView+iMedia.m
/trunk/NSWindow_Flipr.h
/trunk/NSWindow_Flipr.m
/trunk/NSWorkspace+iMedia.h
/trunk/NSWorkspace+iMedia.m
/trunk/ObjectiveFlickr
/trunk/OmniwebBookmarksToXBEL.xslt
/trunk/TestApp-Info.plist
/trunk/UKFNSubscribeFileWatcher.h
/trunk/UKFNSubscribeFileWatcher.m
/trunk/UKFSEventsWatcher.h
/trunk/UKFSEventsWatcher.m
/trunk/UKFileWatcher.h
/trunk/UKFileWatcher.m
/trunk/UKKQueue.h
/trunk/UKKQueue.m
/trunk/UKMainThreadProxy.h
/trunk/UKMainThreadProxy.m
/trunk/UK_IMB_RenameBegin.h
/trunk/UK_IMB_RenameEnd.h
/trunk/cork-background.jpg
/trunk/de.lproj
/trunk/en.lproj
/trunk/es.lproj
/trunk/firefox_allBookmarks.png
/trunk/firefox_bookmarksMenu.png
/trunk/firefox_bookmarksToolbar.png
/trunk/firefox_tag.png
/trunk/firefox_unfiledBookmarks.png
/trunk/fmdb
/trunk/fr.lproj
/trunk/i.tiff
/trunk/i2.tiff
/trunk/iMedia.h
/trunk/iMedia.pch
/trunk/iMedia.tiff
/trunk/iMedia.xcodeproj
/trunk/iTunes10-icon-01.png
/trunk/iTunes10-icon-02.png
/trunk/iTunes10-icon-03.png
/trunk/iTunes10-icon-04.png
/trunk/iTunes10-icon-05.png
/trunk/iTunes10-icon-06.png
/trunk/iTunes10-icon-07.png
/trunk/iTunes10-icon-08.png
/trunk/iTunes10-icon-09.png
/trunk/iTunes10-icon-10.png
/trunk/iTunes10-icon-11.png
/trunk/iTunes10-icon-12.png
/trunk/iTunes10-icon-13.png
/trunk/iTunes10-icon-14.png
/trunk/iTunes10-icon-15.png
/trunk/iTunes10-icon-16.png
/trunk/iTunes10-icon-17.png
/trunk/iTunes10-icon-18.png
/trunk/iTunes10-icon-19.png
/trunk/iTunes10-icon-20.png
/trunk/iTunes10-icon-21.png
/trunk/iTunes10-icon-22.png
/trunk/iTunes10-icon-23.png
/trunk/iTunes10-icon-24.png
/trunk/iTunes10-icon-25.png
/trunk/iTunes10-icon-26.png
/trunk/iTunes10-icon-27.png
/trunk/iTunes10-icon-28.png
/trunk/iTunes10-icon-29.png
/trunk/iTunes10-icon-30.png
/trunk/iTunes10-icon-31.png
/trunk/iTunes10-icon-32.png
/trunk/iTunes9-icon-01.png
/trunk/iTunes9-icon-02.png
/trunk/iTunes9-icon-03.png
/trunk/iTunes9-icon-04.png
/trunk/iTunes9-icon-05.png
/trunk/iTunes9-icon-06.png
/trunk/iTunes9-icon-07.png
/trunk/iTunes9-icon-08.png
/trunk/iTunes9-icon-09.png
/trunk/iTunes9-icon-10.png
/trunk/iTunes9-icon-11.png
/trunk/iTunes9-icon-12.png
/trunk/iTunes9-icon-13.png
/trunk/iTunes9-icon-14.png
/trunk/iTunes9-icon-15.png
/trunk/iTunes9-icon-16.png
/trunk/iTunes9-icon-17.png
/trunk/iTunes9-icon-18.png
/trunk/iTunes9-icon-19.png
/trunk/iTunes9-icon-20.png
/trunk/iTunes9-icon-21.png
/trunk/iTunes9-icon-22.png
/trunk/iTunes9-icon-23.png
/trunk/iTunes9-icon-24.png
/trunk/iTunes9-icon-25.png
/trunk/iTunes9-icon-26.png
/trunk/iTunes9-icon-27.png
/trunk/iTunes9-icon-28.png
/trunk/iTunes9-icon-29.png
/trunk/iTunes9-icon-30.png
/trunk/iTunes9-icon-31.png
/trunk/iTunes9-icon-32.png
/trunk/it.lproj
/trunk/itunes-icon-audiobooks.png
/trunk/itunes-icon-folder7.png
/trunk/itunes-icon-library.png
/trunk/itunes-icon-movies.png
/trunk/itunes-icon-music.png
/trunk/itunes-icon-partyshuffle.png
/trunk/itunes-icon-partyshuffle7.png
/trunk/itunes-icon-playlist-normal.png
/trunk/itunes-icon-playlist-normal7.png
/trunk/itunes-icon-playlist-purchased.png
/trunk/itunes-icon-playlist-smart.png
/trunk/itunes-icon-playlist-smart7.png
/trunk/itunes-icon-podcasts.png
/trunk/itunes-icon-podcasts7.png
/trunk/itunes-icon-purchased7.png
/trunk/itunes-icon-tvshows.png
/trunk/ja.lproj
/trunk/js.opacity
/trunk/js.tiff
/trunk/load-more-normal.pdf
/trunk/load-more-pressed.pdf
/trunk/main.m
/trunk/nl.lproj
/trunk/pt_BR.lproj
/trunk/url_icon.tiff
/trunk/version.plist
/trunk/warning.tiff
=======================================
--- /trunk/Credits.html Tue May 17 17:27:18 2011
+++ /dev/null
@@ -1,64 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML
4.01//EN" "
http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <meta http-equiv="Content-Style-Type" content="text/css">
- <title></title>
- <style type="text/css">
- body { font: 11px 'Lucida Grande'; }
- .small { font-size:9px; }
- h1 { text-align:center; line-height:1.5em; }
- </style>
-</head>
-<body>
-<h1>iMedia Browser</h1>
-<p><b>{IMB.introduction}</b></p>
-<p><b>{IMB.availableLink}</b></p>
-
-<p><b>Copyright © 2005–2011 by <a
href="
http://www.karelia.com/">Karelia Software</a> et al.</b></p>
-
-<div class='small'>
-<p><b>{IMB.credits}</b></p>
-<p>iMedia Browser is based on code originally developed by <a
href="
http://www.jterhorst.com/">Jason Terhorst</a>, further developed for
Sandvox® by <a href="mailto:
ghul...@mac.com">Greg Hulands</a>, Dan
Wood, and Terrence Talbot. The new architecture for version 2.0 was
developed by <a href="
http://www.boinx.com/fotomagico/">Peter
Baumgartner</a>. Contributions have also been made by <a
href="
http://microspot.co.uk/">Matt Gough</a>, <a
href="
http://www.norrkross.com/">Martin Wennerberg</a> and others as
indicated in source files.</p>
-<p>iMedia Browser makes use of these separately available components:</p>
-<p>
-<a href="
http://www.brockerhoff.net/src/">Flipr</a> by <a
href="
http://www.brockerhoff.net/">Rainer Brockerhoff</a>
-<br>
-<a href="
http://flycode.googlecode.com/svn/trunk/fmdb/">FMDatabase</a> by
<a href="
http://flyingmeat.com/">Gus Mueller</a>
-<br>
-NSData+SKExtensions by <a
href="
http://hofman.users.sourceforge.net/">Christiaan Hofman</a>
-<br>
-<a href="
https://github.com/lukhnos/objectiveflickr">ObjectiveFlickr</a>
by <a href="
http://lukhnos.org/">Lukhnos D. Liu</a>
-<br>
-<a href="
http://cocoaobjects.com/ukfseventswatcher/">UKFSEventsWatcher</a>
by <a href="
http://www.boinx.com/fotomagico/">Peter Baumgartner</a>
-<br>
-<a href="
http://www.zathras.de/angelweb/sourcecode.htm">UKKQueue</a> by <a
href="
http://www.zathras.de/">M. Uli Kusterer</a>
-<br>
-
-
-<p class="loc"><b>{IMB.localization}</b>
-Mogens Thyregod (Dansk) ·
-Jens Hembach, Götz Görisch, Peter Baumgartner (Deutsch) ·
-Ronald Leroux, Joselyne Rochaud (Français) ·
-Massimo Finizio (Italiano) ·
-Martin Wennerberg (Svenska) ·
-Daisuke Okada, Hiroto Sawane (日本語) ·
-Jack M. H. Lin (繁體中文) ·
-JT Lee, Jack M. H. Lin (简体中文) ·
-Paulo Neto (Português do Brasil) ·
-Славышенский Александр (Русский).
-</p>
-
-<p><b>{IMB.licenseIntro}</b></p>
-
-<p>Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
“Software”), to deal in all or substantial portions of the
Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:</p>
-<ul>
- <li>Redistributions of source code must retain the original terms stated
here, including this list of conditions, the disclaimer noted below, and
the following copyright notice: Copyright © 2005–2011 by Karelia
Software et al.</li>
- <li>Redistributions in binary form must include, in an end-user-visible
manner (e.g., About window, Acknowledgments window, or similar), either a)
the original terms stated here, including this list of conditions, the
disclaimer noted below, and the aforementioned copyright notice, or b) the
aforementioned copyright notice and a link to <a
href="
http://karelia.com/imedia/">
karelia.com/imedia</a>.</li>
- <li>Neither the name of Karelia Software, nor Sandvox, nor the names of
contributors to iMedia Browser may be used to endorse or promote products
derived from the Software without prior and express written permission from
Karelia Software or individual contributors, as appropriate.</li>
-</ul>
-<p></p>
-<p><b>Disclaimer:</b> THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR
A PARTICULAR PURPOSE, AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF,
OR IN CONNECTION WITH, THE SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN,
THE SOFTWARE.</p>
-</div>
-</body>
-</html>
=======================================
--- /trunk/Flickr.png Mon Apr 5 17:29:51 2010
+++ /dev/null
Binary file, no diff available.
=======================================
--- /trunk/IMBApertureAudioParser.h Mon Jan 3 15:11:51 2011
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- iMedia Browser Framework <
http://karelia.com/imedia/>
-
- Copyright (c) 2005-2011 by Karelia Software et al.
-
- iMedia Browser is based on code originally developed by Jason Terhorst,
- further developed for Sandvox by Greg Hulands, Dan Wood, and Terrence
Talbot.
- The new architecture for version 2.0 was developed by Peter Baumgartner.
- Contributions have also been made by Matt Gough, Martin Wennerberg and
others
- as indicated in source files.
-
- The iMedia Browser Framework is licensed under the following terms:
-
- Permission is hereby granted, free of charge, to any person obtaining a
copy
- of this software and associated documentation files (the "Software"), to
deal
- in all or substantial portions of the Software without restriction,
including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
following
- conditions:
-
- Redistributions of source code must retain the original terms stated here,
- including this list of conditions, the disclaimer noted below, and the
- following copyright notice: Copyright (c) 2005-2011 by Karelia Software
et al.
-
- Redistributions in binary form must include, in an end-user-visible
manner,
- e.g., About window, Acknowledgments window, or similar, either a) the
original
- terms stated here, including this list of conditions, the disclaimer noted
- below, and the aforementioned copyright notice, or b) the aforementioned
- copyright notice and a link to
karelia.com/imedia.
-
- Neither the name of Karelia Software, nor Sandvox, nor the names of
- contributors to iMedia Browser may be used to endorse or promote products
- derived from the Software without prior and express written permission
from
- Karelia Software or individual contributors, as appropriate.
-
- Disclaimer: THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS
- "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE,
- AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH, THE
- SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN, THE SOFTWARE.
-*/
-
-
-// Author: Peter Baumgartner
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark HEADERS
-
-#import "IMBApertureParser.h"
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark
-
-@interface IMBApertureAudioParser : IMBApertureParser
-
-@end
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
=======================================
--- /trunk/IMBApertureAudioParser.m Mon Feb 21 03:02:42 2011
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- iMedia Browser Framework <
http://karelia.com/imedia/>
-
- Copyright (c) 2005-2011 by Karelia Software et al.
-
- iMedia Browser is based on code originally developed by Jason Terhorst,
- further developed for Sandvox by Greg Hulands, Dan Wood, and Terrence
Talbot.
- The new architecture for version 2.0 was developed by Peter Baumgartner.
- Contributions have also been made by Matt Gough, Martin Wennerberg and
others
- as indicated in source files.
-
- The iMedia Browser Framework is licensed under the following terms:
-
- Permission is hereby granted, free of charge, to any person obtaining a
copy
- of this software and associated documentation files (the "Software"), to
deal
- in all or substantial portions of the Software without restriction,
including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
following
- conditions:
-
- Redistributions of source code must retain the original terms stated here,
- including this list of conditions, the disclaimer noted below, and the
- following copyright notice: Copyright (c) 2005-2011 by Karelia Software
et al.
-
- Redistributions in binary form must include, in an end-user-visible
manner,
- e.g., About window, Acknowledgments window, or similar, either a) the
original
- terms stated here, including this list of conditions, the disclaimer noted
- below, and the aforementioned copyright notice, or b) the aforementioned
- copyright notice and a link to
karelia.com/imedia.
-
- Neither the name of Karelia Software, nor Sandvox, nor the names of
- contributors to iMedia Browser may be used to endorse or promote products
- derived from the Software without prior and express written permission
from
- Karelia Software or individual contributors, as appropriate.
-
- Disclaimer: THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS
- "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE,
- AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH, THE
- SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN, THE SOFTWARE.
-*/
-
-
-// Author: Peter Baumgartner
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark HEADERS
-
-#import "IMBApertureAudioParser.h"
-#import "IMBParserController.h"
-#import "IMBObject.h"
-#import "NSDictionary+iMedia.h"
-#import "NSURL+iMedia.h"
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark
-
-@interface IMBApertureAudioParser ()
-
-- (NSString*) metadataDescriptionForMetadata:(NSDictionary*)inMetadata;
-
-@end
-
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark
-
-@implementation IMBApertureAudioParser
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// Register this parser, so that it gets automatically loaded...
-
-+ (void) load
-{
- NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
- [IMBParserController registerParserClass:self
forMediaType:kIMBMediaTypeAudio];
- [pool drain];
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// Exclude some album types...
-
-//- (BOOL) shouldUseAlbumType:(NSString*)inAlbumType
-//{
-// if ([inAlbumType isEqualToString:@"94"]) return NO;
-// if ([inAlbumType isEqualToString:@"97"]) return NO;
-//// if ([inAlbumType isEqualToString:@"98"]) return NO;
-// if ([inAlbumType isEqualToString:@"99"]) return NO;
-// return YES;
-//}
-
-
-// Exclude everything but audio files...
-
-- (BOOL) shouldUseObject:(NSString*)inObjectType
-{
- return [inObjectType isEqualToString:@"Audio"];
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// Loaded lazily when actually needed for display. Here we combine the
metadata we got from the Aperture XML file
-// (which was available immediately, but not enough information) with more
information that we obtain via ImageIO.
-// This takes a little longer, but since it only done laziy for those
object that are actually visible it's fine.
-// Please note that this method may be called on a background thread...
-
-- (void) loadMetadataForObject:(IMBObject*)inObject
-{
- NSURL* audioURL = [inObject URL];
-
- if (audioURL == nil) {
- return;
- }
-
- NSMutableDictionary* metadata = [NSMutableDictionary
dictionaryWithDictionary:inObject.preliminaryMetadata];
-
- [metadata setObject:[inObject path] forKey:@"path"];
- [metadata addEntriesFromDictionary:[NSURL
imb_metadataFromAudioAtURL:audioURL]];
-
- NSString* description = [self metadataDescriptionForMetadata:metadata];
-
- if ([NSThread isMainThread])
- {
- inObject.metadata = metadata;
- inObject.metadataDescription = description;
- }
- else
- {
- NSArray* modes = [NSArray arrayWithObject:NSRunLoopCommonModes];
- [inObject performSelectorOnMainThread:@selector(setMetadata:)
withObject:metadata waitUntilDone:NO modes:modes];
- [inObject performSelectorOnMainThread:@selector(setMetadataDescription:)
withObject:description waitUntilDone:NO modes:modes];
- }
-}
-
-
-// Convert metadata into human readable string...
-
-- (NSString*) metadataDescriptionForMetadata:(NSDictionary*)inMetadata
-{
- return [NSDictionary imb_metadataDescriptionForAudioMetadata:inMetadata];
-}
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-@end
=======================================
--- /trunk/IMBApertureHeaderView.xib Wed Sep 29 10:39:38 2010
+++ /dev/null
@@ -1,1003 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
- <data>
- <int key="IBDocument.SystemTarget">1050</int>
- <string key="IBDocument.SystemVersion">10F569</string>
- <string key="IBDocument.InterfaceBuilderVersion">804</string>
- <string key="IBDocument.AppKitVersion">1038.29</string>
- <string key="IBDocument.HIToolboxVersion">461.00</string>
- <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
- <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="NS.object.0">804</string>
- </object>
- <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="77"/>
- </object>
- <object class="NSArray" key="IBDocument.PluginDependencies">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- </object>
- <object class="NSMutableDictionary" key="IBDocument.Metadata">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys" id="0">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- </object>
- <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSCustomObject" id="1001">
- <string key="NSClassName">IMBApertureHeaderViewController</string>
- </object>
- <object class="NSCustomObject" id="1003">
- <string key="NSClassName">FirstResponder</string>
- </object>
- <object class="NSCustomObject" id="1004">
- <string key="NSClassName">NSApplication</string>
- </object>
- <object class="NSCustomView" id="306076665">
- <reference key="NSNextResponder"/>
- <int key="NSvFlags">274</int>
- <object class="NSMutableArray" key="NSSubviews">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSTextField" id="469944275">
- <reference key="NSNextResponder" ref="306076665"/>
- <int key="NSvFlags">266</int>
- <string key="NSFrame">{{64, 104}, {221, 17}}</string>
- <reference key="NSSuperview" ref="306076665"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="516172136">
- <int key="NSCellFlags">68288064</int>
- <int key="NSCellFlags2">272630784</int>
- <string key="NSContents"/>
- <object class="NSFont" key="NSSupport">
- <string key="NSName">LucidaGrande</string>
- <double key="NSSize">13</double>
- <int key="NSfFlags">1044</int>
- </object>
- <reference key="NSControlView" ref="469944275"/>
- <object class="NSColor" key="NSBackgroundColor" id="53134068">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">controlColor</string>
- <object class="NSColor" key="NSColor">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MC42NjY2NjY2ODY1AA</bytes>
- </object>
- </object>
- <object class="NSColor" key="NSTextColor">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">controlTextColor</string>
- <object class="NSColor" key="NSColor">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MAA</bytes>
- </object>
- </object>
- </object>
- </object>
- <object class="NSImageView" id="19904045">
- <reference key="NSNextResponder" ref="306076665"/>
- <int key="NSvFlags">268</int>
- <object class="NSMutableSet" key="NSDragTypes">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="set.sortedObjects">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>Apple PDF pasteboard type</string>
- <string>Apple PICT pasteboard type</string>
- <string>Apple PNG pasteboard type</string>
- <string>NSFilenamesPboardType</string>
- <string>NeXT Encapsulated PostScript v1.2 pasteboard type</string>
- <string>NeXT TIFF v4.0 pasteboard type</string>
- </object>
- </object>
- <string key="NSFrame">{{20, 104}, {32, 32}}</string>
- <reference key="NSSuperview" ref="306076665"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSImageCell" key="NSCell" id="513951657">
- <int key="NSCellFlags">130560</int>
- <int key="NSCellFlags2">33554432</int>
- <object class="NSCustomResource" key="NSContents">
- <string key="NSClassName">NSImage</string>
- <string key="NSResourceName">warning</string>
- </object>
- <int key="NSAlign">0</int>
- <int key="NSScale">0</int>
- <int key="NSStyle">0</int>
- <bool key="NSAnimates">NO</bool>
- </object>
- <bool key="NSEditable">YES</bool>
- </object>
- <object class="NSTextField" id="1069445935">
- <reference key="NSNextResponder" ref="306076665"/>
- <int key="NSvFlags">274</int>
- <string key="NSFrame">{{17, 20}, {268, 76}}</string>
- <reference key="NSSuperview" ref="306076665"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="646657784">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">272629760</int>
- <string key="NSContents"/>
- <object class="NSFont" key="NSSupport">
- <string key="NSName">LucidaGrande</string>
- <double key="NSSize">13</double>
- <int key="NSfFlags">16</int>
- </object>
- <reference key="NSControlView" ref="1069445935"/>
- <reference key="NSBackgroundColor" ref="53134068"/>
- <object class="NSColor" key="NSTextColor">
- <int key="NSColorSpace">1</int>
- <bytes
key="NSRGB">MC40MDAwMDAwMDYgMC40MDAwMDAwMDYgMC40MDAwMDAwMDYAA</bytes>
- </object>
- </object>
- </object>
- </object>
- <string key="NSFrameSize">{302, 152}</string>
- <reference key="NSSuperview"/>
- <string key="NSClassName">NSView</string>
- </object>
- </object>
- <object class="IBObjectContainer" key="IBDocument.Objects">
- <object class="NSMutableArray" key="connectionRecords">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">view</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="306076665"/>
- </object>
- <int key="connectionID">187</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">headerMessage</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="469944275"/>
- </object>
- <int key="connectionID">225</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">headerTitle</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="1069445935"/>
- </object>
- <int key="connectionID">226</int>
- </object>
- </object>
- <object class="IBMutableOrderedSet" key="objectRecords">
- <object class="NSArray" key="orderedObjects">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBObjectRecord">
- <int key="objectID">0</int>
- <reference key="object" ref="0"/>
- <reference key="children" ref="1000"/>
- <nil key="parent"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">-2</int>
- <reference key="object" ref="1001"/>
- <reference key="parent" ref="0"/>
- <string key="objectName">File's Owner</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">-1</int>
- <reference key="object" ref="1003"/>
- <reference key="parent" ref="0"/>
- <string key="objectName">First Responder</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">-3</int>
- <reference key="object" ref="1004"/>
- <reference key="parent" ref="0"/>
- <string key="objectName">Application</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">77</int>
- <reference key="object" ref="306076665"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="19904045"/>
- <reference ref="469944275"/>
- <reference ref="1069445935"/>
- </object>
- <reference key="parent" ref="0"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">219</int>
- <reference key="object" ref="1069445935"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="646657784"/>
- </object>
- <reference key="parent" ref="306076665"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">220</int>
- <reference key="object" ref="646657784"/>
- <reference key="parent" ref="1069445935"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">221</int>
- <reference key="object" ref="19904045"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="513951657"/>
- </object>
- <reference key="parent" ref="306076665"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">222</int>
- <reference key="object" ref="513951657"/>
- <reference key="parent" ref="19904045"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">223</int>
- <reference key="object" ref="469944275"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="516172136"/>
- </object>
- <reference key="parent" ref="306076665"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">224</int>
- <reference key="object" ref="516172136"/>
- <reference key="parent" ref="469944275"/>
- </object>
- </object>
- </object>
- <object class="NSMutableDictionary" key="flattenedProperties">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>-1.IBPluginDependency</string>
- <string>-2.IBPluginDependency</string>
- <string>-3.IBPluginDependency</string>
- <string>219.IBPluginDependency</string>
- <string>220.IBPluginDependency</string>
- <string>221.IBPluginDependency</string>
- <string>222.IBPluginDependency</string>
- <string>223.IBPluginDependency</string>
- <string>224.IBPluginDependency</string>
- <string>77.IBEditorWindowLastContentRect</string>
- <string>77.IBPluginDependency</string>
-
<string>77.IBViewEditorWindowController.showingLayoutRectangles</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{174, 63}, {302, 152}}</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <boolean value="YES"/>
- </object>
- </object>
- <object class="NSMutableDictionary" key="unlocalizedProperties">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference key="dict.sortedKeys" ref="0"/>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- </object>
- <nil key="activeLocalization"/>
- <object class="NSMutableDictionary" key="localizations">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference key="dict.sortedKeys" ref="0"/>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- </object>
- <nil key="sourceID"/>
- <int key="maxID">226</int>
- </object>
- <object class="IBClassDescriber" key="IBDocument.Classes">
- <object class="NSMutableArray" key="referencedPartialClassDescriptions">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBPartialClassDescription">
- <string key="className">IMBApertureHeaderViewController</string>
- <string key="superclassName">NSViewController</string>
- <object class="NSMutableDictionary" key="outlets">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>headerMessage</string>
- <string>headerTitle</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>NSTextField</string>
- <string>NSTextField</string>
- </object>
- </object>
- <object class="NSMutableDictionary" key="toOneOutletInfosByName">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>headerMessage</string>
- <string>headerTitle</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBToOneOutletInfo">
- <string key="name">headerMessage</string>
- <string key="candidateClassName">NSTextField</string>
- </object>
- <object class="IBToOneOutletInfo">
- <string key="name">headerTitle</string>
- <string key="candidateClassName">NSTextField</string>
- </object>
- </object>
- </object>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">IMBApertureHeaderViewController.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">IMBObjectArrayController.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">IMBQLPreviewPanel.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">NSString+iMedia.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">UKFileWatcher.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">UKMainThreadProxy.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSView</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">NSView+iMedia.h</string>
- </object>
- </object>
- </object>
- <object class="NSMutableArray"
key="referencedPartialClassDescriptionsV3.2+">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBPartialClassDescription">
- <string key="className">NSActionCell</string>
- <string key="superclassName">NSCell</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSActionCell.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSApplication</string>
- <string key="superclassName">NSResponder</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier"
id="150404888">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSApplication.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSApplication</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier"
id="911924548">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSApplicationScripting.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSApplication</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier"
id="698176846">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSColorPanel.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSApplication</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSHelpManager.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSApplication</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSPageLayout.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSApplication</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSUserInterfaceItemSearching.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSCell</string>
- <string key="superclassName">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSCell.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSControl</string>
- <string key="superclassName">NSView</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier"
id="73367353">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSControl.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSFormatter</string>
- <string key="superclassName">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">Foundation.framework/Headers/NSFormatter.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSImageCell</string>
- <string key="superclassName">NSCell</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSImageCell.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSImageView</string>
- <string key="superclassName">NSControl</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSImageView.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSMenu</string>
- <string key="superclassName">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier"
id="498024585">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSMenu.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSAccessibility.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <reference key="sourceIdentifier" ref="150404888"/>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <reference key="sourceIdentifier" ref="911924548"/>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <reference key="sourceIdentifier" ref="698176846"/>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <reference key="sourceIdentifier" ref="73367353"/>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSDictionaryController.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSDragging.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSFontManager.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSFontPanel.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSKeyValueBinding.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <reference key="sourceIdentifier" ref="498024585"/>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSNibLoading.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSOutlineView.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSPasteboard.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSSavePanel.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSTableView.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSToolbarItem.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier"
id="658392329">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSView.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">Foundation.framework/Headers/NSArchiver.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">Foundation.framework/Headers/NSClassDescription.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">Foundation.framework/Headers/NSError.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">Foundation.framework/Headers/NSFileManager.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">Foundation.framework/Headers/NSObject.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">Foundation.framework/Headers/NSObjectScripting.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">Foundation.framework/Headers/NSPortCoder.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">Foundation.framework/Headers/NSScriptClassDescription.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">Foundation.framework/Headers/NSScriptKeyValueCoding.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">Foundation.framework/Headers/NSScriptObjectSpecifiers.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">Foundation.framework/Headers/NSScriptWhoseTests.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">Foundation.framework/Headers/NSThread.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSURL.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">Foundation.framework/Headers/NSURLDownload.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">ImageKit.framework/Headers/IKImageBrowserView.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">ImageKit.framework/Headers/ImageKitDeprecated.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">PDFKit.framework/Headers/PDFDocument.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">PDFKit.framework/Headers/PDFView.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">Print.framework/Headers/PDEPluginInterface.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">QTKit.framework/Headers/QTCaptureDecompressedVideoOutput.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">QTKit.framework/Headers/QTCaptureFileOutput.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">QTKit.framework/Headers/QTCaptureVideoPreviewOutput.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">QTKit.framework/Headers/QTCaptureView.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">QTKit.framework/Headers/QTMovie.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">QTKit.framework/Headers/QTMovieView.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">QuartzComposer.framework/Headers/QCCompositionParameterView.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">QuartzComposer.framework/Headers/QCCompositionPickerView.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">QuartzFilters.framework/Headers/QuartzFilterManager.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">WebKit.framework/Headers/WebDownload.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">WebKit.framework/Headers/WebEditingDelegate.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">WebKit.framework/Headers/WebFrameLoadDelegate.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">WebKit.framework/Headers/WebJavaPlugIn.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">WebKit.framework/Headers/WebPlugin.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">WebKit.framework/Headers/WebPluginContainer.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">WebKit.framework/Headers/WebPolicyDelegate.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">WebKit.framework/Headers/WebResourceLoadDelegate.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">WebKit.framework/Headers/WebScriptObject.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">WebKit.framework/Headers/WebUIDelegate.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSResponder</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSInterfaceStyle.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSResponder</string>
- <string key="superclassName">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSResponder.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSTextField</string>
- <string key="superclassName">NSControl</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSTextField.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSTextFieldCell</string>
- <string key="superclassName">NSActionCell</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSTextFieldCell.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSView</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSClipView.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSView</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSMenuItem.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSView</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSRulerView.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSView</string>
- <string key="superclassName">NSResponder</string>
- <reference key="sourceIdentifier" ref="658392329"/>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSViewController</string>
- <string key="superclassName">NSResponder</string>
- <object class="NSMutableDictionary" key="outlets">
- <string key="NS.key.0">view</string>
- <string key="NS.object.0">NSView</string>
- </object>
- <object class="NSMutableDictionary" key="toOneOutletInfosByName">
- <string key="NS.key.0">view</string>
- <object class="IBToOneOutletInfo" key="NS.object.0">
- <string key="name">view</string>
- <string key="candidateClassName">NSView</string>
- </object>
- </object>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSViewController.h</string>
- </object>
- </object>
- </object>
- </object>
- <int key="IBDocument.localizationMode">0</int>
- <string
key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
- <object class="NSMutableDictionary"
key="IBDocument.PluginDeclaredDependencies">
- <string
key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string>
- <integer value="1050" key="NS.object.0"/>
- </object>
- <object class="NSMutableDictionary"
key="IBDocument.PluginDeclaredDependencyDefaults">
- <string
key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string>
- <integer value="1050" key="NS.object.0"/>
- </object>
- <object class="NSMutableDictionary"
key="IBDocument.PluginDeclaredDevelopmentDependencies">
- <string
key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string>
- <integer value="3000" key="NS.object.0"/>
- </object>
- <bool
key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
- <string
key="IBDocument.LastKnownRelativeProjectPath">iMedia.xcodeproj</string>
- <int key="IBDocument.defaultPropertyAccessControl">3</int>
- <object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
***The diff for this file has been truncated for email.***
=======================================
--- /trunk/IMBApertureHeaderViewController.h Mon Jan 3 15:11:51 2011
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- iMedia Browser Framework <
http://karelia.com/imedia/>
-
- Copyright (c) 2005-2011 by Karelia Software et al.
-
- iMedia Browser is based on code originally developed by Jason Terhorst,
- further developed for Sandvox by Greg Hulands, Dan Wood, and Terrence
Talbot.
- The new architecture for version 2.0 was developed by Peter Baumgartner.
- Contributions have also been made by Matt Gough, Martin Wennerberg and
others
- as indicated in source files.
-
- The iMedia Browser Framework is licensed under the following terms:
-
- Permission is hereby granted, free of charge, to any person obtaining a
copy
- of this software and associated documentation files (the "Software"), to
deal
- in all or substantial portions of the Software without restriction,
including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
following
- conditions:
-
- Redistributions of source code must retain the original terms stated here,
- including this list of conditions, the disclaimer noted below, and the
- following copyright notice: Copyright (c) 2005-2011 by Karelia Software
et al.
-
- Redistributions in binary form must include, in an end-user-visible
manner,
- e.g., About window, Acknowledgments window, or similar, either a) the
original
- terms stated here, including this list of conditions, the disclaimer noted
- below, and the aforementioned copyright notice, or b) the aforementioned
- copyright notice and a link to
karelia.com/imedia.
-
- Neither the name of Karelia Software, nor Sandvox, nor the names of
- contributors to iMedia Browser may be used to endorse or promote products
- derived from the Software without prior and express written permission
from
- Karelia Software or individual contributors, as appropriate.
-
- Disclaimer: THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS
- "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE,
- AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH, THE
- SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN, THE SOFTWARE.
- */
-
-
-// Author: Pierre Bernard
-
-#import "IMBNode.h"
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-@interface IMBApertureHeaderViewController : NSViewController
-{
- IMBNode* _owningNode;
- NSTextField *_headerTitle;
- NSTextField *_headerMessage;
-}
-
-+ (IMBApertureHeaderViewController*)
headerViewControllerWithNode:(IMBNode*)inNode;
-
-@property (assign) IMBNode* owningNode;
-@property (nonatomic, retain) IBOutlet NSTextField *headerTitle;
-@property (nonatomic, retain) IBOutlet NSTextField *headerMessage;
-
-@end
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
=======================================
--- /trunk/IMBApertureHeaderViewController.m Mon Jan 3 15:11:51 2011
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- iMedia Browser Framework <
http://karelia.com/imedia/>
-
- Copyright (c) 2005-2011 by Karelia Software et al.
-
- iMedia Browser is based on code originally developed by Jason Terhorst,
- further developed for Sandvox by Greg Hulands, Dan Wood, and Terrence
Talbot.
- The new architecture for version 2.0 was developed by Peter Baumgartner.
- Contributions have also been made by Matt Gough, Martin Wennerberg and
others
- as indicated in source files.
-
- The iMedia Browser Framework is licensed under the following terms:
-
- Permission is hereby granted, free of charge, to any person obtaining a
copy
- of this software and associated documentation files (the "Software"), to
deal
- in all or substantial portions of the Software without restriction,
including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
following
- conditions:
-
- Redistributions of source code must retain the original terms stated here,
- including this list of conditions, the disclaimer noted below, and the
- following copyright notice: Copyright (c) 2005-2011 by Karelia Software
et al.
-
- Redistributions in binary form must include, in an end-user-visible
manner,
- e.g., About window, Acknowledgments window, or similar, either a) the
original
- terms stated here, including this list of conditions, the disclaimer noted
- below, and the aforementioned copyright notice, or b) the aforementioned
- copyright notice and a link to
karelia.com/imedia.
-
- Neither the name of Karelia Software, nor Sandvox, nor the names of
- contributors to iMedia Browser may be used to endorse or promote products
- derived from the Software without prior and express written permission
from
- Karelia Software or individual contributors, as appropriate.
-
- Disclaimer: THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS
- "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE,
- AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH, THE
- SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN, THE SOFTWARE.
- */
-
-
-// Author: Pierre Bernard
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark HEADERS
-
-#import "IMBApertureHeaderViewController.h"
-#import "IMBApertureParser.h"
-#import "IMBCommon.h"
-#import "NSString+iMedia.h"
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark
-
-@implementation IMBApertureHeaderViewController
-
-@synthesize owningNode = _owningNode;
-@synthesize headerTitle = _headerTitle;
-@synthesize headerMessage = _headerMessage;
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-+ (IMBApertureHeaderViewController*)
headerViewControllerWithNode:(IMBNode*)inNode
-{
- IMBApertureHeaderViewController* controller =
[[[IMBApertureHeaderViewController alloc] init] autorelease];
-
- controller.owningNode = inNode;
-
- return controller;
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-- (id) init
-{
- if (self = [super initWithNibName:@"IMBApertureHeaderView"
bundle:IMBBundle()])
- {
- }
-
- return self;
-}
-
-
-- (void) awakeFromNib
-{
- [super awakeFromNib];
-
- // Localize...
-
- self.headerTitle.stringValue =
NSLocalizedStringWithDefaultValue(@"IMBApertureParser.header.placeholderTitle",
- nil,
- IMBBundle(),
- @"Please enable preview sharing",
- @"Title in the Aperture header view");
- self.headerMessage.stringValue =
NSLocalizedStringWithDefaultValue(@"IMBApertureParser.header.placeholderMessage",
- nil,
- IMBBundle(),
- @"Go to Aperture Preferences > Preview > Share
Previews with iLife and iWork.\nSet it to \"Always\".",
- @"Message in the Aperture header view");
-}
-
-
-- (void) dealloc
-{
- [super dealloc];
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-@end
-
=======================================
--- /trunk/IMBApertureParser.h Fri Apr 15 06:23:54 2011
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- iMedia Browser Framework <
http://karelia.com/imedia/>
-
- Copyright (c) 2005-2011 by Karelia Software et al.
-
- iMedia Browser is based on code originally developed by Jason Terhorst,
- further developed for Sandvox by Greg Hulands, Dan Wood, and Terrence
Talbot.
- The new architecture for version 2.0 was developed by Peter Baumgartner.
- Contributions have also been made by Matt Gough, Martin Wennerberg and
others
- as indicated in source files.
-
- The iMedia Browser Framework is licensed under the following terms:
-
- Permission is hereby granted, free of charge, to any person obtaining a
copy
- of this software and associated documentation files (the "Software"), to
deal
- in all or substantial portions of the Software without restriction,
including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
following
- conditions:
-
- Redistributions of source code must retain the original terms stated here,
- including this list of conditions, the disclaimer noted below, and the
- following copyright notice: Copyright (c) 2005-2011 by Karelia Software
et al.
-
- Redistributions in binary form must include, in an end-user-visible
manner,
- e.g., About window, Acknowledgments window, or similar, either a) the
original
- terms stated here, including this list of conditions, the disclaimer noted
- below, and the aforementioned copyright notice, or b) the aforementioned
- copyright notice and a link to
karelia.com/imedia.
-
- Neither the name of Karelia Software, nor Sandvox, nor the names of
- contributors to iMedia Browser may be used to endorse or promote products
- derived from the Software without prior and express written permission
from
- Karelia Software or individual contributors, as appropriate.
-
- Disclaimer: THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS
- "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE,
- AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH, THE
- SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN, THE SOFTWARE.
-*/
-
-
-// Author: Peter Baumgartner
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark HEADERS
-
-#import "IMBAppleMediaParser.h"
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark
-
-@interface IMBApertureParser : IMBAppleMediaParser
-{
- BOOL _placeholderParser;
- NSString* _appPath;
- BOOL _shouldDisplayLibraryName;
- NSInteger _version;
-}
-
-@property (assign) BOOL placeholderParser;
-@property (retain) NSString* appPath;
-@property (assign) BOOL shouldDisplayLibraryName;
-@property (assign) NSInteger version;
-
-@end
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
=======================================
--- /trunk/IMBApertureParser.m Fri Apr 15 06:23:54 2011
+++ /dev/null
@@ -1,880 +0,0 @@
-/*
- iMedia Browser Framework <
http://karelia.com/imedia/>
-
- Copyright (c) 2005-2011 by Karelia Software et al.
-
- iMedia Browser is based on code originally developed by Jason Terhorst,
- further developed for Sandvox by Greg Hulands, Dan Wood, and Terrence
Talbot.
- The new architecture for version 2.0 was developed by Peter Baumgartner.
- Contributions have also been made by Matt Gough, Martin Wennerberg and
others
- as indicated in source files.
-
- The iMedia Browser Framework is licensed under the following terms:
-
- Permission is hereby granted, free of charge, to any person obtaining a
copy
- of this software and associated documentation files (the "Software"), to
deal
- in all or substantial portions of the Software without restriction,
including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
following
- conditions:
-
- Redistributions of source code must retain the original terms stated here,
- including this list of conditions, the disclaimer noted below, and the
- following copyright notice: Copyright (c) 2005-2011 by Karelia Software
et al.
-
- Redistributions in binary form must include, in an end-user-visible
manner,
- e.g., About window, Acknowledgments window, or similar, either a) the
original
- terms stated here, including this list of conditions, the disclaimer noted
- below, and the aforementioned copyright notice, or b) the aforementioned
- copyright notice and a link to
karelia.com/imedia.
-
- Neither the name of Karelia Software, nor Sandvox, nor the names of
- contributors to iMedia Browser may be used to endorse or promote products
- derived from the Software without prior and express written permission
from
- Karelia Software or individual contributors, as appropriate.
-
- Disclaimer: THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS
- "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE,
- AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH, THE
- SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN, THE SOFTWARE.
-*/
-
-
-// Author: Peter Baumgartner
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark HEADERS
-
-#import "IMBApertureParser.h"
-
-#import "IMBApertureHeaderViewController.h"
-#import "IMBParserController.h"
-#import "IMBNode.h"
-#import "IMBObject.h"
-#import "IMBIconCache.h"
-#import "NSWorkspace+iMedia.h"
-#import "NSFileManager+iMedia.h"
-#import "NSImage+iMedia.h"
-#import <Quartz/Quartz.h>
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark
-
-@interface IMBApertureParser ()
-
-- (NSString*) identifierForId:(NSNumber*) inId inSpace:(NSString*)
inIdSpace;
-- (NSString*) rootNodeIdentifier;
-- (BOOL) shouldUseAlbumType:(NSString*)inAlbumType;
-- (BOOL) isLeafAlbumType:(NSString*)inType;
-- (NSImage*) iconForAlbumType:(NSString*)inType;
-- (NSArray*) keylistForAlbum:(NSDictionary*)inAlbumDict;
-- (BOOL) shouldUseObject:(NSString*)inObjectType;
-- (void) addSubNodesToNode:(IMBNode*)inParentNode
albums:(NSArray*)inAlbums images:(NSDictionary*)inImages;
-- (void) populateNode:(IMBNode*)inNode albums:(NSArray*)inAlbums
images:(NSDictionary*)inImages;
-
-@end
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark
-
-@implementation IMBApertureParser
-
-@synthesize placeholderParser = _placeholderParser;
-@synthesize appPath = _appPath;
-@synthesize shouldDisplayLibraryName = _shouldDisplayLibraryName;
-@synthesize version = _version;
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// Register this parser, so that it gets automatically loaded...
-
-+ (void) load
-{
- NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
- [IMBParserController registerParserClass:self
forMediaType:kIMBMediaTypeImage];
- [pool drain];
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// Check if Aperture is installed...
-
-+ (NSString*) aperturePath
-{
- return [[NSWorkspace imb_threadSafeWorkspace]
absolutePathForAppBundleWithIdentifier:@"com.apple.Aperture"];
-}
-
-
-+ (BOOL) isInstalled
-{
- return [self aperturePath] != nil;
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// Look at the iApps preferences file and find all iPhoto libraries.
Create a parser instance for each libary...
-
-+ (NSArray*) parserInstancesForMediaType:(NSString*)inMediaType
-{
- NSMutableArray* parserInstances = [NSMutableArray array];
-
- if ([self isInstalled])
- {
- CFArrayRef apertureLibraries =
CFPreferencesCopyAppValue((CFStringRef)@"ApertureLibraries",(CFStringRef)@"com.apple.iApps");
- NSArray* libraries = (NSArray*)apertureLibraries;
-
- for (NSString* library in libraries)
- {
- NSURL* url = [NSURL URLWithString:library];
- NSString* path = [url path];
- BOOL changed;
- (void) [[NSFileManager imb_threadSafeManager]
imb_fileExistsAtPath:&path wasChanged:&changed];
-
- IMBApertureParser* parser = [[[self class] alloc]
initWithMediaType:inMediaType];
- parser.mediaSource = path;
- parser.shouldDisplayLibraryName = libraries.count > 1;
- [parserInstances addObject:parser];
- [parser release];
- }
-
- if (apertureLibraries) CFRelease(apertureLibraries);
-
- if ([parserInstances count] == 0) {
- NSArray *keys = [NSArray arrayWithObjects:@"RKXMLExportManagerMode",
@"LibraryPath", nil];
- NSDictionary *preferences = (NSDictionary*)
CFPreferencesCopyMultiple((CFArrayRef)keys,
- (CFStringRef)@"com.apple.Aperture",
- kCFPreferencesCurrentUser,
- kCFPreferencesAnyHost);
- preferences = [NSMakeCollectable(preferences) autorelease];
-
- NSString *exportManagerMode = [preferences objectForKey:[keys
objectAtIndex:0]];
- NSString *libraryPath = [preferences objectForKey:[keys
objectAtIndex:1]];
-
- if ((libraryPath != nil) && ([@"RKXMLExportManagerExportNeverKey"
isEqual:exportManagerMode])) {
- IMBApertureParser* parser = [[[self class] alloc]
initWithMediaType:inMediaType];
- parser.placeholderParser = YES;
- parser.mediaSource = libraryPath;
- parser.shouldDisplayLibraryName = NO;
- [parserInstances addObject:parser];
- [parser release];
- }
- }
- }
-
- return parserInstances;
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-- (id) initWithMediaType:(NSString*)inMediaType
-{
- if ((self = [super initWithMediaType:inMediaType]) != nil)
- {
- self.appPath = [[self class] aperturePath];
- self.plist = nil;
- self.modificationDate = nil;
- self.version = 0;
- }
-
- return self;
-}
-
-
-- (void) dealloc
-{
- IMBRelease(_appPath);
- IMBRelease(_plist);
- IMBRelease(_modificationDate);
- [super dealloc];
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark
-#pragma mark Parser Methods
-
-- (IMBNode*) nodeWithOldNode:(const IMBNode*)inOldNode
options:(IMBOptions)inOptions error:(NSError**)outError
-{
- NSError* error = nil;
-
- // Oops no path, can't create a root node. This is bad...
-
- if (self.mediaSource == nil)
- {
- return nil;
- }
-
- // Create a root node...
-
- IMBNode* node = [[[IMBNode alloc] init] autorelease];
-
- if (inOldNode == nil)
- {
- NSImage* icon = [[NSWorkspace imb_threadSafeWorkspace]
iconForFile:self.appPath];;
- [icon setScalesWhenResized:YES];
- [icon setSize:NSMakeSize(16.0,16.0)];
-
- node.mediaSource = self.mediaSource;
- node.identifier = [self rootNodeIdentifier];
-
node.name = @"Aperture";
- node.icon = icon;
- node.parser = self;
- node.isTopLevelNode = YES;
- node.groupType = kIMBGroupTypeLibrary;
-
- if (self.placeholderParser)
- {
- node.leaf = YES;
- node.shouldDisplayObjectView = NO;
- }
- else
- {
- node.leaf = NO;
- }
- }
-
- // Or a subnode...
-
- else
- {
- node.mediaSource = self.mediaSource;
- node.identifier = inOldNode.identifier;
-
node.name = inOldNode.name;
- node.icon = inOldNode.icon;
- node.groupType = inOldNode.groupType;
- node.leaf = inOldNode.leaf;
- node.parser = self;
- }
-
- // If we have more than one library then append the library name to the
root node...
-
- if (node.isTopLevelNode && self.shouldDisplayLibraryName)
- {
- NSString* path = (NSString*)node.mediaSource;
- NSString* name = [[[path stringByDeletingLastPathComponent]
lastPathComponent] stringByDeletingPathExtension];
-
node.name = [NSString stringWithFormat:@"%@ (%@)",
node.name,name];
- }
-
- // Watch the XML file. Whenever something in Aperture changes, we have to
replace the
- // WHOLE node tree, as we have no way of finding WHAT has changed inside
the library...
-
- if (node.isTopLevelNode)
- {
- node.watcherType = kIMBWatcherTypeFSEvent;
- node.watchedPath = [(NSString*)node.mediaSource
stringByDeletingLastPathComponent];
- }
- else
- {
- node.watcherType = kIMBWatcherTypeNone;
- }
-
- // If the old node was populated, then also populate the new node...
-
- if (inOldNode.isPopulated)
- {
- [self populateNewNode:node likeOldNode:inOldNode options:inOptions];
- }
-
- if (outError) *outError = error;
- return node;
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// The supplied node is a private copy which may be modified here in the
background operation. Parse the
-// iPhoto XML file and create subnodes as needed...
-
-- (BOOL) populateNode:(IMBNode*)inNode options:(IMBOptions)inOptions
error:(NSError**)outError
-{
- NSError* error = nil;
- NSDictionary* plist = self.plist;
- NSDictionary* images = [plist objectForKey:@"Master Image List"];
-
- // Population of events and faces node fundamentally different from album
node
-
- if ([self isFacesNode:inNode]) {
- NSDictionary* faces = [plist objectForKey:@"List of Faces"];
- [self populateFacesNode:inNode withFaces:faces images:images];
- } else {
- NSArray* albums = [plist objectForKey:@"List of Albums"];
- [self addSubNodesToNode:inNode albums:albums images:images];
- [self populateNode:inNode albums:albums images:images];
- }
-
- if (outError) *outError = error;
- return error == nil;
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// When the parser is deselected, then get rid of the cached plist data.
It will be loaded into memory lazily
-// once it is needed again...
-
-- (void) didStopUsingParser
-{
- @synchronized(self)
- {
- self.plist = nil;
- }
-}
-
-
-// When the XML file has changed then get rid of our cached plist...
-
-- (void) watchedPathDidChange:(NSString*)inWatchedPath
-{
- if ([inWatchedPath isEqual:self.mediaSource])
- {
- @synchronized(self)
- {
- self.plist = nil;
- }
- }
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// Placeholder parsers provide their own custom header view...
-
-- (NSViewController*) customHeaderViewControllerForNode:(IMBNode*)inNode
-{
- if (self.placeholderParser)
- {
- return [IMBApertureHeaderViewController
headerViewControllerWithNode:inNode];
- }
-
- return nil;
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark
-#pragma mark Helper Methods
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-- (NSInteger) version
-{
- if (_version == 0)
- {
- _version = [[self.plist objectForKey:@"Application Version"]
integerValue];
- }
-
- return _version;
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-// Create a unique identifier from the library path and the AlbumID that
is stored in the XML file.
-// An example is "IMBApertureParser://123/Sample/AlbumId/17"...
-
-- (NSString*) identifierForId:(NSNumber*) inId inSpace:(NSString*)
inIdSpace
-{
- NSString* path = (NSString*) self.mediaSource;
- NSString* libraryName = [[[path stringByDeletingLastPathComponent]
lastPathComponent] stringByDeletingPathExtension];
-
- NSString* nodePath = nil;
- if (inIdSpace)
- {
- nodePath = [NSString stringWithFormat:@"/%i/%@/%@/%@",[path
hash],libraryName,inIdSpace,inId];
- } else {
- nodePath = [NSString stringWithFormat:@"/%i/%@/%@",[path
hash],libraryName,inId];
- }
-
- return [self identifierForPath:nodePath];
-}
-
-
-// In Aperture 2 the root node always has the hardcoded AlbumID 1. In
Aperture 3 however we are choosing a
-// different node as root as there always seems to be an (empty) extra
node (Album Type 5) inserted between
-// the root and the nodes that we like to see at the first level. So we'll
look for this type 5 album and
-// return its id as the root node...
-
-- (NSString*) rootNodeIdentifier
-{
- // Aperture 2...
-
- if (self.version < 3)
- {
- return [self identifierForId:[NSNumber numberWithInt:1] inSpace:nil];
- }
-
- // Aperture 3...
-
- NSArray* albums = [self.plist objectForKey:@"List of Albums"];
-
- for (NSDictionary* albumDict in albums)
- {
- NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
- NSString* albumType = [albumDict objectForKey:@"Album Type"];
- NSNumber* albumId = [albumDict objectForKey:@"AlbumId"];
-
- if ([albumType isEqualToString:@"5"])
- {
- return [self identifierForId:albumId inSpace:nil];
- }
-
- [pool drain];
- }
-
- // Fallback if nothing is found...
-
- return [self identifierForId:[NSNumber numberWithInt:1] inSpace:nil];
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// Exclude some album types. Specifically exclude all root albums as the
root node has already
-// been created by the parser during its first invocation...
-
-- (BOOL) shouldUseAlbumType:(NSString*)inAlbumType
-{
- if ([inAlbumType isEqualToString:@"5"]) return (self.version < 3);
- if ([inAlbumType isEqualToString:@"97"]) return NO;
- if ([inAlbumType isEqualToString:@"98"]) return NO;
- if ([inAlbumType isEqualToString:@"99"]) return NO;
- return YES;
-}
-
-
-// This method may be used to filter specific albums from the list
-// (e.g. ones that don't have the correct media type).
-// Always returns YES for now.
-
-- (BOOL) shouldUseAlbum:(NSDictionary*)inAlbumDict
images:(NSDictionary*)inImages
-{
- return YES;
-}
-
-
-// Return YES indicating that an album should be a leaf node, i.e. that it
does not have a disclosure triangle
-// in the IMBOutlineView...
-
-- (BOOL) isLeafAlbumType:(NSString*)inType
-{
- NSInteger type = [inType integerValue];
-
- switch (type)
- {
- case 1: return YES; // Album
- case 2: return YES; // Smart album
- case 3: return YES; // Smart album
- case 4: return NO; // Project
- case 5: return NO; // All projects
- case 6: return NO; // Folder
- case 7: return NO; // Folder
- case 8: return YES; // Book
- case 9: return YES; // Web page
- case 10: return YES; // Web journal
- case 11: return YES; // Lighttable
- case 13: return YES; // Web gallery
- case 19: return YES; // Slideshow
- case 94: return YES; // Photos
- case 95: return YES; // Flagged
- case 96: return NO; // Smart albums
- case 97: return NO; // Library
- case 98: return NO; // Library
- case 99: return NO; // Library (holding all images)
- }
-
- return [super isLeafAlbumType:inType];
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-// Returns whether the album dictionary provided represents the "photos"
album
-
-- (BOOL) isAllPhotosAlbum:(NSDictionary*)inAlbumDict
-{
- return [[inAlbumDict objectForKey:@"uuid"]
isEqualToString:@"allPhotosAlbum"];
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// Icons for older Aperture versions...
-
-- (NSImage*) iconForAlbumType2:(NSString*)inType
-{
- static const IMBIconTypeMappingEntry kIconTypeMappingEntries[] =
- {
- {@"v2-1", @"Project_I_Album.tiff", @"folder", nil, nil}, // album
- {@"v2-2", @"Project_I_SAlbum.tiff", @"folder", nil, nil}, // smart
album
- {@"v2-3", @"List_Icons_LibrarySAlbum.tiff", @"folder", nil, nil}, //
library **** ... 200X
- {@"v2-4", @"Project_I_Project.tiff", @"folder", nil, nil}, // project
- {@"v2-5", @"List_Icons_Library.tiff", @"folder", nil, nil}, // library
(top level)
- {@"v2-6", @"Project_I_Folder.tiff", @"folder", nil, nil}, // folder
- {@"v2-7", @"Project_I_ProjectFolder.tiff", @"folder", nil, nil}, //
sub-folder of project
- {@"v2-8", @"Project_I_Book.tiff", @"folder", nil, nil}, // book
- {@"v2-9", @"Project_I_WebPage.tiff", @"folder", nil, nil}, // web
gallery
- {@"v2-9", @"Project_I_WebGallery.tiff", @"folder", nil, nil}, // web
gallery (alternate image)
- {@"v2-10", @"Project_I_WebJournal.tiff", @"folder", nil, nil}, // web
journal
- {@"v2-11", @"Project_I_LightTable.tiff", @"folder", nil, nil}, // light
table
- {@"v2-13", @"Project_I_SWebGallery.tiff", @"folder", nil, nil}, //
smart web gallery
- {@"v2-97", @"Project_I_Projects.tiff", @"folder", nil, nil}, // library
- {@"v2-98", @"AppIcon.icns", @"folder", nil, nil}, // library
- {@"v2-99", @"List_Icons_Library.tiff", @"folder", nil, nil}, //
library (knot holding all images)
- };
-
- static const IMBIconTypeMapping kIconTypeMapping =
- {
- sizeof(kIconTypeMappingEntries) / sizeof(kIconTypeMappingEntries[0]),
- kIconTypeMappingEntries,
- {@"v2-1", @"Project_I_Album.tiff", @"folder", nil, nil} // fallback
image
- };
-
- // Since icons are different for different versions of Aperture, we are
adding the prefix v2- or v3-
- // to the album type so that we can store different icons (for each
version) in the icon cache...
-
- NSString* type = [@"v2-" stringByAppendingString:inType];
- return [[IMBIconCache sharedIconCache] iconForType:type
fromBundleID:@"com.apple.Aperture" withMappingTable:&kIconTypeMapping];
-}
-
-
-// New icons for Aperture 3...
-
-- (NSImage*) iconForAlbumType3:(NSString*)inType
-{
- static const IMBIconTypeMappingEntry kIconTypeMappingEntries[] =
- {
- {@"v3-Faces",@"sl-icon-small_people.tiff", @"folder", nil, nil},
- {@"v3-1", @"SL-album.tiff", @"folder", nil, nil}, // album
- {@"v3-2", @"SL-smartAlbum.tiff", @"folder", nil, nil}, // smart album
- {@"v3-3", @"SL-smartAlbum.tiff", @"folder", nil, nil}, // library
**** ... 200X
- {@"v3-4", @"SL-project.tiff", @"folder", nil, nil}, // project
- {@"v3-5", @"SL-allProjects.tiff", @"folder", nil, nil}, // library
(top level)
- {@"v3-6", @"SL-folder.tiff", @"folder", nil, nil}, // folder
- {@"v3-7", @"SL-folder.tiff", @"folder", nil, nil}, // sub-folder of
project
- {@"v3-8", @"SL-book.tiff", @"folder", nil, nil}, // book
- {@"v3-9", @"SL-webpage.tiff", @"folder", nil, nil}, // web gallery
- {@"v3-9", @"Project_I_WebGallery.tiff", @"folder", nil, nil}, // web
gallery (alternate image)
- {@"v3-10", @"SL-webJournal.tiff", @"folder", nil, nil}, // web journal
- {@"v3-11", @"SL-lightTable.tiff", @"folder", nil, nil}, // light table
- {@"v3-13", @"sl-icon-small_webGallery.tiff", @"folder", nil, nil}, //
smart web gallery
- {@"v3-19", @"SL-slideshow.tiff", @"folder", nil, nil}, // slideshow
- {@"v3-94", @"SL-photos.tiff", @"folder", nil, nil}, // photos
- {@"v3-95", @"SL-flag.tif", @"folder", nil, nil}, // flagged
- {@"v3-96", @"SL-smartLibrary.tiff", @"folder", nil, nil}, // library
albums
- {@"v3-97", @"SL-allProjects.tiff", @"folder", nil, nil}, // library
- {@"v3-98", @"AppIcon.icns", @"folder", nil, nil}, // library
- {@"v3-99", @"List_Icons_Library.tiff", @"folder", nil, nil}, //
library (knot holding all images)
- };
-
- static const IMBIconTypeMapping kIconTypeMapping =
- {
- sizeof(kIconTypeMappingEntries) / sizeof(kIconTypeMappingEntries[0]),
- kIconTypeMappingEntries,
- {@"1", @"SL-album.tiff", @"folder", nil, nil} // fallback image
- };
-
- // Since icons are different for different versions of Aperture, we are
adding the prefix v2- or v3-
- // to the album type so that we can store different icons (for each
version) in the icon cache...
-
- NSString* type = [@"v3-" stringByAppendingString:inType];
- return [[IMBIconCache sharedIconCache] iconForType:type
fromBundleID:@"com.apple.Aperture" withMappingTable:&kIconTypeMapping];
-}
-
-
-- (NSImage*) iconForAlbumType:(NSString*)inType
-{
- if (self.version < 3)
- {
- return [self iconForAlbumType2:inType];
- }
- else
- {
- return [self iconForAlbumType3:inType];
- }
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// The xml file has a list of albums. Each album contains a KeyList entry
(array of images). However this list
-// does not always seem to corresponds with what one sees in the Aperture
UI itself. Instead there are albums
-// in the xml that we do not want to display as a node, which do contain
the images we need for another node.
-// For this reason we need a mapping mechanism that lets us assign the
KeyList of one album to another node.
-// The following two methods provide this mecahism...
-
-- (NSArray*) _keylistForAlbumType:(NSString*)inAlbumType
-{
- NSArray* albums = [self.plist objectForKey:@"List of Albums"];
-
- for (NSDictionary* albumDict in albums)
- {
- NSString* albumType = [albumDict objectForKey:@"Album Type"];
-
- if ([albumType isEqualToString:inAlbumType])
- {
- return [albumDict objectForKey:@"KeyList"];
- }
- }
-
- return nil;
-}
-
-
-- (NSArray*) keylistForAlbum:(NSDictionary*)inAlbumDict
-{
- NSString* albumType = [inAlbumDict objectForKey:@"Album Type"];
-
- // In Aperture 3 map keyList of album 99 to root node and Photos node...
-
-// if (self.version == 3)
-// {
- if ([albumType isEqualToString:@"98"]) // root node
- {
- return [self _keylistForAlbumType:@"99"];
- }
- else if ([albumType isEqualToString:@"5"]) // root node
- {
- return [self _keylistForAlbumType:@"99"];
- }
- else if ([albumType isEqualToString:@"94"]) // Photos node
- {
- return [self _keylistForAlbumType:@"99"];
- }
-// }
-
- // All other album just use their own key list...
-
- return [inAlbumDict objectForKey:@"KeyList"];
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// Exclude everything but images...
-
-- (BOOL) shouldUseObject:(NSString*)inObjectType
-{
- return inObjectType==nil || [inObjectType isEqualToString:@"Image"];
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-- (void) addSubNodesToNode:(IMBNode*)inParentNode
albums:(NSArray*)inAlbums images:(NSDictionary*)inImages
-{
- // Create the subNodes array on demand - even if turns out to be empty
after exiting this method,
- // because without creating an array we would cause an endless loop...
-
- NSMutableArray* subNodes = [NSMutableArray array];
-
- // Now parse the Aperture XML plist and look for albums whose parent
matches our parent node. We are
- // only going to add subnodes that are direct children of inParentNode...
-
- for (NSDictionary* albumDict in inAlbums)
- {
- NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
-
- NSString* albumType = [albumDict objectForKey:@"Album Type"];
- NSString* albumName = [albumDict objectForKey:@"AlbumName"];
- NSNumber* parentId = [albumDict objectForKey:@"Parent"];
-
- // Root node does not have an id space
- NSString* parentIdSpace = [inParentNode isTopLevelNode] ? nil : [self
idSpaceForAlbumType:albumType];
-
- // parent always from same id space for non top-level albums
- NSString* parentIdentifier = parentId ? [self identifierForId:parentId
inSpace:parentIdSpace] : [self identifierForPath:@"/"];
-
- if ([self shouldUseAlbumType:albumType] && [inParentNode.identifier
isEqualToString:parentIdentifier])
- {
- // Create node for this album...
-
- IMBNode* albumNode = [[[IMBNode alloc] init] autorelease];
-
- albumNode.leaf = [self isLeafAlbumType:albumType];
- albumNode.icon = [self iconForAlbumType:albumType];
- albumNode.name = albumName;
- albumNode.mediaSource = self.mediaSource;
- albumNode.parser = self;
-
- // Keep a ref to the album dictionary for later use when we populate
this node
- // so we don't have to loop through the whole album list again to find
it.
-
- albumNode.attributes = albumDict;
-
- // Set the node's identifier. This is needed later to link it to the
correct parent node...
-
- NSNumber* albumId = [albumDict objectForKey:@"AlbumId"];
- albumNode.identifier = [self identifierForId:albumId inSpace:[self
idSpaceForAlbumType:albumType]];
-
- // Add the new album node to its parent (inRootNode)...
-
- [subNodes addObject:albumNode];
- }
-
- [pool drain];
- }
-
- inParentNode.subNodes = subNodes;
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-- (Class) objectClass
-{
- return [IMBObject class];
-}
-
-
-// Returns an empty dictionary for now.
-// TODO: Verify whether we need to return some "true" values
for "KeyList", "KeyPhotoKey" and "PhotoCount"
-
-- (NSDictionary*) childrenInfoForNode:(IMBNode*)inNode
images:(NSDictionary*)inImages
-{
- return [NSDictionary dictionaryWithObjectsAndKeys:nil];
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-- (void) populateNode:(IMBNode*)inNode albums:(NSArray*)inAlbums
images:(NSDictionary*)inImages
-{
- // Create the objects array on demand - even if turns out to be empty
after exiting this method, because
- // without creating an array we would cause an endless loop...
-
- NSMutableArray* objects = [[NSMutableArray alloc]
initWithArray:inNode.objects];
-
- // Look for the correct album in the Aperture XML plist. Once we find it,
populate the node with IMBVisualObjects
- // for each image in this album...
-
- Class objectClass = [self objectClass];
- NSUInteger index = 0;
-
- // We saved a reference to the album dictionary when this node was created
- // (ivar 'attributes') and now happily reuse it to save an outer loop
(over album list) here.
-
- NSDictionary* albumDict = inNode.attributes;
-
- NSAutoreleasePool* pool1 = [[NSAutoreleasePool alloc] init];
-// NSArray* imageKeys = [albumDict objectForKey:@"KeyList"];
- NSArray* imageKeys = [self keylistForAlbum:albumDict];
-
- for (NSString* key in imageKeys)
- {
- NSAutoreleasePool* pool2 = [[NSAutoreleasePool alloc] init];
- NSDictionary* objectDict = [inImages objectForKey:key];
- NSString* mediaType = [objectDict objectForKey:@"MediaType"];
-
- if (objectDict!=nil && [self shouldUseObject:mediaType])
- {
- NSString* imagePath = [objectDict objectForKey:@"ImagePath"];
- NSString* thumbPath = [objectDict objectForKey:@"ThumbPath"];
- NSString* caption = [objectDict objectForKey:@"Caption"];
- NSMutableDictionary* preliminaryMetadata =
[NSMutableDictionary dictionaryWithDictionary:objectDict];
-
- [preliminaryMetadata setObject:key
forKey:@"VersionUUID"];
-
- IMBObject* object = [[objectClass alloc] init];
- [objects addObject:object];
- [object release];
-
- object.location = (id)imagePath;
-
object.name = caption;
- object.preliminaryMetadata = preliminaryMetadata; // This metadata
from the XML file is available immediately
- object.metadata = nil; // Build lazily
when needed (takes longer)
- object.metadataDescription = nil; // Build lazily
when needed (takes longer)
- object.parser = self;
- object.index = index++;
-
- object.imageLocation = (thumbPath!=nil) ? thumbPath : imagePath;
- object.imageRepresentationType =
IKImageBrowserCGImageRepresentationType;
- object.imageRepresentation = nil;
- }
-
- [pool2 drain];
- }
-
- [pool1 drain];
-
- inNode.objects = objects;
- [objects release];
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// Loaded lazily when actually needed for display. Here we combine the
metadata we got from the Aperture XML file
-// (which was available immediately, but not enough information) with more
information that we obtain via ImageIO.
-// This takes a little longer, but since it only done laziy for those
object that are actually visible it's fine.
-// Please note that this method may be called on a background thread...
-
-- (void) loadMetadataForObject:(IMBObject*)inObject
-{
- NSMutableDictionary* metadata = [NSMutableDictionary
dictionaryWithDictionary:inObject.preliminaryMetadata];
-
- // Do not load (key) image specific metadata for node objects
- // because it doesn't represent the nature of the object well enough.
-
- if (![inObject isKindOfClass:[IMBNodeObject class]])
- {
- [metadata addEntriesFromDictionary:[NSImage
imb_metadataFromImageAtPath:inObject.path checkSpotlightComments:NO]];
- }
-
- NSString* description = [self metadataDescriptionForMetadata:metadata];
-
- if ([NSThread isMainThread])
- {
- inObject.metadata = metadata;
- inObject.metadataDescription = description;
- }
- else
- {
- NSArray* modes = [NSArray arrayWithObject:NSRunLoopCommonModes];
- [inObject performSelectorOnMainThread:@selector(setMetadata:)
withObject:metadata waitUntilDone:NO modes:modes];
- [inObject performSelectorOnMainThread:@selector(setMetadataDescription:)
withObject:description waitUntilDone:NO modes:modes];
- }
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-@end
=======================================
--- /trunk/IMBApertureVideoParser.h Mon Jan 3 15:11:51 2011
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- iMedia Browser Framework <
http://karelia.com/imedia/>
-
- Copyright (c) 2005-2011 by Karelia Software et al.
-
- iMedia Browser is based on code originally developed by Jason Terhorst,
- further developed for Sandvox by Greg Hulands, Dan Wood, and Terrence
Talbot.
- The new architecture for version 2.0 was developed by Peter Baumgartner.
- Contributions have also been made by Matt Gough, Martin Wennerberg and
others
- as indicated in source files.
-
- The iMedia Browser Framework is licensed under the following terms:
-
- Permission is hereby granted, free of charge, to any person obtaining a
copy
- of this software and associated documentation files (the "Software"), to
deal
- in all or substantial portions of the Software without restriction,
including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
following
- conditions:
-
- Redistributions of source code must retain the original terms stated here,
- including this list of conditions, the disclaimer noted below, and the
- following copyright notice: Copyright (c) 2005-2011 by Karelia Software
et al.
-
- Redistributions in binary form must include, in an end-user-visible
manner,
- e.g., About window, Acknowledgments window, or similar, either a) the
original
- terms stated here, including this list of conditions, the disclaimer noted
- below, and the aforementioned copyright notice, or b) the aforementioned
- copyright notice and a link to
karelia.com/imedia.
-
- Neither the name of Karelia Software, nor Sandvox, nor the names of
- contributors to iMedia Browser may be used to endorse or promote products
- derived from the Software without prior and express written permission
from
- Karelia Software or individual contributors, as appropriate.
-
- Disclaimer: THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS
- "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE,
- AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH, THE
- SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN, THE SOFTWARE.
-*/
-
-
-// Author: Peter Baumgartner
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark HEADERS
-
-#import "IMBApertureParser.h"
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark
-
-@interface IMBApertureVideoParser : IMBApertureParser
-
-@end
-
-
-//----------------------------------------------------------------------------------------------------------------------
=======================================
--- /trunk/IMBApertureVideoParser.m Mon Feb 21 03:02:42 2011
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- iMedia Browser Framework <
http://karelia.com/imedia/>
-
- Copyright (c) 2005-2011 by Karelia Software et al.
-
- iMedia Browser is based on code originally developed by Jason Terhorst,
- further developed for Sandvox by Greg Hulands, Dan Wood, and Terrence
Talbot.
- The new architecture for version 2.0 was developed by Peter Baumgartner.
- Contributions have also been made by Matt Gough, Martin Wennerberg and
others
- as indicated in source files.
-
- The iMedia Browser Framework is licensed under the following terms:
-
- Permission is hereby granted, free of charge, to any person obtaining a
copy
- of this software and associated documentation files (the "Software"), to
deal
- in all or substantial portions of the Software without restriction,
including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
following
- conditions:
-
- Redistributions of source code must retain the original terms stated here,
- including this list of conditions, the disclaimer noted below, and the
- following copyright notice: Copyright (c) 2005-2011 by Karelia Software
et al.
-
- Redistributions in binary form must include, in an end-user-visible
manner,
- e.g., About window, Acknowledgments window, or similar, either a) the
original
- terms stated here, including this list of conditions, the disclaimer noted
- below, and the aforementioned copyright notice, or b) the aforementioned
- copyright notice and a link to
karelia.com/imedia.
-
- Neither the name of Karelia Software, nor Sandvox, nor the names of
- contributors to iMedia Browser may be used to endorse or promote products
- derived from the Software without prior and express written permission
from
- Karelia Software or individual contributors, as appropriate.
-
- Disclaimer: THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS
- "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE,
- AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH, THE
- SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN, THE SOFTWARE.
-*/
-
-
-// Author: Peter Baumgartner
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark HEADERS
-
-#import "IMBApertureVideoParser.h"
-#import "IMBParserController.h"
-#import "IMBObject.h"
-#import "NSDictionary+iMedia.h"
-#import "NSURL+iMedia.h"
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark
-
-@interface IMBApertureVideoParser ()
-
-- (NSString*) metadataDescriptionForMetadata:(NSDictionary*)inMetadata;
-
-@end
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark
-
-@implementation IMBApertureVideoParser
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// Register this parser, so that it gets automatically loaded...
-
-+ (void) load
-{
- NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
- [IMBParserController registerParserClass:self
forMediaType:kIMBMediaTypeMovie];
- [pool drain];
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// Exclude some album types...
-
-//- (BOOL) shouldUseAlbumType:(NSString*)inAlbumType
-//{
-// if ([inAlbumType isEqualToString:@"94"]) return NO;
-// if ([inAlbumType isEqualToString:@"97"]) return NO;
-//// if ([inAlbumType isEqualToString:@"98"]) return NO;
-// if ([inAlbumType isEqualToString:@"99"]) return NO;
-// return YES;
-//}
-
-
-// Exclude everything but movie files...
-
-- (BOOL) shouldUseObject:(NSString*)inObjectType
-{
- return [inObjectType isEqualToString:@"Movie"];
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// Loaded lazily when actually needed for display. Here we combine the
metadata we got from the Aperture XML file
-// (which was available immediately, but not enough information) with more
information that we obtain via ImageIO.
-// This takes a little longer, but since it only done laziy for those
object that are actually visible it's fine.
-// Please note that this method may be called on a background thread...
-
-- (void) loadMetadataForObject:(IMBObject*)inObject
-{
- NSURL* videoURL = [inObject URL];
-
- if (videoURL == nil) {
- return;
- }
-
- NSMutableDictionary* metadata = [NSMutableDictionary
dictionaryWithDictionary:inObject.preliminaryMetadata];
-
- [metadata setObject:[inObject path] forKey:@"path"];
- [metadata addEntriesFromDictionary:[NSURL
imb_metadataFromVideoAtURL:videoURL]];
-
- NSString* description = [self metadataDescriptionForMetadata:metadata];
-
- if ([NSThread isMainThread])
- {
- inObject.metadata = metadata;
- inObject.metadataDescription = description;
- }
- else
- {
- NSArray* modes = [NSArray arrayWithObject:NSRunLoopCommonModes];
- [inObject performSelectorOnMainThread:@selector(setMetadata:)
withObject:metadata waitUntilDone:NO modes:modes];
- [inObject performSelectorOnMainThread:@selector(setMetadataDescription:)
withObject:description waitUntilDone:NO modes:modes];
- }
-}
-
-
-- (NSString*) metadataDescriptionForMetadata:(NSDictionary*)inMetadata
-{
- return [NSDictionary imb_metadataDescriptionForMovieMetadata:inMetadata];
-}
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-@end
=======================================
--- /trunk/IMBAppleMediaParser.h Fri May 20 07:18:59 2011
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- iMedia Browser Framework <
http://karelia.com/imedia/>
-
- Copyright (c) 2005-2011 by Karelia Software et al.
-
- iMedia Browser is based on code originally developed by Jason Terhorst,
- further developed for Sandvox by Greg Hulands, Dan Wood, and Terrence
Talbot.
- The new architecture for version 2.0 was developed by Peter Baumgartner.
- Contributions have also been made by Matt Gough, Martin Wennerberg and
others
- as indicated in source files.
-
- The iMedia Browser Framework is licensed under the following terms:
-
- Permission is hereby granted, free of charge, to any person obtaining a
copy
- of this software and associated documentation files (the "Software"), to
deal
- in all or substantial portions of the Software without restriction,
including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
following
- conditions:
-
- Redistributions of source code must retain the original terms stated here,
- including this list of conditions, the disclaimer noted below, and the
- following copyright notice: Copyright (c) 2005-2011 by Karelia Software
et al.
-
- Redistributions in binary form must include, in an end-user-visible
manner,
- e.g., About window, Acknowledgments window, or similar, either a) the
original
- terms stated here, including this list of conditions, the disclaimer noted
- below, and the aforementioned copyright notice, or b) the aforementioned
- copyright notice and a link to
karelia.com/imedia.
-
- Neither the name of Karelia Software, nor Sandvox, nor the names of
- contributors to iMedia Browser may be used to endorse or promote products
- derived from the Software without prior and express written permission
from
- Karelia Software or individual contributors, as appropriate.
-
- Disclaimer: THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS
- "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE,
- AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH, THE
- SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN, THE SOFTWARE.
- */
-
-
-// Author: Jörg Jacobsen
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark ABSTRACT
-/*
- This class provides parsing functionality that is common to some media
data storages provided by Apple
- (such as iPhoto and Aperture). Public property list files of iPhoto and
Aperture share a lot of structure
- (specifically regarding faces data) so you can utilize this intermediate
class to share corresponding
- functionality between iPhoto and Aperture parsers (and maybe other
parsers to come).
-
- ATTENTION: This is an abstract class. Do not use an instance of this
class, but use a specific subclass
- like IMBiPhotoParser or IMBApertureParser instead...
-*/
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark HEADERS
-
-#import <Cocoa/Cocoa.h>
-#import "IMBParser.h"
-#import "IMBSkimmableObjectViewController.h"
-#import "IMBNodeObject.h"
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-#pragma mark CONSTANTS
-
-// Provide different id spaces for events, faces and albums. Distinct ids
must be guaranteed
-// throughout the media tree in the outline view.
-
-#define EVENTS_ID_SPACE @"EventId"
-#define FACES_ID_SPACE @"FaceId"
-#define ALBUMS_ID_SPACE @"AlbumId"
-
-// Since we will add an events node to the list of iPhoto albums and a
faces node to iPhoto and Aperture
-// we have to create (sub-)ids for them that are unique throughout their
library. The ones chosen below
-// are very, very likely to be.
-
-#define EVENTS_NODE_ID UINT_MAX-4811 // Very, very unlikely this not to be
unique throughout library
-#define FACES_NODE_ID UINT_MAX-4812 // Very, very unlikely this not to be
unique throughout library
-
-// node object types of interest for skimming
-
-extern NSString* const kIMBiPhotoNodeObjectTypeEvent; // = @"events"
-extern NSString* const kIMBiPhotoNodeObjectTypeFace; // = @"faces"
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-#pragma mark -
-
-@interface IMBAppleMediaParser : IMBParser
<IMBSkimmableObjectViewControllerDelegate>
-{
- NSDictionary* _plist;
- NSDate* _modificationDate;
-}
-
-@property (retain) NSDictionary* plist;
-@property (retain) NSDate* modificationDate;
-
-
-// Returns IKImageBrowserCGImageRepresentationType
-
-- (NSString*) requestedImageRepresentationType;
-
-// Returns events id space (EVENTS_ID_SPACE) for album types "Event"
and "Events".
-// Returns faces id space (FACES_ID_SPACE) for album types "Face"
and "Faces".
-// Otherwise returns the albums id space (ALBUMS_ID_SPACE).
-
-- (NSString*) idSpaceForAlbumType:(NSString*) inAlbumType;
-
-// Returns an identifier built from the provided id and id space. An
example is "IMBiPhotoParser://FaceId/17"...
-
-- (NSString*) identifierForId:(NSNumber*) inId inSpace:(NSString*)
inIdSpace;
-
-// Returns the standard album of all photos ("Photos") found in the XML
data file.
-// Also returns the index in the album list where the album was found.
-
-- (NSDictionary*) allPhotosAlbumInAlbumList:(NSArray*)inAlbumList
atIndex:(NSNumber**)outIndex;
-
-// Returns whether inNode is the events node
-
-- (BOOL) isEventsNode:(IMBNode*)inNode;
-
-// Returns whether node provided is the faces node
-
-- (BOOL) isFacesNode:(IMBNode*)inNode;
-
-// Returns whether an album of this type exposes a disclosure triangle or
not.
-// Takes care of album Types "Folder", "Faces" and "Events".
-// Subclass for more specific behavior.
-
-- (BOOL) isLeafAlbumType:(NSString*)inType;
-
-// The image location represents an image path to the image to be used for
display inside of the browser (a preview of
-// of the original image). By default we use the path to the image's
thumbnail (key: "ThumbPath").
-// Subclass for distinct behavior.
-
-- (NSString*) imageLocationForObject:(NSDictionary*)inObjectDict;
-
-// Returns the image location for the clipped face in the image
represented by inImageKey in the master image list
-// (aka dictionary)
-
-- (NSString*) imagePathForFaceIndex:(NSNumber*)inFaceIndex
inImageWithKey:(NSString*)inImageKey;
-
-// Returns the image location for the image represented by inImageKey in
the master image list (aka dictionary)
-
-- (NSString*) imagePathForImageKey:(NSString*)inImageKey;
-
-// Specific method for populating Faces nodes (in Aperture and iPhoto
library)
-
-- (void) populateFacesNode:(IMBNode*)inNode
withFaces:(NSDictionary*)inFaces images:(NSDictionary*)inImages;
-
-// Events and Faces have other metadata than images or movies
-
-- (NSString*)
countableMetadataDescriptionForMetadata:(NSDictionary*)inMetadata;
-
-// Convert metadata into a human readable string...
-
-- (NSString*) metadataDescriptionForMetadata:(NSDictionary*)inMetadata;
-
-@end
=======================================
--- /trunk/IMBAppleMediaParser.m Fri Apr 15 06:23:54 2011
+++ /dev/null
@@ -1,833 +0,0 @@
-/*
- iMedia Browser Framework <
http://karelia.com/imedia/>
-
- Copyright (c) 2005-2011 by Karelia Software et al.
-
- iMedia Browser is based on code originally developed by Jason Terhorst,
- further developed for Sandvox by Greg Hulands, Dan Wood, and Terrence
Talbot.
- The new architecture for version 2.0 was developed by Peter Baumgartner.
- Contributions have also been made by Matt Gough, Martin Wennerberg and
others
- as indicated in source files.
-
- The iMedia Browser Framework is licensed under the following terms:
-
- Permission is hereby granted, free of charge, to any person obtaining a
copy
- of this software and associated documentation files (the "Software"), to
deal
- in all or substantial portions of the Software without restriction,
including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
following
- conditions:
-
- Redistributions of source code must retain the original terms stated here,
- including this list of conditions, the disclaimer noted below, and the
- following copyright notice: Copyright (c) 2005-2011 by Karelia Software
et al.
-
- Redistributions in binary form must include, in an end-user-visible
manner,
- e.g., About window, Acknowledgments window, or similar, either a) the
original
- terms stated here, including this list of conditions, the disclaimer noted
- below, and the aforementioned copyright notice, or b) the aforementioned
- copyright notice and a link to
karelia.com/imedia.
-
- Neither the name of Karelia Software, nor Sandvox, nor the names of
- contributors to iMedia Browser may be used to endorse or promote products
- derived from the Software without prior and express written permission
from
- Karelia Software or individual contributors, as appropriate.
-
- Disclaimer: THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS
- "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE,
- AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH, THE
- SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN, THE SOFTWARE.
- */
-
-
-// Author: Jörg Jacobsen
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-#pragma mark HEADERS
-
-#import "IMBAppleMediaParser.h"
-#import "NSFileManager+iMedia.h"
-#import "IMBNode.h"
-#import "IMBNodeObject.h"
-#import "IMBiPhotoEventObjectViewController.h"
-#import "IMBFaceObjectViewController.h"
-#import "IMBImageViewController.h"
-#import "NSImage+iMedia.h"
-#import "NSString+iMedia.h"
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-#pragma mark CONSTANTS
-
-// node object types of interest for skimming
-
-NSString* const kIMBiPhotoNodeObjectTypeEvent = @"events";
-NSString* const kIMBiPhotoNodeObjectTypeFace = @"faces";
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-#pragma mark -
-
-@interface IMBAppleMediaParser ()
-
-- (NSString*) imagePathForImageKey:(NSString*)inImageKey;
-- (NSString*) imagePathForFaceIndex:(NSNumber*)inFaceIndex
inImageWithKey:(NSString*)inImageKey;
-
-@end
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-#pragma mark -
-
-@implementation IMBAppleMediaParser
-
-@synthesize plist = _plist;
-@synthesize modificationDate = _modificationDate;
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-#pragma mark -
-#pragma mark Parsing
-
-//----------------------------------------------------------------------------------------------------------------------
-// iPhoto and Aperture do not include events nor faces in the album list.
To let events or faces also be shown
-// in the browser we let events (aka rolls) and faces pose as albums in
the album list.
-
-- (void)
addSpecialAlbumsToAlbumsInLibrary:(NSMutableDictionary*)inLibraryDict
-{
- NSArray* oldAlbumList = [inLibraryDict objectForKey:@"List of Albums"];
-
- if (oldAlbumList != nil && [oldAlbumList count]>0)
- {
- NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
-
- NSNumber* photosDictIndex = nil;
- NSDictionary *photosDict = [self allPhotosAlbumInAlbumList:oldAlbumList
atIndex:&photosDictIndex];
-
- if (photosDict && photosDictIndex)
- {
- // To insert events and faces into the album list we have to re-create
it mutable style
- NSMutableArray *newAlbumList = [NSMutableArray
arrayWithArray:oldAlbumList];
-
- // events album right before photos album
-
- if ([inLibraryDict objectForKey:@"List of Rolls"])
- {
- NSNumber *eventsId = [NSNumber numberWithUnsignedInt:EVENTS_NODE_ID];
- NSString *eventsName =
NSLocalizedStringWithDefaultValue(@"IMB.iPhotoParser.events", nil,
IMBBundle(), @"Events", @"Events node shown in iPhoto library");
-
- NSDictionary* events = [[NSDictionary alloc] initWithObjectsAndKeys:
- eventsId, @"AlbumId",
- eventsName, @"AlbumName",
- @"Events", @"Album Type",
- [photosDict objectForKey:@"Parent"], @"Parent", nil];
-
- [newAlbumList insertObject:events atIndex:[photosDictIndex
unsignedIntegerValue]];
- IMBRelease(events);
- photosDictIndex = [NSNumber numberWithUnsignedInteger:[photosDictIndex
unsignedIntegerValue] + 1];
- }
-
- // Faces album right after photos album
-
- if ([inLibraryDict objectForKey:@"List of Faces"])
- {
- NSNumber *facesId = [NSNumber numberWithUnsignedInt:FACES_NODE_ID];
- NSString *facesName =
NSLocalizedStringWithDefaultValue(@"IMB.iPhotoParser.faces", nil,
IMBBundle(), @"Faces", @"Faces node shown in iPhoto library");
-
- NSDictionary* faces = [[NSDictionary alloc] initWithObjectsAndKeys:
- facesId, @"AlbumId",
- facesName, @"AlbumName",
- @"Faces", @"Album Type",
- [photosDict objectForKey:@"Parent"], @"Parent", nil];
-
- [newAlbumList insertObject:faces atIndex:[photosDictIndex
unsignedIntegerValue] + 1];
- IMBRelease(faces);
- }
-
- // Replace the old albums array.
- [inLibraryDict setValue:newAlbumList forKey:@"List of Albums"];
- }
- [pool drain];
- }
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-// Load the XML file into a plist lazily (on demand). If we notice that an
existing cached plist is out-of-date
-// we get rid of it and load it anew...
-
-- (NSDictionary*) plist
-{
- NSDictionary* result = nil;
- NSError* error = nil;
- NSString* path = (NSString*)self.mediaSource;
-
- if ([[NSFileManager imb_threadSafeManager] fileExistsAtPath:path])
- {
- NSDictionary* metadata = [[NSFileManager imb_threadSafeManager]
attributesOfItemAtPath:path error:&error];
- NSDate* modificationDate = [metadata
objectForKey:NSFileModificationDate];
-
- @synchronized(self)
- {
- if ([self.modificationDate compare:modificationDate] ==
NSOrderedAscending)
- {
- self.plist = nil;
- }
-
- if (_plist == nil)
- {
- // Since we want to add events and faces to the list of albums we will
need
- // to modify the album data dictionary (see further down below)
- NSMutableDictionary* dict = [NSMutableDictionary
dictionaryWithContentsOfFile:path];
-
- // WORKAROUND
- if (dict == nil || 0 == dict.count) // unable to read. possibly due to
unencoded '&'. rdar://7469235
- {
- NSData *data = [NSData dataWithContentsOfFile:path];
- if (data)
- {
- NSString *eString = nil;
- NSError *e = nil;
- @try
- {
- NSXMLDocument *xmlDoc = [[NSXMLDocument alloc] initWithData:data
- options:NSXMLDocumentTidyXML error:&e];
- dict = [NSPropertyListSerialization
- propertyListFromData:[xmlDoc XMLData]
- mutabilityOption:0 // Apple doc: The opt parameter is
currently unused and should be set to 0.
- format:NULL errorDescription:&eString];
- [xmlDoc release];
-
- // the assignment to 'dict' in the code above yields
- // a mutable dictionary as this code snippet would reveal:
- // Class dictClass = [dict classForCoder];
- // NSLog(@"Dictionary class: %@", [dictClass description]);
- }
- @catch(NSException *e)
- {
- NSLog(@"%s %@", __FUNCTION__, e);
- }
- // When we start targetting 10.6, we should use
propertyListWithData:options:format:error:
- }
- }
-
- // If there is an AlbumData.xml file, there should be something inside!
-
- if (dict == nil || 0 == dict.count)
- {
- NSLog (@"The iPhoto or Aperture XML file seems to be empty. This is
an unhealthy condition!");
- }
-
- // Since this parser confines itself to deal with the "List of Albums"
only
- // we add an events node to the album list to incorporate events in
the browser.
- // This is why we need a mutable library dictionary.
-
- if (dict)
- {
- [self addSpecialAlbumsToAlbumsInLibrary:dict];
- }
-
- self.plist = dict;
- self.modificationDate = modificationDate;
- }
-
- result = [[_plist retain] autorelease];
- }
- }
-
- return result;
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark -
-#pragma mark Custom view controller support
-
-- (NSViewController*) customObjectViewControllerForNode:(IMBNode*)inNode
-{
- // Use custom view for events
-
- if ([self isEventsNode:inNode])
- {
- NSDictionary* userInfo = [NSDictionary dictionaryWithObjectsAndKeys:
- kIMBiPhotoNodeObjectTypeEvent, @"nodeObjectType", nil];
-
- NSViewController* viewController = [[[IMBiPhotoEventObjectViewController
alloc] initWithDelegate:self userInfo:userInfo] autorelease];
- [viewController view];
- return viewController;
- }
-
- if ([self isFacesNode:inNode])
- {
- NSDictionary* userInfo = [NSDictionary dictionaryWithObjectsAndKeys:
- kIMBiPhotoNodeObjectTypeFace, @"nodeObjectType", nil];
-
- NSViewController* viewController = [[[IMBFaceObjectViewController alloc]
initWithDelegate:self userInfo:userInfo] autorelease];
- [viewController view];
- return viewController;
- }
-
- return [super customObjectViewControllerForNode:inNode];
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark -
-#pragma mark IMBSkimmableObjectViewControllerDelegate
-
-- (NSUInteger) childrenCountOfNodeObject:(IMBNodeObject*)inNodeObject
userInfo:(NSDictionary*)inUserInfo
-{
- return [[inNodeObject.preliminaryMetadata objectForKey:@"PhotoCount"]
integerValue];
-}
-
-
-- (NSString*) imagePathForChildOfNodeObject:(IMBNodeObject*)inNodeObject
atIndex:(NSUInteger)inIndex userInfo:(NSDictionary*)inUserInfo
-{
- NSString* imageKey = [[inNodeObject.preliminaryMetadata
objectForKey:@"KeyList"] objectAtIndex:inIndex];
-
- // Faces
- if ([[inUserInfo objectForKey:@"nodeObjectType"]
isEqualToString:kIMBiPhotoNodeObjectTypeFace])
- {
- // Get this face's data describing its occurence in the inIndex'th image
- NSDictionary* imageFaceMetadata = [[[inNodeObject preliminaryMetadata]
objectForKey:@"ImageFaceMetadataList"] objectAtIndex:inIndex];
-
- // Get this face's index inside of this image
- NSNumber* faceIndex = [imageFaceMetadata objectForKey:@"face index"];
-
- // Finally, get the path to this face's occurence
- NSString* imagePath = [self imagePathForFaceIndex:faceIndex
inImageWithKey:imageKey];
-
- //NSLog(@"Skimming controller asked delegate for image path and
receives: %@", imagePath);
-
- return imagePath;
- }
-
- // Events
- return [self imagePathForImageKey:imageKey];
-}
-
-
-- (NSString*)
imagePathForKeyChildOfNodeObject:(IMBNodeObject*)inNodeObject
userInfo:(NSDictionary*)inUserInfo
-{
- NSString* imageKey = [inNodeObject.preliminaryMetadata
objectForKey:@"KeyPhotoKey"];
-
- // Faces
- if ([[inUserInfo objectForKey:@"nodeObjectType"]
isEqualToString:kIMBiPhotoNodeObjectTypeFace])
- {
- // Get this face's index inside of this image
- NSNumber* faceIndex = [[inNodeObject preliminaryMetadata]
objectForKey:@"key image face index"];
-
- // Get the path to this face's occurence
- NSString* imagePath = [self imagePathForFaceIndex:faceIndex
inImageWithKey:imageKey];
-
- return imagePath;
- }
-
- // Events
- return [self imagePathForImageKey:imageKey];
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-#pragma mark -
-#pragma mark To be subclassed
-
-//----------------------------------------------------------------------------------------------------------------------
-// Create an identifier from the provided id and id space. An example
is "IMBiPhotoParser://FaceId/17"...
-
-- (NSString*) identifierForId:(NSNumber*) inId inSpace:(NSString*)
inIdSpace
-{
- NSLog(@"%s Please use a custom subclass of
IMBAppleMediaParser...",__FUNCTION__);
- [[NSException exceptionWithName:@"IMBProgrammerError" reason:@"Please use
a custom subclass of IMBAppleMediaParser" userInfo:nil] raise];
-
- return nil;
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-// returns whether this album type should be used. Must be subclassed.
-
-- (BOOL) shouldUseAlbumType:(NSString*)inAlbumType
-{
- NSLog(@"%s Please use a custom subclass of
IMBAppleMediaParser...",__FUNCTION__);
- [[NSException exceptionWithName:@"IMBProgrammerError" reason:@"Please use
a custom subclass of IMBAppleMediaParser" userInfo:nil] raise];
-
- return NO;
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-// Returns whether inAlbumDict should be used. Must be subclassed.
-
-- (BOOL) shouldUseAlbum:(NSDictionary*)inAlbumDict
images:(NSDictionary*)inImages
-{
- NSLog(@"%s Please use a custom subclass of
IMBAppleMediaParser...",__FUNCTION__);
- [[NSException exceptionWithName:@"IMBProgrammerError" reason:@"Please use
a custom subclass of IMBAppleMediaParser" userInfo:nil] raise];
-
- return NO;
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-// Returns a dictionary that contains the "true" KeyList, KeyPhotoKey and
PhotoCount values for the provided node.
-// (The values provided by the according dictionary in .plist are mostly
wrong because we separate node children by
-// media types 'Image' and 'Movie' into different views.) Must be
subclassed.
-
-- (NSDictionary*) childrenInfoForNode:(IMBNode*)inNode
images:(NSDictionary*)inImages
-{
- NSLog(@"%s Please use a custom subclass of
IMBAppleMediaParser...",__FUNCTION__);
- [[NSException exceptionWithName:@"IMBProgrammerError" reason:@"Please use
a custom subclass of IMBAppleMediaParser" userInfo:nil] raise];
-
- return nil;
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-// Returns an icon for an album of this type. Must be subclassed.
-
-- (NSImage*) iconForAlbumType:(NSString*)inType
-{
- NSLog(@"%s Please use a custom subclass of
IMBAppleMediaParser...",__FUNCTION__);
- [[NSException exceptionWithName:@"IMBProgrammerError" reason:@"Please use
a custom subclass of IMBAppleMediaParser" userInfo:nil] raise];
-
- return nil;
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-// Returns whether inAlbumDict is the "Photos" album. Must be subclassed.
-
-- (BOOL) isAllPhotosAlbum:(NSDictionary*)inAlbumDict
-{
- NSLog(@"%s Please use a custom subclass of
IMBAppleMediaParser...",__FUNCTION__);
- [[NSException exceptionWithName:@"IMBProgrammerError" reason:@"Please use
a custom subclass of IMBAppleMediaParser" userInfo:nil] raise];
-
- return NO;
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-#pragma mark -
-#pragma mark Image location
-
-//----------------------------------------------------------------------------------------------------------------------
-// The image location represents an image path to the image to be used for
display inside of the browser (a preview of
-// of the original image). By default we use the path to the image's
thumbnail (key: "ThumbPath").
-// Subclass for distinct behavior.
-
-- (NSString*) imageLocationForObject:(NSDictionary*)inObjectDict
-{
- return [inObjectDict objectForKey:@"ThumbPath"];
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-// Returns the image location for the image represented by inImageKey in
the master image list (aka dictionary)
-
-- (NSString*) imagePathForImageKey:(NSString*)inImageKey
-{
- NSDictionary* images = [[self plist] objectForKey:@"Master Image List"];
- NSDictionary* imageDict = [images objectForKey:inImageKey];
- NSString* imagePath = [self imageLocationForObject:imageDict];
-
- return imagePath;
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-// Returns the image location for the clipped face in the image
represented by inImageKey in the master image list
-// (aka dictionary)
-
-- (NSString*) imagePathForFaceIndex:(NSNumber*)inFaceIndex
inImageWithKey:(NSString*)inImageKey
-{
- NSString* imagePath = [self imagePathForImageKey:inImageKey];
-
- return [NSString stringWithFormat:@"%@_face%@.%@",
- [imagePath stringByDeletingPathExtension],
- inFaceIndex,
- [imagePath pathExtension]];
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-#pragma mark -
-#pragma mark Subnode creation and node population
-
-//----------------------------------------------------------------------------------------------------------------------
-// Returns array of all face dictionaries (sorted by name). These are also
enriched by several keys:
-// ImageFaceMetadataList: list of meta info of face occurences in images
(sorted by date)
-// KeyPhotoKey: key of key image ('KeyPhotoKey' is an
event-compatible key)
-// KeyList: list of all images in which a face occurs
(sorted by date)
-
-- (NSArray*) faces:(NSDictionary*)inFaces
collectedFromImages:(NSDictionary*)inImages
-{
- // Need the enriched copy mutable style
- NSMutableDictionary* facesDict = [NSMutableDictionary
dictionaryWithDictionary:inFaces];
-
- // Collect all occurences faces. We iterate over master images because
only there AlbumData.xml
- // stores occurences of faces.
-
- NSArray* facesOnImage = nil;
- NSDictionary* imageDict = nil;
- NSMutableDictionary* faceDict = nil; // Will need to add keys
like "KeyList" to dictionary
-
- NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
-
- for (NSString* imageDictKey in [inImages keyEnumerator])
- {
- imageDict = [inImages objectForKey:imageDictKey];
-
- // Get all known faces that appear on this image
- facesOnImage = [imageDict objectForKey:@"Faces"];
-
- NSString* imageFaceKey = nil;
- NSMutableArray* imageFaceMetadataList = nil;
- NSDictionary* imageFaceMetadata = nil;
- for (NSDictionary* imageFaceDict in facesOnImage)
- {
- // Get face dictionary for given face key.
- // Face dictionary will be the basis of our subnode to be created.
-
- imageFaceKey = [imageFaceDict objectForKey:@"face key"];
- faceDict = [facesDict objectForKey:imageFaceKey];
-
- // It might well be that found face in image is now longer known...
- if (faceDict)
- {
- // Coming here we found a face on an image and this face is known.
- // Now add some key/value pairs to face dictionary
-
- // First convert to a mutable dictionary to be able to add the extra
pairs
- faceDict = [NSMutableDictionary dictionaryWithDictionary:faceDict];
- [facesDict setObject:faceDict forKey:imageFaceKey];
-
- // Add image face meta data to this face (need this later)
- // (Create meta data list when first occurence of face in some image
is detected)
-
- imageFaceMetadataList = [faceDict
objectForKey:@"ImageFaceMetadataList"];
- if (!imageFaceMetadataList)
- {
- imageFaceMetadataList = [NSMutableArray array];
- [faceDict setObject:imageFaceMetadataList
forKey:@"ImageFaceMetadataList"];
- }
- imageFaceMetadata = [NSDictionary dictionaryWithObjectsAndKeys:
- imageDictKey, @"image key",
- [imageFaceDict objectForKey:@"face index"], @"face index",
- [imageDict objectForKey:@"DateAsTimerInterval"],
@"DateAsTimerInterval", nil];
-
- [imageFaceMetadataList addObject:imageFaceMetadata];
-
- } else {
- // We found a face in a master image but that face is not associated
- // with a known face anymore. Just skip this one.
-
- //NSLog(@"Found unknown face with ID %@ in image %@", faceKey,
imageDictKey);
- }
- }
- }
-
- // For each face dictionary sort associated images by date (this is how
iPhoto displays them)
-
- NSSortDescriptor* dateDescriptor = [[NSSortDescriptor alloc]
initWithKey:@"DateAsTimerInterval" ascending:YES];
- NSArray* sortDescriptors = [NSArray arrayWithObject:dateDescriptor];
- [dateDescriptor release];
-
- for (NSString* faceKey in [facesDict keyEnumerator])
- {
- faceDict = [facesDict objectForKey:faceKey];
-
- // Sort images related to face by date
- NSArray* imageFaceMetadataList = [[faceDict
objectForKey:@"ImageFaceMetadataList"]
sortedArrayUsingDescriptors:sortDescriptors];
- [faceDict setObject:imageFaceMetadataList
forKey:@"ImageFaceMetadataList"];
-
- // Also provide key image key under an event-compatible key
- [faceDict setObject:[faceDict objectForKey:@"key image"]
forKey:@"KeyPhotoKey"];
-
- // Also store a sorted key list in face dictionary
- [faceDict setObject:[imageFaceMetadataList valueForKey:@"image key"]
forKey:@"KeyList"];
- }
-
- [pool drain];
-
- // Sort faces dictionary by names (this is how iPhoto displays faces)
-
- NSSortDescriptor* nameDescriptor = [[NSSortDescriptor alloc]
initWithKey:@"name" ascending:YES];
- sortDescriptors = [NSArray arrayWithObject:nameDescriptor];
- [nameDescriptor release];
-
- NSArray* sortedFaces = [[facesDict allValues]
sortedArrayUsingDescriptors:sortDescriptors];
-
- return sortedFaces;
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-// Populate faces node and create corresponding subnodes that each
represent a single face
-
-- (void) populateFacesNode:(IMBNode*)inNode
- withFaces:(NSDictionary*)inFaces
- images:(NSDictionary*)inImages
-{
- // Pull all information on faces from faces dictionary and face
occurences in images
- // into a faces array (sorted by name)
- NSArray* sortedFaces = [self faces:inFaces collectedFromImages:inImages];
-
- // Create the subNodes array on demand - even if turns out to be empty
after exiting this method,
- // because without creating an array we would cause an endless loop...
- NSMutableArray* subNodes = [NSMutableArray array];
-
- // Create the objects array on demand - even if turns out to be empty
after exiting this method, because
- // without creating an array we would cause an endless loop...
- NSMutableArray* objects = [[NSMutableArray alloc]
initWithArray:inNode.objects];
-
- NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
-
- // Setup the loop
-
- NSUInteger index = 0;
- NSString* faceKeyPhotoKey = nil;
- NSString* path = nil;
- IMBNodeObject* object = nil;
- NSString* subNodeType = @"Face";
-
- for (NSDictionary* faceDict in sortedFaces)
- {
- NSString* subNodeName = [faceDict objectForKey:@"name"];
-
- if ([self shouldUseAlbumType:subNodeType] &&
- [self shouldUseAlbum:faceDict images:inImages])
- {
- // Create subnode for this node...
-
- IMBNode* subNode = [[[IMBNode alloc] init] autorelease];
-
- subNode.leaf = [self isLeafAlbumType:subNodeType];
- subNode.icon = [self iconForAlbumType:subNodeType];
- subNode.name = subNodeName;
- subNode.mediaSource = self.mediaSource;
- subNode.parser = self;
-
- // Keep a ref to face dictionary for potential later use
- subNode.attributes = faceDict;
-
- // Set the node's identifier. This is needed later to link it to the
correct parent node.
- // Note that a faces dictionary always has a "key" key.
-
- NSNumber* subNodeId = [faceDict objectForKey:@"key"];
- subNode.identifier = [self identifierForId:subNodeId
inSpace:FACES_ID_SPACE];
-
- // Add the new subnode to its parent (inRootNode)...
-
- [subNodes addObject:subNode];
-
- // Now create the visual object and link it to subnode just created
-
- object = [[IMBNodeObject alloc] init];
- [objects addObject:object];
- [object release];
-
- // Adjust keys "KeyPhotoKey", "KeyList", and "PhotoCount" in metadata
dictionary
- // because movies and images are not jointly displayed in iMedia browser
- NSMutableDictionary* preliminaryMetadata = [NSMutableDictionary
dictionaryWithDictionary:faceDict];
- [preliminaryMetadata addEntriesFromDictionary:[self
childrenInfoForNode:subNode images:inImages]];
-
- object.preliminaryMetadata = preliminaryMetadata; // This metadata from
the XML file is available immediately
- object.metadata = nil; // Build lazily when needed (takes longer)
- object.metadataDescription = nil; // Build lazily when needed
(takes longer)
-
- // Obtain key photo dictionary (key photo is displayed while not
skimming)
- faceKeyPhotoKey = [object.preliminaryMetadata
objectForKey:@"KeyPhotoKey"];
- NSDictionary* keyPhotoDict = [inImages objectForKey:faceKeyPhotoKey];
-
- path = [keyPhotoDict objectForKey:@"ImagePath"];
-
- object.representedNodeIdentifier = subNode.identifier;
- object.location = (id)path;
-
object.name = subNode.name;
- object.parser = self;
- object.index = index++;
-
- object.imageLocation = [self imagePathForFaceIndex:[faceDict
objectForKey:@"key image face index"] inImageWithKey:faceKeyPhotoKey];
- object.imageRepresentationType = [self
requestedImageRepresentationType];
- object.imageRepresentation = nil;
- }
- }
- [pool drain];
- inNode.subNodes = subNodes;
- inNode.objects = objects;
- [objects release];
-}
-
-
-#pragma mark -
-#pragma mark Object description
-
-
-+ (NSString*) objectCountFormatSingular
-{
- return [IMBImageViewController objectCountFormatSingular];
-}
-
-
-+ (NSString*) objectCountFormatPlural
-{
- return [IMBImageViewController objectCountFormatPlural];
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-// Events and Faces have other metadata than images or movies
-
-- (NSString*)
countableMetadataDescriptionForMetadata:(NSDictionary*)inMetadata
-{
- NSMutableString* metaDesc = [NSMutableString string];
-
- NSNumber* count = [inMetadata objectForKey:@"PhotoCount"];
- if (count)
- {
- NSString* formatString = [count intValue] > 1 ?
- [[self class] objectCountFormatPlural] :
- [[self class] objectCountFormatSingular];
-
- [metaDesc appendFormat:formatString, [count intValue]];
- }
-
- NSNumber* dateAsTimerInterval = [inMetadata
objectForKey:@"RollDateAsTimerInterval"];
- if (dateAsTimerInterval)
- {
- [metaDesc imb_appendNewline];
- NSDate* eventDate = [NSDate
dateWithTimeIntervalSinceReferenceDate:[dateAsTimerInterval doubleValue]];
-
- NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
- [formatter setFormatterBehavior:NSDateFormatterBehavior10_4];
- [formatter setDateStyle:NSDateFormatterMediumStyle]; // medium date
-
- [metaDesc appendFormat:@"%@", [formatter stringFromDate:eventDate]];
-
- [formatter release];
- }
- return metaDesc;
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-// Convert metadata into a human readable string...
-
-- (NSString*) metadataDescriptionForMetadata:(NSDictionary*)inMetadata
-{
- // Events and Faces have other metadata than images
-
- if ([inMetadata objectForKey:@"PhotoCount"]) // Event, face, ...
- {
- return [self countableMetadataDescriptionForMetadata:inMetadata];
- }
-
- // Image
- return [NSImage imb_imageMetadataDescriptionForMetadata:inMetadata];
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-#pragma mark -
-#pragma mark Convenience
-
-//----------------------------------------------------------------------------------------------------------------------
-// Returns events id space (EVENTS_ID_SPACE) for album types "Face"
and "Faces".
-// Returns faces id space (FACES_ID_SPACE) for album types "Face"
and "Faces".
-// Otherwise returns the albums id space (ALBUMS_ID_SPACE).
-
-- (NSString*) idSpaceForAlbumType:(NSString*) inAlbumType
-{
- if ([inAlbumType isEqualToString:@"Event"] || [inAlbumType
isEqualToString:@"Events"])
- {
- return EVENTS_ID_SPACE;
- } else if ([inAlbumType isEqualToString:@"Face"] || [inAlbumType
isEqualToString:@"Faces"])
- {
- return FACES_ID_SPACE;
- }
- return ALBUMS_ID_SPACE;
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-// Returns whether an album of this type exposes a disclosure triangle or
not.
-
-- (BOOL) isLeafAlbumType:(NSString*)inType
-{
- return ![inType isEqualToString:@"Folder"] &&
- ![inType isEqualToString:@"Events"] &&
- ![inType isEqualToString:@"Faces"];
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-// Returns the standard album of all photos ("Photos") in its plist
representation
-
-- (NSDictionary*) allPhotosAlbumInAlbumList:(NSArray*)inAlbumList
atIndex:(NSNumber**)outIndex
-{
- NSUInteger i, count = [inAlbumList count];
- for (i = 0; i < count; i++)
- {
- NSDictionary* albumDict = [inAlbumList objectAtIndex:i];
- if ([self isAllPhotosAlbum:albumDict])
- {
- *outIndex = [NSNumber numberWithUnsignedInteger:i];
- return albumDict;
- }
- }
- return nil;
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-// Returns IKImageBrowserCGImageRepresentationType
-
-- (NSString*) requestedImageRepresentationType
-{
- return IKImageBrowserCGImageRepresentationType;
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-// Returns whether inNode is the events node
-
-- (BOOL) isEventsNode:(IMBNode*)inNode
-{
- NSNumber* eventsId = [NSNumber numberWithUnsignedInt:EVENTS_NODE_ID];
- NSString* eventsIdentifier = [self identifierForId:eventsId
inSpace:EVENTS_ID_SPACE];
-
- return [inNode.identifier isEqualToString:eventsIdentifier];
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-// Returns whether inNode is the faces node
-
-- (BOOL) isFacesNode:(IMBNode*)inNode
-{
- NSNumber* facesId= [NSNumber numberWithUnsignedInt:FACES_NODE_ID];
- NSString* facesIdentifier = [self identifierForId:facesId
inSpace:FACES_ID_SPACE];
-
- return [inNode.identifier isEqualToString:facesIdentifier];
-}
-
-
-@end
=======================================
--- /trunk/IMBAudioFolderParser.h Mon Jan 3 15:11:51 2011
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- iMedia Browser Framework <
http://karelia.com/imedia/>
-
- Copyright (c) 2005-2011 by Karelia Software et al.
-
- iMedia Browser is based on code originally developed by Jason Terhorst,
- further developed for Sandvox by Greg Hulands, Dan Wood, and Terrence
Talbot.
- The new architecture for version 2.0 was developed by Peter Baumgartner.
- Contributions have also been made by Matt Gough, Martin Wennerberg and
others
- as indicated in source files.
-
- The iMedia Browser Framework is licensed under the following terms:
-
- Permission is hereby granted, free of charge, to any person obtaining a
copy
- of this software and associated documentation files (the "Software"), to
deal
- in all or substantial portions of the Software without restriction,
including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
following
- conditions:
-
- Redistributions of source code must retain the original terms stated here,
- including this list of conditions, the disclaimer noted below, and the
- following copyright notice: Copyright (c) 2005-2011 by Karelia Software
et al.
-
- Redistributions in binary form must include, in an end-user-visible
manner,
- e.g., About window, Acknowledgments window, or similar, either a) the
original
- terms stated here, including this list of conditions, the disclaimer noted
- below, and the aforementioned copyright notice, or b) the aforementioned
- copyright notice and a link to
karelia.com/imedia.
-
- Neither the name of Karelia Software, nor Sandvox, nor the names of
- contributors to iMedia Browser may be used to endorse or promote products
- derived from the Software without prior and express written permission
from
- Karelia Software or individual contributors, as appropriate.
-
- Disclaimer: THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS
- "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE,
- AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH, THE
- SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN, THE SOFTWARE.
-*/
-
-
-// Author: Peter Baumgartner
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark HEADERS
-
-#import "IMBFolderParser.h"
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark CLASSES
-
-@class IMBTimecodeTransformer;
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark
-
-// This parser scans any folder for audio files...
-
-@interface IMBAudioFolderParser : IMBFolderParser
-{
- IMBTimecodeTransformer* _timecodeTransformer;
-}
-
-@property (retain) IMBTimecodeTransformer* timecodeTransformer;
-
-@end
-
-// This subclass looks only in "~/Music"...
-
-@interface IMBMusicFolderParser : IMBAudioFolderParser
-@end
-
-// This subclass looks only in "/Library/Audio/Apple Loops/Apple/iLife
Sound Effects"...
-
-@interface IMBiLifeSoundEffectsFolderParser : IMBAudioFolderParser
-@end
-
-// This subclass looks only in "/Library/Audio/Apple Loops/Apple/Apple
Loops for GarageBand"...
-
-@interface IMBAppleLoopsForGarageBandFolderParser : IMBAudioFolderParser
-@end
-
-// This subclass looks only in "iMovie.app/Contents/Resources/Sound
Effects"...
-
-@interface IMBiMovieSoundEffectsFolderParser : IMBAudioFolderParser
-@end
-
-// This subclass looks only in "~/Library/Sounds"...
-
-@interface IMBLibrarySoundsFolderParser : IMBAudioFolderParser
-@end
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
=======================================
--- /trunk/IMBAudioFolderParser.m Mon Feb 21 03:02:42 2011
+++ /dev/null
@@ -1,354 +0,0 @@
-/*
- iMedia Browser Framework <
http://karelia.com/imedia/>
-
- Copyright (c) 2005-2011 by Karelia Software et al.
-
- iMedia Browser is based on code originally developed by Jason Terhorst,
- further developed for Sandvox by Greg Hulands, Dan Wood, and Terrence
Talbot.
- The new architecture for version 2.0 was developed by Peter Baumgartner.
- Contributions have also been made by Matt Gough, Martin Wennerberg and
others
- as indicated in source files.
-
- The iMedia Browser Framework is licensed under the following terms:
-
- Permission is hereby granted, free of charge, to any person obtaining a
copy
- of this software and associated documentation files (the "Software"), to
deal
- in all or substantial portions of the Software without restriction,
including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
following
- conditions:
-
- Redistributions of source code must retain the original terms stated here,
- including this list of conditions, the disclaimer noted below, and the
- following copyright notice: Copyright (c) 2005-2011 by Karelia Software
et al.
-
- Redistributions in binary form must include, in an end-user-visible
manner,
- e.g., About window, Acknowledgments window, or similar, either a) the
original
- terms stated here, including this list of conditions, the disclaimer noted
- below, and the aforementioned copyright notice, or b) the aforementioned
- copyright notice and a link to
karelia.com/imedia.
-
- Neither the name of Karelia Software, nor Sandvox, nor the names of
- contributors to iMedia Browser may be used to endorse or promote products
- derived from the Software without prior and express written permission
from
- Karelia Software or individual contributors, as appropriate.
-
- Disclaimer: THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS
- "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE,
- AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH, THE
- SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN, THE SOFTWARE.
-*/
-
-
-// Author: Peter Baumgartner
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark HEADERS
-
-#import "IMBAudioFolderParser.h"
-#import "IMBParserController.h"
-#import "IMBTimecodeTransformer.h"
-#import "IMBCommon.h"
-#import "NSString+iMedia.h"
-#import "NSURL+iMedia.h"
-#import "NSWorkspace+iMedia.h"
-#import "IMBNode.h"
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark
-
-@implementation IMBAudioFolderParser
-
-@synthesize timecodeTransformer = _timecodeTransformer;
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// Restrict this parser to audio files...
-
-- (id) initWithMediaType:(NSString*)inMediaType
-{
- if (self = [super initWithMediaType:inMediaType])
- {
- self.fileUTI = (NSString*)kUTTypeAudio;
- self.timecodeTransformer = [[[IMBTimecodeTransformer alloc] init]
autorelease];
- }
-
- return self;
-}
-
-
-- (void) dealloc
-{
- IMBRelease(_timecodeTransformer);
- [super dealloc];
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// Return metadata specific to audio files...
-
-- (NSDictionary*) metadataForFileAtPath:(NSString*)inPath
-{
- return [NSURL imb_metadataFromAudioAtURL:[NSURL fileURLWithPath:inPath]];
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// Convert metadata into human readable string...
-
-- (NSString*) metadataDescriptionForMetadata:(NSDictionary*)inMetadata
-{
- NSMutableString* description = [NSMutableString string];
- NSNumber* duration = [inMetadata objectForKey:@"duration"];
- NSString* artist = [inMetadata objectForKey:@"artist"];
- NSString* album = [inMetadata objectForKey:@"album"];
- NSString* comment = [inMetadata objectForKey:@"comment"];
- if (comment) comment = [comment
stringByTrimmingCharactersInSet:[NSCharacterSet
whitespaceAndNewlineCharacterSet]];
-
- if (artist)
- {
- NSString* artistLabel = NSLocalizedStringWithDefaultValue(
- @"Artist",
- nil,IMBBundle(),
- @"Artist",
- @"Artist label in metadataDescription");
-
- if (description.length > 0) [description imb_appendNewline];
- [description appendFormat:@"%@: %@",artistLabel,artist];
- }
-
- if (album)
- {
- NSString* albumLabel = NSLocalizedStringWithDefaultValue(
- @"Album",
- nil,IMBBundle(),
- @"Album",
- @"Album label in metadataDescription");
-
- if (description.length > 0) [description imb_appendNewline];
- [description appendFormat:@"%@: %@",albumLabel,album];
- }
-
- if (duration)
- {
- NSString* durationLabel = NSLocalizedStringWithDefaultValue(
- @"Time",
- nil,IMBBundle(),
- @"Time",
- @"Time label in metadataDescription");
-
- NSString* durationString = [_timecodeTransformer
transformedValue:duration];
- if (description.length > 0) [description imb_appendNewline];
- [description appendFormat:@"%@: %@",durationLabel,durationString];
- }
-
- if (comment && ![comment isEqualToString:@""])
- {
- NSString* commentLabel = NSLocalizedStringWithDefaultValue(
- @"Comment",
- nil,IMBBundle(),
- @"Comment",
- @"Comment label in metadataDescription");
-
- if (description.length > 0) [description imb_appendNewline];
- [description appendFormat:@"%@: %@",commentLabel,comment];
- }
-
- return description;
-}
-
-
-@end
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark
-
-@implementation IMBMusicFolderParser
-
-// Register this parser, so that it gets automatically loaded...
-
-+ (void) load
-{
- NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
- [IMBParserController registerParserClass:self
forMediaType:kIMBMediaTypeAudio];
- [pool drain];
-}
-
-
-// Set the folder path to ~/Music...
-
-- (id) initWithMediaType:(NSString*)inMediaType
-{
- if (self = [super initWithMediaType:inMediaType])
- {
- self.mediaSource = [NSHomeDirectory()
stringByAppendingPathComponent:@"Music"];
- self.displayPriority = 1;
- }
-
- return self;
-}
-
-@end
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark
-
-@implementation IMBiLifeSoundEffectsFolderParser
-
-
-// Register this parser, so that it gets automatically loaded...
-
-+ (void) load
-{
- NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
- [IMBParserController registerParserClass:self
forMediaType:kIMBMediaTypeAudio];
- [pool drain];
-}
-
-
-// Set the folder path to /Library/Audio/Apple Loops/Apple/iLife Sound
Effects...
-
-- (id) initWithMediaType:(NSString*)inMediaType
-{
- if (self = [super initWithMediaType:inMediaType])
- {
- self.mediaSource = @"/Library/Audio/Apple Loops/Apple/iLife Sound
Effects";
- }
-
- return self;
-}
-
-@end
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark
-
-@implementation IMBAppleLoopsForGarageBandFolderParser
-
-// Register this parser, so that it gets automatically loaded...
-
-+ (void) load
-{
- NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
- [IMBParserController registerParserClass:self
forMediaType:kIMBMediaTypeAudio];
- [pool drain];
-}
-
-
-// Set the folder path to /Library/Audio/Apple Loops/Apple/iLife Sound
Effects...
-
-- (id) initWithMediaType:(NSString*)inMediaType
-{
- if (self = [super initWithMediaType:inMediaType])
- {
- self.mediaSource = @"/Library/Audio/Apple Loops/Apple/Apple Loops for
GarageBand";
- }
-
- return self;
-}
-
-@end
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark
-
-@implementation IMBiMovieSoundEffectsFolderParser
-
-
-+ (id) folderPath
-{
- NSString* path = [[NSWorkspace imb_threadSafeWorkspace]
absolutePathForAppBundleWithIdentifier:@"com.apple.iMovie"];
- return [path stringByAppendingPathComponent:@"/Contents/Resources/Sound
Effects"];
-}
-
-
-// Register this parser, so that it gets automatically loaded...
-
-+ (void) load
-{
- NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
- if ([self folderPath]) [IMBParserController registerParserClass:self
forMediaType:kIMBMediaTypeAudio];
- [pool drain];
-}
-
-
-// Set the folder path to iMovie.app/Contents/Resources/Sound Effects...
-
-- (id) initWithMediaType:(NSString*)inMediaType
-{
- if (self = [super initWithMediaType:inMediaType])
- {
- self.mediaSource = [[self class] folderPath];
- }
-
- return self;
-}
-
-@end
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark
-
-@implementation IMBLibrarySoundsFolderParser
-
-
-// Register this parser, so that it gets automatically loaded...
-
-+ (void) load
-{
- NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
- [IMBParserController registerParserClass:self
forMediaType:kIMBMediaTypeAudio];
- [pool drain];
-}
-
-
-// Set the folder path to ~/Library/Sounds...
-
-- (id) initWithMediaType:(NSString*)inMediaType
-{
- if (self = [super initWithMediaType:inMediaType])
- {
- NSArray *libraryPaths =
NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask,
YES);
-
- if ([libraryPaths count] > 0)
- {
- NSString *libraryPath = [libraryPaths objectAtIndex:0];
- self.mediaSource = [libraryPath
stringByAppendingPathComponent:@"Sounds"];
- }
- }
-
- return self;
-}
-
-@end
-
-//----------------------------------------------------------------------------------------------------------------------
=======================================
--- /trunk/IMBAudioView.xib Fri Mar 4 10:09:52 2011
+++ /dev/null
@@ -1,2988 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
- <data>
- <int key="IBDocument.SystemTarget">1050</int>
- <string key="IBDocument.SystemVersion">10J567</string>
- <string key="IBDocument.InterfaceBuilderVersion">823</string>
- <string key="IBDocument.AppKitVersion">1038.35</string>
- <string key="IBDocument.HIToolboxVersion">462.00</string>
- <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.imagekit.ibplugin</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>823</string>
- <string>1.1</string>
- </object>
- </object>
- <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="696"/>
- </object>
- <object class="NSArray" key="IBDocument.PluginDependencies">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>com.apple.imagekit.ibplugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- </object>
- <object class="NSMutableDictionary" key="IBDocument.Metadata">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys" id="0">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- </object>
- <object class="NSMutableArray" key="IBDocument.RootObjects" id="1048">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSCustomObject" id="1021">
- <string key="NSClassName">IMBAudioViewController</string>
- </object>
- <object class="NSCustomObject" id="1014">
- <string key="NSClassName">FirstResponder</string>
- </object>
- <object class="NSCustomObject" id="1050">
- <string key="NSClassName">NSApplication</string>
- </object>
- <object class="NSArrayController" id="918073312">
- <object class="NSMutableArray" key="NSDeclaredKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>name</string>
- <string>value</string>
- <string>metadata</string>
- <string>icon</string>
- <string>metadata.artist</string>
- <string>metadata.album</string>
- <string>metadata.duration</string>
- </object>
- <string key="NSObjectClassName">IMBObject</string>
- <bool key="NSAutomaticallyPreparesContent">YES</bool>
- <object class="_NSManagedProxy" key="_NSManagedProxy"/>
- <bool key="NSPreservesSelection">YES</bool>
- <bool key="NSFilterRestrictsInsertion">YES</bool>
- <bool key="NSClearsFilterPredicateOnInsertion">YES</bool>
- <bool key="NSAutomaticallyRearrangesObjects">YES</bool>
- </object>
- <object class="NSCustomView" id="818174058">
- <reference key="NSNextResponder"/>
- <int key="NSvFlags">274</int>
- <object class="NSMutableArray" key="NSSubviews">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSTabView" id="565099908">
- <reference key="NSNextResponder" ref="818174058"/>
- <int key="NSvFlags">18</int>
- <string key="NSFrame">{{0, 35}, {408, 474}}</string>
- <reference key="NSSuperview" ref="818174058"/>
- <object class="NSMutableArray" key="NSTabViewItems">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSTabViewItem" id="169461210">
- <string key="NSIdentifier">1</string>
- <object class="NSView" key="NSView" id="842547720">
- <nil key="NSNextResponder"/>
- <int key="NSvFlags">274</int>
- <object class="NSMutableArray" key="NSSubviews">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSScrollView" id="1048916289">
- <reference key="NSNextResponder" ref="842547720"/>
- <int key="NSvFlags">274</int>
- <object class="NSMutableArray" key="NSSubviews">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSClipView" id="666718852">
- <reference key="NSNextResponder" ref="1048916289"/>
- <int key="NSvFlags">2304</int>
- <object class="NSMutableArray" key="NSSubviews">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IKImageBrowserView" id="856178384">
- <reference key="NSNextResponder" ref="666718852"/>
- <int key="NSvFlags">45</int>
- <object class="NSMutableSet" key="NSDragTypes">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="set.sortedObjects">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>Apple PDF pasteboard type</string>
- <string>Apple PICT pasteboard type</string>
- <string>Apple PNG pasteboard type</string>
- <string>Apple URL pasteboard type</string>
- <string>NSFilenamesPboardType</string>
- <string>NSTypedFilenamesPboardType:'.SGI'</string>
- <string>NSTypedFilenamesPboardType:'8BPS'</string>
- <string>NSTypedFilenamesPboardType:'BMP '</string>
- <string>NSTypedFilenamesPboardType:'BMPf'</string>
- <string>NSTypedFilenamesPboardType:'EPSF'</string>
- <string>NSTypedFilenamesPboardType:'FPix'</string>
- <string>NSTypedFilenamesPboardType:'GIFf'</string>
- <string>NSTypedFilenamesPboardType:'ICO '</string>
- <string>NSTypedFilenamesPboardType:'JPEG'</string>
- <string>NSTypedFilenamesPboardType:'PDF '</string>
- <string>NSTypedFilenamesPboardType:'PICT'</string>
- <string>NSTypedFilenamesPboardType:'PNGf'</string>
- <string>NSTypedFilenamesPboardType:'PNTG'</string>
- <string>NSTypedFilenamesPboardType:'TIFF'</string>
- <string>NSTypedFilenamesPboardType:'TPIC'</string>
- <string>NSTypedFilenamesPboardType:'icns'</string>
- <string>NSTypedFilenamesPboardType:'jp2 '</string>
- <string>NSTypedFilenamesPboardType:'qtif'</string>
- <string>NSTypedFilenamesPboardType:3FR</string>
- <string>NSTypedFilenamesPboardType:3fr</string>
- <string>NSTypedFilenamesPboardType:ARW</string>
- <string>NSTypedFilenamesPboardType:BMP</string>
- <string>NSTypedFilenamesPboardType:CR2</string>
- <string>NSTypedFilenamesPboardType:CRW</string>
- <string>NSTypedFilenamesPboardType:CUR</string>
- <string>NSTypedFilenamesPboardType:DCR</string>
- <string>NSTypedFilenamesPboardType:DNG</string>
- <string>NSTypedFilenamesPboardType:EFX</string>
- <string>NSTypedFilenamesPboardType:EPI</string>
- <string>NSTypedFilenamesPboardType:EPS</string>
- <string>NSTypedFilenamesPboardType:EPSF</string>
- <string>NSTypedFilenamesPboardType:EPSI</string>
- <string>NSTypedFilenamesPboardType:ERF</string>
- <string>NSTypedFilenamesPboardType:EXR</string>
- <string>NSTypedFilenamesPboardType:FAX</string>
- <string>NSTypedFilenamesPboardType:FFF</string>
- <string>NSTypedFilenamesPboardType:FPIX</string>
- <string>NSTypedFilenamesPboardType:FPX</string>
- <string>NSTypedFilenamesPboardType:G3</string>
- <string>NSTypedFilenamesPboardType:GIF</string>
- <string>NSTypedFilenamesPboardType:HDR</string>
- <string>NSTypedFilenamesPboardType:ICNS</string>
- <string>NSTypedFilenamesPboardType:ICO</string>
- <string>NSTypedFilenamesPboardType:JFAX</string>
- <string>NSTypedFilenamesPboardType:JFX</string>
- <string>NSTypedFilenamesPboardType:JP2</string>
- <string>NSTypedFilenamesPboardType:JPE</string>
- <string>NSTypedFilenamesPboardType:JPEG</string>
- <string>NSTypedFilenamesPboardType:JPF</string>
- <string>NSTypedFilenamesPboardType:JPG</string>
- <string>NSTypedFilenamesPboardType:MAC</string>
- <string>NSTypedFilenamesPboardType:MOS</string>
- <string>NSTypedFilenamesPboardType:MRW</string>
- <string>NSTypedFilenamesPboardType:NEF</string>
- <string>NSTypedFilenamesPboardType:NRW</string>
- <string>NSTypedFilenamesPboardType:ORF</string>
- <string>NSTypedFilenamesPboardType:PCT</string>
- <string>NSTypedFilenamesPboardType:PDF</string>
- <string>NSTypedFilenamesPboardType:PEF</string>
- <string>NSTypedFilenamesPboardType:PIC</string>
- <string>NSTypedFilenamesPboardType:PICT</string>
- <string>NSTypedFilenamesPboardType:PNG</string>
- <string>NSTypedFilenamesPboardType:PNT</string>
- <string>NSTypedFilenamesPboardType:PNTG</string>
- <string>NSTypedFilenamesPboardType:PS</string>
- <string>NSTypedFilenamesPboardType:PSD</string>
- <string>NSTypedFilenamesPboardType:PWL</string>
- <string>NSTypedFilenamesPboardType:QTI</string>
- <string>NSTypedFilenamesPboardType:QTIF</string>
- <string>NSTypedFilenamesPboardType:RAF</string>
- <string>NSTypedFilenamesPboardType:RAW</string>
- <string>NSTypedFilenamesPboardType:RGB</string>
- <string>NSTypedFilenamesPboardType:RW2</string>
- <string>NSTypedFilenamesPboardType:RWL</string>
- <string>NSTypedFilenamesPboardType:SGI</string>
- <string>NSTypedFilenamesPboardType:SR2</string>
- <string>NSTypedFilenamesPboardType:SRF</string>
- <string>NSTypedFilenamesPboardType:SRW</string>
- <string>NSTypedFilenamesPboardType:TARGA</string>
- <string>NSTypedFilenamesPboardType:TGA</string>
- <string>NSTypedFilenamesPboardType:TIF</string>
- <string>NSTypedFilenamesPboardType:TIFF</string>
- <string>NSTypedFilenamesPboardType:XBM</string>
- <string>NSTypedFilenamesPboardType:arw</string>
- <string>NSTypedFilenamesPboardType:bmp</string>
- <string>NSTypedFilenamesPboardType:cr2</string>
- <string>NSTypedFilenamesPboardType:crw</string>
- <string>NSTypedFilenamesPboardType:cur</string>
- <string>NSTypedFilenamesPboardType:dcr</string>
- <string>NSTypedFilenamesPboardType:dng</string>
- <string>NSTypedFilenamesPboardType:efx</string>
- <string>NSTypedFilenamesPboardType:epi</string>
- <string>NSTypedFilenamesPboardType:eps</string>
- <string>NSTypedFilenamesPboardType:epsf</string>
- <string>NSTypedFilenamesPboardType:epsi</string>
- <string>NSTypedFilenamesPboardType:erf</string>
- <string>NSTypedFilenamesPboardType:exr</string>
- <string>NSTypedFilenamesPboardType:fax</string>
- <string>NSTypedFilenamesPboardType:fff</string>
- <string>NSTypedFilenamesPboardType:fpix</string>
- <string>NSTypedFilenamesPboardType:fpx</string>
- <string>NSTypedFilenamesPboardType:g3</string>
- <string>NSTypedFilenamesPboardType:gif</string>
- <string>NSTypedFilenamesPboardType:hdr</string>
- <string>NSTypedFilenamesPboardType:icns</string>
- <string>NSTypedFilenamesPboardType:ico</string>
- <string>NSTypedFilenamesPboardType:jfax</string>
- <string>NSTypedFilenamesPboardType:jfx</string>
- <string>NSTypedFilenamesPboardType:jp2</string>
- <string>NSTypedFilenamesPboardType:jpe</string>
- <string>NSTypedFilenamesPboardType:jpeg</string>
- <string>NSTypedFilenamesPboardType:jpf</string>
- <string>NSTypedFilenamesPboardType:jpg</string>
- <string>NSTypedFilenamesPboardType:mac</string>
- <string>NSTypedFilenamesPboardType:mos</string>
- <string>NSTypedFilenamesPboardType:mrw</string>
- <string>NSTypedFilenamesPboardType:nef</string>
- <string>NSTypedFilenamesPboardType:nrw</string>
- <string>NSTypedFilenamesPboardType:orf</string>
- <string>NSTypedFilenamesPboardType:pct</string>
- <string>NSTypedFilenamesPboardType:pdf</string>
- <string>NSTypedFilenamesPboardType:pef</string>
- <string>NSTypedFilenamesPboardType:pic</string>
- <string>NSTypedFilenamesPboardType:pict</string>
- <string>NSTypedFilenamesPboardType:png</string>
- <string>NSTypedFilenamesPboardType:pnt</string>
- <string>NSTypedFilenamesPboardType:pntg</string>
- <string>NSTypedFilenamesPboardType:ps</string>
- <string>NSTypedFilenamesPboardType:psd</string>
- <string>NSTypedFilenamesPboardType:pwl</string>
- <string>NSTypedFilenamesPboardType:qti</string>
- <string>NSTypedFilenamesPboardType:qtif</string>
- <string>NSTypedFilenamesPboardType:raf</string>
- <string>NSTypedFilenamesPboardType:raw</string>
- <string>NSTypedFilenamesPboardType:rgb</string>
- <string>NSTypedFilenamesPboardType:rw2</string>
- <string>NSTypedFilenamesPboardType:rwl</string>
- <string>NSTypedFilenamesPboardType:sgi</string>
- <string>NSTypedFilenamesPboardType:sr2</string>
- <string>NSTypedFilenamesPboardType:srf</string>
- <string>NSTypedFilenamesPboardType:srw</string>
- <string>NSTypedFilenamesPboardType:targa</string>
- <string>NSTypedFilenamesPboardType:tga</string>
- <string>NSTypedFilenamesPboardType:tif</string>
- <string>NSTypedFilenamesPboardType:tiff</string>
- <string>NSTypedFilenamesPboardType:xbm</string>
- <string>NeXT Encapsulated PostScript v1.2 pasteboard
type</string>
- <string>NeXT TIFF v4.0 pasteboard type</string>
- </object>
- </object>
- <string key="NSFrameSize">{406, 472}</string>
- <reference key="NSSuperview" ref="666718852"/>
- <bool key="constrainsToOriginalSize">YES</bool>
- <bool key="cellsHaveSubtitle">NO</bool>
- <bool key="cellsHaveTitle">YES</bool>
- <bool key="outlinesCells">YES</bool>
- <bool key="shadowsCells">YES</bool>
- <bool key="animates">NO</bool>
- <bool key="allowsReordering">NO</bool>
- <bool key="allowsMultipleSelection">YES</bool>
- <float key="cellWidth">129</float>
- <float key="cellHeight">129</float>
- <reference key="dataSource"/>
- <reference key="delegate"/>
- </object>
- </object>
- <string key="NSFrame">{{1, 1}, {392, 472}}</string>
- <reference key="NSSuperview" ref="1048916289"/>
- <reference key="NSNextKeyView" ref="856178384"/>
- <reference key="NSDocView" ref="856178384"/>
- <object class="NSColor" key="NSBGColor" id="849578898">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">controlColor</string>
- <object class="NSColor" key="NSColor" id="127779954">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MC42NjY2NjY2ODY1AA</bytes>
- </object>
- </object>
- <int key="NScvFlags">6</int>
- </object>
- <object class="NSScroller" id="541187350">
- <reference key="NSNextResponder" ref="1048916289"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{393, 1}, {15, 472}}</string>
- <reference key="NSSuperview" ref="1048916289"/>
- <reference key="NSTarget" ref="1048916289"/>
- <string key="NSAction">_doScroller:</string>
- <double key="NSCurValue">1</double>
- <double key="NSPercent">0.99788582324981689</double>
- </object>
- <object class="NSScroller" id="454630173">
- <reference key="NSNextResponder" ref="1048916289"/>
- <int key="NSvFlags">-
2147483392</int>
- <string key="NSFrame">{{-100, -100}, {303, 15}}</string>
- <reference key="NSSuperview" ref="1048916289"/>
- <bool key="NSEnabled">YES</bool>
- <int key="NSsFlags">1</int>
- <reference key="NSTarget" ref="1048916289"/>
- <string key="NSAction">_doScroller:</string>
- <double key="NSPercent">0.50602412223815918</double>
- </object>
- </object>
- <string key="NSFrame">{{-1, 0}, {409, 474}}</string>
- <reference key="NSSuperview" ref="842547720"/>
- <reference key="NSNextKeyView" ref="666718852"/>
- <int key="NSsFlags">146</int>
- <reference key="NSVScroller" ref="541187350"/>
- <reference key="NSHScroller" ref="454630173"/>
- <reference key="NSContentView" ref="666718852"/>
- <bytes key="NSScrollAmts">QSAAAEEgAABC/1VVQvAAAA</bytes>
- </object>
- </object>
- <string key="NSFrameSize">{408, 474}</string>
- </object>
- <string key="NSLabel">Tab</string>
- <reference key="NSColor" ref="849578898"/>
- <reference key="NSTabView" ref="565099908"/>
- </object>
- <object class="NSTabViewItem" id="806868058">
- <string key="NSIdentifier">2</string>
- <object class="NSView" key="NSView" id="664813015">
- <reference key="NSNextResponder" ref="565099908"/>
- <int key="NSvFlags">274</int>
- <object class="NSMutableArray" key="NSSubviews">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSScrollView" id="1016361311">
- <reference key="NSNextResponder" ref="664813015"/>
- <int key="NSvFlags">274</int>
- <object class="NSMutableArray" key="NSSubviews">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSClipView" id="261767761">
- <reference key="NSNextResponder" ref="1016361311"/>
- <int key="NSvFlags">2304</int>
- <object class="NSMutableArray" key="NSSubviews">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSTableView" id="861297930">
- <reference key="NSNextResponder" ref="261767761"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrameSize">{392, 456}</string>
- <reference key="NSSuperview" ref="261767761"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTableHeaderView" key="NSHeaderView"
id="309835116">
- <reference key="NSNextResponder" ref="371238080"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrameSize">{392, 17}</string>
- <reference key="NSSuperview" ref="371238080"/>
- <reference key="NSTableView" ref="861297930"/>
- </object>
- <object class="_NSCornerView" key="NSCornerView"
id="43222197">
- <reference key="NSNextResponder" ref="1016361311"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{393, 0}, {16, 17}}</string>
- <reference key="NSSuperview" ref="1016361311"/>
- </object>
- <object class="NSMutableArray" key="NSTableColumns">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSTableColumn" id="1038661797">
- <string key="NSIdentifier">icon</string>
- <double key="NSWidth">20</double>
- <double key="NSMinWidth">20</double>
- <double key="NSMaxWidth">20</double>
- <object class="NSTableHeaderCell" key="NSHeaderCell">
- <int key="NSCellFlags">75628096</int>
- <int key="NSCellFlags2">2048</int>
- <string key="NSContents"/>
- <object class="NSFont" key="NSSupport" id="26">
- <string key="NSName">LucidaGrande</string>
- <double key="NSSize">11</double>
- <int key="NSfFlags">3100</int>
- </object>
- <object class="NSColor" key="NSBackgroundColor"
id="16811310">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">headerColor</string>
- <object class="NSColor" key="NSColor" id="570983033">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MQA</bytes>
- </object>
- </object>
- <object class="NSColor" key="NSTextColor" id="455749575">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">headerTextColor</string>
- <object class="NSColor" key="NSColor" id="650835320">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MAA</bytes>
- </object>
- </object>
- </object>
- <object class="NSImageCell" key="NSDataCell"
id="530017882">
- <int key="NSCellFlags">67239488</int>
- <int key="NSCellFlags2">33556480</int>
- <object class="NSFont" key="NSSupport" id="404275500">
- <string key="NSName">LucidaGrande</string>
- <double key="NSSize">13</double>
- <int key="NSfFlags">1044</int>
- </object>
- <int key="NSAlign">0</int>
- <int key="NSScale">0</int>
- <int key="NSStyle">0</int>
- <bool key="NSAnimates">NO</bool>
- </object>
- <int key="NSResizingMask">3</int>
- <bool key="NSIsResizeable">YES</bool>
- <reference key="NSTableView" ref="861297930"/>
- </object>
- <object class="NSTableColumn" id="788574860">
- <string key="NSIdentifier">name</string>
- <double key="NSWidth">155</double>
- <double key="NSMinWidth">2</double>
- <double key="NSMaxWidth">1000</double>
- <object class="NSTableHeaderCell" key="NSHeaderCell">
- <int key="NSCellFlags">75628096</int>
- <int key="NSCellFlags2">2048</int>
- <string key="NSContents">Name</string>
- <reference key="NSSupport" ref="26"/>
- <object class="NSColor" key="NSBackgroundColor">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MC4zMzMzMzI5ODU2AA</bytes>
- </object>
- <reference key="NSTextColor" ref="455749575"/>
- </object>
- <object class="NSTextFieldCell" key="NSDataCell"
id="269335832">
- <int key="NSCellFlags">337772096</int>
- <int key="NSCellFlags2">2048</int>
- <string key="NSContents">Text Cell</string>
- <reference key="NSSupport" ref="404275500"/>
- <reference key="NSControlView" ref="861297930"/>
- <object class="NSColor" key="NSBackgroundColor"
id="1001016020">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string
key="NSColorName">controlBackgroundColor</string>
- <reference key="NSColor" ref="127779954"/>
- </object>
- <object class="NSColor" key="NSTextColor" id="902106797">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">controlTextColor</string>
- <reference key="NSColor" ref="650835320"/>
- </object>
- </object>
- <int key="NSResizingMask">3</int>
- <bool key="NSIsResizeable">YES</bool>
- <reference key="NSTableView" ref="861297930"/>
- <object class="NSSortDescriptor"
key="NSSortDescriptorPrototype" id="494267221">
- <string key="NSKey">name</string>
- <bool key="NSAscending">YES</bool>
- <string key="NSSelector">caseInsensitiveCompare:</string>
- </object>
- </object>
- <object class="NSTableColumn" id="137078291">
- <string key="NSIdentifier">artist</string>
- <double key="NSWidth">140</double>
- <double key="NSMinWidth">2</double>
- <double key="NSMaxWidth">1000</double>
- <object class="NSTableHeaderCell" key="NSHeaderCell">
- <int key="NSCellFlags">75628096</int>
- <int key="NSCellFlags2">2048</int>
- <string key="NSContents">Artist</string>
- <reference key="NSSupport" ref="26"/>
- <reference key="NSBackgroundColor" ref="16811310"/>
- <reference key="NSTextColor" ref="455749575"/>
- </object>
- <object class="NSTextFieldCell" key="NSDataCell"
id="791784643">
- <int key="NSCellFlags">337772096</int>
- <int key="NSCellFlags2">2048</int>
- <string key="NSContents">Text Cell</string>
- <reference key="NSSupport" ref="404275500"/>
- <reference key="NSControlView" ref="861297930"/>
- <reference key="NSBackgroundColor" ref="1001016020"/>
- <reference key="NSTextColor" ref="902106797"/>
- </object>
- <int key="NSResizingMask">3</int>
- <bool key="NSIsResizeable">YES</bool>
- <reference key="NSTableView" ref="861297930"/>
- <object class="NSSortDescriptor"
key="NSSortDescriptorPrototype">
- <string key="NSKey">metadata.artist</string>
- <bool key="NSAscending">YES</bool>
- <string key="NSSelector">caseInsensitiveCompare:</string>
- </object>
- </object>
- <object class="NSTableColumn" id="467342685">
- <string key="NSIdentifier">duration</string>
- <double key="NSWidth">65</double>
- <double key="NSMinWidth">65</double>
- <double key="NSMaxWidth">65</double>
- <object class="NSTableHeaderCell" key="NSHeaderCell">
- <int key="NSCellFlags">75628096</int>
- <int key="NSCellFlags2">67110912</int>
- <string key="NSContents">Time</string>
- <reference key="NSSupport" ref="26"/>
- <reference key="NSBackgroundColor" ref="16811310"/>
- <reference key="NSTextColor" ref="455749575"/>
- </object>
- <object class="NSTextFieldCell" key="NSDataCell"
id="973375628">
- <int key="NSCellFlags">67239488</int>
- <int key="NSCellFlags2">67115008</int>
- <string key="NSContents">Text Cell</string>
- <reference key="NSSupport" ref="404275500"/>
- <reference key="NSControlView" ref="861297930"/>
- <reference key="NSBackgroundColor" ref="1001016020"/>
- <reference key="NSTextColor" ref="902106797"/>
- </object>
- <int key="NSResizingMask">2</int>
- <bool key="NSIsResizeable">YES</bool>
- <reference key="NSTableView" ref="861297930"/>
- <object class="NSSortDescriptor"
key="NSSortDescriptorPrototype">
- <string key="NSKey">metadata.duration</string>
- <bool key="NSAscending">YES</bool>
- <string key="NSSelector">compare:</string>
- </object>
- </object>
- </object>
- <double key="NSIntercellSpacingWidth">3</double>
- <double key="NSIntercellSpacingHeight">2</double>
- <reference key="NSBackgroundColor" ref="570983033"/>
- <object class="NSColor" key="NSGridColor" id="968832139">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">gridColor</string>
- <object class="NSColor" key="NSColor">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MC41AA</bytes>
- </object>
- </object>
- <double key="NSRowHeight">17</double>
- <int key="NSTvFlags">-624951296</int>
- <reference key="NSDelegate"/>
- <reference key="NSDataSource"/>
- <object class="NSArray" key="NSSortDescriptors">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="494267221"/>
- </object>
- <int key="NSColumnAutoresizingStyle">2</int>
- <int key="NSDraggingSourceMaskForLocal">15</int>
- <int key="NSDraggingSourceMaskForNonLocal">0</int>
- <bool key="NSAllowsTypeSelect">YES</bool>
- <int key="NSTableViewDraggingDestinationStyle">0</int>
- </object>
- </object>
- <string key="NSFrame">{{1, 17}, {392, 456}}</string>
- <reference key="NSSuperview" ref="1016361311"/>
- <reference key="NSNextKeyView" ref="861297930"/>
- <reference key="NSDocView" ref="861297930"/>
- <reference key="NSBGColor" ref="1001016020"/>
- <int key="NScvFlags">4</int>
- </object>
- <object class="NSScroller" id="1054601595">
- <reference key="NSNextResponder" ref="1016361311"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{393, 17}, {15, 456}}</string>
- <reference key="NSSuperview" ref="1016361311"/>
- <reference key="NSTarget" ref="1016361311"/>
- <string key="NSAction">_doScroller:</string>
- <double key="NSPercent">0.99781179428100586</double>
- </object>
- <object class="NSScroller" id="751089058">
- <reference key="NSNextResponder" ref="1016361311"/>
- <int key="NSvFlags">-
2147483392</int>
- <string key="NSFrame">{{-100, -100}, {393, 15}}</string>
- <reference key="NSSuperview" ref="1016361311"/>
- <int key="NSsFlags">1</int>
- <reference key="NSTarget" ref="1016361311"/>
- <string key="NSAction">_doScroller:</string>
- <double key="NSPercent">0.57142859697341919</double>
- </object>
- <object class="NSClipView" id="371238080">
- <reference key="NSNextResponder" ref="1016361311"/>
- <int key="NSvFlags">2304</int>
- <object class="NSMutableArray" key="NSSubviews">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="309835116"/>
- </object>
- <string key="NSFrame">{{1, 0}, {392, 17}}</string>
- <reference key="NSSuperview" ref="1016361311"/>
- <reference key="NSNextKeyView" ref="309835116"/>
- <reference key="NSDocView" ref="309835116"/>
- <reference key="NSBGColor" ref="1001016020"/>
- <int key="NScvFlags">4</int>
- </object>
- <reference ref="43222197"/>
- </object>
- <string key="NSFrame">{{-1, 0}, {409, 474}}</string>
- <reference key="NSSuperview" ref="664813015"/>
- <reference key="NSNextKeyView" ref="261767761"/>
- <int key="NSsFlags">18</int>
- <reference key="NSVScroller" ref="1054601595"/>
- <reference key="NSHScroller" ref="751089058"/>
- <reference key="NSContentView" ref="261767761"/>
- <reference key="NSHeaderClipView" ref="371238080"/>
- <reference key="NSCornerView" ref="43222197"/>
- <bytes key="NSScrollAmts">QSAAAEEgAABBmAAAQZgAAA</bytes>
- </object>
- </object>
- <string key="NSFrameSize">{408, 474}</string>
- <reference key="NSSuperview" ref="565099908"/>
- </object>
- <string key="NSLabel">View</string>
- <reference key="NSColor" ref="849578898"/>
- <reference key="NSTabView" ref="565099908"/>
- </object>
- <object class="NSTabViewItem" id="678264642">
- <string key="NSIdentifier">Item 2</string>
- <object class="NSView" key="NSView" id="986317763">
- <nil key="NSNextResponder"/>
- <int key="NSvFlags">256</int>
- <object class="NSMutableArray" key="NSSubviews">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSScrollView" id="522911762">
- <reference key="NSNextResponder" ref="986317763"/>
- <int key="NSvFlags">274</int>
- <object class="NSMutableArray" key="NSSubviews">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSClipView" id="341049101">
- <reference key="NSNextResponder" ref="522911762"/>
- <int key="NSvFlags">2304</int>
- <object class="NSMutableArray" key="NSSubviews">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSTableView" id="259220693">
- <reference key="NSNextResponder" ref="341049101"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrameSize">{391, 472}</string>
- <reference key="NSSuperview" ref="341049101"/>
- <bool key="NSEnabled">YES</bool>
- <object class="_NSCornerView" key="NSCornerView">
- <nil key="NSNextResponder"/>
- <int key="NSvFlags">-
2147483392</int>
- <string key="NSFrame">{{-26, 0}, {16, 17}}</string>
- </object>
- <object class="NSMutableArray" key="NSTableColumns">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSTableColumn" id="868765452">
- <double key="NSWidth">388</double>
- <double key="NSMinWidth">40</double>
- <double key="NSMaxWidth">1000</double>
- <object class="NSTableHeaderCell" key="NSHeaderCell">
- <int key="NSCellFlags">75628096</int>
- <int key="NSCellFlags2">2048</int>
- <string key="NSContents"/>
- <reference key="NSSupport" ref="26"/>
- <object class="NSColor" key="NSBackgroundColor">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MC4zMzMzMzI5ODU2AA</bytes>
- </object>
- <reference key="NSTextColor" ref="455749575"/>
- </object>
- <object class="NSTextFieldCell" key="NSDataCell"
id="112078698">
- <int key="NSCellFlags">337772096</int>
- <int key="NSCellFlags2">2048</int>
- <string key="NSContents">Text Cell</string>
- <reference key="NSSupport" ref="404275500"/>
- <reference key="NSControlView" ref="259220693"/>
- <reference key="NSBackgroundColor" ref="1001016020"/>
- <reference key="NSTextColor" ref="902106797"/>
- </object>
- <int key="NSResizingMask">3</int>
- <bool key="NSIsResizeable">YES</bool>
- <bool key="NSIsEditable">YES</bool>
- <reference key="NSTableView" ref="259220693"/>
- </object>
- </object>
- <double key="NSIntercellSpacingWidth">3</double>
- <double key="NSIntercellSpacingHeight">2</double>
- <reference key="NSBackgroundColor" ref="570983033"/>
- <reference key="NSGridColor" ref="968832139"/>
- <double key="NSRowHeight">80</double>
- <int key="NSTvFlags">448790528</int>
- <reference key="NSDelegate"/>
- <reference key="NSDataSource"/>
- <int key="NSColumnAutoresizingStyle">5</int>
- <int key="NSDraggingSourceMaskForLocal">15</int>
- <int key="NSDraggingSourceMaskForNonLocal">0</int>
- <bool key="NSAllowsTypeSelect">YES</bool>
- <int key="NSTableViewDraggingDestinationStyle">0</int>
- </object>
- </object>
- <string key="NSFrame">{{1, 1}, {391, 472}}</string>
- <reference key="NSSuperview" ref="522911762"/>
- <reference key="NSNextKeyView" ref="259220693"/>
- <reference key="NSDocView" ref="259220693"/>
- <reference key="NSBGColor" ref="1001016020"/>
- <int key="NScvFlags">4</int>
- </object>
- <object class="NSScroller" id="59681056">
- <reference key="NSNextResponder" ref="522911762"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{392, 1}, {15, 472}}</string>
- <reference key="NSSuperview" ref="522911762"/>
- <reference key="NSTarget" ref="522911762"/>
- <string key="NSAction">_doScroller:</string>
- <double key="NSPercent">0.99734038114547729</double>
- </object>
- <object class="NSScroller" id="965389675">
- <reference key="NSNextResponder" ref="522911762"/>
- <int key="NSvFlags">-
2147483392</int>
- <string key="NSFrame">{{-100, -100}, {393, 15}}</string>
- <reference key="NSSuperview" ref="522911762"/>
- <int key="NSsFlags">1</int>
- <reference key="NSTarget" ref="522911762"/>
- <string key="NSAction">_doScroller:</string>
- <double key="NSPercent">0.57142859697341919</double>
- </object>
- </object>
- <string key="NSFrameSize">{408, 474}</string>
- <reference key="NSSuperview" ref="986317763"/>
- <reference key="NSNextKeyView" ref="341049101"/>
- <int key="NSsFlags">18</int>
- <reference key="NSVScroller" ref="59681056"/>
- <reference key="NSHScroller" ref="965389675"/>
- <reference key="NSContentView" ref="341049101"/>
- <bytes key="NSScrollAmts">QSAAAEEgAABCpAAAQqQAAA</bytes>
- </object>
- </object>
- <string key="NSFrameSize">{408, 474}</string>
- </object>
- <string key="NSLabel">Item 2</string>
- <reference key="NSColor" ref="849578898"/>
- <reference key="NSTabView" ref="565099908"/>
- </object>
- </object>
- <reference key="NSSelectedTabViewItem" ref="806868058"/>
- <reference key="NSFont" ref="404275500"/>
- <int key="NSTvFlags">6</int>
- <bool key="NSAllowTruncatedLabels">YES</bool>
- <object class="NSMutableArray" key="NSSubviews">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="664813015"/>
- </object>
- </object>
- <object class="NSButton" id="972754095">
- <reference key="NSNextResponder" ref="818174058"/>
- <int key="NSvFlags">292</int>
- <string key="NSFrame">{{68, 9}, {32, 18}}</string>
- <reference key="NSSuperview" ref="818174058"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="450164318">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">134348800</int>
- <string key="NSContents"/>
- <reference key="NSSupport" ref="26"/>
- <reference key="NSControlView" ref="972754095"/>
- <int key="NSButtonFlags">-929300225</int>
- <int key="NSButtonFlags2">35</int>
- <object class="NSCustomResource" key="NSNormalImage">
- <string key="NSClassName">NSImage</string>
- <string key="NSResourceName">NSRightFacingTriangleTemplate</string>
- </object>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSSegmentedControl" id="74501851">
- <reference key="NSNextResponder" ref="818174058"/>
- <int key="NSvFlags">292</int>
- <string key="NSFrame">{{12, 8}, {48, 19}}</string>
- <reference key="NSSuperview" ref="818174058"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSSegmentedCell" key="NSCell" id="1043442950">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">131072</int>
- <reference key="NSSupport" ref="26"/>
- <reference key="NSControlView" ref="74501851"/>
- <object class="NSMutableArray" key="NSSegmentImages">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSSegmentItem">
- <double key="NSSegmentItemWidth">23</double>
- <object class="NSCustomResource" key="NSSegmentItemImage">
- <string key="NSClassName">NSImage</string>
- <string key="NSResourceName">NSListViewTemplate</string>
- </object>
- <string key="NSSegmentItemLabel"/>
- <int key="NSSegmentItemTag">1</int>
- <bool key="NSSegmentItemSelected">YES</bool>
- <int key="NSSegmentItemImageScaling">2</int>
- </object>
- <object class="NSSegmentItem">
- <double key="NSSegmentItemWidth">22</double>
- <object class="NSCustomResource" key="NSSegmentItemImage">
- <string key="NSClassName">NSImage</string>
- <string key="NSResourceName">IMBComboViewTemplate</string>
- </object>
- <string key="NSSegmentItemLabel"/>
- <int key="NSSegmentItemTag">2</int>
- <int key="NSSegmentItemImageScaling">2</int>
- </object>
- </object>
- <int key="NSSegmentStyle">2</int>
- </object>
- </object>
- <object class="NSTextField" id="912974408">
- <reference key="NSNextResponder" ref="818174058"/>
- <int key="NSvFlags">290</int>
- <string key="NSFrame">{{105, 10}, {168, 14}}</string>
- <reference key="NSSuperview" ref="818174058"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="5543292">
- <int key="NSCellFlags">67239488</int>
- <int key="NSCellFlags2">138545152</int>
- <string key="NSContents">Object Count</string>
- <reference key="NSSupport" ref="26"/>
- <reference key="NSControlView" ref="912974408"/>
- <reference key="NSBackgroundColor" ref="849578898"/>
- <reference key="NSTextColor" ref="902106797"/>
- </object>
- </object>
- <object class="NSSearchField" id="796568742">
- <reference key="NSNextResponder" ref="818174058"/>
- <int key="NSvFlags">289</int>
- <string key="NSFrame">{{278, 8}, {118, 19}}</string>
- <reference key="NSSuperview" ref="818174058"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSSearchFieldCell" key="NSCell" id="928480503">
- <int key="NSCellFlags">343014976</int>
- <int key="NSCellFlags2">268567552</int>
- <string key="NSContents"/>
- <reference key="NSSupport" ref="26"/>
- <reference key="NSControlView" ref="796568742"/>
- <bool key="NSDrawsBackground">YES</bool>
- <int key="NSTextBezelStyle">1</int>
- <object class="NSColor" key="NSBackgroundColor">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">textBackgroundColor</string>
- <reference key="NSColor" ref="570983033"/>
- </object>
- <reference key="NSTextColor" ref="902106797"/>
- <object class="NSButtonCell" key="NSSearchButtonCell">
- <int key="NSCellFlags">130560</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">search</string>
- <reference key="NSControlView" ref="796568742"/>
- <string key="NSAction">_searchFieldSearch:</string>
- <reference key="NSTarget" ref="928480503"/>
- <int key="NSButtonFlags">138690815</int>
- <int key="NSButtonFlags2">0</int>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">400</int>
- <int key="NSPeriodicInterval">75</int>
- </object>
- <object class="NSButtonCell" key="NSCancelButtonCell">
- <int key="NSCellFlags">130560</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">clear</string>
- <object class="NSMutableArray"
key="NSAccessibilityOverriddenAttributes">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMutableDictionary">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>AXDescription</string>
- <string>NSAccessibilityEncodedAttributesValueType</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>cancel</string>
- <integer value="1"/>
- </object>
- </object>
- </object>
- <reference key="NSControlView" ref="796568742"/>
- <string key="NSAction">_searchFieldCancel:</string>
- <reference key="NSTarget" ref="928480503"/>
- <int key="NSButtonFlags">138690815</int>
- <int key="NSButtonFlags2">0</int>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">400</int>
- <int key="NSPeriodicInterval">75</int>
- </object>
- <int key="NSMaximumRecents">255</int>
- </object>
- </object>
- </object>
- <string key="NSFrameSize">{408, 509}</string>
- <reference key="NSSuperview"/>
- <string key="NSClassName">NSView</string>
- </object>
- </object>
- <object class="IBObjectContainer" key="IBDocument.Objects">
- <object class="NSMutableArray" key="connectionRecords">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">ibSearchField</string>
- <reference key="source" ref="918073312"/>
- <reference key="destination" ref="796568742"/>
- </object>
- <int key="connectionID">520</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">view</string>
- <reference key="source" ref="1021"/>
- <reference key="destination" ref="818174058"/>
- </object>
- <int key="connectionID">613</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">ibObjectArrayController</string>
- <reference key="source" ref="1021"/>
- <reference key="destination" ref="918073312"/>
- </object>
- <int key="connectionID">614</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBBindingConnection" key="connection">
- <string key="label">value: objectCountString</string>
- <reference key="source" ref="912974408"/>
- <reference key="destination" ref="1021"/>
- <object class="NSNibBindingConnector" key="connector">
- <reference key="NSSource" ref="912974408"/>
- <reference key="NSDestination" ref="1021"/>
- <string key="NSLabel">value: objectCountString</string>
- <string key="NSBinding">value</string>
- <string key="NSKeyPath">objectCountString</string>
- <object class="NSDictionary" key="NSOptions">
- <string
key="NS.key.0">NSAllowsEditingMultipleValuesSelection</string>
- <boolean value="NO" key="NS.object.0"/>
- </object>
- <int key="NSNibBindingConnectorVersion">2</int>
- </object>
- </object>
- <int key="connectionID">628</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBBindingConnection" key="connection">
- <string key="label">contentArray:
nodeViewController.nodeTreeController.selection.bindableObjects</string>
- <reference key="source" ref="918073312"/>
- <reference key="destination" ref="1021"/>
- <object class="NSNibBindingConnector" key="connector">
- <reference key="NSSource" ref="918073312"/>
- <reference key="NSDestination" ref="1021"/>
- <string key="NSLabel">contentArray:
nodeViewController.nodeTreeController.selection.bindableObjects</string>
- <string key="NSBinding">contentArray</string>
- <string
key="NSKeyPath">nodeViewController.nodeTreeController.selection.bindableObjects</string>
- <object class="NSDictionary" key="NSOptions">
- <string key="NS.key.0">NSConditionallySetsEditable</string>
- <boolean value="NO" key="NS.object.0"/>
- </object>
- <int key="NSNibBindingConnectorVersion">2</int>
- </object>
- </object>
- <int key="connectionID">655</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">_playButton</string>
- <reference key="source" ref="1021"/>
- <reference key="destination" ref="972754095"/>
- </object>
- <int key="connectionID">685</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">ibTabView</string>
- <reference key="source" ref="1021"/>
- <reference key="destination" ref="565099908"/>
- </object>
- <int key="connectionID">718</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">ibIconView</string>
- <reference key="source" ref="1021"/>
- <reference key="destination" ref="856178384"/>
- </object>
- <int key="connectionID">719</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBBindingConnection" key="connection">
- <string key="label">selectedIndex: viewType</string>
- <reference key="source" ref="565099908"/>
- <reference key="destination" ref="1021"/>
- <object class="NSNibBindingConnector" key="connector">
- <reference key="NSSource" ref="565099908"/>
- <reference key="NSDestination" ref="1021"/>
- <string key="NSLabel">selectedIndex: viewType</string>
- <string key="NSBinding">selectedIndex</string>
- <string key="NSKeyPath">viewType</string>
- <int key="NSNibBindingConnectorVersion">2</int>
- </object>
- </object>
- <int key="connectionID">721</int>
- </object>
- <object class="IBConnectionRecord">
***The diff for this file has been truncated for email.***
=======================================
--- /trunk/IMBAudioViewController.h Fri Mar 4 10:09:52 2011
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- iMedia Browser Framework <
http://karelia.com/imedia/>
-
- Copyright (c) 2005-2011 by Karelia Software et al.
-
- iMedia Browser is based on code originally developed by Jason Terhorst,
- further developed for Sandvox by Greg Hulands, Dan Wood, and Terrence
Talbot.
- The new architecture for version 2.0 was developed by Peter Baumgartner.
- Contributions have also been made by Matt Gough, Martin Wennerberg and
others
- as indicated in source files.
-
- The iMedia Browser Framework is licensed under the following terms:
-
- Permission is hereby granted, free of charge, to any person obtaining a
copy
- of this software and associated documentation files (the "Software"), to
deal
- in all or substantial portions of the Software without restriction,
including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
following
- conditions:
-
- Redistributions of source code must retain the original terms stated here,
- including this list of conditions, the disclaimer noted below, and the
- following copyright notice: Copyright (c) 2005-2011 by Karelia Software
et al.
-
- Redistributions in binary form must include, in an end-user-visible
manner,
- e.g., About window, Acknowledgments window, or similar, either a) the
original
- terms stated here, including this list of conditions, the disclaimer noted
- below, and the aforementioned copyright notice, or b) the aforementioned
- copyright notice and a link to
karelia.com/imedia.
-
- Neither the name of Karelia Software, nor Sandvox, nor the names of
- contributors to iMedia Browser may be used to endorse or promote products
- derived from the Software without prior and express written permission
from
- Karelia Software or individual contributors, as appropriate.
-
- Disclaimer: THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS
- "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE,
- AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH, THE
- SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN, THE SOFTWARE.
-*/
-
-
-// Author: Peter Baumgartner
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark HEADERS
-
-#import "IMBObjectViewController.h"
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark CLASSES
-
-@class QTMovie;
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark
-
-@interface IMBAudioViewController : IMBObjectViewController
-{
- IBOutlet NSButton* _playButton;
- QTMovie* _playingAudio;
- IBOutlet NSTableView *_tableView;
-}
-
-// This is not currently invoked directly from any control's action, but
-// conceptually it is an action method, so I'm leaving it an IBAction.
-- (IBAction) startPlayingSelection:(id)inSender;
-
-// This artificial property is actually hooked conceptually to whether the
-// QTMovie _playingAudio is nil or not. The status isPlaying is tied to the
-// _playButton wiht bindings, causing it to show lit up or not depending.
As
-// a toggle button, the play button will set isPlaying to YES or NO,
depending.
-- (BOOL) isPlaying;
-- (void) setIsPlaying:(BOOL)shouldPlay;
-
-- (void) playAudioObject:(IMBObject*)inObject;
-@property (retain) QTMovie* playingAudio;
-
-@end
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
=======================================
--- /trunk/IMBAudioViewController.m Fri Mar 4 10:09:52 2011
+++ /dev/null
@@ -1,376 +0,0 @@
-/*
- iMedia Browser Framework <
http://karelia.com/imedia/>
-
- Copyright (c) 2005-2011 by Karelia Software et al.
-
- iMedia Browser is based on code originally developed by Jason Terhorst,
- further developed for Sandvox by Greg Hulands, Dan Wood, and Terrence
Talbot.
- The new architecture for version 2.0 was developed by Peter Baumgartner.
- Contributions have also been made by Matt Gough, Martin Wennerberg and
others
- as indicated in source files.
-
- The iMedia Browser Framework is licensed under the following terms:
-
- Permission is hereby granted, free of charge, to any person obtaining a
copy
- of this software and associated documentation files (the "Software"), to
deal
- in all or substantial portions of the Software without restriction,
including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
following
- conditions:
-
- Redistributions of source code must retain the original terms stated here,
- including this list of conditions, the disclaimer noted below, and the
- following copyright notice: Copyright (c) 2005-2011 by Karelia Software
et al.
-
- Redistributions in binary form must include, in an end-user-visible
manner,
- e.g., About window, Acknowledgments window, or similar, either a) the
original
- terms stated here, including this list of conditions, the disclaimer noted
- below, and the aforementioned copyright notice, or b) the aforementioned
- copyright notice and a link to
karelia.com/imedia.
-
- Neither the name of Karelia Software, nor Sandvox, nor the names of
- contributors to iMedia Browser may be used to endorse or promote products
- derived from the Software without prior and express written permission
from
- Karelia Software or individual contributors, as appropriate.
-
- Disclaimer: THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS
- "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE,
- AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH, THE
- SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN, THE SOFTWARE.
-*/
-
-
-// Author: Peter Baumgartner
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark HEADERS
-
-#import "IMBAudioViewController.h"
-#import "IMBNodeViewController.h"
-#import "IMBObjectArrayController.h"
-#import "IMBPanelController.h"
-#import "IMBCommon.h"
-#import "IMBConfig.h"
-#import "IMBObject.h"
-#import "IMBNode.h"
-#import "IMBNodeObject.h"
-#import "IMBFolderParser.h"
-#import "NSWorkspace+iMedia.h"
-#import "NSFileManager+iMedia.h"
-#import <QTKit/QTKit.h>
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark
-
-@implementation IMBAudioViewController
-
-@synthesize playingAudio = _playingAudio;
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-+ (void) load
-{
- [IMBPanelController registerViewControllerClass:[self class]
forMediaType:kIMBMediaTypeAudio];
-}
-
-
-+ (void) initialize
-{
- NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
- NSMutableDictionary* classDict = [NSMutableDictionary dictionary];
- [classDict setObject:[NSNumber
numberWithUnsignedInteger:kIMBObjectViewTypeList] forKey:@"viewType"];
- [classDict setObject:[NSNumber numberWithDouble:0.5] forKey:@"iconSize"];
- [IMBConfig registerDefaultPrefs:classDict forClass:self.class];
- [pool release];
-}
-
-
-- (void) awakeFromNib
-{
- [super awakeFromNib];
-
- ibObjectArrayController.searchableProperties = [NSArray arrayWithObjects:
- @"name",
- @"metadata.artist",
- @"metadata.album",
- nil];
-
- [[[_tableView tableColumnWithIdentifier:@"name"] headerCell]
setStringValue:
-
NSLocalizedStringWithDefaultValue(@"
IMBAudioViewController.tableColumn.name",
nil,IMBBundle(), @"Name", @"Column title - should be a short word")
- ];
- [[[_tableView tableColumnWithIdentifier:@"artist"] headerCell]
setStringValue:
-
NSLocalizedStringWithDefaultValue(@"IMBAudioViewController.tableColumn.artist",
nil,IMBBundle(), @"Artist", @"Column title - should be a short word")
- ];
- [[[_tableView tableColumnWithIdentifier:@"duration"] headerCell]
setStringValue:
-
NSLocalizedStringWithDefaultValue(@"IMBAudioViewController.tableColumn.time",
nil,IMBBundle(), @"Time", @"Column title - should be a short word")
- ];
-}
-
-
-- (void) dealloc
-{
- [[NSNotificationCenter defaultCenter] removeObserver:self];
- IMBRelease(_playingAudio);
- [super dealloc];
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-+ (NSString*) mediaType
-{
- return kIMBMediaTypeAudio;
-}
-
-+ (NSString*) nibName
-{
- return @"IMBAudioView";
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-- (NSImage*) icon
-{
- return [[NSWorkspace imb_threadSafeWorkspace]
imb_iconForAppWithBundleIdentifier:@"com.apple.iTunes"];
-}
-
-- (NSString*) displayName
-{
- return NSLocalizedStringWithDefaultValue(
- @"IMBAudioViewController.displayName",
- nil,IMBBundle(),
- @"Audio",
- @"mediaType display name");
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-+ (NSString*) objectCountFormatSingular
-{
- return NSLocalizedStringWithDefaultValue(
- @"IMBAudioViewController.countFormatSingular",
- nil,IMBBundle(),
- @"%d track",
- @"Format string for object count in singluar");
-}
-
-+ (NSString*) objectCountFormatPlural
-{
- return NSLocalizedStringWithDefaultValue(
- @"IMBAudioViewController.countFormatPlural",
- nil,IMBBundle(),
- @"%d tracks",
- @"Format string for object count in plural");
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// The Audio panel doesn't have an icon view...
-
-- (void) setViewType:(NSUInteger)inViewType
-{
- if (inViewType < 1) inViewType = 1;
- if (inViewType > 2) inViewType = 2;
- [super setViewType:inViewType];
-}
-
-
-- (NSUInteger) viewType
-{
- NSUInteger viewType = [super viewType];
- if (viewType < 1) viewType = 1;
- if (viewType > 2) viewType = 2;
- return viewType;
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// Stop playing audio as we are leaving this panel...
-
-- (void) willHideView
-{
- [self.playingAudio stop];
- self.playingAudio = nil;
-}
-
-
-- (IBAction) quicklook:(id)inSender
-{
- if (IMBRunningOnSnowLeopardOrNewer())
- {
- [self setIsPlaying:NO];
- [super quicklook:inSender];
- }
- else // Don't quicklook on 10.5 .. instead, play the current selection.
- {
- [self startPlayingSelection:inSender];
- }
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark
-#pragma mark NSTableViewDelegate
-
-
-// Upon doubleclick start playing the selection (or opens a folder in case
of IMBNodeObject)...
-
-- (IBAction) tableViewWasDoubleClicked:(id)inSender
-{
- NSInteger row = [(NSTableView*)inSender clickedRow];
- NSArray* objects = [ibObjectArrayController arrangedObjects];
- NSInteger count = [objects count];
-
- if (row>=0 && row<count)
- {
- IMBObject* object = [objects objectAtIndex:row];
-
- if ([object isKindOfClass:[IMBNodeObject class]])
- {
- [super tableViewWasDoubleClicked:inSender]; // handled in superclass
- }
- else
- {
- [self startPlayingSelection:inSender];
- }
- }
-}
-
-
-// If we already has some audio playing, then play the new song if the
selection changes...
-
-- (void) tableViewSelectionDidChange:(NSNotification*)inNotification
-{
- if (self.playingAudio.rate > 0.0)
- {
- [self startPlayingSelection:nil];
- }
- else
- {
- self.playingAudio = nil;
- }
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-- (void) setIsPlaying:(BOOL)shouldPlay
-{
- if ([self isPlaying] != shouldPlay)
- {
- if (shouldPlay)
- {
- // starts playing with the current selection
- NSArray* objects = [ibObjectArrayController arrangedObjects];
- NSIndexSet* rows = [[self listView] selectedRowIndexes];
- NSUInteger row = [rows firstIndex];
-
- if (row != NSNotFound && row < [objects count])
- {
- IMBObject* object = (IMBObject*) [objects objectAtIndex:row];
-
- // Sets self.playingAudio
- [self playAudioObject:object];
- }
- }
- else
- {
- [[NSNotificationCenter defaultCenter] removeObserver:self
name:QTMovieDidEndNotification object:nil];
- [self.playingAudio stop];
- self.playingAudio = nil;
- }
- }
-}
-
-
-- (BOOL) isPlaying
-{
- return (self.playingAudio != nil);
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// Invoked e.g. when double-clicking on a specific song file. First stop
any audio that may currently be playing.
-// Start playing whatever the current selection is...
-
-- (IBAction) startPlayingSelection:(id)inSender
-{
- [self setIsPlaying:NO];
- [self setIsPlaying:YES];
-}
-
-
-- (void) playAudioObject:(IMBObject*)inObject
-{
- // GarageBand files require special attention as the "playable" file
resides inside the document package...
-
- NSString* path = [inObject path];
-
- if ([[[path pathExtension] lowercaseString] isEqualToString:@"band"])
- {
- NSString* output = [path
stringByAppendingPathComponent:@"Output/Output.aif"];
- BOOL exists = [[NSFileManager imb_threadSafeManager]
fileExistsAtPath:output];
- if (exists) path = output;
- }
-
- // Create a QTMovie for the selected item...
-
- NSError* error = nil;
- QTMovie* movie = [QTMovie movieWithFile:path error:&error];
-
- [[NSNotificationCenter defaultCenter]
- addObserver:self
- selector:@selector(_movieDidEnd:)
- name:QTMovieDidEndNotification
- object:movie];
-
- // Start playing it...
-
- if (error == nil)
- {
- [movie gotoBeginning];
- [movie play];
- self.playingAudio = movie;
- }
-}
-
-
-// When regular playback stops at end of file, reset our state so that
highlight disappears on button...
-
-- (void) _movieDidEnd:(NSNotification*)inNotification
-{
- [self setIsPlaying:NO];
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-@end
-
=======================================
--- /trunk/IMBButtonObject.h Mon Jan 3 15:11:51 2011
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- iMedia Browser Framework <
http://karelia.com/imedia/>
-
- Copyright (c) 2005-2011 by Karelia Software et al.
-
- iMedia Browser is based on code originally developed by Jason Terhorst,
- further developed for Sandvox by Greg Hulands, Dan Wood, and Terrence
Talbot.
- The new architecture for version 2.0 was developed by Peter Baumgartner.
- Contributions have also been made by Matt Gough, Martin Wennerberg and
others
- as indicated in source files.
-
- The iMedia Browser Framework is licensed under the following terms:
-
- Permission is hereby granted, free of charge, to any person obtaining a
copy
- of this software and associated documentation files (the "Software"), to
deal
- in all or substantial portions of the Software without restriction,
including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
following
- conditions:
-
- Redistributions of source code must retain the original terms stated here,
- including this list of conditions, the disclaimer noted below, and the
- following copyright notice: Copyright (c) 2005-2011 by Karelia Software
et al.
-
- Redistributions in binary form must include, in an end-user-visible
manner,
- e.g., About window, Acknowledgments window, or similar, either a) the
original
- terms stated here, including this list of conditions, the disclaimer noted
- below, and the aforementioned copyright notice, or b) the aforementioned
- copyright notice and a link to
karelia.com/imedia.
-
- Neither the name of Karelia Software, nor Sandvox, nor the names of
- contributors to iMedia Browser may be used to endorse or promote products
- derived from the Software without prior and express written permission
from
- Karelia Software or individual contributors, as appropriate.
-
- Disclaimer: THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS
- "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE,
- AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH, THE
- SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN, THE SOFTWARE.
-*/
-
-
-// Author: Peter Baumgartner
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark HEADERS
-
-#import "IMBObject.h"
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// This subclass is used to represent clickable buttons in the object
views. This button is not selectable, draggable,
-// and it cannot be used to open a media object - as is does not represent
a media object (image, audio or movie file).
-// Instead it can be used to trigger an action...
-
-
-@interface IMBButtonObject : IMBObject
-{
- id _representedObject;
- id _target;
- SEL _clickAction;
- SEL _doubleClickAction;
-
- id _normalImage;
- id _highlightedImage;
-}
-
-// Properties for configuring the behavior of the button...
-
-@property (retain) id representedObject;
-@property (retain) id target;
-@property (assign) SEL clickAction;
-@property (assign) SEL doubleClickAction;
-
-// Optional properties for configuring the look of the button. If missing,
imageRepresentation will not be modified...
-
-@property (retain) id normalImage;
-@property (retain) id highlightedImage;
-
-- (void) setImageRepresentationForState:(BOOL)inHighlighted;
-
-// Send preconfigured actions...
-
-- (void) sendClickAction;
-- (void) sendDoubleClickAction;
-
-@end
-
-
-//----------------------------------------------------------------------------------------------------------------------
=======================================
--- /trunk/IMBButtonObject.m Mon Jan 3 15:11:51 2011
+++ /dev/null
@@ -1,206 +0,0 @@
-/*
- iMedia Browser Framework <
http://karelia.com/imedia/>
-
- Copyright (c) 2005-2011 by Karelia Software et al.
-
- iMedia Browser is based on code originally developed by Jason Terhorst,
- further developed for Sandvox by Greg Hulands, Dan Wood, and Terrence
Talbot.
- The new architecture for version 2.0 was developed by Peter Baumgartner.
- Contributions have also been made by Matt Gough, Martin Wennerberg and
others
- as indicated in source files.
-
- The iMedia Browser Framework is licensed under the following terms:
-
- Permission is hereby granted, free of charge, to any person obtaining a
copy
- of this software and associated documentation files (the "Software"), to
deal
- in all or substantial portions of the Software without restriction,
including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
following
- conditions:
-
- Redistributions of source code must retain the original terms stated here,
- including this list of conditions, the disclaimer noted below, and the
- following copyright notice: Copyright (c) 2005-2011 by Karelia Software
et al.
-
- Redistributions in binary form must include, in an end-user-visible
manner,
- e.g., About window, Acknowledgments window, or similar, either a) the
original
- terms stated here, including this list of conditions, the disclaimer noted
- below, and the aforementioned copyright notice, or b) the aforementioned
- copyright notice and a link to
karelia.com/imedia.
-
- Neither the name of Karelia Software, nor Sandvox, nor the names of
- contributors to iMedia Browser may be used to endorse or promote products
- derived from the Software without prior and express written permission
from
- Karelia Software or individual contributors, as appropriate.
-
- Disclaimer: THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS
- "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE,
- AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH, THE
- SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN, THE SOFTWARE.
- */
-
-
-// Author: Peter Baumgartner
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark HEADERS
-
-#import "IMBButtonObject.h"
-#import "IMBCommon.h"
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark
-
-@implementation IMBButtonObject
-
-@synthesize representedObject = _representedObject;
-@synthesize target = _target;
-@synthesize clickAction = _clickAction;
-@synthesize doubleClickAction = _doubleClickAction;
-@synthesize normalImage = _normalImage;
-@synthesize highlightedImage = _highlightedImage;
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-- (id) init
-{
- if (self = [super init])
- {
- _representedObject = nil;
- _target = nil;
- _clickAction = NULL;
- _doubleClickAction = NULL;
- _normalImage = nil;
- _highlightedImage = nil;
-
- self.shouldDrawAdornments = NO;
- self.shouldDisableTitle = NO;
- }
-
- return self;
-}
-
-
-- (void) dealloc
-{
- IMBRelease(_representedObject);
- IMBRelease(_target);
- IMBRelease(_normalImage);
- IMBRelease(_highlightedImage);
-
- [super dealloc];
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// Buttons are not selectable or draggable...
-
-- (BOOL) isSelectable
-{
- return NO;
-}
-
-
-- (BOOL) isDraggable
-{
- return NO;
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// If we have custom images for the normal and hilghted state, then update
imageRepresentation with the appropriate
-// one depdending on state. If we do not have any custom images, then do
not touch imageRepresentation...
-
-
-- (void) setImageRepresentationForState:(BOOL)inHighlighted
-{
- if (inHighlighted)
- {
- if (_highlightedImage)
- {
- self.imageRepresentation = _highlightedImage;
- self.imageVersion = self.imageVersion + 1;
- }
- }
- else
- {
- if (_normalImage)
- {
- self.imageRepresentation = _normalImage;
- self.imageVersion = self.imageVersion + 1;
- }
- }
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// Send the preconfigured actions. The object is self (IMBButtonObject),
so the action can access all properties,
-// like representedObject and location to customize the behavior of the
action...
-
-
-- (void) sendClickAction
-{
- if (_target != nil && _clickAction != NULL)
- {
- [_target performSelector:_clickAction withObject:self];
- }
- else
- {
- NSBeep();
- }
-}
-
-
-- (void) sendDoubleClickAction
-{
- if (_target != nil && _doubleClickAction != NULL)
- {
- [_target performSelector:_doubleClickAction withObject:self];
- }
- else
- {
- NSBeep();
- }
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// Return the button image as the small icon...
-
-- (NSImage*) icon
-{
- id imageRepresentation = self.imageRepresentation;
-
- if ([imageRepresentation isKindOfClass:[NSImage class]])
- {
- return (NSImage*)imageRepresentation;
- }
-
- return [super icon];
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-@end
=======================================
--- /trunk/IMBComboTableView.h Mon Jan 3 15:11:51 2011
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- iMedia Browser Framework <
http://karelia.com/imedia/>
-
- Copyright (c) 2005-2011 by Karelia Software et al.
-
- iMedia Browser is based on code originally developed by Jason Terhorst,
- further developed for Sandvox by Greg Hulands, Dan Wood, and Terrence
Talbot.
- The new architecture for version 2.0 was developed by Peter Baumgartner.
- Contributions have also been made by Matt Gough, Martin Wennerberg and
others
- as indicated in source files.
-
- The iMedia Browser Framework is licensed under the following terms:
-
- Permission is hereby granted, free of charge, to any person obtaining a
copy
- of this software and associated documentation files (the "Software"), to
deal
- in all or substantial portions of the Software without restriction,
including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
following
- conditions:
-
- Redistributions of source code must retain the original terms stated here,
- including this list of conditions, the disclaimer noted below, and the
- following copyright notice: Copyright (c) 2005-2011 by Karelia Software
et al.
-
- Redistributions in binary form must include, in an end-user-visible
manner,
- e.g., About window, Acknowledgments window, or similar, either a) the
original
- terms stated here, including this list of conditions, the disclaimer noted
- below, and the aforementioned copyright notice, or b) the aforementioned
- copyright notice and a link to
karelia.com/imedia.
-
- Neither the name of Karelia Software, nor Sandvox, nor the names of
- contributors to iMedia Browser may be used to endorse or promote products
- derived from the Software without prior and express written permission
from
- Karelia Software or individual contributors, as appropriate.
-
- Disclaimer: THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS
- "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE,
- AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH, THE
- SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN, THE SOFTWARE.
-*/
-
-
-// Author: Dan Wood
-
-
-/*
- File: IMBComboTableView.h
- Based on Apple Sample Code "AnimatedTableView"
-*/
-
-#import <Cocoa/Cocoa.h>
-#import "IMBDynamicTableView.h"
-
-@protocol IMBDynamicTableViewDelegate;
-
-@interface IMBComboTableView : IMBDynamicTableView
-
-@end
=======================================
--- /trunk/IMBComboTableView.m Mon Jan 3 15:11:51 2011
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- iMedia Browser Framework <
http://karelia.com/imedia/>
-
- Copyright (c) 2005-2011 by Karelia Software et al.
-
- iMedia Browser is based on code originally developed by Jason Terhorst,
- further developed for Sandvox by Greg Hulands, Dan Wood, and Terrence
Talbot.
- The new architecture for version 2.0 was developed by Peter Baumgartner.
- Contributions have also been made by Matt Gough, Martin Wennerberg and
others
- as indicated in source files.
-
- The iMedia Browser Framework is licensed under the following terms:
-
- Permission is hereby granted, free of charge, to any person obtaining a
copy
- of this software and associated documentation files (the "Software"), to
deal
- in all or substantial portions of the Software without restriction,
including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
following
- conditions:
-
- Redistributions of source code must retain the original terms stated here,
- including this list of conditions, the disclaimer noted below, and the
- following copyright notice: Copyright (c) 2005-2011 by Karelia Software
et al.
-
- Redistributions in binary form must include, in an end-user-visible
manner,
- e.g., About window, Acknowledgments window, or similar, either a) the
original
- terms stated here, including this list of conditions, the disclaimer noted
- below, and the aforementioned copyright notice, or b) the aforementioned
- copyright notice and a link to
karelia.com/imedia.
-
- Neither the name of Karelia Software, nor Sandvox, nor the names of
- contributors to iMedia Browser may be used to endorse or promote products
- derived from the Software without prior and express written permission
from
- Karelia Software or individual contributors, as appropriate.
-
- Disclaimer: THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS
- "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE,
- AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH, THE
- SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN, THE SOFTWARE.
-*/
-
-
-// Author: Dan Wood
-
-
-/*
- File: IMBComboTableView.m
- Based on Apple Sample Code "AnimatedTableView"
-
-*/
-
-#import "IMBComboTableView.h"
-#import "IMBComboTextCell.h"
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-@implementation IMBComboTableView
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-- (BOOL)wantsThumbnails;
-{
- return YES;
-}
-
-
-// If we are using custom background and highlight colors, we may have to
adjust the text colors accordingly,
-// to make sure that text is always clearly readable...
-
-- (NSCell*) preparedCellAtColumn:(NSInteger)inColumn row:(NSInteger)inRow
-{
- NSCell* cell = [super preparedCellAtColumn:inColumn row:inRow];
- IMBComboTextCell* comboCell = (IMBComboTextCell*)cell;
- NSMutableDictionary* attributes;
- NSMutableParagraphStyle* style;
-
- if ([cell isKindOfClass:[IMBComboTextCell class]])
- {
- if ([comboCell isHighlighted])
- {
- if (_customHighlightedTextColor != nil)
- {
- style = [[NSMutableParagraphStyle alloc] init];
- [style setLineBreakMode:NSLineBreakByTruncatingTail];
-
- attributes = [[NSMutableDictionary alloc] initWithObjectsAndKeys:
- _customHighlightedTextColor,NSForegroundColorAttributeName,
- [NSFont systemFontOfSize:13.0],NSFontAttributeName,
- style,NSParagraphStyleAttributeName,
- nil];
- comboCell.titleTextAttributes = attributes;
- [attributes release];
-
- attributes = [[NSMutableDictionary alloc] initWithObjectsAndKeys:
- [_customHighlightedTextColor
colorWithAlphaComponent:0.5],NSForegroundColorAttributeName,
- [NSFont systemFontOfSize:11.0],NSFontAttributeName,
- style,NSParagraphStyleAttributeName,
- nil];
- comboCell.subtitleTextAttributes = attributes;
- [attributes release];
-
- [style release];
- }
- }
- else
- {
- if (_customTextColor != nil)
- {
- style = [[NSMutableParagraphStyle alloc] init];
- [style setLineBreakMode:NSLineBreakByTruncatingTail];
-
- attributes = [[NSMutableDictionary alloc] initWithObjectsAndKeys:
- _customTextColor,NSForegroundColorAttributeName,
- [NSFont systemFontOfSize:13.0],NSFontAttributeName,
- style,NSParagraphStyleAttributeName,
- nil];
- comboCell.titleTextAttributes = attributes;
- [attributes release];
-
- attributes = [[NSMutableDictionary alloc] initWithObjectsAndKeys:
- [_customTextColor
colorWithAlphaComponent:0.5],NSForegroundColorAttributeName,
- [NSFont systemFontOfSize:11.0],NSFontAttributeName,
- style,NSParagraphStyleAttributeName,
- nil];
- comboCell.subtitleTextAttributes = attributes;
- [attributes release];
-
- [style release];
- }
- }
- }
-
- return cell;
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-@end
=======================================
--- /trunk/IMBComboTextCell.h Mon Jan 3 15:11:51 2011
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- iMedia Browser Framework <
http://karelia.com/imedia/>
-
- Copyright (c) 2005-2011 by Karelia Software et al.
-
- iMedia Browser is based on code originally developed by Jason Terhorst,
- further developed for Sandvox by Greg Hulands, Dan Wood, and Terrence
Talbot.
- The new architecture for version 2.0 was developed by Peter Baumgartner.
- Contributions have also been made by Matt Gough, Martin Wennerberg and
others
- as indicated in source files.
-
- The iMedia Browser Framework is licensed under the following terms:
-
- Permission is hereby granted, free of charge, to any person obtaining a
copy
- of this software and associated documentation files (the "Software"), to
deal
- in all or substantial portions of the Software without restriction,
including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
following
- conditions:
-
- Redistributions of source code must retain the original terms stated here,
- including this list of conditions, the disclaimer noted below, and the
- following copyright notice: Copyright (c) 2005-2011 by Karelia Software
et al.
-
- Redistributions in binary form must include, in an end-user-visible
manner,
- e.g., About window, Acknowledgments window, or similar, either a) the
original
- terms stated here, including this list of conditions, the disclaimer noted
- below, and the aforementioned copyright notice, or b) the aforementioned
- copyright notice and a link to
karelia.com/imedia.
-
- Neither the name of Karelia Software, nor Sandvox, nor the names of
- contributors to iMedia Browser may be used to endorse or promote products
- derived from the Software without prior and express written permission
from
- Karelia Software or individual contributors, as appropriate.
-
- Disclaimer: THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS
- "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE,
- AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH, THE
- SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN, THE SOFTWARE.
-*/
-
-
-// Author: Dan Wood, Peter Baumgartner, Mike Abdullah
-
-
-#import "IMBImageItem.h"
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-@interface IMBComboTextCell : NSTextFieldCell <IMBImageItem>
-{
- id _imageRepresentation;
- NSString* _imageRepresentationType;
- NSString* _title;
- NSString* _subtitle;
- BOOL _isDisabledFromDragging;
-
- NSDictionary* _titleTextAttributes;
- NSDictionary* _subtitleTextAttributes;
-}
-
-@property (retain) id imageRepresentation;
-@property (retain) NSString* imageRepresentationType;
-
-@property (retain) NSString* title;
-@property (copy) NSDictionary* titleTextAttributes;
-
-@property (retain) NSString* subtitle;
-@property (copy) NSDictionary* subtitleTextAttributes;
-
-@property (assign, setter=setDisabledFromDragging:) BOOL
isDisabledFromDragging;
-
-@end
-
-//----------------------------------------------------------------------------------------------------------------------
=======================================
--- /trunk/IMBComboTextCell.m Thu Feb 24 10:06:40 2011
+++ /dev/null
@@ -1,386 +0,0 @@
-/*
- iMedia Browser Framework <
http://karelia.com/imedia/>
-
- Copyright (c) 2005-2011 by Karelia Software et al.
-
- iMedia Browser is based on code originally developed by Jason Terhorst,
- further developed for Sandvox by Greg Hulands, Dan Wood, and Terrence
Talbot.
- The new architecture for version 2.0 was developed by Peter Baumgartner.
- Contributions have also been made by Matt Gough, Martin Wennerberg and
others
- as indicated in source files.
-
- The iMedia Browser Framework is licensed under the following terms:
-
- Permission is hereby granted, free of charge, to any person obtaining a
copy
- of this software and associated documentation files (the "Software"), to
deal
- in all or substantial portions of the Software without restriction,
including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
following
- conditions:
-
- Redistributions of source code must retain the original terms stated here,
- including this list of conditions, the disclaimer noted below, and the
- following copyright notice: Copyright (c) 2005-2011 by Karelia Software
et al.
-
- Redistributions in binary form must include, in an end-user-visible
manner,
- e.g., About window, Acknowledgments window, or similar, either a) the
original
- terms stated here, including this list of conditions, the disclaimer noted
- below, and the aforementioned copyright notice, or b) the aforementioned
- copyright notice and a link to
karelia.com/imedia.
-
- Neither the name of Karelia Software, nor Sandvox, nor the names of
- contributors to iMedia Browser may be used to endorse or promote products
- derived from the Software without prior and express written permission
from
- Karelia Software or individual contributors, as appropriate.
-
- Disclaimer: THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS
- "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE,
- AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH, THE
- SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN, THE SOFTWARE.
- */
-
-
-// Author: Dan Wood, Peter Baumgartner, Mike Abdullah
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark HEADERS
-
-#import "IMBComboTextCell.h"
-#import "IMBComboTableView.h"
-#import "IMBCommon.h"
-#import <Quartz/Quartz.h>
-#import <QTKit/QTKit.h>
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark CONSTANTS
-
-#define IMAGE_INSET 8.0
-#define ASPECT_RATIO 1.5
-#define TITLE_HEIGHT 17.0
-#define INSET_FROM_IMAGE_TO_TEXT 8.0
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark
-
-@implementation IMBComboTextCell
-
-@synthesize imageRepresentation = _imageRepresentation;
-@synthesize imageRepresentationType = _imageRepresentationType;
-@synthesize title = _title;
-@synthesize titleTextAttributes = _titleTextAttributes;
-@synthesize subtitle = _subtitle;
-@synthesize subtitleTextAttributes = _subtitleTextAttributes;
-@synthesize isDisabledFromDragging = _isDisabledFromDragging;
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// Set default text style for title and subtitle...
-
-- (void) initTextAttributes
-{
- NSMutableParagraphStyle* paragraphStyle = [[[NSMutableParagraphStyle
alloc] init] autorelease];
- [paragraphStyle setLineBreakMode:NSLineBreakByTruncatingTail];
-
- NSColor* titleColor = [self textColor];
- NSColor* metadataColor = [[self textColor] colorWithAlphaComponent:0.4];
-
- self.titleTextAttributes = [[[NSMutableDictionary alloc]
initWithObjectsAndKeys:
- titleColor,NSForegroundColorAttributeName,
- [NSFont systemFontOfSize:13.0],NSFontAttributeName,
- paragraphStyle,NSParagraphStyleAttributeName,
- nil] autorelease];
-
- self.subtitleTextAttributes = [[[NSMutableDictionary alloc]
initWithObjectsAndKeys:
- metadataColor,NSForegroundColorAttributeName,
- [NSFont systemFontOfSize:11.0],NSFontAttributeName,
- paragraphStyle,NSParagraphStyleAttributeName,
- nil] autorelease];
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-- (id) initTextCell:(NSString*)inString
-{
- if (self = [super initTextCell:inString])
- {
- [self initTextAttributes];
- }
-
- return self;
-}
-
-
-- (id) initImageCell:(NSImage*)inImage
-{
- if (self = [super initImageCell:inImage])
- {
- [self initTextAttributes];
- }
-
- return self;
-}
-
-
-- (id) initWithCoder:(NSCoder*)inCoder
-{
- if (self = [super initWithCoder:inCoder])
- {
- [self initTextAttributes];
- }
-
- return self;
-}
-
-
-- (void) dealloc
-{
- IMBRelease(_imageRepresentation);
- IMBRelease(_imageRepresentationType);
- IMBRelease(_title);
- IMBRelease(_titleTextAttributes);
- IMBRelease(_subtitle);
- IMBRelease(_subtitleTextAttributes);
-
- [super dealloc];
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-- (id) copyWithZone:(NSZone*)inZone
-{
- IMBComboTextCell* result = [super copyWithZone:inZone];
-
- // Because copyWithZone may use NSCopyObject, we need to implicitly ZERO
out our retained subclass fields
- // in order to prevent them being over-released by the accessor methods
that get implicitly called below.
- // Notice the use of the C-struct style -> avoids using an accessor and
blots out the value completely.
- // This is appropriate because NSCopyObject, if called, has blithely
copied the bits over without retaining...
-
- result->_imageRepresentation = nil;
- result->_title = nil;
- result->_subtitle = nil;
- result->_titleTextAttributes = nil;
- result->_subtitleTextAttributes = nil;
-
- result.imageRepresentation = self.imageRepresentation;
- result.imageRepresentationType = self.imageRepresentationType;
- result.title = self.title;
- result.subtitle = self.subtitle;
- result.titleTextAttributes = self.titleTextAttributes;
- result.subtitleTextAttributes = self.subtitleTextAttributes;
-
- result.isDisabledFromDragging = self.isDisabledFromDragging;
-
- return result;
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark
-#pragma mark Layout
-
-
-- (NSRect) titleRectForBounds:(NSRect)inBounds
-{
- NSRect imageRect = [self imageRectForBounds:inBounds];
-
- NSRect rect = NSInsetRect(inBounds,IMAGE_INSET,IMAGE_INSET);
- rect.origin.x = NSMaxX(imageRect) + INSET_FROM_IMAGE_TO_TEXT;
- rect.origin.y -= 2.0;
- rect.size.width = NSMaxX(inBounds) - INSET_FROM_IMAGE_TO_TEXT -
NSWidth(imageRect) - IMAGE_INSET;
- rect.size.height = TITLE_HEIGHT;
- return rect;
-}
-
-
-- (NSRect) subtitleRectForBounds:(NSRect)inBounds
-{
- NSRect rect = [self titleRectForBounds:inBounds];
- rect.origin.y = NSMaxY(rect);
- rect.size.height = NSHeight(inBounds) - IMAGE_INSET - TITLE_HEIGHT -
IMAGE_INSET;
- return rect;
-}
-
-
-- (NSRect) imageRectForBounds:(NSRect)inBounds
-{
- NSRect rect = NSInsetRect(inBounds,IMAGE_INSET,IMAGE_INSET);
- rect.size.width = round(rect.size.height * ASPECT_RATIO);
- return rect;
-}
-
-
-- (NSRect) imageRectForFrame:(NSRect)inImageFrame
imageWidth:(CGFloat)inWidth imageHeight:(CGFloat)inHeight
-{
- CGFloat f = 1.0;
- if (inWidth > inImageFrame.size.width || inHeight >
inImageFrame.size.height)
- {
- CGFloat fx = inImageFrame.size.width / inWidth;
- CGFloat fy = inImageFrame.size.height / inHeight;
- f = MIN(fx,fy);
- }
-
- CGFloat x0 = NSMidX(inImageFrame);
- CGFloat y0 = NSMidY(inImageFrame);
- CGFloat width = f * inWidth;
- CGFloat height = f * inHeight;
-
- NSRect rect;
- rect.origin.x = round(x0 - 0.5*width);
- rect.origin.y = round(y0 - 0.5*height);
- rect.size.width = round(width);
- rect.size.height = round(height);
-
- return rect;
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark
-#pragma mark Drawing
-
-
-// Please note that we have to temporarily modify the CTM because the
tableview
-// is flipped... You should restore the gstate afterwards
-- (void) willDrawImageInRect:(NSRect)rect context:(CGContextRef)context;
-{
- CGContextSaveGState(context);
- CGContextScaleCTM(context,1.0,-1.0);
- CGContextTranslateCTM(context,0.0,-2.0*rect.origin.y-NSHeight(rect));
-}
-
-
-// Draw a CGImageRef into the specified rect, keeping the aspect ratio of
the image intact. The image will have
-// to be scaled to fit into the rect.
-
-- (void) _drawImage:(CGImageRef)inImage withFrame:(NSRect)inImageRect
-{
- CGFloat width = CGImageGetWidth(inImage);
- CGFloat height = CGImageGetHeight(inImage);
- NSRect rect = [self imageRectForFrame:inImageRect imageWidth:width
imageHeight:height];
-
- CGContextRef context = (CGContextRef) [[NSGraphicsContext
currentContext] graphicsPort];
- [self willDrawImageInRect:rect context:context];
- CGContextSetInterpolationQuality(context, kCGInterpolationHigh); //
artwork is pretty bad if you don't set this.
- CGContextDrawImage(context,NSRectToCGRect(rect),inImage);
- CGContextRestoreGState(context);
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-- (void) drawInteriorWithFrame:(NSRect)inCellFrame inView:(NSView*)inView
-{
- // Get cell layout...
-
- NSRect imageRect = [self imageRectForBounds:inCellFrame];
- NSRect titleRect = [self titleRectForBounds:inCellFrame];
- NSRect subtitleRect = [self subtitleRectForBounds:inCellFrame];
-
- // If the image hasn't been loaded yet, then draw a placeholder frame...
-
- if (self.imageRepresentation == nil)
- {
- NSBezierPath* path = [NSBezierPath bezierPathWithRoundedRect:imageRect
xRadius:8.0 yRadius:8.0];
- [[NSColor colorWithCalibratedWhite:0.0 alpha:0.05] set];
- [path fill];
-
- CGFloat dashes[2] = {8.0,4.0};
- [[NSColor colorWithCalibratedWhite:0.0 alpha:0.15] set];
- [path setLineWidth:2.0];
- [path setLineDash:dashes count:2 phase:0.0];
- [path stroke];
- }
-
- else
- {
- // Draw the thumbnail image (NSImage)...
-
- if ([_imageRepresentationType
isEqualToString:IKImageBrowserNSImageRepresentationType])
- {
- NSImage* image = (NSImage*) _imageRepresentation;
-
- CGFloat width = image.size.width;
- CGFloat height = image.size.height;
- NSRect rect = [self imageRectForFrame:imageRect
imageWidth:width imageHeight:height];
-
- CGContextRef context = (CGContextRef) [[NSGraphicsContext
currentContext] graphicsPort];
- [self willDrawImageInRect:rect context:context];
- [image drawInRect:rect fromRect:NSZeroRect
operation:NSCompositeSourceOver fraction:1.0];
- CGContextRestoreGState(context);
- }
-
- // Draw the thumbnail image (CGImage)...
-
- else if ([_imageRepresentationType
isEqualToString:IKImageBrowserCGImageRepresentationType])
- {
- CGImageRef image = (CGImageRef) _imageRepresentation;
- [self _drawImage:image withFrame:imageRect];
- }
- else if ([_imageRepresentationType
isEqualToString:IKImageBrowserQTMovieRepresentationType]) // QTMovie, we
got quicklook...
- {
- NSLog(@"WHAT TO DO? IKImageBrowserQTMovieRepresentationType,
_imageRepresentation = %@", _imageRepresentation);
- }
- else if ([_imageRepresentationType
isEqualToString:IKImageBrowserQTMoviePathRepresentationType])
- {
- //NSImage *nsImage = [[NSImage alloc]
initWithContentsOfFile:_imageRepresentation];
- //NSBitmapImageRep *imageRep = [[nsImage representations]
objectAtIndex:0];
- //CGImageRef image = [imageRep CGImage];
- //[nsImage release];
- CGImageRef image = (CGImageRef) _imageRepresentation;
-
- [self _drawImage:image withFrame:imageRect];
- }
-
- // Draw the thumbnail image (other representations)...
-
- else
- {
- CGImageRef image = IMB_CGImageCreateWithImageItem(self);
- [self _drawImage:image withFrame:imageRect];
- CFRelease(image);
- }
- }
-
- // Draw the title and subtitle...
-
- [self initTextAttributes];
-
- if (_title)
- {
- [_title drawInRect:titleRect withAttributes:_titleTextAttributes];
- }
-
- if (_subtitle)
- {
- [_subtitle drawInRect:subtitleRect
withAttributes:_subtitleTextAttributes];
- }
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-@end
=======================================
--- /trunk/IMBComboViewTemplate.pdf Thu Feb 10 17:00:06 2011
+++ /dev/null
@@ -1,153 +0,0 @@
-%PDF-1.3
-%Äåòåë§ó ÐÄÆ
-4 0 obj
-<< /Length 5 0 R /Filter /FlateDecode >>
-stream
-x - 1 Â@
- û¼b~ óå DMA Š D„+ ¤pÿ—X;ÈÖ®´ÖŽ V ’Æ ßï“ Æ[7¶
-‡Dß ï
-^ ‚%Þd·æ–e
-óШ W
-gi“Ú$³Ó*; Ì\üÉ®R P Î ×: SP¼>«à דáÉ ±þ ‡ )
-endstream
-endobj
-5 0 obj
-123
-endobj
-2 0 obj
-<< /Type /Page /Parent 3 0 R /Resources 6 0 R /Contents 4 0 R /MediaBox [0
0 16 16]
-/ArtBox [1 3 14 13] >>
-endobj
-6 0 obj
-<< /ProcSet [ /PDF ] /ColorSpace << /Cs1 7 0 R >> /ExtGState << /Gs1 8 0 R
->> >>
-endobj
-8 0 obj
-<< /Type /ExtGState /OPM 1 >>
-endobj
-9 0 obj
-<< /Length 10 0 R /N 3 /Alternate /DeviceRGB /Filter /FlateDecode >>
-stream
-x –wTSÙ ‡Ï½7½Ð " %ô z Ò;H Q‰I€P †„&vD F )VdTÀ G‡"cE
-ƒ‚b× ò PÆÁQDEåÝŒk
ï5óÞšýÇYßÙç·×Ùgï}׺ Pü‚ ÂtX €4¡X îëÁ\ ËÄ÷ X Àáff GøD Ôü½=™™¨HƳöî.€d»Û,¿P&sÖÿ ‘"7C$
-EÕ6<~& å ”S³Å 2ÿ Êô•)2†12 ¡ ¢¬"ãįlö§æ+»É˜—&ä¡ YÎ ¼4žŒ»PÞš%ᣌ ¡\˜%àg£|
e½TIš å÷(ÓÓøœL 0 ™_Ìç&¡l‰2E î‰ò ”Ä9¼r ‹ù9hž x¦gäŠ ‰Ib¦ טiåèÈfúñ³Sùb1+”ÃMáˆxLÏô´
-Ž0 €¯o–E %Ym™h‘í
-ííYÖæhù¿Ùß
-~Sý=ÈzûUñ&ìÏžAŒžYßlì¬/½ ö$Z›
-³¾•U ´m @åá¬Oï ò ´Þœó
-†l^’Äâ
-'
-‹ììls Ÿk.+è7ûŸ‚oÊ¿†9÷™ËîûV;¦ ? #I 3eE妧¦KDÌÌ
- —Ïdý÷ ÿãÀ9iÍÉÃ,œŸÀ ñ
-èUQè” „‰h»
-< X .d
-„ Õá 6' ~ k hu_ }
-9P¸I Èo= C# $n?z }ë[ 1
-Ⱦ¼h‘¯s 2zþçú
-\ŠnáLA"Sæö
- dr%¢, £ß„lÁ t
-4 .0 ,`
-
-€3p Þ „€H – .H i@ ²A>Ø
-A1Ø vƒjp Ô zÐ N‚6p \ WÀ
-p
-
-€G@
-†ÁK0 Þ i ‚ð ¢Aª ¤ ™BÖ Z yCAP8 ÅC‰ ’@ùÐ&¨ *ƒª¡CP=ô#t º ]ƒú Ð
4 ý }„ ˜ Óa
-Ø ¶€Ù°;
- GÂËàDx œ ÀÛáJ¸ > ·Â á ð ,
-_“ @È ÑFX ñDB X$ !k‘"¤ ©Eš ¤ ¹ H‘qä ‡¡a˜ Æ ã‡YŒábVaÖbJ0Õ˜c˜VL æ6f 3 ù‚¥bÕ±¦X'¬?v
6 › -ÄV` `[°—± Øaì;
- ÇÀ â
-p~¸ \2n5® · ׌»€ëÃ
-á&ñx¼*Þ ï‚ Ásðb|!¾
-
-
-ß Æ¿' Z k‚ !– $l$T ç ý„ Â4Q ¨Ot"† yÄ\b)±ŽØA¼I
-&N“ I†$ R$)™´ TIj"]&=&½!“É:dGr Y@^O®$Ÿ _% ’?P”(& OJ
-EBÙN9J¹@y@yC¥R
-¨nÔXª˜º ZO½D}J}/G“3—ó—ãÉ“«‘k•ë—{%O”×—w—_.Ÿ'_! Jþ¦ü¸ QÁ@ÁS £°V¡Fá´Â=
-IEš¢•bˆbšb‰bƒâ5ÅQ%¼’ ’· O©@é°Ò%¥! BÓ¥yÒ¸´M´:ÚeÚ0
-G7¤ûÓ“éÅô è½ô e%e[å(å
-å å³ÊR Â0`ø3R ¥Œ“Œ»Œ ó4æ¹ÏãÏÛ6¯i^ÿ¼)•ù*n*|
•"•f• • ªLUoÕ Õ ªmªOÔ0j&jajÙjûÕ.« ϧÏwžÏ _4ÿäü‡ê°º‰z¸újõÃê=ê“ š ¾ U —4Æ5 šnšÉšåšç4Ç´hZ
-µ ZåZçµ^0•™îÌTf%³‹9¡®í§-Ñ>¤Ý«=c¨³Xg£N³Î ]’.[7A·\·SwBOK/X/_¯Qï¡>QŸŸ¤¿G¿[ ÊÀÐ
Ú`‹A›Á¨¡Š¡¿aža£ác#ª‘«Ñ*£Z£;Æ8c¶qŠñ>ã[&°‰ I’I ÉMSØÔÞT`ºÏ´Ï
-kæh&4«5»Ç¢°ÜYY¬FÖ 9Ã<È|£y›ù+
-=‹X‹ Ý _,í,S-ë, Y)Y Xm´ê°úÃÚÄšk]c}džjãc³Î¦Ý浩-ßv¿í};š]°Ý »N»Ïö ö"û&û1 =‡x‡½ ÷Øtv(»„}Õ ëèá¸ÎñŒã '{'±ÓI§ß YÎ)Î
-Σ
-
- ð Ô- rÑqá¸
-r‘.d.Œ_xp¡ÔUÛ•ãZëúÌM× çvÄmÄÝØ=Ùý¸û+ K ‘G‹Ç”§“ç Ï
-^ˆ—¯W‘W¯·’÷bïjï§>:>‰> > ¾v¾«}/øaý ývúÝó×ðçú×ûO 8 ¬ è
-¤ F V >
-2 u ÃÁ Á»‚ /Ò_$\Ô BüCv
-< 5
-] ús .,4¬&ìy¸Ux~xw -bEDCÄ»H ÈÒÈG‹ K wFÉGÅEÕGME{E—EK—X,Y³äFŒZŒ
¦= {$vr©÷ÒÝK‡ãìâ
-ãî.3\–³ìÚrµå©ËÏ® _ÁYq*
-
-ß ÿ‰ ©åL®ô_¹wå ד»‡û’çÆ+ç ñ]øeü‘ —„²„ÑD—Ä]‰cI®I Iã OAµàu²_ò ä©” ”£)3©Ñ©Íi„´ø´ÓB%aа+]3='½/Ã4£0CºÊiÕîU ¢@Ñ‘L(sYf»˜ŽþLõHŒ$›%ƒY
-³j²ÞgGeŸÊQÌ æôäšänË
-ÉóÉû~5f5wug¾vþ†üÁ5îk
-Ö®\Û¹Nw]Áºáõ¾ë m
mHÙðËFË e ßnŠÞÔQ Q°¾`h³ïæÆB¹BQá½-Î[ lÅl líÝf³jÛ—"^ÑõbËâŠâO%Ü’ëßY}WùÝÌö„í½¥ö¥ûwàv wÜÝéºóX™bY^ÙЮà]åÌò¢ò·»Wì¾Va[q` i d ´2¨²½J¯jGÕ§ê¤ê šæ½ê{·í ÚÇÛ׿ßm Ó Å >
-
-¼ È÷PkAmÅaÜá¬ÃÏë¢êº¿g _ DíHñ‘ÏG
-G¥Ç uÕ;Ô×7¨7”6 ’ƱãqÇoýàõC{ «éP3£¹ø 8!9ñâÇø ïž
-<ÙyŠ}ªé'ýŸö¶ÐZŠZ¡ÖÜÖ‰¶¤6i{L{ßé€Ó
-Î
--?›ÿ|ôŒö™š³ÊgKϑΠœ›9Ÿw~òBÆ
-ñ‹‰ ‡:Wt>º´äÒ ®°®ÞË —¯^ñ¹r©Û½ûüU—«g®9];} }½í†ý Ö
-»ž–_ì~iéµïm½ép³ý–㎾ }çú]û/Þöº}åŽÿ ‹ úî.¾{ÿ^Ü=é}ÞýÑ © ^?Ìz8ýhýcìã¢'
-O*žª?ýÕø×f©½ôì ×`ϳˆg †¸C/ÿ•ù¯Oà ϩÏ+F´FêGGÏŒùŒÝz±ôÅðËŒ—Óã
-¿)þ¶÷•Ñ«Ÿ~wû½gbÉÄðkÑë™?JÞ¨¾9úÖömçdèäÓwi獵ŠÞ«¾?ö ý¡ûcôÇ‘éìOøO•Ÿ ?w|
üòx&mfæß÷„óû
-endstream
-endobj
-10 0 obj
-2612
-endobj
-7 0 obj
-[ /ICCBased 9 0 R ]
-endobj
-3 0 obj
-<< /Type /Pages /MediaBox [0 0 612 792] /Count 1 /Kids [ 2 0 R ] >>
-endobj
-11 0 obj
-<< /Type /Catalog /Pages 3 0 R >>
-endobj
-12 0 obj
-(Basic RGB)
-endobj
-13 0 obj
-(Mac OS X 10.6.6 Quartz PDFContext)
-endobj
-14 0 obj
-(Adobe Illustrator CS3)
-endobj
-15 0 obj
-(D:20110210221759Z00'00')
-endobj
-1 0 obj
-<< /Title 12 0 R /Producer 13 0 R /Creator 14 0 R /CreationDate 15 0 R
/ModDate
-15 0 R >>
-endobj
-xref
-0 16
-0000000000 65535 f
-0000003566 00000 n
-0000000238 00000 n
-0000003271 00000 n
-0000000022 00000 n
-0000000219 00000 n
-0000000360 00000 n
-0000003236 00000 n
-0000000456 00000 n
-0000000501 00000 n
-0000003215 00000 n
-0000003354 00000 n
-0000003404 00000 n
-0000003432 00000 n
-0000003484 00000 n
-0000003524 00000 n
-trailer
-<< /Size 16 /Root 11 0 R /Info 1 0 R /ID [
<9cf1ca18a0083b3237d7a9dddc9a8e27>
-<9cf1ca18a0083b3237d7a9dddc9a8e27> ] >>
-startxref
-3671
-%%EOF
=======================================
--- /trunk/IMBCommon.h Mon Jan 3 15:11:51 2011
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
- iMedia Browser Framework <
http://karelia.com/imedia/>
-
- Copyright (c) 2005-2011 by Karelia Software et al.
-
- iMedia Browser is based on code originally developed by Jason Terhorst,
- further developed for Sandvox by Greg Hulands, Dan Wood, and Terrence
Talbot.
- The new architecture for version 2.0 was developed by Peter Baumgartner.
- Contributions have also been made by Matt Gough, Martin Wennerberg and
others
- as indicated in source files.
-
- The iMedia Browser Framework is licensed under the following terms:
-
- Permission is hereby granted, free of charge, to any person obtaining a
copy
- of this software and associated documentation files (the "Software"), to
deal
- in all or substantial portions of the Software without restriction,
including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
following
- conditions:
-
- Redistributions of source code must retain the original terms stated here,
- including this list of conditions, the disclaimer noted below, and the
- following copyright notice: Copyright (c) 2005-2011 by Karelia Software
et al.
-
- Redistributions in binary form must include, in an end-user-visible
manner,
- e.g., About window, Acknowledgments window, or similar, either a) the
original
- terms stated here, including this list of conditions, the disclaimer noted
- below, and the aforementioned copyright notice, or b) the aforementioned
- copyright notice and a link to
karelia.com/imedia.
-
- Neither the name of Karelia Software, nor Sandvox, nor the names of
- contributors to iMedia Browser may be used to endorse or promote products
- derived from the Software without prior and express written permission
from
- Karelia Software or individual contributors, as appropriate.
-
- Disclaimer: THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS
- "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE,
- AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH, THE
- SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN, THE SOFTWARE.
-*/
-
-
-// Author: Peter Baumgartner
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark CONSTANTS
-
-
-// Options to control behavior of the framework...
-
-enum
-{
- kIMBOptionNone = 0,
- kIMBOptionForceRecursiveLoading = 1
-};
-typedef NSUInteger IMBOptions;
-
-
-// File watcher type for an IMBNode...
-
-enum
-{
- kIMBWatcherTypeNone,
- kIMBWatcherTypeKQueue,
- kIMBWatcherTypeFSEvent,
- kIMBWatcherTypeFirstCustom = 1000
-};
-typedef NSUInteger IMBWatcherType;
-
-
-// Badge type for IMBNode. A corresponding icon will be displayed in the
cell...
-
-enum
-{
- kIMBBadgeTypeNone,
- kIMBBadgeTypeLoading,
- kIMBBadgeTypeReload,
- kIMBBadgeTypeStop,
- kIMBBadgeTypeEject,
- kIMBBadgeTypeOffline
-};
-typedef NSUInteger IMBBadgeType;
-
-
-// Media types...
-
-extern NSString* kIMBMediaTypeImage;
-extern NSString* kIMBMediaTypeAudio;
-extern NSString* kIMBMediaTypeMovie;
-extern NSString* kIMBMediaTypeLink;
-extern NSString* kIMBMediaTypeContact;
-
-
-// Group types...
-
-enum
-{
- kIMBGroupTypeLibrary,
- kIMBGroupTypeFolder,
- kIMBGroupTypeSearches,
- kIMBGroupTypeInternet,
- kIMBGroupTypeDevice,
- kIMBGroupTypeNone
-};
-typedef NSUInteger IMBGroupType;
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// User Interface constants...
-
-#define kIMBMaxThumbnailSize 256.0
-
-// Common error codes...
-
-#define kIMBErrorDomain @"com.karelia.imedia"
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark MACROS
-
-#ifndef IMBRelease
-#define IMBRelease(object) if (object) {[object release]; object=nil;}
-#endif
-
-#ifndef IMBDrain
-#define IMBDrain(pool) if (pool) {[pool drain]; pool=nil;}
-#endif
-
-#ifndef IMBBundle
-#define IMBBundle() [NSBundle
bundleForClass:NSClassFromString(@"IMBConfig")]
-#endif
-
-
-// Version checks in a centralized location for easy safe-adoption of
features conditional on running OS version
-
-#ifndef NSAppKitVersionNumber10_6
-#define NSAppKitVersionNumber10_6 1000 // NOTE(jalkut): I don't think this
is exactly right, my 10.6.1 system reports 1038.1,
- // but it's "good enough" in that it's higher than 10.5's
version of 949.x,
- // and it was the constant already in use in the source code.
- // (I'm guessing it was a pre-GM Snow Leopard version number)
-#endif
-
-#define IMBRunningOnSnowLeopardOrNewer() (NSAppKitVersionNumber >=
NSAppKitVersionNumber10_6)
-#define IMB_COMPILING_WITH_SNOW_LEOPARD_OR_NEWER_SDK
defined(MAC_OS_X_VERSION_10_6)
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// We have to declare a fake prototypes because the 10.6 runtime
interrogates our compliance with the protocol,
-// rather that interrogating the presence of the particular method we
implement...
-
-#if ! IMB_COMPILING_WITH_SNOW_LEOPARD_OR_NEWER_SDK
-
-@protocol NSPasteboardItemDataProvider <NSObject>
-@end
-
-@protocol QLPreviewPanelDelegate <NSObject>
-@end
-
-@protocol QLPreviewPanelDataSource <NSObject>
-@end
-
-@protocol NSAnimationDelegate <NSObject>
-@end
-
-#endif
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// Flickr sizes
-
-typedef enum {
- kIMBFlickrSizeSpecifierOriginal = 0,
- kIMBFlickrSizeSpecifierSmall, // 240 longest
- kIMBFlickrSizeSpecifierMedium, // 500 longest
- kIMBFlickrSizeSpecifierLarge // 1024 longest
-}
-IMBFlickrSizeSpecifier;
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-
=======================================
--- /trunk/IMBCommon.m Mon Jan 3 15:11:51 2011
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- iMedia Browser Framework <
http://karelia.com/imedia/>
-
- Copyright (c) 2005-2011 by Karelia Software et al.
-
- iMedia Browser is based on code originally developed by Jason Terhorst,
- further developed for Sandvox by Greg Hulands, Dan Wood, and Terrence
Talbot.
- The new architecture for version 2.0 was developed by Peter Baumgartner.
- Contributions have also been made by Matt Gough, Martin Wennerberg and
others
- as indicated in source files.
-
- The iMedia Browser Framework is licensed under the following terms:
-
- Permission is hereby granted, free of charge, to any person obtaining a
copy
- of this software and associated documentation files (the "Software"), to
deal
- in all or substantial portions of the Software without restriction,
including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
following
- conditions:
-
- Redistributions of source code must retain the original terms stated here,
- including this list of conditions, the disclaimer noted below, and the
- following copyright notice: Copyright (c) 2005-2011 by Karelia Software
et al.
-
- Redistributions in binary form must include, in an end-user-visible
manner,
- e.g., About window, Acknowledgments window, or similar, either a) the
original
- terms stated here, including this list of conditions, the disclaimer noted
- below, and the aforementioned copyright notice, or b) the aforementioned
- copyright notice and a link to
karelia.com/imedia.
-
- Neither the name of Karelia Software, nor Sandvox, nor the names of
- contributors to iMedia Browser may be used to endorse or promote products
- derived from the Software without prior and express written permission
from
- Karelia Software or individual contributors, as appropriate.
-
- Disclaimer: THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS
- "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE,
- AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH, THE
- SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN, THE SOFTWARE.
-*/
-
-
-// Author: Peter Baumgartner
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark CONSTANTS
-
-// Media types...
-
-NSString* kIMBMediaTypeImage = @"image";
-NSString* kIMBMediaTypeAudio = @"audio";
-NSString* kIMBMediaTypeMovie = @"movie";
-NSString* kIMBMediaTypeLink = @"link";
-NSString* kIMBMediaTypeContact = @"contact";
-
-
-//----------------------------------------------------------------------------------------------------------------------
=======================================
--- /trunk/IMBConfig.h Fri Mar 11 02:45:49 2011
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- iMedia Browser Framework <
http://karelia.com/imedia/>
-
- Copyright (c) 2005-2011 by Karelia Software et al.
-
- iMedia Browser is based on code originally developed by Jason Terhorst,
- further developed for Sandvox by Greg Hulands, Dan Wood, and Terrence
Talbot.
- The new architecture for version 2.0 was developed by Peter Baumgartner.
- Contributions have also been made by Matt Gough, Martin Wennerberg and
others
- as indicated in source files.
-
- The iMedia Browser Framework is licensed under the following terms:
-
- Permission is hereby granted, free of charge, to any person obtaining a
copy
- of this software and associated documentation files (the "Software"), to
deal
- in all or substantial portions of the Software without restriction,
including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
following
- conditions:
-
- Redistributions of source code must retain the original terms stated here,
- including this list of conditions, the disclaimer noted below, and the
- following copyright notice: Copyright (c) 2005-2011 by Karelia Software
et al.
-
- Redistributions in binary form must include, in an end-user-visible
manner,
- e.g., About window, Acknowledgments window, or similar, either a) the
original
- terms stated here, including this list of conditions, the disclaimer noted
- below, and the aforementioned copyright notice, or b) the aforementioned
- copyright notice and a link to
karelia.com/imedia.
-
- Neither the name of Karelia Software, nor Sandvox, nor the names of
- contributors to iMedia Browser may be used to endorse or promote products
- derived from the Software without prior and express written permission
from
- Karelia Software or individual contributors, as appropriate.
-
- Disclaimer: THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS
- "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE,
- AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH, THE
- SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN, THE SOFTWARE.
-*/
-
-
-// Author: Peter Baumgartner
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-@interface IMBConfig : NSObject
-
-// Low-level accessors for iMedia preferences...
-
-+ (void) registerDefaultPrefsValue:(id)inValue forKey:(NSString*)inKey;
-+ (void) setPrefsValue:(id)inValue forKey:(NSString*)inKey;
-+ (id) prefsValueForKey:(NSString*)inKey;
-
-// Class specific accessors for iMedia preferences (use these methods from
iMedia controller classes)...
-
-+ (void) registerDefaultPrefs:(NSMutableDictionary*)inClassDict
forClass:(Class)inClass;
-+ (void) setPrefs:(NSMutableDictionary*)inClassDict
forClass:(Class)inClass;
-+ (NSMutableDictionary*) prefsForClass:(Class)inClass;
-
-// Determines whether Group labels are visible in the node view
(IMBOutlineView)...
-
-+ (void) setShowsGroupNodes:(BOOL)inState;
-+ (BOOL) showsGroupNodes;
-
-// Determines whether all mediaType share the same viewType state, or
whether each keeps its own state...
-
-+ (void) setUseGlobalViewType:(BOOL)inGlobalViewType;
-+ (BOOL) useGlobalViewType;
-
-// Sets the global view type
-
-+ (void) setGlobalViewType:(NSNumber*)inViewType;
-+ (NSNumber*) globalViewType;
-
-// Sets path for the download folder for remote IMBObjects (e.g. from
Flickr or camera devices)...
-
-+ (void) setDownloadFolderPath:(NSString*)inPath;
-+ (NSString*) downloadFolderPath;
-
-// Flickr downloaded size preference
-
-+ (void) setFlickrDownloadSize:(IMBFlickrSizeSpecifier)inFlickrSize;
-+ (IMBFlickrSizeSpecifier) flickrDownloadSize;
-
-// Path for external editor and viewer apps...
-
-+ (void) setViewerApp:(NSString*)inAppPath
forMediaType:(NSString*)inMediaType;
-+ (NSString*) viewerAppForMediaType:(NSString*)inMediaType;
-
-+ (void) setEditorApp:(NSString*)inAppPath
forMediaType:(NSString*)inMediaType;
-+ (NSString*) editorAppForMediaType:(NSString*)inMediaType;
-
-// Library Paths
-
-+ (void)registerLibraryPath:(NSString *)aPath;
-+ (BOOL) isLibraryPath:(NSString *)aPath;
-
-
-// Set default prefs values...
-
-+ (void) registerDefaultValues;
-
-
-@end
-
-
-//----------------------------------------------------------------------------------------------------------------------
=======================================
--- /trunk/IMBConfig.m Fri Mar 11 02:45:49 2011
+++ /dev/null
@@ -1,339 +0,0 @@
-/*
- iMedia Browser Framework <
http://karelia.com/imedia/>
-
- Copyright (c) 2005-2011 by Karelia Software et al.
-
- iMedia Browser is based on code originally developed by Jason Terhorst,
- further developed for Sandvox by Greg Hulands, Dan Wood, and Terrence
Talbot.
- The new architecture for version 2.0 was developed by Peter Baumgartner.
- Contributions have also been made by Matt Gough, Martin Wennerberg and
others
- as indicated in source files.
-
- The iMedia Browser Framework is licensed under the following terms:
-
- Permission is hereby granted, free of charge, to any person obtaining a
copy
- of this software and associated documentation files (the "Software"), to
deal
- in all or substantial portions of the Software without restriction,
including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
following
- conditions:
-
- Redistributions of source code must retain the original terms stated here,
- including this list of conditions, the disclaimer noted below, and the
- following copyright notice: Copyright (c) 2005-2011 by Karelia Software
et al.
-
- Redistributions in binary form must include, in an end-user-visible
manner,
- e.g., About window, Acknowledgments window, or similar, either a) the
original
- terms stated here, including this list of conditions, the disclaimer noted
- below, and the aforementioned copyright notice, or b) the aforementioned
- copyright notice and a link to
karelia.com/imedia.
-
- Neither the name of Karelia Software, nor Sandvox, nor the names of
- contributors to iMedia Browser may be used to endorse or promote products
- derived from the Software without prior and express written permission
from
- Karelia Software or individual contributors, as appropriate.
-
- Disclaimer: THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS
- "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE,
- AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH, THE
- SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN, THE SOFTWARE.
-*/
-
-
-// Author: Peter Baumgartner
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark HEADERS
-
-#import "IMBConfig.h"
-#import "IMBCommon.h"
-#import "NSWorkspace+iMedia.h"
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark CONSTANTS
-
-static NSString* sIMBPrefsKeyFormat = @"iMedia2_%@";
-static NSString* sIMBShowsGroupNodesKey = @"showsGroupNodes";
-//static NSString* sIMBUseGlobalViewTypeKey = @"useGlobalViewType";
-static NSString* sIMBDownloadFolderPathKey = @"downloadFolderPath";
-static NSString* sIMBViewerAppPathsKey = @"viewerAppPaths";
-static NSString* sIMBEditorAppPathsKey = @"editorAppPaths";
-static NSString* sIMBFlickrDownloadSizeKey = @"flickrDownloadSize";
-
-static BOOL sUseGlobalViewType = NO;
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark
-
-@implementation IMBConfig
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// Low level accessors for preferences values...
-
-+ (void) registerDefaultPrefsValue:(id)inValue forKey:(NSString*)inKey
-{
- NSString* key = [NSString stringWithFormat:sIMBPrefsKeyFormat,inKey];
- NSDictionary* defaults = [NSDictionary
dictionaryWithObjectsAndKeys:inValue,key,nil];
- [[NSUserDefaults standardUserDefaults] registerDefaults:defaults];
-}
-
-
-+ (void) setPrefsValue:(id)inValue forKey:(NSString*)inKey
-{
- NSString* key = [NSString stringWithFormat:sIMBPrefsKeyFormat,inKey];
-
- if (inValue)
- [[NSUserDefaults standardUserDefaults] setObject:inValue forKey:key];
- else
- [[NSUserDefaults standardUserDefaults] removeObjectForKey:key];
-}
-
-
-+ (id) prefsValueForKey:(NSString*)inKey
-{
- NSString* key = [NSString stringWithFormat:sIMBPrefsKeyFormat,inKey];
- return [[NSUserDefaults standardUserDefaults] objectForKey:key];
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// Store the specified dictionary in the iMedia section of the preferences
under its class name...
-
-+ (void) registerDefaultPrefs:(NSMutableDictionary*)inClassDict
forClass:(Class)inClass
-{
- [self registerDefaultPrefsValue:inClassDict
forKey:NSStringFromClass(inClass)];
-}
-
-
-// Store the specified dictionary in the iMedia section of the preferences
under its class name...
-
-+ (void) setPrefs:(NSMutableDictionary*)inClassDict forClass:(Class)inClass
-{
- [self setPrefsValue:inClassDict forKey:NSStringFromClass(inClass)];
-}
-
-
-// Return a mutable copy of the class specific preference dictionary. If
it doesn't exist yet, then return an
-// empty dictionary...
-
-+ (NSMutableDictionary*) prefsForClass:(Class)inClass
-{
- return [NSMutableDictionary dictionaryWithDictionary:[self
prefsValueForKey:NSStringFromClass(inClass)]];
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// Determines whether the group nodes (LIBRARIES, FOLDERS, INTERNET,
DEVICES) are visible in the outline view...
-
-+ (void) setShowsGroupNodes:(BOOL)inState
-{
- [self setPrefsValue:[NSNumber numberWithBool:inState]
forKey:sIMBShowsGroupNodesKey];
-}
-
-
-+ (BOOL) showsGroupNodes
-{
- return [[self prefsValueForKey:sIMBShowsGroupNodesKey] boolValue];
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-+ (void) setUseGlobalViewType:(BOOL)inState
-{
- sUseGlobalViewType = inState;
-}
-
-
-+ (BOOL) useGlobalViewType
-{
- return sUseGlobalViewType;
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// Make global view type preference value an observable property
-
-+ (void) setGlobalViewType:(NSNumber*)viewType
-{
- NSString* key = @"globalViewType";
- [self willChangeValueForKey:key];
- [self setPrefsValue:viewType forKey:key];
- [self didChangeValueForKey:key];
-}
-
-
-+ (NSNumber*) globalViewType
-{
- return (NSNumber*) [self prefsValueForKey:@"globalViewType"];
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// Sets the path to the download folder. Default is ~/Downloads...
-
-+ (void) setDownloadFolderPath:(NSString*)inPath
-{
- [self setPrefsValue:inPath forKey:sIMBDownloadFolderPathKey];
-}
-
-
-+ (NSString*) downloadFolderPath
-{
- return [self prefsValueForKey:sIMBDownloadFolderPathKey];
-}
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-+ (void) setFlickrDownloadSize:(IMBFlickrSizeSpecifier)inFlickrSize;
-{
- [self setPrefsValue:[NSNumber numberWithInt:inFlickrSize]
forKey:sIMBFlickrDownloadSizeKey];
-}
-
-
-+ (IMBFlickrSizeSpecifier) flickrDownloadSize
-{
- return [[self prefsValueForKey:sIMBFlickrDownloadSizeKey] intValue];
-}
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// Path to an external viewer app. Defaults to Preview for images and
QuickTime Player for audio/video content...
-
-+ (void) setViewerApp:(NSString*)inAppPath
forMediaType:(NSString*)inMediaType
-{
- NSMutableDictionary* viewerAppPaths = [NSMutableDictionary
dictionaryWithDictionary:[self prefsValueForKey:sIMBViewerAppPathsKey]];
- if (inAppPath) [viewerAppPaths setObject:inAppPath forKey:inMediaType];
- [self setPrefsValue:viewerAppPaths forKey:sIMBViewerAppPathsKey];
-}
-
-
-+ (NSString*) viewerAppForMediaType:(NSString*)inMediaType
-{
- NSDictionary* viewerAppPaths = [self
prefsValueForKey:sIMBViewerAppPathsKey];
- return [viewerAppPaths objectForKey:inMediaType];
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// Path to an external editor app. May not be available for all media
types...
-
-+ (void) setEditorApp:(NSString*)inAppPath
forMediaType:(NSString*)inMediaType
-{
- NSMutableDictionary* editorAppPaths = [NSMutableDictionary
dictionaryWithDictionary:[self prefsValueForKey:sIMBEditorAppPathsKey]];
- if (inAppPath) [editorAppPaths setObject:inAppPath forKey:inMediaType];
- [self setPrefsValue:editorAppPaths forKey:sIMBEditorAppPathsKey];
-}
-
-
-+ (NSString*) editorAppForMediaType:(NSString*)inMediaType
-{
- NSDictionary* editorAppPaths = [self
prefsValueForKey:sIMBEditorAppPathsKey];
- return [editorAppPaths objectForKey:inMediaType];
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// Set default preferences values...
-
-+ (void) registerDefaultValues
-{
- NSString* path = [NSHomeDirectory()
stringByAppendingPathComponent:@"Downloads"]; // brute force fallback
- NSArray* paths =
NSSearchPathForDirectoriesInDomains(NSDownloadsDirectory,NSUserDomainMask,YES);
- if ([paths count] > 0) path = [paths objectAtIndex:0];
-
- [self registerDefaultPrefsValue:[NSNumber numberWithBool:YES]
forKey:sIMBShowsGroupNodesKey];
- [self registerDefaultPrefsValue:path forKey:sIMBDownloadFolderPathKey];
- [self registerDefaultPrefsValue:[NSNumber
numberWithInt:kIMBFlickrSizeSpecifierLarge]
forKey:sIMBFlickrDownloadSizeKey];
-
- NSString* preview = [[NSWorkspace imb_threadSafeWorkspace]
absolutePathForAppBundleWithIdentifier:@"com.apple.Preview"];
- NSString* qtplayerx = [[NSWorkspace imb_threadSafeWorkspace]
absolutePathForAppBundleWithIdentifier:@"com.apple.QuickTimePlayerX"];
- NSString* safari = [[NSWorkspace imb_threadSafeWorkspace]
absolutePathForAppBundleWithIdentifier:@"com.apple.Safari"];
- NSString* addressbook = [[NSWorkspace imb_threadSafeWorkspace]
absolutePathForAppBundleWithIdentifier:@"com.apple.AddressBook"];
- NSString* photoshop = [[NSWorkspace imb_threadSafeWorkspace]
absolutePathForAppBundleWithIdentifier:@"com.adobe.Photoshop"];
-
- NSMutableDictionary* viewerAppPaths = [NSMutableDictionary dictionary];
- if (preview) [viewerAppPaths setObject:preview forKey:kIMBMediaTypeImage];
- if (qtplayerx) [viewerAppPaths setObject:qtplayerx
forKey:kIMBMediaTypeAudio];
- if (qtplayerx) [viewerAppPaths setObject:qtplayerx
forKey:kIMBMediaTypeMovie];
- if (safari) [viewerAppPaths setObject:safari forKey:kIMBMediaTypeLink];
- if (addressbook) [viewerAppPaths setObject:addressbook
forKey:kIMBMediaTypeContact];
- [self registerDefaultPrefsValue:viewerAppPaths
forKey:sIMBViewerAppPathsKey];
-
- NSMutableDictionary* editorAppPaths = [NSMutableDictionary dictionary];
- if (photoshop) [editorAppPaths setObject:photoshop
forKey:kIMBMediaTypeImage];
- [self registerDefaultPrefsValue:editorAppPaths
forKey:sIMBEditorAppPathsKey];
-}
-
-+ (void)load // register default values automatically
-{
- NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
- [self registerDefaultValues];
- [pool drain];
-}
-
-//----------------------------------------------------------------------------------------------------------------------
-
-/*
- Library paths. Each parser should register any path of a library that it
uses, so that other parser
- (e.g. folder parser, spotlight parser, etc.) can exclude that path from
showing up in the source list.
-
- */
-
-static NSMutableSet *sLibraryPaths = nil;
-
-+ (void)registerLibraryPath:(NSString *)aPath
-{
- if (nil == sLibraryPaths)
- {
- sLibraryPaths = [NSMutableSet new];
- }
- [sLibraryPaths addObject:aPath];
-}
-
-+ (BOOL) isLibraryPath:(NSString *)aPath
-{
- return [sLibraryPaths containsObject:aPath];
-}
-
-// Future: We may need a method that loops through the library paths and
asks if the given
-// path is a subpath of any of these paths.
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-
-@end
-
=======================================
--- /trunk/IMBDisableTitleToColorTransformer.h Mon Jan 3 15:11:51 2011
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- iMedia Browser Framework <
http://karelia.com/imedia/>
-
- Copyright (c) 2005-2011 by Karelia Software et al.
-
- iMedia Browser is based on code originally developed by Jason Terhorst,
- further developed for Sandvox by Greg Hulands, Dan Wood, and Terrence
Talbot.
- The new architecture for version 2.0 was developed by Peter Baumgartner.
- Contributions have also been made by Matt Gough, Martin Wennerberg and
others
- as indicated in source files.
-
- The iMedia Browser Framework is licensed under the following terms:
-
- Permission is hereby granted, free of charge, to any person obtaining a
copy
- of this software and associated documentation files (the "Software"), to
deal
- in all or substantial portions of the Software without restriction,
including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
following
- conditions:
-
- Redistributions of source code must retain the original terms stated here,
- including this list of conditions, the disclaimer noted below, and the
- following copyright notice: Copyright (c) 2005-2011 by Karelia Software
et al.
-
- Redistributions in binary form must include, in an end-user-visible
manner,
- e.g., About window, Acknowledgments window, or similar, either a) the
original
- terms stated here, including this list of conditions, the disclaimer noted
- below, and the aforementioned copyright notice, or b) the aforementioned
- copyright notice and a link to
karelia.com/imedia.
-
- Neither the name of Karelia Software, nor Sandvox, nor the names of
- contributors to iMedia Browser may be used to endorse or promote products
- derived from the Software without prior and express written permission
from
- Karelia Software or individual contributors, as appropriate.
-
- Disclaimer: THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS
- "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE,
- AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH, THE
- SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN, THE SOFTWARE.
- */
-
-
-// Author: Dan Wood
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-#import <Cocoa/Cocoa.h>
-
-
-@interface IMBDisableTitleToColorTransformer : NSValueTransformer {
-
-}
-
-+ (void) setTextColor:(NSColor*)inColor;
-
-@end
=======================================
--- /trunk/IMBDisableTitleToColorTransformer.m Mon Jan 3 15:11:51 2011
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- iMedia Browser Framework <
http://karelia.com/imedia/>
-
- Copyright (c) 2005-2011 by Karelia Software et al.
-
- iMedia Browser is based on code originally developed by Jason Terhorst,
- further developed for Sandvox by Greg Hulands, Dan Wood, and Terrence
Talbot.
- The new architecture for version 2.0 was developed by Peter Baumgartner.
- Contributions have also been made by Matt Gough, Martin Wennerberg and
others
- as indicated in source files.
-
- The iMedia Browser Framework is licensed under the following terms:
-
- Permission is hereby granted, free of charge, to any person obtaining a
copy
- of this software and associated documentation files (the "Software"), to
deal
- in all or substantial portions of the Software without restriction,
including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
following
- conditions:
-
- Redistributions of source code must retain the original terms stated here,
- including this list of conditions, the disclaimer noted below, and the
- following copyright notice: Copyright (c) 2005-2011 by Karelia Software
et al.
-
- Redistributions in binary form must include, in an end-user-visible
manner,
- e.g., About window, Acknowledgments window, or similar, either a) the
original
- terms stated here, including this list of conditions, the disclaimer noted
- below, and the aforementioned copyright notice, or b) the aforementioned
- copyright notice and a link to
karelia.com/imedia.
-
- Neither the name of Karelia Software, nor Sandvox, nor the names of
- contributors to iMedia Browser may be used to endorse or promote products
- derived from the Software without prior and express written permission
from
- Karelia Software or individual contributors, as appropriate.
-
- Disclaimer: THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS
- "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE,
- AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH, THE
- SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN, THE SOFTWARE.
-*/
-
-// Author: Dan Wood
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark HEADERS
-
-#import "IMBDisableTitleToColorTransformer.h"
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark GLOBALS
-
-static NSColor* sTextColor;
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-@implementation IMBDisableTitleToColorTransformer
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// Register the transformer...
-
-+ (void) load
-{
- NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
- IMBDisableTitleToColorTransformer* transformer =
[[IMBDisableTitleToColorTransformer alloc] init];
- [NSValueTransformer setValueTransformer:transformer
forName:NSStringFromClass(self)];
- [transformer release];
- [pool drain];
-
- [self setTextColor:[NSColor blackColor]];
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-+ (Class) transformedValueClass
-{
- return [NSColor class];
-}
-
-
-+ (BOOL) allowsReverseTransformation
-{
- return NO;
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// Convert from Bool NSNumber to NSColor...
-
-- (id) transformedValue:(id)inValue
-{
- id result = nil;
-
- if (inValue)
- {
- if ([inValue isKindOfClass:[NSNumber class]])
- {
- BOOL value = [inValue boolValue];
-// result = value ? [NSColor grayColor] : [NSColor blackColor];
- result = value ? [sTextColor colorWithAlphaComponent:0.4] : sTextColor;
- }
- }
-
- return result;
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// Store the base text color...
-
-+ (void) setTextColor:(NSColor*)inColor
-{
- NSColor* old = sTextColor;
- sTextColor = [inColor retain];
- [old release];
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-@end
-
=======================================
--- /trunk/IMBDynamicTableView.h Mon Jan 3 15:11:51 2011
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- iMedia Browser Framework <
http://karelia.com/imedia/>
-
- Copyright (c) 2005-2011 by Karelia Software et al.
-
- iMedia Browser is based on code originally developed by Jason Terhorst,
- further developed for Sandvox by Greg Hulands, Dan Wood, and Terrence
Talbot.
- The new architecture for version 2.0 was developed by Peter Baumgartner.
- Contributions have also been made by Matt Gough, Martin Wennerberg and
others
- as indicated in source files.
-
- The iMedia Browser Framework is licensed under the following terms:
-
- Permission is hereby granted, free of charge, to any person obtaining a
copy
- of this software and associated documentation files (the "Software"), to
deal
- in all or substantial portions of the Software without restriction,
including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
following
- conditions:
-
- Redistributions of source code must retain the original terms stated here,
- including this list of conditions, the disclaimer noted below, and the
- following copyright notice: Copyright (c) 2005-2011 by Karelia Software
et al.
-
- Redistributions in binary form must include, in an end-user-visible
manner,
- e.g., About window, Acknowledgments window, or similar, either a) the
original
- terms stated here, including this list of conditions, the disclaimer noted
- below, and the aforementioned copyright notice, or b) the aforementioned
- copyright notice and a link to
karelia.com/imedia.
-
- Neither the name of Karelia Software, nor Sandvox, nor the names of
- contributors to iMedia Browser may be used to endorse or promote products
- derived from the Software without prior and express written permission
from
- Karelia Software or individual contributors, as appropriate.
-
- Disclaimer: THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS
- "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE,
- AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH, THE
- SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN, THE SOFTWARE.
-*/
-
-
-// Author: Dan Wood
-
-
-#import <Cocoa/Cocoa.h>
-#import "IMBTableView.h"
-
-// Forward declaration:
-@protocol IMBDynamicTableViewDelegate;
-
-@interface IMBDynamicTableView : IMBTableView
-{
-
-@private
- // The _visibleRows is a cache of the rows that are currently displaying.
We inform the delegate when they change
- NSRange _visibleRows;
- // _viewsInVisibleRows is a record of the views that we are currently
displaying. The key is an NSNumber with the row index. We only ever keep
track of views that are in our _visibleRows, and remove others that aren't
seen.
- NSMutableDictionary *_viewsInVisibleRows;
- BOOL _viewsNeedUpdate;
-
-}
-
-- (BOOL)wantsThumbnails;
-
-@property(assign) id <IMBDynamicTableViewDelegate> delegate;
-
-@end
-
-// If you are getting duplicate protocol declaration warnings because you
already declare dummy
-// compatibility protocols in your host application, just make sure
IMB_HOST_APP_DECLARES_DUMMY_PROTOCOLS
-// is defined and non-zero, to prevent this redundant definition of the
same protocol.
-#if !IMB_HOST_APP_DECLARES_DUMMY_PROTOCOLS
-#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_5
-@protocol NSTableViewDelegate <NSObject> @end
-#endif
-#endif
-
-// We declare some extra protocol messages to let the delegate know when
the visible rows are changing.
-// It is important to create a delegate signature that will not conflict
with standard Cocoa delegate signatures. In short, that means don't use the
prefix "tableView:".
-@protocol IMBDynamicTableViewDelegate <NSTableViewDelegate>
-@optional
-
-// We want to give the delegate a change to pre-load things given a new
visible row set. In addition, it could stop loading previous things that
have scrolled off screen and weren't fully loaded yet.
-- (void)dynamicTableView:(IMBDynamicTableView *)tableView
changedVisibleRowsFromRange:(NSRange)oldVisibleRows
toRange:(NSRange)newVisibleRows;
-
-// Allows the delegate to give a custom view back for a particular row.
The view's frame should be properly set based on the rectOfRow:. This could
easily be extended to a row/column matrix.
-- (NSView *)dynamicTableView:(IMBDynamicTableView *)tableView
viewForRow:(NSInteger)row;
-
-// Allows advanced cell editing to easily be supported by the delegate.
propertyName is the name of the property that was edited by the advanced
cell editor.
-- (void)dynamicTableView:(IMBDynamicTableView *)tableView
setObjectValue:(id)object forTableColumn:(NSTableColumn *)tableColumn
row:(NSInteger)row property:(NSString *)propertyName;
-
-@end
-
=======================================
--- /trunk/IMBDynamicTableView.m Mon Mar 28 21:44:49 2011
+++ /dev/null
@@ -1,270 +0,0 @@
-/*
- iMedia Browser Framework <
http://karelia.com/imedia/>
-
- Copyright (c) 2005-2011 by Karelia Software et al.
-
- iMedia Browser is based on code originally developed by Jason Terhorst,
- further developed for Sandvox by Greg Hulands, Dan Wood, and Terrence
Talbot.
- The new architecture for version 2.0 was developed by Peter Baumgartner.
- Contributions have also been made by Matt Gough, Martin Wennerberg and
others
- as indicated in source files.
-
- The iMedia Browser Framework is licensed under the following terms:
-
- Permission is hereby granted, free of charge, to any person obtaining a
copy
- of this software and associated documentation files (the "Software"), to
deal
- in all or substantial portions of the Software without restriction,
including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
following
- conditions:
-
- Redistributions of source code must retain the original terms stated here,
- including this list of conditions, the disclaimer noted below, and the
- following copyright notice: Copyright (c) 2005-2011 by Karelia Software
et al.
-
- Redistributions in binary form must include, in an end-user-visible
manner,
- e.g., About window, Acknowledgments window, or similar, either a) the
original
- terms stated here, including this list of conditions, the disclaimer noted
- below, and the aforementioned copyright notice, or b) the aforementioned
- copyright notice and a link to
karelia.com/imedia.
-
- Neither the name of Karelia Software, nor Sandvox, nor the names of
- contributors to iMedia Browser may be used to endorse or promote products
- derived from the Software without prior and express written permission
from
- Karelia Software or individual contributors, as appropriate.
-
- Disclaimer: THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS
- "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE,
- AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH, THE
- SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN, THE SOFTWARE.
- */
-
-
-// Author: Dan Wood
-
-
-#import "IMBDynamicTableView.h"
-#import "IMBCommon.h"
-
-@interface NSTableView(NotPublicSoThisMightBeAProblemForTheMAS)
-// Define this so we can call through to super, for when we are running
Snow Leopard
-- (void)reloadDataForRowIndexes:(NSIndexSet *)rowIndexes
columnIndexes:(NSIndexSet *)columnIndexes;
-@end
-
-@interface IMBDynamicTableView()
-
-- (void)_removeCachedViewForRow:(NSInteger)row;
-- (void)_removeCachedViewsInIndexSet:(NSIndexSet *)rowIndexes;
-
-@end
-
-@implementation IMBDynamicTableView
-
-@dynamic delegate;
-
-- (id)initWithCoder:(NSCoder *)coder
-{
- self = [super initWithCoder:coder];
- return self;
-}
-
-- (void)dealloc
-{
- [_viewsInVisibleRows release];
- _viewsInVisibleRows = nil;
- [super dealloc];
-}
-
-- (BOOL)wantsThumbnails;
-{
- return NO; // subclass can override.
-}
-
-- (void)_ensureVisibleRowsIsCreated
-{
- if (_viewsInVisibleRows == nil)
- {
- _viewsInVisibleRows = [NSMutableDictionary new];
- }
-}
-
-- (void)viewWillDraw
-{
- // We have to call super first in case the NSTableView does some
layout in -viewWillDraw
- [super viewWillDraw];
-
- // Calculate the new visible rows and let the delegate do any extra
work it wants to
- NSRange newVisibleRows = [self rowsInRect:self.visibleRect];
- BOOL visibleRowsNeedsUpdate = !NSEqualRanges(newVisibleRows,
_visibleRows);
- NSRange oldVisibleRows = _visibleRows;
- if (visibleRowsNeedsUpdate)
- {
- _visibleRows = newVisibleRows;
- // Give the delegate a chance to do any pre-loading or special
work that it wants to do
- if ([[self delegate]
respondsToSelector:@selector(dynamicTableView:changedVisibleRowsFromRange:toRange:)])
- {
- [[self delegate] dynamicTableView:self
changedVisibleRowsFromRange:oldVisibleRows toRange:newVisibleRows];
- }
- // We always have to update our views if the visible area changed
- _viewsNeedUpdate = YES;
- }
-
- if (_viewsNeedUpdate)
- {
- _viewsNeedUpdate = NO;
- // Update any views that the delegate wants to give us
- if ([[self delegate]
respondsToSelector:@selector(dynamicTableView:viewForRow:)])
- {
-
- if (visibleRowsNeedsUpdate)
- {
- // First, remove any views that are no longer before our
new visible rows
- NSMutableIndexSet *rowIndexesToRemove = [NSMutableIndexSet
indexSetWithIndexesInRange:oldVisibleRows];
- // Remove any rows from the set that are STILL visible; we
want a resulting index set that has the views which are no longer on screen.
- [rowIndexesToRemove removeIndexesInRange:newVisibleRows];
- // Remove those views which are no longer visible
- [self _removeCachedViewsInIndexSet:rowIndexesToRemove];
- }
-
- [self _ensureVisibleRowsIsCreated];
-
- // Finally, update and add in any new views given to us by the
delegate. Use [NSNull null] for things that don't have a view at a
particular row
- for (NSInteger row = _visibleRows.location; row <
NSMaxRange(_visibleRows); row++)
- {
- NSNumber *key = [NSNumber numberWithInteger:row];
- id view = [_viewsInVisibleRows objectForKey:key];
- if (view == nil)
- {
- // We don't already have a view at that row
- view = [[self delegate] dynamicTableView:self
viewForRow:row];
- if (view != nil)
- {
- [self addSubview:view];
- }
- else
- {
- // Use null as a place holder so we don't call the
delegate again until the row is relaoded
- view = [NSNull null];
- }
- [_viewsInVisibleRows setObject:view forKey:key];
- }
- }
- }
- }
-}
-
-- (void)_removeCachedViewForRow:(NSInteger)row
-{
- _viewsNeedUpdate = YES;
- if (_viewsInVisibleRows != nil)
- {
- NSNumber *key = [NSNumber numberWithInteger:row];
- id view = [_viewsInVisibleRows objectForKey:key];
- if (view != nil)
- {
- if (view != [NSNull null])
- {
- [view removeFromSuperview];
- }
- [_viewsInVisibleRows removeObjectForKey:key];
- }
- }
-}
-
-- (void)_removeCachedViewsInIndexSet:(NSIndexSet *)rowIndexes
-{
- if (rowIndexes != nil)
- {
- for (NSInteger row = [rowIndexes firstIndex]; row != NSNotFound;
row = [rowIndexes indexGreaterThanIndex:row])
- {
- [self _removeCachedViewForRow:row];
- }
- }
-}
-
-- (void)_removeAllCachedViews
-{
- if (_viewsInVisibleRows != nil)
- {
- for (id view in [_viewsInVisibleRows allValues])
- {
- [view removeFromSuperview];
- }
- [_viewsInVisibleRows release];
- _viewsInVisibleRows = nil;
- }
-}
-
-// Reset our visible row cache when we reload things
-- (void)reloadData
-{
- [self _removeAllCachedViews];
- _visibleRows = NSMakeRange(NSNotFound, 0);
- [super reloadData];
-}
-
-- (void)noteHeightOfRowsWithIndexesChanged:(NSIndexSet *)indexSet
-{
- // We replace all cached views, as their offsets may change
- [self _removeAllCachedViews];
- _visibleRows = NSMakeRange(NSNotFound, 0);
- [super noteHeightOfRowsWithIndexesChanged:indexSet];
-}
-
-// Snow Leopard Only, so we implement our own if we're not running snow
leopard.
-
-- (void)reloadDataForRowIndexes:(NSIndexSet *)rowIndexes
columnIndexes:(NSIndexSet *)columnIndexes
-{
- [self _removeCachedViewsInIndexSet:rowIndexes];
-
- if (IMBRunningOnSnowLeopardOrNewer())
- {
- [super reloadDataForRowIndexes:rowIndexes columnIndexes:columnIndexes];
- }
- else
- {
- // LEOPARD implementation. Ignore the columns; mark the whole row dirty.
- NSRect dirtyRect = NSZeroRect;
- NSUInteger currentIndex = [rowIndexes firstIndex];
- while (currentIndex != NSNotFound)
- {
- NSRect rowDirtyRect = [self rectOfRow:currentIndex];
- dirtyRect = NSUnionRect(dirtyRect, rowDirtyRect);
- currentIndex = [rowIndexes indexGreaterThanIndex:currentIndex];
- }
- [self setNeedsDisplayInRect:dirtyRect];
- }
-}
-
-- (void)setDelegate:(id <IMBDynamicTableViewDelegate>)delegate
-{
- [super setDelegate:delegate];
-}
-
-- (id <IMBDynamicTableViewDelegate>)delegate
-{
- return (id <IMBDynamicTableViewDelegate>)[super delegate];
-}
-
-// Method called after KVO detects a change, to reload the table row.
-- (void)_reloadRow:(NSNumber *)aRowNumber
-{
- NSInteger row = [aRowNumber intValue];
- if (row != NSNotFound)
- {
- [self reloadDataForRowIndexes:[NSIndexSet indexSetWithIndex:row]
columnIndexes:[NSIndexSet indexSetWithIndex:0]];
- }
-
-}
-
-// Make external drags work
-- (NSDragOperation) draggingSourceOperationMaskForLocal:(BOOL)inLocal
-{
- return NSDragOperationCopy;
-}
-
-@end
=======================================
--- /trunk/IMBFNSubscribeFileWatcher.h Mon Jan 3 15:11:51 2011
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- iMedia Browser Framework <
http://karelia.com/imedia/>
-
- Copyright (c) 2005-2011 by Karelia Software et al.
-
- iMedia Browser is based on code originally developed by Jason Terhorst,
- further developed for Sandvox by Greg Hulands, Dan Wood, and Terrence
Talbot.
- The new architecture for version 2.0 was developed by Peter Baumgartner.
- Contributions have also been made by Matt Gough, Martin Wennerberg and
others
- as indicated in source files.
-
- The iMedia Browser Framework is licensed under the following terms:
-
- Permission is hereby granted, free of charge, to any person obtaining a
copy
- of this software and associated documentation files (the "Software"), to
deal
- in all or substantial portions of the Software without restriction,
including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
following
- conditions:
-
- Redistributions of source code must retain the original terms stated here,
- including this list of conditions, the disclaimer noted below, and the
- following copyright notice: Copyright (c) 2005-2011 by Karelia Software
et al.
-
- Redistributions in binary form must include, in an end-user-visible
manner,
- e.g., About window, Acknowledgments window, or similar, either a) the
original
- terms stated here, including this list of conditions, the disclaimer noted
- below, and the aforementioned copyright notice, or b) the aforementioned
- copyright notice and a link to
karelia.com/imedia.
-
- Neither the name of Karelia Software, nor Sandvox, nor the names of
- contributors to iMedia Browser may be used to endorse or promote products
- derived from the Software without prior and express written permission
from
- Karelia Software or individual contributors, as appropriate.
-
- Disclaimer: THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS
- "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE,
- AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH, THE
- SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN, THE SOFTWARE.
-*/
-
-
-// Author: Peter Baumgartner
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#include "UK_IMB_RenameBegin.h"
-#include "FNSubscribeFileWatcher.h"
-#include "UK_IMB_RenameEnd.h"
-
-
-//----------------------------------------------------------------------------------------------------------------------
=======================================
--- /trunk/IMBFNSubscribeFileWatcher.m Mon Jan 3 15:11:51 2011
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- iMedia Browser Framework <
http://karelia.com/imedia/>
-
- Copyright (c) 2005-2011 by Karelia Software et al.
-
- iMedia Browser is based on code originally developed by Jason Terhorst,
- further developed for Sandvox by Greg Hulands, Dan Wood, and Terrence
Talbot.
- The new architecture for version 2.0 was developed by Peter Baumgartner.
- Contributions have also been made by Matt Gough, Martin Wennerberg and
others
- as indicated in source files.
-
- The iMedia Browser Framework is licensed under the following terms:
-
- Permission is hereby granted, free of charge, to any person obtaining a
copy
- of this software and associated documentation files (the "Software"), to
deal
- in all or substantial portions of the Software without restriction,
including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
following
- conditions:
-
- Redistributions of source code must retain the original terms stated here,
- including this list of conditions, the disclaimer noted below, and the
- following copyright notice: Copyright (c) 2005-2011 by Karelia Software
et al.
-
- Redistributions in binary form must include, in an end-user-visible
manner,
- e.g., About window, Acknowledgments window, or similar, either a) the
original
- terms stated here, including this list of conditions, the disclaimer noted
- below, and the aforementioned copyright notice, or b) the aforementioned
- copyright notice and a link to
karelia.com/imedia.
-
- Neither the name of Karelia Software, nor Sandvox, nor the names of
- contributors to iMedia Browser may be used to endorse or promote products
- derived from the Software without prior and express written permission
from
- Karelia Software or individual contributors, as appropriate.
-
- Disclaimer: THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS
- "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE,
- AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH, THE
- SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN, THE SOFTWARE.
-*/
-
-
-// Author: Peter Baumgartner
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#include "UK_IMB_RenameBegin.h"
-#include "UKFNSubscribeFileWatcher.m"
-#include "UK_IMB_RenameEnd.h"
-
-
-//----------------------------------------------------------------------------------------------------------------------
=======================================
--- /trunk/IMBFSEventsWatcher.h Mon Jan 3 15:11:51 2011
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- iMedia Browser Framework <
http://karelia.com/imedia/>
-
- Copyright (c) 2005-2011 by Karelia Software et al.
-
- iMedia Browser is based on code originally developed by Jason Terhorst,
- further developed for Sandvox by Greg Hulands, Dan Wood, and Terrence
Talbot.
- The new architecture for version 2.0 was developed by Peter Baumgartner.
- Contributions have also been made by Matt Gough, Martin Wennerberg and
others
- as indicated in source files.
-
- The iMedia Browser Framework is licensed under the following terms:
-
- Permission is hereby granted, free of charge, to any person obtaining a
copy
- of this software and associated documentation files (the "Software"), to
deal
- in all or substantial portions of the Software without restriction,
including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
following
- conditions:
-
- Redistributions of source code must retain the original terms stated here,
- including this list of conditions, the disclaimer noted below, and the
- following copyright notice: Copyright (c) 2005-2011 by Karelia Software
et al.
-
- Redistributions in binary form must include, in an end-user-visible
manner,
- e.g., About window, Acknowledgments window, or similar, either a) the
original
- terms stated here, including this list of conditions, the disclaimer noted
- below, and the aforementioned copyright notice, or b) the aforementioned
- copyright notice and a link to
karelia.com/imedia.
-
- Neither the name of Karelia Software, nor Sandvox, nor the names of
- contributors to iMedia Browser may be used to endorse or promote products
- derived from the Software without prior and express written permission
from
- Karelia Software or individual contributors, as appropriate.
-
- Disclaimer: THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS
- "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE,
- AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH, THE
- SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN, THE SOFTWARE.
-*/
-
-
-// Author: Peter Baumgartner
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#include "UK_IMB_RenameBegin.h"
-#include "UKFSEventsWatcher.h"
-#include "UK_IMB_RenameEnd.h"
-
-
-//----------------------------------------------------------------------------------------------------------------------
=======================================
--- /trunk/IMBFSEventsWatcher.m Mon Jan 3 15:11:51 2011
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- iMedia Browser Framework <
http://karelia.com/imedia/>
-
- Copyright (c) 2005-2011 by Karelia Software et al.
-
- iMedia Browser is based on code originally developed by Jason Terhorst,
- further developed for Sandvox by Greg Hulands, Dan Wood, and Terrence
Talbot.
- The new architecture for version 2.0 was developed by Peter Baumgartner.
- Contributions have also been made by Matt Gough, Martin Wennerberg and
others
- as indicated in source files.
-
- The iMedia Browser Framework is licensed under the following terms:
-
- Permission is hereby granted, free of charge, to any person obtaining a
copy
- of this software and associated documentation files (the "Software"), to
deal
- in all or substantial portions of the Software without restriction,
including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
following
- conditions:
-
- Redistributions of source code must retain the original terms stated here,
- including this list of conditions, the disclaimer noted below, and the
- following copyright notice: Copyright (c) 2005-2011 by Karelia Software
et al.
-
- Redistributions in binary form must include, in an end-user-visible
manner,
- e.g., About window, Acknowledgments window, or similar, either a) the
original
- terms stated here, including this list of conditions, the disclaimer noted
- below, and the aforementioned copyright notice, or b) the aforementioned
- copyright notice and a link to
karelia.com/imedia.
-
- Neither the name of Karelia Software, nor Sandvox, nor the names of
- contributors to iMedia Browser may be used to endorse or promote products
- derived from the Software without prior and express written permission
from
- Karelia Software or individual contributors, as appropriate.
-
- Disclaimer: THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS
- "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE,
- AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH, THE
- SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN, THE SOFTWARE.
-*/
-
-
-// Author: Peter Baumgartner
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#include "UK_IMB_RenameBegin.h"
-#include "UKFSEventsWatcher.m"
-#include "UK_IMB_RenameEnd.h"
-
-
-//----------------------------------------------------------------------------------------------------------------------
=======================================
--- /trunk/IMBFaceObjectViewController.h Fri Apr 15 06:23:54 2011
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- iMedia Browser Framework <
http://karelia.com/imedia/>
-
- Copyright (c) 2005-2011 by Karelia Software et al.
-
- iMedia Browser is based on code originally developed by Jason Terhorst,
- further developed for Sandvox by Greg Hulands, Dan Wood, and Terrence
Talbot.
- The new architecture for version 2.0 was developed by Peter Baumgartner.
- Contributions have also been made by Matt Gough, Martin Wennerberg and
others
- as indicated in source files.
-
- The iMedia Browser Framework is licensed under the following terms:
-
- Permission is hereby granted, free of charge, to any person obtaining a
copy
- of this software and associated documentation files (the "Software"), to
deal
- in all or substantial portions of the Software without restriction,
including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
following
- conditions:
-
- Redistributions of source code must retain the original terms stated here,
- including this list of conditions, the disclaimer noted below, and the
- following copyright notice: Copyright (c) 2005-2011 by Karelia Software
et al.
-
- Redistributions in binary form must include, in an end-user-visible
manner,
- e.g., About window, Acknowledgments window, or similar, either a) the
original
- terms stated here, including this list of conditions, the disclaimer noted
- below, and the aforementioned copyright notice, or b) the aforementioned
- copyright notice and a link to
karelia.com/imedia.
-
- Neither the name of Karelia Software, nor Sandvox, nor the names of
- contributors to iMedia Browser may be used to endorse or promote products
- derived from the Software without prior and express written permission
from
- Karelia Software or individual contributors, as appropriate.
-
- Disclaimer: THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS
- "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE,
- AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH, THE
- SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN, THE SOFTWARE.
- */
-
-
-// Author: Jörg Jacobsen
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-#import <Cocoa/Cocoa.h>
-#import "IMBSkimmableObjectViewController.h"
-
-
-@interface IMBFaceObjectViewController : IMBSkimmableObjectViewController {
-
-}
-
-@end
=======================================
--- /trunk/IMBFaceObjectViewController.m Fri Apr 15 06:23:54 2011
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- iMedia Browser Framework <
http://karelia.com/imedia/>
-
- Copyright (c) 2005-2011 by Karelia Software et al.
-
- iMedia Browser is based on code originally developed by Jason Terhorst,
- further developed for Sandvox by Greg Hulands, Dan Wood, and Terrence
Talbot.
- The new architecture for version 2.0 was developed by Peter Baumgartner.
- Contributions have also been made by Matt Gough, Martin Wennerberg and
others
- as indicated in source files.
-
- The iMedia Browser Framework is licensed under the following terms:
-
- Permission is hereby granted, free of charge, to any person obtaining a
copy
- of this software and associated documentation files (the "Software"), to
deal
- in all or substantial portions of the Software without restriction,
including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
following
- conditions:
-
- Redistributions of source code must retain the original terms stated here,
- including this list of conditions, the disclaimer noted below, and the
- following copyright notice: Copyright (c) 2005-2011 by Karelia Software
et al.
-
- Redistributions in binary form must include, in an end-user-visible
manner,
- e.g., About window, Acknowledgments window, or similar, either a) the
original
- terms stated here, including this list of conditions, the disclaimer noted
- below, and the aforementioned copyright notice, or b) the aforementioned
- copyright notice and a link to
karelia.com/imedia.
-
- Neither the name of Karelia Software, nor Sandvox, nor the names of
- contributors to iMedia Browser may be used to endorse or promote products
- derived from the Software without prior and express written permission
from
- Karelia Software or individual contributors, as appropriate.
-
- Disclaimer: THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS
- "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE,
- AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH, THE
- SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN, THE SOFTWARE.
- */
-
-
-// Author: Jörg Jacobsen
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-#import "IMBFaceObjectViewController.h"
-
-
-@implementation IMBFaceObjectViewController
-
-- (NSString*) objectCountFormatSingular
-{
- return
NSLocalizedStringWithDefaultValue(@"IMBFaceObjectViewController.countFormatSingular",
- nil,IMBBundle(),
- @"%d Face",
- @"Format string for object count in singular");
-}
-
-
-- (NSString*) objectCountFormatPlural
-{
- return
NSLocalizedStringWithDefaultValue(@"IMBFaceObjectViewController.countFormatPlural",
- nil,IMBBundle(),
- @"%d Faces",
- @"Format string for object count in plural");
-}
-
-
-@end
=======================================
--- /trunk/IMBFileWatcher.h Mon Jan 3 15:11:51 2011
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- iMedia Browser Framework <
http://karelia.com/imedia/>
-
- Copyright (c) 2005-2011 by Karelia Software et al.
-
- iMedia Browser is based on code originally developed by Jason Terhorst,
- further developed for Sandvox by Greg Hulands, Dan Wood, and Terrence
Talbot.
- The new architecture for version 2.0 was developed by Peter Baumgartner.
- Contributions have also been made by Matt Gough, Martin Wennerberg and
others
- as indicated in source files.
-
- The iMedia Browser Framework is licensed under the following terms:
-
- Permission is hereby granted, free of charge, to any person obtaining a
copy
- of this software and associated documentation files (the "Software"), to
deal
- in all or substantial portions of the Software without restriction,
including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
following
- conditions:
-
- Redistributions of source code must retain the original terms stated here,
- including this list of conditions, the disclaimer noted below, and the
- following copyright notice: Copyright (c) 2005-2011 by Karelia Software
et al.
-
- Redistributions in binary form must include, in an end-user-visible
manner,
- e.g., About window, Acknowledgments window, or similar, either a) the
original
- terms stated here, including this list of conditions, the disclaimer noted
- below, and the aforementioned copyright notice, or b) the aforementioned
- copyright notice and a link to
karelia.com/imedia.
-
- Neither the name of Karelia Software, nor Sandvox, nor the names of
- contributors to iMedia Browser may be used to endorse or promote products
- derived from the Software without prior and express written permission
from
- Karelia Software or individual contributors, as appropriate.
-
- Disclaimer: THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS
- "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE,
- AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH, THE
- SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN, THE SOFTWARE.
-*/
-
-
-// Author: Peter Baumgartner
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// This is a wrapper file that renames Uli's UK classes to have the prefix
IMB. That way we can use these
-// classes without running into runtime conflicts with other UKKQueue
classes being loaded by the runtime
-// from other bundles. The preprocessor technique qas suggested by Uli
himself...
-
-#include "UK_IMB_RenameBegin.h"
-#include "UKFileWatcher.h"
-#include "UK_IMB_RenameEnd.h"
-
-
-//----------------------------------------------------------------------------------------------------------------------
=======================================
--- /trunk/IMBFileWatcher.m Mon Jan 3 15:11:51 2011
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- iMedia Browser Framework <
http://karelia.com/imedia/>
-
- Copyright (c) 2005-2011 by Karelia Software et al.
-
- iMedia Browser is based on code originally developed by Jason Terhorst,
- further developed for Sandvox by Greg Hulands, Dan Wood, and Terrence
Talbot.
- The new architecture for version 2.0 was developed by Peter Baumgartner.
- Contributions have also been made by Matt Gough, Martin Wennerberg and
others
- as indicated in source files.
-
- The iMedia Browser Framework is licensed under the following terms:
-
- Permission is hereby granted, free of charge, to any person obtaining a
copy
- of this software and associated documentation files (the "Software"), to
deal
- in all or substantial portions of the Software without restriction,
including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
following
- conditions:
-
- Redistributions of source code must retain the original terms stated here,
- including this list of conditions, the disclaimer noted below, and the
- following copyright notice: Copyright (c) 2005-2011 by Karelia Software
et al.
-
- Redistributions in binary form must include, in an end-user-visible
manner,
- e.g., About window, Acknowledgments window, or similar, either a) the
original
- terms stated here, including this list of conditions, the disclaimer noted
- below, and the aforementioned copyright notice, or b) the aforementioned
- copyright notice and a link to
karelia.com/imedia.
-
- Neither the name of Karelia Software, nor Sandvox, nor the names of
- contributors to iMedia Browser may be used to endorse or promote products
- derived from the Software without prior and express written permission
from
- Karelia Software or individual contributors, as appropriate.
-
- Disclaimer: THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS
- "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE,
- AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH, THE
- SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN, THE SOFTWARE.
-*/
-
-
-// Author: Peter Baumgartner
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// This is a wrapper file that renames Uli's UK classes to have the prefix
IMB. That way we can use these
-// classes without running into runtime conflicts with other UKKQueue
classes being loaded by the runtime
-// from other bundles. The preprocessor technique qas suggested by Uli
himself...
-
-#include "UK_IMB_RenameBegin.h"
-#include "UKFileWatcher.m"
-#include "UK_IMB_RenameEnd.h"
-
-
-//----------------------------------------------------------------------------------------------------------------------
=======================================
--- /trunk/IMBFireFoxParser.h Mon Jan 3 15:11:51 2011
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- iMedia Browser Framework <
http://karelia.com/imedia/>
-
- Copyright (c) 2005-2011 by Karelia Software et al.
-
- iMedia Browser is based on code originally developed by Jason Terhorst,
- further developed for Sandvox by Greg Hulands, Dan Wood, and Terrence
Talbot.
- The new architecture for version 2.0 was developed by Peter Baumgartner.
- Contributions have also been made by Matt Gough, Martin Wennerberg and
others
- as indicated in source files.
-
- The iMedia Browser Framework is licensed under the following terms:
-
- Permission is hereby granted, free of charge, to any person obtaining a
copy
- of this software and associated documentation files (the "Software"), to
deal
- in all or substantial portions of the Software without restriction,
including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
following
- conditions:
-
- Redistributions of source code must retain the original terms stated here,
- including this list of conditions, the disclaimer noted below, and the
- following copyright notice: Copyright (c) 2005-2011 by Karelia Software
et al.
-
- Redistributions in binary form must include, in an end-user-visible
manner,
- e.g., About window, Acknowledgments window, or similar, either a) the
original
- terms stated here, including this list of conditions, the disclaimer noted
- below, and the aforementioned copyright notice, or b) the aforementioned
- copyright notice and a link to
karelia.com/imedia.
-
- Neither the name of Karelia Software, nor Sandvox, nor the names of
- contributors to iMedia Browser may be used to endorse or promote products
- derived from the Software without prior and express written permission
from
- Karelia Software or individual contributors, as appropriate.
-
- Disclaimer: THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS
- "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE,
- AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH, THE
- SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN, THE SOFTWARE.
-*/
-
-
-// Author: Dan Wood
-
-
-#import <Cocoa/Cocoa.h>
-#import "IMBParser.h"
-
-@class WebView, IMBNode, FMDatabase;
-
-@interface IMBFireFoxParser : IMBParser
-{
- NSString *_appPath;
- NSString *_databasePathOriginal;
- NSString *_databasePathCurrent;
- FMDatabase *_database;
-}
-
-@property (copy) NSString *databasePathOriginal;
-@property (copy) NSString *databasePathCurrent;
-@property (copy) NSString *appPath;
-@property (retain) FMDatabase *database;
-
-@end
=======================================
--- /trunk/IMBFireFoxParser.m Thu Mar 10 11:14:22 2011
+++ /dev/null
@@ -1,481 +0,0 @@
-/*
- iMedia Browser Framework <
http://karelia.com/imedia/>
-
- Copyright (c) 2005-2011 by Karelia Software et al.
-
- iMedia Browser is based on code originally developed by Jason Terhorst,
- further developed for Sandvox by Greg Hulands, Dan Wood, and Terrence
Talbot.
- The new architecture for version 2.0 was developed by Peter Baumgartner.
- Contributions have also been made by Matt Gough, Martin Wennerberg and
others
- as indicated in source files.
-
- The iMedia Browser Framework is licensed under the following terms:
-
- Permission is hereby granted, free of charge, to any person obtaining a
copy
- of this software and associated documentation files (the "Software"), to
deal
- in all or substantial portions of the Software without restriction,
including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
following
- conditions:
-
- Redistributions of source code must retain the original terms stated here,
- including this list of conditions, the disclaimer noted below, and the
- following copyright notice: Copyright (c) 2005-2011 by Karelia Software
et al.
-
- Redistributions in binary form must include, in an end-user-visible
manner,
- e.g., About window, Acknowledgments window, or similar, either a) the
original
- terms stated here, including this list of conditions, the disclaimer noted
- below, and the aforementioned copyright notice, or b) the aforementioned
- copyright notice and a link to
karelia.com/imedia.
-
- Neither the name of Karelia Software, nor Sandvox, nor the names of
- contributors to iMedia Browser may be used to endorse or promote products
- derived from the Software without prior and express written permission
from
- Karelia Software or individual contributors, as appropriate.
-
- Disclaimer: THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS
- "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE,
- AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH, THE
- SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN, THE SOFTWARE.
-*/
-
-
-// Author: Dan Wood
-// Documentation on firefox bookmarks:
-//
https://developer.mozilla.org/en/The_Places_database
-//
http://www.forensicswiki.org/index.php?title=Mozilla_Firefox_3_History_File_Format
-
-#import "IMBFireFoxParser.h"
-#import <WebKit/WebKit.h>
-#import "IMBNode.h"
-#import "IMBParserController.h"
-#import "FMDatabase.h"
-#import "FMResultSet.h"
-#import "NSWorkspace+iMedia.h"
-#import "IMBObject.h"
-#import "NSImage+iMedia.h"
-#import "NSFileManager+iMedia.h"
-#import "IMBNodeObject.h"
-
-@interface IMBFireFoxParser ()
-+ (NSString *)firefoxBookmarkPath;
-- (BOOL)openDatabase;
-@end
-
-@implementation IMBFireFoxParser
-
-@synthesize databasePathOriginal = _databasePathOriginal;
-@synthesize databasePathCurrent = _databasePathCurrent;
-
-@synthesize appPath = _appPath;
-@synthesize database = _database;
-
-+ (void)load
-{
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
- [IMBParserController registerParserClass:self
forMediaType:kIMBMediaTypeLink];
- [pool drain];
-}
-
-+ (NSString*) firefoxPath
-{
- return [[NSWorkspace imb_threadSafeWorkspace]
absolutePathForAppBundleWithIdentifier:@"org.mozilla.firefox"];
-}
-
-+ (BOOL) isInstalled
-{
- return [self firefoxPath] != nil;
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-// Create a single parser instance for Firefox bookmarks (if found)
-
-+ (NSArray*) parserInstancesForMediaType:(NSString*)inMediaType
-{
- NSMutableArray* parserInstances = [NSMutableArray array];
-
- NSString *bookmarkPath = [self firefoxBookmarkPath];
- NSFileManager *fm = [NSFileManager imb_threadSafeManager]; // File
manager, not flying meat!
- if ([self isInstalled] && bookmarkPath && [fm
fileExistsAtPath:bookmarkPath] && [fm isReadableFileAtPath:bookmarkPath])
- {
- IMBFireFoxParser* parser = [[[self class] alloc]
initWithMediaType:inMediaType];
- parser.databasePathOriginal = bookmarkPath;
- parser.databasePathCurrent = bookmarkPath;
- parser.appPath = [self firefoxPath];
- [parserInstances addObject:parser];
- [parser release];
- }
- return parserInstances;
-}
-
-+ (NSString *)firefoxBookmarkPath;
-{
- NSString *result = nil;
- NSArray *libraryPaths1 =
NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory,
NSUserDomainMask | NSLocalDomainMask, YES);
- NSArray *libraryPaths2 =
NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask |
NSLocalDomainMask, YES);
-
- NSMutableArray *libraryPaths = [NSMutableArray
arrayWithArray:libraryPaths1];
- [libraryPaths addObjectsFromArray:libraryPaths2];
-
- NSFileManager *fm = [NSFileManager imb_threadSafeManager];
- for (NSString *path in libraryPaths)
- {
- NSString *firefoxPath = [path stringByAppendingPathComponent:@"Firefox"];
- NSString *profilesPath = [firefoxPath
stringByAppendingPathComponent:@"Profiles"];
- BOOL isDir;
- if ([fm fileExistsAtPath:profilesPath isDirectory:&isDir] && isDir)
- {
- NSDirectoryEnumerator *e = [fm enumeratorAtPath:profilesPath];
- [e skipDescendents];
- NSString *filename = nil;
- while ( filename = [e nextObject] )
- {
- if ( ![filename hasPrefix:@"."] )
- {
- NSString *profilePath = [profilesPath
stringByAppendingPathComponent:filename];
- NSString *bookmarkPath = [profilePath
stringByAppendingPathComponent:@"places.sqlite"];
- if ([fm fileExistsAtPath:bookmarkPath isDirectory:&isDir] && !isDir)
- {
- result = bookmarkPath; // just stop on the first profile we find.
Should be good enough!
- return result;
- }
- }
- }
- }
- }
- return result;
-}
-
-
-
-- (void) copyDatabase; // try to copy the database and store in copy.
-{
- NSFileManager *fm = [NSFileManager imb_threadSafeManager];
- NSString *newPath = nil; // copy destination if we have to copy the file
-
- // null result set means we couldn't open it ... it's probably busy.
- // The stupid workaround is to make a copy of the sqlite file, and check
there!
- // However just in case the source file has not changed, we'll check
modification dates.
- //
- newPath = [[[NSFileManager imb_threadSafeManager]
imb_sharedTemporaryFolder:@"firefox"]
stringByAppendingPathComponent:@"places.sqlite"];
- if (![newPath isEqualToString:self.databasePathCurrent]) // if we are
trying to open the copy, don't allow that.
- {
- BOOL needToCopyFile = YES; // probably we will need to copy but let's
check
- if ([fm fileExistsAtPath:newPath])
- {
- NSError *error = nil;
- NSDictionary *attr = [fm attributesOfItemAtPath:newPath error:&error];
- NSDate *modDateOfCopy = [attr fileModificationDate];
- attr = [fm attributesOfItemAtPath:self.databasePathOriginal
error:&error];
- NSDate *modDateOfOrig = [attr fileModificationDate];
- if (NSOrderedSame == [modDateOfOrig compare:modDateOfCopy])
- {
- needToCopyFile = NO;
- }
- }
- if (needToCopyFile)
- {
- NSError *error = nil;
- (void) [fm removeItemAtPath:newPath error:nil];
- BOOL copied = (nil != self.databasePathOriginal)
- && (nil != newPath)
- && [fm copyItemAtPath:self.databasePathOriginal toPath:newPath
error:&error];
- if (!copied)
- {
- NSLog(@"Unable to copy Firefox bookmarks.");
- }
- }
- [self.database close]; // explicitly close now
- self.database = [FMDatabase databaseWithPath:newPath];
- self.databasePathCurrent = newPath;
- if (![self openDatabase])
- {
- // Couldn't open, so empty out this database so it doesn't keep trying
- self.database = nil;
- }
- }
- else
- {
- self.database = nil; // don't try to open; couldn't open copy
- }
-}
-
-- (BOOL)openDatabase;
-{
- BOOL result = NO;
- if ([self.database open]) // Later, we could maybe do openWithFlags:
SQLITE_OPEN_READONLY for speed
- {
- [self.database setBusyRetryTimeout:10];
- result = YES;
- }
- return result;
-}
-
-
-- (void)dealloc
-{
- IMBRelease(_appPath);
- IMBRelease(_databasePathOriginal);
- IMBRelease(_databasePathCurrent);
- [super dealloc];
-}
-
-//----------------------------------------------------------------------------------------------------------------------
-
-- (NSImage*) iconForFolderID:(int)aFolderID;
-{
- NSImage *result = nil;
- NSString* filename = nil;
-
- switch(aFolderID)
- {
- case 1: filename = @"firefox_allBookmarks.png"; break;
- case 2: filename = @"firefox_bookmarksMenu.png"; break;
- case 3: filename = @"firefox_bookmarksToolbar.png"; break;
- case 4: filename = @"firefox_tag.png"; break;
- case 5: filename = @"firefox_unfiledBookmarks.png"; break;
- default: break;
- }
-
- if (filename)
- {
- NSBundle* bundle = [NSBundle bundleForClass:[self class]];
- NSString* path = [bundle pathForResource:filename ofType:nil];
- result = [[[NSImage alloc] initWithContentsOfFile:path] autorelease];
- }
- else
- {
- result = [NSImage imb_sharedGenericFolderIcon];
- }
- return result;
-}
-
-// The following two methods must be overridden by subclasses...
-
-- (IMBNode*) nodeWithOldNode:(const IMBNode*)inOldNode
options:(IMBOptions)inOptions error:(NSError**)outError
-{
- IMBNode* node = [[[IMBNode alloc] init] autorelease];
-
- if (nil == inOldNode) // create the initial node
- {
- NSImage* icon = [[NSWorkspace imb_threadSafeWorkspace]
iconForFile:self.appPath];;
- [icon setScalesWhenResized:YES];
- [icon setSize:NSMakeSize(16.0,16.0)];
-
-
node.name = @"Firefox";
- node.icon = icon;
- node.groupType = kIMBGroupTypeLibrary;
- node.leaf = NO;
- node.isTopLevelNode = YES;
- node.parser = self;
- // ??? node.mediaSource = self.mediaSource;
- node.identifier = [self identifierForPath:@"/"];
- node.attributes = [NSDictionary dictionaryWithObject:[NSNumber
numberWithInt:1] forKey:@"id"];
-
- self.database = [FMDatabase databaseWithPath:self.databasePathCurrent];
- if ([self openDatabase])
- {
- [self populateNode:node options:inOptions error:outError]; // populate
the WHOLE thing.
- }
- else
- {
- node.subNodes = [NSArray array]; // Empty subnodes/objects since we
couldn't read it.
- node.objects = [NSArray array];
- }
-
- self.database = nil; // close the database
- }
- else
- {
- node.mediaSource = self.mediaSource;
- node.identifier = inOldNode.identifier;
-
node.name = inOldNode.name;
- node.icon = inOldNode.icon;
- node.parser = self;
- node.leaf = inOldNode.leaf;
- node.groupType = inOldNode.groupType;
- node.attributes = [[inOldNode.attributes copy] autorelease];
- }
-
- // Watch the root node. Whenever something in Lightroom changes, we have
to replace the
- // WHOLE node tree, as we have no way of finding out WHAT has changed in
Lightroom...
-
- if (node.isTopLevelNode)
- {
- node.watcherType = kIMBWatcherTypeFSEvent;
- node.watchedPath = self.databasePathOriginal;
- }
-
- return node;
-}
-
-
-// Just load all the bookmarks in the tree -- this is not going to be that
memory-intensive.
-
-- (BOOL) populateNode:(IMBNode*)inNode options:(IMBOptions)inOptions
error:(NSError**)outError
-{
- NSMutableArray *subNodes = [NSMutableArray array];
- NSMutableArray *objects = [NSMutableArray array];
-
- NSNumber *parentIDNumber = [inNode.attributes objectForKey:@"id"];
-
- FMResultSet *rs = nil;
-
- // First get the folders (type 2)
- while (self.database && !rs) // keep trying until we get result set (or
database is invalid)
- {
- NSString *query = @"select id,title from moz_bookmarks where type=2 and
parent=? order by position";
-
- rs = [self.database executeQuery:query, parentIDNumber];
- if (!rs)
- {
- [self copyDatabase]; // read-only copy if file busy
- }
- }
-
- NSUInteger index = 0;
-
- while ([rs next])
- {
-// NSLog(@"%@>%@ '%@' %@",
-// parentIDNumber,
-// [rs stringForColumn:@"id"],
-// [rs stringForColumn:@"title"],
-// @"type=2");
-
- int theID = [rs intForColumn:@"id"];
- NSString *theName = [rs stringForColumn:@"title"];
- if (theName && ![theName isEqualToString:@""]) // make sure we have a
title; otherwise bogus
- {
- IMBNode* node = [[[IMBNode alloc] init] autorelease];
- // NSImage* icon = [[NSWorkspace imb_threadSafeWorkspace]
iconForFile:self.appPath];;
- // [icon setScalesWhenResized:YES];
- // [icon setSize:NSMakeSize(16.0,16.0)];
- NSImage* icon = [self iconForFolderID:theID];
- node.icon = icon;
-
node.name = theName;
- node.attributes = [NSDictionary dictionaryWithObject:[NSNumber
numberWithInt:theID] forKey:@"id"];
-
- node.leaf = NO;
- node.parser = self;
- // ??? node.mediaSource = self.mediaSource;
- node.identifier = [self identifierForPath:[NSString
stringWithFormat:@"/%d/%@",theID, theName]];
- [subNodes addObject:node];
-
- // Top level node? Make sub-objects show up for these subnodes as well.
- // if ([parentIDNumber intValue] == 1)
- {
- IMBObject *object = [[[IMBNodeObject alloc] init] autorelease];
-
object.name = theName;
- object.parser = self;
- ((IMBNodeObject*)object).representedNodeIdentifier = node.identifier;
-
- object.index = index++;
- object.imageLocation = nil;
- object.imageRepresentationType =
IKImageBrowserNSImageRepresentationType;
- object.imageRepresentation = icon;
-
- [objects addObject:object];
- }
- }
- }
- inNode.subNodes = subNodes;
-
- [rs close]; rs = nil;
-
- // Now get the bookmarks (type 1)
- while (self.database && !rs) // keep trying until we get result set (or
database is invalid)
- {
- NSString *query = @"select b.parent,
b.id, b.title, b.type, p.url,
f.mime_type, f.data from moz_bookmarks b, moz_places p left outer join
moz_favicons f on p.favicon_id=
f.id where
p.id=
b.fk and b.parent=? order by
b.position;";
- rs = [self.database executeQuery:query, parentIDNumber];
- if (!rs)
- {
- [self copyDatabase]; // read-only copy if file busy
- }
- }
-
- while ([rs next])
- {
- IMBObject *object = [[[IMBObject alloc] init] autorelease];
-
-// NSLog(@"%@>%@ '%@' %@",
-// [rs stringForColumn:@"parent"],
-// [rs stringForColumn:@"id"],
-// [rs stringForColumn:@"title"],
-// [rs stringForColumn:@"type"]);
-
-
-
object.name = [rs stringForColumn:@"title"];
- object.location = [NSURL URLWithString:[rs stringForColumn:@"url"]];
-
- NSData *imageData = [rs dataForColumn:@"data"];
- if (imageData)
- {
- NSImage *iconImage = [NSImage imb_imageWithData:imageData mimeType:[rs
stringForColumn:@"mime_type"]];
-// [icon setScalesWhenResized:YES];
-// [icon setSize:NSMakeSize(16.0,16.0)];
- object.imageRepresentationType =
IKImageBrowserNSImageRepresentationType;
- object.imageRepresentation = iconImage;
- }
- else
- {
- static NSImage *sGenericIcon = nil;
- if (!sGenericIcon)
- {
- // Get generic icon, and shrink it down to favicon size for
consistency.
- sGenericIcon = [[[NSWorkspace imb_threadSafeWorkspace]
iconForFileType:(NSString *)kUTTypeURL] retain];
- [sGenericIcon setScalesWhenResized:YES];
- [sGenericIcon setSize:NSMakeSize(16.0,16.0)];
- }
- object.imageRepresentationType =
IKImageBrowserNSImageRepresentationType;
- object.imageRepresentation = sGenericIcon;
- }
-
- object.parser = self;
-
- [objects addObject:object];
-
- }
- inNode.objects = objects;
- [rs close]; rs = nil;
-
-
- // Now do the recursion, now that we are done with the queries. (I don't
want to try queries within queries!)
- for (IMBNode *subNode in inNode.subNodes)
- {
- [self populateNode:subNode options:inOptions error:outError];
- }
-
-
-
-
- return NO;
-}
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-// Optional methods that do nothing in the base class and can be
overridden in subclasses, e.g. to update
-// or get rid of cached data...
-
-
-- (void) didStopUsingParser
-{
-
-}
-
-- (void) watchedPathDidChange:(NSString*)inWatchedPath
-{
-
-}
-
-
-
-@end
-
=======================================
--- /trunk/IMBFlickrHeaderView.xib Thu Mar 3 08:44:43 2011
+++ /dev/null
@@ -1,1155 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
- <data>
- <int key="IBDocument.SystemTarget">1050</int>
- <string key="IBDocument.SystemVersion">10J567</string>
- <string key="IBDocument.InterfaceBuilderVersion">851</string>
- <string key="IBDocument.AppKitVersion">1038.35</string>
- <string key="IBDocument.HIToolboxVersion">462.00</string>
- <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
- <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="NS.object.0">851</string>
- </object>
- <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="77"/>
- </object>
- <object class="NSArray" key="IBDocument.PluginDependencies">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- </object>
- <object class="NSMutableDictionary" key="IBDocument.Metadata">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys" id="0">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- </object>
- <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSCustomObject" id="1001">
- <string key="NSClassName">IMBFlickrHeaderViewController</string>
- </object>
- <object class="NSCustomObject" id="1003">
- <string key="NSClassName">FirstResponder</string>
- </object>
- <object class="NSCustomObject" id="1004">
- <string key="NSClassName">NSApplication</string>
- </object>
- <object class="NSCustomView" id="306076665">
- <reference key="NSNextResponder"/>
- <int key="NSvFlags">274</int>
- <object class="NSMutableArray" key="NSSubviews">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSButton" id="578654495">
- <reference key="NSNextResponder" ref="306076665"/>
- <int key="NSvFlags">265</int>
- <string key="NSFrame">{{260, 11}, {104, 19}}</string>
- <reference key="NSSuperview" ref="306076665"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="567316205">
- <int key="NSCellFlags">-2080244224</int>
- <int key="NSCellFlags2">134217728</int>
- <string key="NSContents">Remove</string>
- <object class="NSFont" key="NSSupport">
- <string key="NSName">LucidaGrande</string>
- <double key="NSSize">12</double>
- <int key="NSfFlags">16</int>
- </object>
- <reference key="NSControlView" ref="578654495"/>
- <int key="NSButtonFlags">-
2038152961</int>
- <int key="NSButtonFlags2">164</int>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">400</int>
- <int key="NSPeriodicInterval">75</int>
- </object>
- </object>
- <object class="NSSearchField" id="144465269">
- <reference key="NSNextResponder" ref="306076665"/>
- <int key="NSvFlags">266</int>
- <string key="NSFrame">{{12, 11}, {236, 19}}</string>
- <reference key="NSSuperview" ref="306076665"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSSearchFieldCell" key="NSCell" id="588943363">
- <int key="NSCellFlags">343014976</int>
- <int key="NSCellFlags2">268571648</int>
- <string key="NSContents"/>
- <object class="NSFont" key="NSSupport">
- <string key="NSName">LucidaGrande</string>
- <double key="NSSize">11</double>
- <int key="NSfFlags">3100</int>
- </object>
- <string key="NSPlaceholderString">Text or Tag</string>
- <reference key="NSControlView" ref="144465269"/>
- <bool key="NSDrawsBackground">YES</bool>
- <int key="NSTextBezelStyle">1</int>
- <object class="NSColor" key="NSBackgroundColor">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">textBackgroundColor</string>
- <object class="NSColor" key="NSColor">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MQA</bytes>
- </object>
- </object>
- <object class="NSColor" key="NSTextColor">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">controlTextColor</string>
- <object class="NSColor" key="NSColor">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MAA</bytes>
- </object>
- </object>
- <object class="NSButtonCell" key="NSSearchButtonCell">
- <int key="NSCellFlags">130560</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">search</string>
- <reference key="NSControlView" ref="144465269"/>
- <string key="NSAction">_searchFieldSearch:</string>
- <reference key="NSTarget" ref="588943363"/>
- <int key="NSButtonFlags">138690815</int>
- <int key="NSButtonFlags2">0</int>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">400</int>
- <int key="NSPeriodicInterval">75</int>
- </object>
- <object class="NSButtonCell" key="NSCancelButtonCell">
- <int key="NSCellFlags">130560</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">clear</string>
- <object class="NSMutableArray"
key="NSAccessibilityOverriddenAttributes">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMutableDictionary">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>AXDescription</string>
- <string>NSAccessibilityEncodedAttributesValueType</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>cancel</string>
- <integer value="1"/>
- </object>
- </object>
- </object>
- <reference key="NSControlView" ref="144465269"/>
- <string key="NSAction">_searchFieldCancel:</string>
- <reference key="NSTarget" ref="588943363"/>
- <int key="NSButtonFlags">138690815</int>
- <int key="NSButtonFlags2">0</int>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">400</int>
- <int key="NSPeriodicInterval">75</int>
- </object>
- <int key="NSMaximumRecents">255</int>
- <bool key="NSSendsWholeSearchString">YES</bool>
- </object>
- </object>
- </object>
- <string key="NSFrameSize">{376, 32}</string>
- <reference key="NSSuperview"/>
- <string key="NSClassName">NSView</string>
- </object>
- <object class="NSUserDefaultsController" id="112183683">
- <bool key="NSSharedInstance">YES</bool>
- </object>
- </object>
- <object class="IBObjectContainer" key="IBDocument.Objects">
- <object class="NSMutableArray" key="connectionRecords">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">view</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="306076665"/>
- </object>
- <int key="connectionID">187</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">_queryField</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="144465269"/>
- </object>
- <int key="connectionID">194</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">_button</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="578654495"/>
- </object>
- <int key="connectionID">195</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">editQuery:</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="144465269"/>
- </object>
- <int key="connectionID">196</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBBindingConnection" key="connection">
- <string key="label">enabled: canEdit</string>
- <reference key="source" ref="144465269"/>
- <reference key="destination" ref="1001"/>
- <object class="NSNibBindingConnector" key="connector">
- <reference key="NSSource" ref="144465269"/>
- <reference key="NSDestination" ref="1001"/>
- <string key="NSLabel">enabled: canEdit</string>
- <string key="NSBinding">enabled</string>
- <string key="NSKeyPath">canEdit</string>
- <int key="NSNibBindingConnectorVersion">2</int>
- </object>
- </object>
- <int key="connectionID">223</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBBindingConnection" key="connection">
- <string key="label">enabled: canEdit</string>
- <reference key="source" ref="578654495"/>
- <reference key="destination" ref="1001"/>
- <object class="NSNibBindingConnector" key="connector">
- <reference key="NSSource" ref="578654495"/>
- <reference key="NSDestination" ref="1001"/>
- <string key="NSLabel">enabled: canEdit</string>
- <string key="NSBinding">enabled</string>
- <string key="NSKeyPath">canEdit</string>
- <int key="NSNibBindingConnectorVersion">2</int>
- </object>
- </object>
- <int key="connectionID">225</int>
- </object>
- </object>
- <object class="IBMutableOrderedSet" key="objectRecords">
- <object class="NSArray" key="orderedObjects">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBObjectRecord">
- <int key="objectID">0</int>
- <reference key="object" ref="0"/>
- <reference key="children" ref="1000"/>
- <nil key="parent"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">-2</int>
- <reference key="object" ref="1001"/>
- <reference key="parent" ref="0"/>
- <string key="objectName">File's Owner</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">-1</int>
- <reference key="object" ref="1003"/>
- <reference key="parent" ref="0"/>
- <string key="objectName">First Responder</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">-3</int>
- <reference key="object" ref="1004"/>
- <reference key="parent" ref="0"/>
- <string key="objectName">Application</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">77</int>
- <reference key="object" ref="306076665"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="578654495"/>
- <reference ref="144465269"/>
- </object>
- <reference key="parent" ref="0"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">173</int>
- <reference key="object" ref="144465269"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="588943363"/>
- </object>
- <reference key="parent" ref="306076665"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">174</int>
- <reference key="object" ref="588943363"/>
- <reference key="parent" ref="144465269"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">175</int>
- <reference key="object" ref="578654495"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="567316205"/>
- </object>
- <reference key="parent" ref="306076665"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">176</int>
- <reference key="object" ref="567316205"/>
- <reference key="parent" ref="578654495"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">220</int>
- <reference key="object" ref="112183683"/>
- <reference key="parent" ref="0"/>
- </object>
- </object>
- </object>
- <object class="NSMutableDictionary" key="flattenedProperties">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>-1.IBPluginDependency</string>
- <string>-2.IBPluginDependency</string>
- <string>-3.IBPluginDependency</string>
- <string>173.IBPluginDependency</string>
- <string>174.IBPluginDependency</string>
- <string>175.IBPluginDependency</string>
- <string>176.IBPluginDependency</string>
- <string>77.IBEditorWindowLastContentRect</string>
- <string>77.IBPluginDependency</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{485, 875}, {376, 32}}</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- </object>
- </object>
- <object class="NSMutableDictionary" key="unlocalizedProperties">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference key="dict.sortedKeys" ref="0"/>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- </object>
- <nil key="activeLocalization"/>
- <object class="NSMutableDictionary" key="localizations">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference key="dict.sortedKeys" ref="0"/>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- </object>
- <nil key="sourceID"/>
- <int key="maxID">225</int>
- </object>
- <object class="IBClassDescriber" key="IBDocument.Classes">
- <object class="NSMutableArray" key="referencedPartialClassDescriptions">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBPartialClassDescription">
- <string key="className">IMBFlickrHeaderViewController</string>
- <string key="superclassName">NSViewController</string>
- <object class="NSMutableDictionary" key="actions">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>addQuery:</string>
- <string>disabledAction:</string>
- <string>editQuery:</string>
- <string>removeQuery:</string>
- <string>setLicense:</string>
- <string>setSearchType:</string>
- <string>setSortOrder:</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- </object>
- </object>
- <object class="NSMutableDictionary" key="actionInfosByName">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>addQuery:</string>
- <string>disabledAction:</string>
- <string>editQuery:</string>
- <string>removeQuery:</string>
- <string>setLicense:</string>
- <string>setSearchType:</string>
- <string>setSortOrder:</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBActionInfo">
- <string key="name">addQuery:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">disabledAction:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">editQuery:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">removeQuery:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">setLicense:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">setSearchType:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">setSortOrder:</string>
- <string key="candidateClassName">id</string>
- </object>
- </object>
- </object>
- <object class="NSMutableDictionary" key="outlets">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>_button</string>
- <string>_queryField</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>NSButton</string>
- <string>NSSearchField</string>
- </object>
- </object>
- <object class="NSMutableDictionary" key="toOneOutletInfosByName">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>_button</string>
- <string>_queryField</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBToOneOutletInfo">
- <string key="name">_button</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo">
- <string key="name">_queryField</string>
- <string key="candidateClassName">NSSearchField</string>
- </object>
- </object>
- </object>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">IMBFlickrHeaderViewController.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">IMBObjectArrayController.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">IMBQLPreviewPanel.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">NSString+iMedia.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">UKFileWatcher.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">UKMainThreadProxy.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSView</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">NSView+iMedia.h</string>
- </object>
- </object>
- </object>
- <object class="NSMutableArray"
key="referencedPartialClassDescriptionsV3.2+">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBPartialClassDescription">
- <string key="className">NSActionCell</string>
- <string key="superclassName">NSCell</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSActionCell.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSApplication</string>
- <string key="superclassName">NSResponder</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier"
id="150404888">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSApplication.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSApplication</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier"
id="911924548">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSApplicationScripting.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSApplication</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier"
id="698176846">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSColorPanel.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSApplication</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSHelpManager.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSApplication</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSPageLayout.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSApplication</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSUserInterfaceItemSearching.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSButton</string>
- <string key="superclassName">NSControl</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSButton.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSButtonCell</string>
- <string key="superclassName">NSActionCell</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSButtonCell.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSCell</string>
- <string key="superclassName">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSCell.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSControl</string>
- <string key="superclassName">NSView</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier"
id="73367353">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSControl.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSController</string>
- <string key="superclassName">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSController.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSFormatter</string>
- <string key="superclassName">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">Foundation.framework/Headers/NSFormatter.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSMenu</string>
- <string key="superclassName">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier"
id="498024585">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSMenu.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSAccessibility.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <reference key="sourceIdentifier" ref="150404888"/>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <reference key="sourceIdentifier" ref="911924548"/>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <reference key="sourceIdentifier" ref="698176846"/>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <reference key="sourceIdentifier" ref="73367353"/>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSDictionaryController.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSDragging.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSFontManager.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSFontPanel.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSKeyValueBinding.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <reference key="sourceIdentifier" ref="498024585"/>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSNibLoading.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSOutlineView.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSPasteboard.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSSavePanel.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSTableView.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">AppKit.framework/Headers/NSToolbarItem.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier"
id="658392329">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSView.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">Foundation.framework/Headers/NSArchiver.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">Foundation.framework/Headers/NSClassDescription.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">Foundation.framework/Headers/NSError.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">Foundation.framework/Headers/NSFileManager.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">Foundation.framework/Headers/NSObject.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">Foundation.framework/Headers/NSObjectScripting.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">Foundation.framework/Headers/NSPortCoder.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">Foundation.framework/Headers/NSScriptClassDescription.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">Foundation.framework/Headers/NSScriptKeyValueCoding.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">Foundation.framework/Headers/NSScriptObjectSpecifiers.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">Foundation.framework/Headers/NSScriptWhoseTests.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">Foundation.framework/Headers/NSThread.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSURL.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">Foundation.framework/Headers/NSURLDownload.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">ImageKit.framework/Headers/IKImageBrowserView.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">ImageKit.framework/Headers/ImageKitDeprecated.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">ObjectiveFlickr.framework/Headers/LFHTTPRequest.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">ObjectiveFlickr.framework/Headers/ObjectiveFlickr.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">PDFKit.framework/Headers/PDFDocument.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">PDFKit.framework/Headers/PDFView.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">Print.framework/Headers/PDEPluginInterface.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">QTKit.framework/Headers/QTCaptureDecompressedVideoOutput.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">QTKit.framework/Headers/QTCaptureFileOutput.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">QTKit.framework/Headers/QTCaptureVideoPreviewOutput.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">QTKit.framework/Headers/QTCaptureView.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">QTKit.framework/Headers/QTMovie.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">QTKit.framework/Headers/QTMovieView.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">QuartzComposer.framework/Headers/QCCompositionParameterView.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">QuartzComposer.framework/Headers/QCCompositionPickerView.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">QuartzFilters.framework/Headers/QuartzFilterManager.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">WebKit.framework/Headers/WebDownload.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">WebKit.framework/Headers/WebEditingDelegate.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">WebKit.framework/Headers/WebFrameLoadDelegate.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string
key="minorKey">WebKit.framework/Headers/WebJavaPlugIn.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">WebKit.framework/Headers/WebPlugin.h</string>
- </object>
***The diff for this file has been truncated for email.***
=======================================
--- /trunk/IMBFlickrHeaderViewController.h Thu Mar 3 08:44:43 2011
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- iMedia Browser Framework <
http://karelia.com/imedia/>
-
- Copyright (c) 2005-2011 by Karelia Software et al.
-
- iMedia Browser is based on code originally developed by Jason Terhorst,
- further developed for Sandvox by Greg Hulands, Dan Wood, and Terrence
Talbot.
- The new architecture for version 2.0 was developed by Peter Baumgartner.
- Contributions have also been made by Matt Gough, Martin Wennerberg and
others
- as indicated in source files.
-
- The iMedia Browser Framework is licensed under the following terms:
-
- Permission is hereby granted, free of charge, to any person obtaining a
copy
- of this software and associated documentation files (the "Software"), to
deal
- in all or substantial portions of the Software without restriction,
including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
following
- conditions:
-
- Redistributions of source code must retain the original terms stated here,
- including this list of conditions, the disclaimer noted below, and the
- following copyright notice: Copyright (c) 2005-2011 by Karelia Software
et al.
-
- Redistributions in binary form must include, in an end-user-visible
manner,
- e.g., About window, Acknowledgments window, or similar, either a) the
original
- terms stated here, including this list of conditions, the disclaimer noted
- below, and the aforementioned copyright notice, or b) the aforementioned
- copyright notice and a link to
karelia.com/imedia.
-
- Neither the name of Karelia Software, nor Sandvox, nor the names of
- contributors to iMedia Browser may be used to endorse or promote products
- derived from the Software without prior and express written permission
from
- Karelia Software or individual contributors, as appropriate.
-
- Disclaimer: THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS
- "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE,
- AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH, THE
- SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN, THE SOFTWARE.
-*/
-
-
-// Author: Peter Baumgartner
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-@class IMBFlickrParser;
-@class IMBFlickrNode;
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-@interface IMBFlickrHeaderViewController : NSViewController
-{
- IMBFlickrParser* _parser;
- NSMutableDictionary* _queryParams;
- SEL _queryAction;
- SEL _buttonAction;
- NSString* _buttonTitle;
-
- IBOutlet NSSearchField* _queryField;
- IBOutlet NSButton* _button;
-}
-
-+ (IMBFlickrHeaderViewController*) headerViewControllerWithParser:
(IMBFlickrParser*) inParser forNode: (IMBFlickrNode*) inNode;
-
-
-@property (readonly) BOOL canEdit;
-@property (assign) IMBFlickrParser* parser;
-@property (assign) SEL queryAction;
-@property (assign) SEL buttonAction;
-@property (retain) NSString* buttonTitle;
-
-
-- (IBAction) addQuery:(id)inSender;
-- (IBAction) editQuery:(id)inSender;
-- (IBAction) removeQuery:(id)inSender;
-
-- (IBAction) setSearchType:(id)inSender;
-- (IBAction) setLicense:(id)inSender;
-- (IBAction) setSortOrder:(id)inSender;
-- (IBAction) disabledAction:(id)inSender;
-
-@end
-
-
-//----------------------------------------------------------------------------------------------------------------------
=======================================
--- /trunk/IMBFlickrHeaderViewController.m Fri Mar 4 09:04:09 2011
+++ /dev/null
@@ -1,391 +0,0 @@
-/*
- iMedia Browser Framework <
http://karelia.com/imedia/>
-
- Copyright (c) 2005-2011 by Karelia Software et al.
-
- iMedia Browser is based on code originally developed by Jason Terhorst,
- further developed for Sandvox by Greg Hulands, Dan Wood, and Terrence
Talbot.
- The new architecture for version 2.0 was developed by Peter Baumgartner.
- Contributions have also been made by Matt Gough, Martin Wennerberg and
others
- as indicated in source files.
-
- The iMedia Browser Framework is licensed under the following terms:
-
- Permission is hereby granted, free of charge, to any person obtaining a
copy
- of this software and associated documentation files (the "Software"), to
deal
- in all or substantial portions of the Software without restriction,
including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
following
- conditions:
-
- Redistributions of source code must retain the original terms stated here,
- including this list of conditions, the disclaimer noted below, and the
- following copyright notice: Copyright (c) 2005-2011 by Karelia Software
et al.
-
- Redistributions in binary form must include, in an end-user-visible
manner,
- e.g., About window, Acknowledgments window, or similar, either a) the
original
- terms stated here, including this list of conditions, the disclaimer noted
- below, and the aforementioned copyright notice, or b) the aforementioned
- copyright notice and a link to
karelia.com/imedia.
-
- Neither the name of Karelia Software, nor Sandvox, nor the names of
- contributors to iMedia Browser may be used to endorse or promote products
- derived from the Software without prior and express written permission
from
- Karelia Software or individual contributors, as appropriate.
-
- Disclaimer: THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS
- "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE,
- AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH, THE
- SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN, THE SOFTWARE.
-*/
-
-
-// Author: Peter Baumgartner
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark HEADERS
-
-#import "IMBFlickrHeaderViewController.h"
-#import "IMBFlickrParser.h"
-#import "IMBFlickrNode.h"
-#import "IMBCommon.h"
-#import "IMBLibraryController.h"
-#import "NSString+iMedia.h"
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark
-
-@interface IMBFlickrHeaderViewController ()
-@property (retain) NSMutableDictionary* queryParams;
-@end
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark
-
-@implementation IMBFlickrHeaderViewController
-
-@synthesize parser = _parser;
-@synthesize queryParams = _queryParams;
-@synthesize queryAction = _queryAction;
-@synthesize buttonAction = _buttonAction;
-@synthesize buttonTitle = _buttonTitle;
-
-/// We can edit text and tag queries only. Ensure that the user can't edit
the
-/// two standard queries ("Recent", "Most Interesting").
-- (BOOL) canEdit
-{
- NSMutableDictionary* queryParams = self.queryParams;
- if (!queryParams) return NO;
-
- NSNumber* methodNumber = [queryParams
objectForKey:IMBFlickrNodeProperty_Method];
- if (!methodNumber) return NO;
-
- return [methodNumber integerValue] == IMBFlickrNodeMethod_TextSearch ||
[methodNumber integerValue] == IMBFlickrNodeMethod_TagSearch;
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-+ (IMBFlickrHeaderViewController*) headerViewControllerWithParser:
(IMBFlickrParser*) inParser forNode: (IMBFlickrNode*) inNode
-{
- IMBFlickrHeaderViewController* controller =
[[[IMBFlickrHeaderViewController alloc] init] autorelease];
- controller.parser = inParser;
-
- NSMutableDictionary* queryParams = [NSMutableDictionary dictionary];
- [queryParams setObject:[NSNumber numberWithInt:inNode.method]
forKey:IMBFlickrNodeProperty_Method];
- [queryParams setObject:[NSNumber numberWithInt:inNode.license]
forKey:IMBFlickrNodeProperty_License];
- [queryParams setObject:[NSNumber numberWithInt:inNode.sortOrder]
forKey:IMBFlickrNodeProperty_SortOrder];
- [queryParams setObject:inNode.identifier
forKey:IMBFlickrNodeProperty_UUID];
- if (inNode.query) { // the standard Flickr search ("recent" etc. may have
no explicit query)...
- [queryParams setObject:inNode.query forKey:IMBFlickrNodeProperty_Query];
- }
-
- controller.queryParams = queryParams;
-
- return controller;
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-- (id) init
-{
- if (self = [super initWithNibName:@"IMBFlickrHeaderView"
bundle:IMBBundle()])
- {
- self.queryParams = [NSMutableDictionary dictionary];
- self.queryAction = @selector(editQuery:);
- }
-
- return self;
-}
-
-
-- (void) awakeFromNib
-{
- // set default data for an 'add' operation...
- if (self.buttonAction == @selector(addQuery:)) {
- [_queryParams setObject:[NSNumber
numberWithInt:IMBFlickrNodeMethod_TextSearch]
forKey:IMBFlickrNodeProperty_Method];
- [_queryParams setObject:[NSNumber
numberWithInt:IMBFlickrNodeLicense_CreativeCommons]
forKey:IMBFlickrNodeProperty_License];
- [_queryParams setObject:[NSNumber
numberWithInt:IMBFlickrNodeSortOrder_InterestingnessDesc]
forKey:IMBFlickrNodeProperty_SortOrder];
- }
-
- // Configure the search field...
-
- [_queryField setAction:_queryAction];
- [_queryField setTarget:self];
- NSString* query = [_queryParams objectForKey:IMBFlickrNodeProperty_Query];
- if (query) {
- [_queryField setStringValue:query];
- }
-
- // Configure the popup menu...
-
- NSMenuItem* item = nil;
- NSString* title = nil;
- NSMenu* menu = [[[NSMenu alloc] initWithTitle:@""] autorelease];
-
- title =
NSLocalizedStringWithDefaultValue(@"IMBFlickrParser.menu.searchIn",nil,IMBBundle(),@"Search
in",@"Menu item in Flickr options popup");
- item = [[NSMenuItem alloc] initWithTitle:title
action:@selector(disabledAction:) keyEquivalent:@""];
- item.target = self;
- item.tag = 0;
- [menu addItem:item];
- [item release];
-
- title =
NSLocalizedStringWithDefaultValue(@"IMBFlickrParser.menu.text",nil,IMBBundle(),@"Text",@"Menu
item in Flickr options popup");
- item = [[NSMenuItem alloc] initWithTitle:title
action:@selector(setSearchType:) keyEquivalent:@""];
- item.target = self;
- item.tag = 0;
- [menu addItem:item];
- [item release];
-
- title =
NSLocalizedStringWithDefaultValue(@"IMBFlickrParser.menu.tag",nil,IMBBundle(),@"Tag",@"Menu
item in Flickr options popup");
- item = [[NSMenuItem alloc] initWithTitle:title
action:@selector(setSearchType:) keyEquivalent:@""];
- item.target = self;
- item.tag = 1;
- [menu addItem:item];
- [item release];
-
- [menu addItem:[NSMenuItem separatorItem]];
-
- title =
NSLocalizedStringWithDefaultValue(@"IMBFlickrParser.menu.license",nil,IMBBundle(),@"License",@"Menu
item in Flickr options popup");
- item = [[NSMenuItem alloc] initWithTitle:title
action:@selector(disabledAction:) keyEquivalent:@""];
- item.target = self;
- item.tag = 0;
- [menu addItem:item];
- [item release];
-
- title =
NSLocalizedStringWithDefaultValue(@"IMBFlickrParser.menu.any",nil,IMBBundle(),@"Any",@"Menu
item in Flickr options popup");
- item = [[NSMenuItem alloc] initWithTitle:title
action:@selector(setLicense:) keyEquivalent:@""];
- item.target = self;
- item.tag = 0;
- [menu addItem:item];
- [item release];
-
- title =
NSLocalizedStringWithDefaultValue(@"IMBFlickrParser.menu.creativeCommons",nil,IMBBundle(),@"Creative
Commons",@"Menu item in Flickr options popup");
- item = [[NSMenuItem alloc] initWithTitle:title
action:@selector(setLicense:) keyEquivalent:@""];
- item.target = self;
- item.tag = 1;
- [menu addItem:item];
- [item release];
-
- title =
NSLocalizedStringWithDefaultValue(@"IMBFlickrParser.menu.derivativeWorks",nil,IMBBundle(),@"Derivative
Works",@"Menu item in Flickr options popup");
- item = [[NSMenuItem alloc] initWithTitle:title
action:@selector(setLicense:) keyEquivalent:@""];
- item.target = self;
- item.tag = 2;
- [menu addItem:item];
- [item release];
-
- title =
NSLocalizedStringWithDefaultValue(@"IMBFlickrParser.menu.commercialUse",nil,IMBBundle(),@"Commercial
Use",@"Menu item in Flickr options popup");
- item = [[NSMenuItem alloc] initWithTitle:title
action:@selector(setLicense:) keyEquivalent:@""];
- item.target = self;
- item.tag = 3;
- [menu addItem:item];
- [item release];
-
- [menu addItem:[NSMenuItem separatorItem]];
-
- title =
NSLocalizedStringWithDefaultValue(@"IMBFlickrParser.menu.chooseBy",nil,IMBBundle(),@"Choose
by",@"Menu item in Flickr options popup");
- item = [[NSMenuItem alloc] initWithTitle:title
action:@selector(disabledAction:) keyEquivalent:@""];
- item.target = self;
- item.tag = 0;
- [menu addItem:item];
- [item release];
-
- title =
NSLocalizedStringWithDefaultValue(@"IMBFlickrParser.menu.relevance",nil,IMBBundle(),@"Relevance",@"Menu
item in Flickr options popup");
- item = [[NSMenuItem alloc] initWithTitle:title
action:@selector(setSortOrder:) keyEquivalent:@""];
- item.target = self;
- item.tag = 7;
- [menu addItem:item];
- [item release];
-
- title =
NSLocalizedStringWithDefaultValue(@"IMBFlickrParser.menu.interest",nil,IMBBundle(),@"Interest",@"Menu
item in Flickr options popup");
- item = [[NSMenuItem alloc] initWithTitle:title
action:@selector(setSortOrder:) keyEquivalent:@""];
- item.target = self;
- item.tag = 5;
- [menu addItem:item];
- [item release];
-
- title =
NSLocalizedStringWithDefaultValue(@"IMBFlickrParser.menu.dateTaken",nil,IMBBundle(),@"Date
Taken",@"Menu item in Flickr options popup");
- item = [[NSMenuItem alloc] initWithTitle:title
action:@selector(setSortOrder:) keyEquivalent:@""];
- item.target = self;
- item.tag = 3;
- [menu addItem:item];
- [item release];
-
- title =
NSLocalizedStringWithDefaultValue(@"IMBFlickrParser.menu.datePosted",nil,IMBBundle(),@"Date
Posted",@"Menu item in Flickr options popup");
- item = [[NSMenuItem alloc] initWithTitle:title
action:@selector(setSortOrder:) keyEquivalent:@""];
- item.target = self;
- item.tag = 1;
- [menu addItem:item];
- [item release];
-
- NSSearchFieldCell* cell = (NSSearchFieldCell*) [_queryField cell];
- [cell setSearchMenuTemplate:menu];
-
- // Configure the button...
-
- [_button setTitle:_buttonTitle];
- [_button setAction:_buttonAction];
- [_button setTarget:self];
-}
-
-
-- (void) dealloc
-{
- [NSObject cancelPreviousPerformRequestsWithTarget:self];
- IMBRelease (_queryParams);
- IMBRelease (_buttonTitle);
- [super dealloc];
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-- (void) updateQuery: (NSDictionary*) queryParams
-{
- if (!queryParams) return;
-
- // we can't update a quere that has not yet been added...
- if (self.buttonAction == @selector(addQuery:)) return;
-
- [_parser updateCustomQuery:queryParams];
- [_parser saveCustomQueries];
-
- [_parser reloadCustomQuery:queryParams];
- [IMBFlickrNode sendSelectNodeNotificationForDict:queryParams];
-}
-
-
-- (IBAction) addQuery: (id) inSender
-{
- // add query text and UUID...
- [_queryParams setObject:[_queryField stringValue]
forKey:IMBFlickrNodeProperty_Query];
- [_queryParams setObject:[NSString uuid]
forKey:IMBFlickrNodeProperty_UUID];
-
- // save custom query to preferences...
- [_parser addCustomQuery:_queryParams];
- [_parser saveCustomQueries];
-
- // update ui...
- IMBLibraryController* libController = [IMBLibraryController
sharedLibraryControllerWithMediaType:[_parser mediaType]];
- [libController reloadNode:_parser.flickrRootNode];
- [IMBFlickrNode sendSelectNodeNotificationForDict:_queryParams];
-}
-
-
-- (IBAction) editQuery: (id) inSender
-{
- [_queryParams setObject:[_queryField stringValue]
forKey:IMBFlickrNodeProperty_Query];
- [self updateQuery:_queryParams];
-}
-
-
-- (IBAction) removeQuery: (id) inSender
-{
- [_parser removeCustomQuery:self.queryParams];
- [_parser saveCustomQueries];
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-- (IBAction) setSearchType:(id)inSender
-{
- NSInteger tag = [inSender tag];
- [_queryParams setObject:[NSNumber numberWithInteger:tag]
forKey:IMBFlickrNodeProperty_Method];
- [self updateQuery:_queryParams];
-}
-
-
-- (IBAction) setLicense:(id)inSender
-{
- NSInteger tag = [inSender tag];
- [_queryParams setObject:[NSNumber numberWithInteger:tag]
forKey:IMBFlickrNodeProperty_License];
- [self updateQuery:_queryParams];
-}
-
-
-- (IBAction) setSortOrder:(id)inSender
-{
- NSInteger tag = [inSender tag];
- [_queryParams setObject:[NSNumber numberWithInteger:tag]
forKey:IMBFlickrNodeProperty_SortOrder];
- [self updateQuery:_queryParams];
-}
-
-
-- (IBAction) disabledAction:(id)inSender
-{
- // Dummy action to make validateMenuItem: work as intended...
-}
-
-
-- (BOOL) validateMenuItem:(NSMenuItem*)inMenuItem
-{
- SEL action = [inMenuItem action];
- NSInteger tag = [inMenuItem tag];
- NSInteger method = [[_queryParams
objectForKey:IMBFlickrNodeProperty_Method] integerValue];
- NSInteger license = [[_queryParams
objectForKey:IMBFlickrNodeProperty_License] integerValue];
- NSInteger sortOrder = [[_queryParams
objectForKey:IMBFlickrNodeProperty_SortOrder] integerValue];
-
- if (action == @selector(setSearchType:))
- {
- [inMenuItem setState:tag == method];
- return YES;
- }
- else if (action == @selector(setLicense:))
- {
- [inMenuItem setState:tag == license];
- return YES;
- }
- else if (action == @selector(setSortOrder:))
- {
- [inMenuItem setState:tag == sortOrder];
- return YES;
- }
-
- [inMenuItem setState:NO];
- return NO;
-}
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-@end
=======================================
--- /trunk/IMBFlickrNode.h Fri Mar 4 02:54:47 2011
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- iMedia Browser Framework <
http://karelia.com/imedia/>
-
- Copyright (c) 2005-2011 by Karelia Software et al.
-
- iMedia Browser is based on code originally developed by Jason Terhorst,
- further developed for Sandvox by Greg Hulands, Dan Wood, and Terrence
Talbot.
- The new architecture for version 2.0 was developed by Peter Baumgartner.
- Contributions have also been made by Matt Gough, Martin Wennerberg and
others
- as indicated in source files.
-
- The iMedia Browser Framework is licensed under the following terms:
-
- Permission is hereby granted, free of charge, to any person obtaining a
copy
- of this software and associated documentation files (the "Software"), to
deal
- in all or substantial portions of the Software without restriction,
including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
following
- conditions:
-
- Redistributions of source code must retain the original terms stated here,
- including this list of conditions, the disclaimer noted below, and the
- following copyright notice: Copyright (c) 2005-2011 by Karelia Software
et al.
-
- Redistributions in binary form must include, in an end-user-visible
manner,
- e.g., About window, Acknowledgments window, or similar, either a) the
original
- terms stated here, including this list of conditions, the disclaimer noted
- below, and the aforementioned copyright notice, or b) the aforementioned
- copyright notice and a link to
karelia.com/imedia.
-
- Neither the name of Karelia Software, nor Sandvox, nor the names of
- contributors to iMedia Browser may be used to endorse or promote products
- derived from the Software without prior and express written permission
from
- Karelia Software or individual contributors, as appropriate.
-
- Disclaimer: THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS
- "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE,
- AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH, THE
- SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN, THE SOFTWARE.
-*/
-
-
-// Author: Christoph Priebe
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-// Objective Flickr
-#import <ObjectiveFlickr/ObjectiveFlickr.h>
-
-// iMedia
-#import <iMedia/IMBNode.h>
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-
-@class IMBParser;
-
-extern NSString* const IMBFlickrNodeProperty_License;
-extern NSString* const IMBFlickrNodeProperty_Method;
-extern NSString* const IMBFlickrNodeProperty_Query;
-extern NSString* const IMBFlickrNodeProperty_SortOrder;
-extern NSString* const IMBFlickrNodeProperty_UUID;
-
-typedef enum {
- IMBFlickrNodeMethod_TextSearch = 0,
- IMBFlickrNodeMethod_TagSearch,
- IMBFlickrNodeMethod_Recent,
- IMBFlickrNodeMethod_MostInteresting,
- IMBFlickrNodeMethod_GetInfo
-} IMBFlickrNodeMethod;
-
-typedef enum {
- IMBFlickrNodeLicense_Undefined = 0,
- IMBFlickrNodeLicense_CreativeCommons,
- IMBFlickrNodeLicense_DerivativeWorks,
- IMBFlickrNodeLicense_CommercialUse
-} IMBFlickrNodeLicense;
-
-typedef enum {
- IMBFlickrNodeSortOrder_Undefined = 0,
- IMBFlickrNodeSortOrder_DatePostedDesc,
- IMBFlickrNodeSortOrder_DatePostedAsc,
- IMBFlickrNodeSortOrder_DateTakenDesc,
- IMBFlickrNodeSortOrder_DateTakenAsc,
- IMBFlickrNodeSortOrder_InterestingnessDesc,
- IMBFlickrNodeSortOrder_InterestingnessAsc,
- IMBFlickrNodeSortOrder_Relevance
-} IMBFlickrNodeSortOrder;
-
-/**
- * Flickr parser custom node.
- *
- * @date 2009-09-21 Start implementing this class (cp).
- *
- * @author Christoph Priebe (cp)
- * @since iMedia 2.0
- */
-@interface IMBFlickrNode: IMBNode {
- @private
- BOOL _customNode;
- NSDictionary* _flickrResponse;
- IMBFlickrNodeLicense _license;
- IMBFlickrNodeMethod _method;
- NSInteger _page;
- NSString* _query;
- IMBFlickrNodeSortOrder _sortOrder;
-}
-
-#pragma mark Construction
-
-+ (IMBFlickrNode*) flickrNodeForInterestingPhotosForRoot: (IMBFlickrNode*)
root
- parser: (IMBParser*) parser;
-
-+ (IMBFlickrNode*) flickrNodeForRecentPhotosForRoot: (IMBFlickrNode*) root
- parser: (IMBParser*) parser;
-
-+ (IMBFlickrNode*) flickrNodeForRoot: (IMBFlickrNode*) root
- parser: (IMBParser*) parser;
-
-+ (IMBFlickrNode*) flickrNodeFromDictionary: (NSDictionary*) dictionary
- rootNode: (IMBFlickrNode*) root
- parser: (IMBParser*) parser;
-
-+ (void) sendSelectNodeNotificationForDict:(NSDictionary*) dict;
-
-
-#pragma mark Flickr Response Handling
-
-/// The iMB Flickr parser saves a response of a Flickr request here.
-@property (copy) NSDictionary* flickrResponse;
-@property (readonly) BOOL hasFlickrResponse;
-
-- (void) clearFlickrResponse;
-
-/// Processes the 'flickrResponse' dictionary to fill the node with actual
images.
-- (void) processResponseForContext: (OFFlickrAPIContext*) context;
-
-
-#pragma mark Properties
-
-@property (assign, getter=isCustomNode) BOOL customNode;
-@property (assign) IMBFlickrNodeLicense license;
-@property (assign) IMBFlickrNodeMethod method;
-@property (assign) NSInteger page;
-@property (copy) NSString* query;
-@property (assign) IMBFlickrNodeSortOrder sortOrder;
-
-
-#pragma mark Utilities
-
-- (NSDictionary*) argumentsForFlickrCall;
-+ (NSString *)base58EncodedValue:(long long)num;
-+ (NSString *)descriptionOfLicense:(int)aLicenseNumber;
-+ (NSString*) identifierWithQueryParams: (NSDictionary*) inQueryParams;
-- (void) readPropertiesFromDictionary: (NSDictionary*) dictionary;
-
-@end
=======================================
--- /trunk/IMBFlickrNode.m Fri Mar 4 02:54:47 2011
+++ /dev/null
@@ -1,632 +0,0 @@
-/*
- iMedia Browser Framework <
http://karelia.com/imedia/>
-
- Copyright (c) 2005-2011 by Karelia Software et al.
-
- iMedia Browser is based on code originally developed by Jason Terhorst,
- further developed for Sandvox by Greg Hulands, Dan Wood, and Terrence
Talbot.
- The new architecture for version 2.0 was developed by Peter Baumgartner.
- Contributions have also been made by Matt Gough, Martin Wennerberg and
others
- as indicated in source files.
-
- The iMedia Browser Framework is licensed under the following terms:
-
- Permission is hereby granted, free of charge, to any person obtaining a
copy
- of this software and associated documentation files (the "Software"), to
deal
- in all or substantial portions of the Software without restriction,
including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
following
- conditions:
-
- Redistributions of source code must retain the original terms stated here,
- including this list of conditions, the disclaimer noted below, and the
- following copyright notice: Copyright (c) 2005-2011 by Karelia Software
et al.
-
- Redistributions in binary form must include, in an end-user-visible
manner,
- e.g., About window, Acknowledgments window, or similar, either a) the
original
- terms stated here, including this list of conditions, the disclaimer noted
- below, and the aforementioned copyright notice, or b) the aforementioned
- copyright notice and a link to
karelia.com/imedia.
-
- Neither the name of Karelia Software, nor Sandvox, nor the names of
- contributors to iMedia Browser may be used to endorse or promote products
- derived from the Software without prior and express written permission
from
- Karelia Software or individual contributors, as appropriate.
-
- Disclaimer: THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS
- "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE,
- AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH, THE
- SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN, THE SOFTWARE.
-*/
-
-
-// Author: Christoph Priebe
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-// iMedia
-#import "IMBFlickrNode.h"
-#import "IMBFlickrObject.h"
-#import "IMBFlickrParser.h"
-#import "IMBLibraryController.h"
-#import "IMBLoadMoreObject.h"
-#import "NSString+iMedia.h"
-#import "IMBNodeViewController.h"
-#import "IMBFlickrHeaderViewController.h"
-
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-@interface IMBFlickrNode ()
-// Utilities:
-+ (NSString*) identifierWithMethod: (NSInteger) method query: (NSString*)
query;
-@end
-
-#pragma mark -
-
-//----------------------------------------------------------------------------------------------------------------------
-
-// Some additions to the iMB node useful for Flickr handling:
-@implementation IMBFlickrNode
-
-NSString* const IMBFlickrNodeProperty_License = @"license";
-NSString* const IMBFlickrNodeProperty_Method = @"method";
-NSString* const IMBFlickrNodeProperty_Query = @"query";
-NSString* const IMBFlickrNodeProperty_SortOrder = @"sortOrder";
-NSString* const IMBFlickrNodeProperty_UUID = @"uuid";
-
-
-#pragma mark
-#pragma mark Construction
-
-- (id) init {
- if (self = [super init]) {
- self.license = IMBFlickrNodeLicense_Undefined;
- self.method = IMBFlickrNodeMethod_TextSearch;
- self.sortOrder = IMBFlickrNodeSortOrder_InterestingnessDesc;
- }
- return self;
-}
-
-
-- (id) copyWithZone: (NSZone*) inZone {
- IMBFlickrNode* copy = [super copyWithZone:inZone];
- copy.customNode = self.customNode;
- copy.flickrResponse = self.flickrResponse;
- copy.license = self.license;
- copy.method = self.method;
- copy.query = self.query;
-
copy.page =
self.page;
- copy.sortOrder = self.sortOrder;
- return copy;
-}
-
-
-+ (IMBFlickrNode*) genericFlickrNodeForRoot: (IMBFlickrNode*) root
- parser: (IMBParser*) parser {
-
- IMBFlickrNode* node = [[[IMBFlickrNode alloc] init] autorelease];
- node.attributes = [NSMutableDictionary dictionary];
- node.leaf = YES;
- //node.parentNode = root;
- node.parser = parser;
-
- // Leaving subNodes and objects nil, will trigger a
populateNode:options:error:
- // as soon as the root node is opened.
- node.subNodes = nil;
- node.objects = nil;
-
- node.badgeTypeNormal = kIMBBadgeTypeReload;
- node.badgeTarget = self;
- node.badgeSelector = @selector (reloadNode:);
-
- return node;
-}
-
-
-+ (IMBFlickrNode*) flickrNodeForInterestingPhotosForRoot: (IMBFlickrNode*)
root
- parser: (IMBParser*) parser {
-
- IMBFlickrNode* node = [self genericFlickrNodeForRoot:root parser:parser];
- node.icon = [NSImage imageNamed:NSImageNameFolderSmart];
- [node.icon setScalesWhenResized:YES];
- [node.icon setSize:NSMakeSize(16.0, 16.0)];
- node.identifier = [self
identifierWithMethod:IMBFlickrNodeMethod_MostInteresting query:@"30"];
- node.mediaSource = node.identifier;
- node.method = IMBFlickrNodeMethod_MostInteresting;
-
node.name =
NSLocalizedStringWithDefaultValue(@"IMBFlickrParser.node.mostinteresting",nil,IMBBundle(),@"Most
Interesting",@"Flickr parser standard node name.");
- node.sortOrder = IMBFlickrNodeSortOrder_DatePostedDesc;
- return node;
-}
-
-
-+ (IMBFlickrNode*) flickrNodeForRecentPhotosForRoot: (IMBFlickrNode*) root
- parser: (IMBParser*) parser {
-
- IMBFlickrNode* node = [self genericFlickrNodeForRoot:root parser:parser];
- node.icon = [NSImage imageNamed:NSImageNameFolderSmart];
- [node.icon setScalesWhenResized:YES];
- [node.icon setSize:NSMakeSize(16.0, 16.0)];
- node.identifier = [self identifierWithMethod:IMBFlickrNodeMethod_Recent
query:@"30"];
- node.mediaSource = node.identifier;
- node.method = IMBFlickrNodeMethod_Recent;
-
node.name =
NSLocalizedStringWithDefaultValue(@"IMBFlickrParser.node.recent",nil,IMBBundle(),@"Recent",@"Flickr
parser standard node name.");
- node.sortOrder = IMBFlickrNodeSortOrder_DatePostedDesc;
- return node;
-}
-
-
-+ (IMBFlickrNode*) flickrNodeForRoot: (IMBFlickrNode*) root
- parser: (IMBParser*) parser {
-
- // iMB general...
- IMBFlickrNode* node = [[[IMBFlickrNode alloc] init] autorelease];
- //node.parentNode = root;
- node.parser = parser;
- node.leaf = YES;
- node.attributes = [NSMutableDictionary dictionary];
-
- // Leaving subNodes and objects nil, will trigger a
populateNode:options:error:
- // as soon as the root node is opened.
- node.subNodes = nil;
- node.objects = nil;
-
- node.badgeTypeNormal = kIMBBadgeTypeReload;
- node.badgeTarget = self;
- node.badgeSelector = @selector (reloadNode:);
-
- return node;
-}
-
-
-+ (IMBFlickrNode*) flickrNodeFromDictionary: (NSDictionary*) dictionary
- rootNode: (IMBFlickrNode*) root
- parser: (IMBParser*) parser {
-
- IMBFlickrNode* node = [IMBFlickrNode flickrNodeForRoot:root
parser:parser];
- [node readPropertiesFromDictionary:dictionary];
- return node;
-}
-
-
-+ (void) sendSelectNodeNotificationForDict:(NSDictionary*) dict {
- if (dict) {
- NSString* identifier = [IMBFlickrNode identifierWithQueryParams:dict];
- [IMBNodeViewController selectNodeWithIdentifier:identifier];
- }
-}
-
-
-- (void) dealloc {
- IMBRelease (_query);
- IMBRelease (_flickrResponse);
- [super dealloc];
-}
-
-
-#pragma mark
-#pragma mark Flickr Response Handling
-
-- (void) clearFlickrResponse {
- self.flickrResponse = nil;
-}
-
-
-- (BOOL) hasFlickrResponse {
- return _flickrResponse != nil;
-}
-
-
-// What about original size?
-
-- (NSString
*)flickrSizeFromFlickrSizeSpecifier:(IMBFlickrSizeSpecifier)flickrSizeSpecifier
-{
- NSAssert(flickrSizeSpecifier >= kIMBFlickrSizeSpecifierOriginal &&
flickrSizeSpecifier <= kIMBFlickrSizeSpecifierLarge, @"Illegal size for
flickr");
- NSString *sizeLookup[] = { @"o", OFFlickrSmallSize, OFFlickrMediumSize,
OFFlickrLargeSize };
- // Note: medium is nil, so we can't put in a dictionary. Original not
specified in objective-flickr
- return sizeLookup[flickrSizeSpecifier];
-}
-
-
-- (NSURL *)imageURLForDesiredSize:(IMBFlickrSizeSpecifier)size
fromPhotoDict:(NSDictionary *)photoDict context:(OFFlickrAPIContext*)
context;
-{
- NSURL* imageURL = nil;
- if (!imageURL && kIMBFlickrSizeSpecifierOriginal == size)
- {
- if ([photoDict objectForKey:@"url_o"])
- {
- imageURL = [NSURL URLWithString:[photoDict objectForKey:@"url_o"]];
- }
- else
- {
- size = kIMBFlickrSizeSpecifierLarge; // downgrade to requesting large
if no original
- }
- }
- if (!imageURL && kIMBFlickrSizeSpecifierLarge == size)
- {
- if ([photoDict objectForKey:@"url_l"])
- {
- imageURL = [NSURL URLWithString:[photoDict objectForKey:@"url_l"]];
- }
- else
- {
- size = kIMBFlickrSizeSpecifierMedium; // downgrade to requesting
medium if no large
- }
- }
-
- if (!imageURL && kIMBFlickrSizeSpecifierMedium == size)
- {
- if ([photoDict objectForKey:@"url_m"])
- {
- imageURL = [NSURL URLWithString:[photoDict objectForKey:@"url_m"]];
- }
- else
- {
- size = kIMBFlickrSizeSpecifierSmall; // downgrade to requesting medium
if no large
- }
- }
-
- if (!imageURL && kIMBFlickrSizeSpecifierSmall == size)
- {
- if ([photoDict objectForKey:@"url_s"])
- {
- imageURL = [NSURL URLWithString:[photoDict objectForKey:@"url_s"]];
- }
- }
-
- // Fallback. Really we should have it by now! But search for Edward &
Bella Icon has no medium size!
- if (!imageURL)
- {
- // build up URL programatically
- NSString *flickrSize = [self flickrSizeFromFlickrSizeSpecifier:size];
- imageURL = [context photoSourceURLFromDictionary:photoDict
size:flickrSize];
- }
- return imageURL;
-}
-
-
-- (NSArray*) extractPhotosFromFlickrResponse: (NSDictionary*) response
context: (OFFlickrAPIContext*) context {
- IMBFlickrParser* parser = (IMBFlickrParser*) self.parser;
- NSArray* photos = [response valueForKeyPath:@"photos.photo"];
- NSMutableArray* objects = [NSMutableArray arrayWithCapacity:photos.count];
- self.displayedObjectCount = 0;
-
- for (NSDictionary* photoDict in photos) {
-
- IMBFlickrObject* obj = [[IMBFlickrObject alloc] init];
-
- // Only store a location if we are allowed to download
- BOOL canDownload = [[photoDict objectForKey:@"can_download"] boolValue];
- if (canDownload)
- {
- obj.location = [self imageURLForDesiredSize:parser.desiredSize
fromPhotoDict:photoDict context:context];
- }
- obj.shouldDisableTitle = !canDownload;
-
-
obj.name = [photoDict objectForKey:@"title"];
-
- // A lot of the metadata comes from the "extras" key we request
- NSMutableDictionary *metadata = [NSMutableDictionary dictionary];
- [metadata addEntriesFromDictionary:photoDict]; // give metaData the
whole thing!
- NSURL *webPageURL = [context photoWebPageURLFromDictionary:photoDict];
- [metadata setObject:webPageURL forKey:@"webPageURL"];
-
- NSURL *quickLookURL = [self
imageURLForDesiredSize:kIMBFlickrSizeSpecifierMedium
fromPhotoDict:photoDict context:context];
- [metadata setObject:quickLookURL forKey:@"quickLookURL"];
-
- // But give it a better 'description' without the nested item
- NSString *descHTML = [[photoDict objectForKey:@"description"]
objectForKey:@"_text"];
- if (descHTML)
- {
- NSData *HTMLData = [descHTML dataUsingEncoding:NSUTF8StringEncoding];
- NSDictionary *options = [NSDictionary dictionaryWithObject:[NSNumber
numberWithInt:NSUTF8StringEncoding]
forKey:NSCharacterEncodingDocumentOption];
- NSAttributedString *descAttributed = [[[NSAttributedString alloc]
initWithHTML:HTMLData options:options documentAttributes:nil] autorelease];
- if (descAttributed)
- {
- NSString *desc = [descAttributed string];
- if (nil != desc) [metadata setObject:desc forKey:@"comment"];
- }
-#ifdef DEBUG
- else NSLog(@"Unable to make attributed string out of %@", descHTML);
-#endif
- }
-
- NSString *can_download = [photoDict objectForKey:@"can_download"];
- NSString *license = [photoDict objectForKey:@"license"];
- NSString *ownerName = [photoDict objectForKey:@"ownername"];
- NSString *photoID = [photoDict objectForKey:@"id"];
- id width = [metadata objectForKey:@"width_o"];
- if (width == nil) width = [metadata objectForKey:@"width_l"];
- if (width == nil) width = [metadata objectForKey:@"width_m"];
- if (width == nil) width = [metadata objectForKey:@"width_s"];
- id height = [metadata objectForKey:@"height_o"];
- if (height == nil) height = [metadata objectForKey:@"height_l"];
- if (height == nil) height = [metadata objectForKey:@"height_m"];
- if (height == nil) height = [metadata objectForKey:@"height_s"];
-
- if (nil != can_download) [metadata setObject:can_download
forKey:@"can_download"];
- if (nil != license) [metadata setObject:license forKey:@"license"];
- if (nil != ownerName) [metadata setObject:ownerName
forKey:@"ownername"];
- if (nil != photoID) [metadata setObject:photoID forKey:@"id"];
- if (nil != width) [metadata setObject:width forKey:@"width"];
- if (nil != height) [metadata setObject:height forKey:@"height"];
-
- obj.preliminaryMetadata = [NSDictionary
dictionaryWithDictionary:metadata];
-
- obj.parser = self.parser;
-
- NSURL* thumbnailURL = [context photoSourceURLFromDictionary:photoDict
size:OFFlickrThumbnailSize];
- obj.imageLocation = thumbnailURL;
- obj.imageRepresentationType = IKImageBrowserCGImageRepresentationType;
- obj.imageRepresentation = nil; // Build lazily when needed
-
- [objects addObject:obj];
- [obj release];
- self.displayedObjectCount++;
- }
-
- return objects;
-}
-
-
-- (void) processResponseForContext: (OFFlickrAPIContext*) context {
- if (!self.hasFlickrResponse) return;
-
- // TODO: Instead of inserting the "load more" object at the end of the
- // array, we should probably associate a sort descriptor with the image
view.
- NSMutableArray* oldImages = [self.objects mutableCopy];
- IMBLoadMoreObject* loadMoreObject = nil;
- for (id object in oldImages) {
- if ([object isKindOfClass:[IMBLoadMoreObject class]]) {
- loadMoreObject = object;
- break;
- }
- }
- if (loadMoreObject) {
- [oldImages removeObject:loadMoreObject];
- }
-
- NSMutableArray* newImages = [[self extractPhotosFromFlickrResponse:[self
flickrResponse] context:context] mutableCopy];
- [newImages removeObjectsInArray:oldImages]; // ensure that we have no
doubles
-
- if ( [oldImages count] ) {
- [newImages insertObjects:oldImages atIndexes:[NSIndexSet
indexSetWithIndexesInRange:NSMakeRange(0, oldImages.count)]];
- }
-
- // add 'load more' button...
- IMBLoadMoreObject* loadMoreButton = ((IMBFlickrParser*)
self.parser).loadMoreButton;
- loadMoreButton.nodeIdentifier = self.identifier;
- [newImages addObject:loadMoreButton];
-
- self.objects = newImages;
-
- [newImages release];
- [oldImages release];
-}
-
-
-#pragma mark
-#pragma mark Properties
-
-@synthesize customNode = _customNode;
-@synthesize flickrResponse = _flickrResponse;
-@synthesize license = _license;
-@synthesize method = _method;
-@synthesize page = _page;
-@synthesize query = _query;
-@synthesize sortOrder = _sortOrder;
-
-
-#pragma mark
-#pragma mark Utilities
-
-/// License kinds and ids as found under
-///
http://www.flickr.com/services/api/flickr.photos.licenses.getInfo.html
-typedef enum {
- IMBFlickrNodeFlickrLicenseID_Undefined = 0,
- IMBFlickrNodeFlickrLicenseID_AttributionNonCommercialShareAlike = 1,
- IMBFlickrNodeFlickrLicenseID_AttributionNonCommercial = 2,
- IMBFlickrNodeFlickrLicenseID_AttributionNonCommercialNoDerivs = 3,
- IMBFlickrNodeFlickrLicenseID_Attribution = 4,
- IMBFlickrNodeFlickrLicenseID_AttributionShareAlike = 5,
- IMBFlickrNodeFlickrLicenseID_AttributionNoDerivs = 6,
- IMBFlickrNodeFlickrLicenseID_NoKnownCopyrightRestrictions = 7
-} IMBFlickrNodeFlickrLicenseID;
-
-
-/// Make the properties of the receiver into a dictionary with keys and
values
-/// that can be directly passed to the Flick method call.
-/// Have a look at
http://www.flickr.com/services/api/flickr.photos.search.html
-/// for details and arguments of a search query.
-- (NSDictionary*) argumentsForFlickrCall {
- NSMutableDictionary* arguments = [NSMutableDictionary dictionary];
-
- // build query arguments based on method...
- if (self.query) {
- if (self.method == IMBFlickrNodeMethod_TagSearch) {
- [arguments setObject:self.query forKey:@"tags"];
- [arguments setObject:@"all" forKey:@"tag_mode"];
- } else if (self.method == IMBFlickrNodeMethod_TextSearch) {
- [arguments setObject:self.query forKey:@"text"];
- }
- }
-
- // translate our user kinds into Flickr license kind ids...
- if (self.license == IMBFlickrNodeLicense_CreativeCommons) {
- [arguments setObject:[NSString stringWithFormat:@"%d",
IMBFlickrNodeFlickrLicenseID_Attribution] forKey:@"license"];
- } else if (self.license == IMBFlickrNodeLicense_DerivativeWorks) {
- [arguments setObject:[NSString stringWithFormat:@"%d", self.license]
forKey:@"license"];
- } else if (self.license == IMBFlickrNodeLicense_CommercialUse) {
- [arguments setObject:[NSString stringWithFormat:@"%d",
IMBFlickrNodeFlickrLicenseID_NoKnownCopyrightRestrictions]
forKey:@"license"];
- }
-
- // determine sort order...
- NSString* sortOrder = nil;
- if (self.sortOrder == IMBFlickrNodeSortOrder_DatePostedDesc) {
- sortOrder = @"date-posted-desc";
- } else if (self.sortOrder == IMBFlickrNodeSortOrder_DatePostedAsc) {
- sortOrder = @"date-posted-asc";
- } else if (self.sortOrder == IMBFlickrNodeSortOrder_DateTakenAsc) {
- sortOrder = @"date-taken-asc";
- } else if (self.sortOrder == IMBFlickrNodeSortOrder_DateTakenDesc) {
- sortOrder = @"date-taken-desc";
- } else if (self.sortOrder == IMBFlickrNodeSortOrder_InterestingnessDesc) {
- sortOrder = @"interestingness-desc";
- } else if (self.sortOrder == IMBFlickrNodeSortOrder_InterestingnessAsc) {
- sortOrder = @"interestingness-asc";
- } else if (self.sortOrder == IMBFlickrNodeSortOrder_Relevance) {
- sortOrder = @"relevance";
- }
- if (sortOrder) {
- [arguments setObject:sortOrder forKey:@"sort"];
- }
-
- // limit the search to a specific number of items...
- [arguments setObject:@"30" forKey:@"per_page"];
-
- // We are only doing photos. Maybe later we want to do videos?
- [arguments setObject:@"photos" forKey:@"media"];
-
- // Extra metadata needed
- //
http://www.flickr.com/services/api/flickr.photos.search.html
- [arguments
setObject:@"description,license,owner_name,original_format,geo,tags,o_dims,url_o,url_l,url_m,url_s,usage"
forKey:@"extras"];
- // Useful keys we can get from this:
- // description -> array with ... description
- // original_format -> originalformat, orignalsecret
- // url_o,l, m, s ... URL to get the various sizes. (url_l is not really
documented, but works if needed.)
- // usage: can_download (& others)
- // Example of a photo that can't be downloaded: THE DECEIVING title.
-
- // load the specified page...
- NSString* page = [NSString stringWithFormat:@"%d",
self.page + 1];
- [arguments setObject:page forKey:@"page"];
-
- return arguments;
-}
-
-
-// From
http://gist.github.com/101674
-
-+ (NSString *)base58EncodedValue:(long long)num {
- NSString *alphabet =
@"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ";
- int baseCount = [alphabet length];
- NSString *encoded = @"";
- while(num >= baseCount) {
- double div = num/baseCount;
- long long mod = (num - (baseCount * (long long)div));
- NSString *alphabetChar = [alphabet substringWithRange: NSMakeRange(mod,
1)];
- encoded = [NSString stringWithFormat: @"%@%@", alphabetChar, encoded];
- num = (long long)div;
- }
-
- if(num) {
- encoded = [NSString stringWithFormat: @"%@%@", [alphabet
substringWithRange: NSMakeRange(num, 1)], encoded];
- }
- return encoded;
-}
-
-
-+ (NSString*) descriptionOfLicense: (int) aLicenseNumber {
- NSString* result = nil;
- switch (aLicenseNumber)
- {
- case IMBFlickrNodeFlickrLicenseID_AttributionNonCommercialShareAlike:
- result = @"Attribution-NonCommercial-ShareAlike License";
- break;
- case IMBFlickrNodeFlickrLicenseID_AttributionNonCommercial:
- result = @"Attribution-NonCommercial License";
- break;
- case IMBFlickrNodeFlickrLicenseID_AttributionNonCommercialNoDerivs:
- result = @"Attribution-NonCommercial-NoDerivs License";
- break;
- case IMBFlickrNodeFlickrLicenseID_Attribution:
- result = @"Attribution License";
- break;
- case IMBFlickrNodeFlickrLicenseID_AttributionShareAlike:
- result = @"Attribution-ShareAlike License";
- break;
- case IMBFlickrNodeFlickrLicenseID_AttributionNoDerivs:
- result = @"Attribution-NoDerivs License";
- break;
- }
- if (result)
- {
- result = [@"Creative Commons: " stringByAppendingString:result];
- }
- return result;
-}
-
-
-/// We construct here something like:
-/// IMBFlickrParser://flickr.photos.search/tag/macintosh,apple
-///
-/// TOOD: Maybe it's a better idea to just go with
-/// [NSString uuid]
-/// and create something like:
-/// IMBFlickrParser://12345678-12345-12345-12345678
-+ (NSString*) identifierWithMethod: (NSInteger) method query: (NSString*)
query {
-#if 0
- // EXPERIMENTAL...
- NSString* parserClassName = NSStringFromClass ([IMBFlickrParser class]);
- return [NSString stringWithFormat:@"%@:/%@", parserClassName, [NSString
uuid]];
- // ...EXPERIMENTAL
-#else
- NSString* flickrMethod = [IMBFlickrParser
flickrMethodForMethodCode:method];
- if (method == IMBFlickrNodeMethod_TagSearch) {
- flickrMethod = [flickrMethod stringByAppendingString:@"/tag"];
- } else if (method == IMBFlickrNodeMethod_TextSearch) {
- flickrMethod = [flickrMethod stringByAppendingString:@"/text"];
- } else if (method == IMBFlickrNodeMethod_Recent) {
- flickrMethod = [flickrMethod stringByAppendingString:@"/recent"];
- } else if (method == IMBFlickrNodeMethod_MostInteresting) {
- flickrMethod = [flickrMethod stringByAppendingString:@"/interesting"];
- }
- NSString* albumPath = [NSString stringWithFormat:@"/%@/%@", flickrMethod,
query];
- NSString* parserClassName = NSStringFromClass ([IMBFlickrParser class]);
- return [NSString stringWithFormat:@"%@:/%@", parserClassName, albumPath];
-#endif
-}
-
-
-+ (NSString*) identifierWithQueryParams: (NSDictionary*) inQueryParams {
- NSString* parserClassName = NSStringFromClass ([IMBFlickrParser class]);
- NSString* uuid = [inQueryParams objectForKey:IMBFlickrNodeProperty_UUID];
- if (uuid == nil) uuid = [inQueryParams
objectForKey:IMBFlickrNodeProperty_Query];
- return [NSString stringWithFormat:@"%@:/%@",parserClassName,uuid];
-}
-
-
-- (void) readPropertiesFromDictionary: (NSDictionary*) dictionary {
- if (!dictionary) return;
-
- // extract node data from preferences dictionary...
- NSInteger method = [[dictionary
objectForKey:IMBFlickrNodeProperty_Method] intValue];
- NSString* query = [dictionary objectForKey:IMBFlickrNodeProperty_Query];
- NSString* title = query;
-
- if (!query || !title) {
- NSLog (@"Invalid Flickr parser user node dictionary.");
- return;
- }
-
- // Flickr stuff...
- self.customNode = YES;
- self.icon = [NSImage imageNamed:NSImageNameFolderSmart];
- [self.icon setScalesWhenResized:YES];
- [self.icon setSize:NSMakeSize(16.0, 16.0)];
- self.identifier = [IMBFlickrNode identifierWithQueryParams:dictionary];
- self.license = [[dictionary objectForKey:IMBFlickrNodeProperty_License]
intValue];
- self.mediaSource = self.identifier;
- self.method = method;
-
self.name = title;
- self.query = query;
- self.sortOrder = [[dictionary
objectForKey:IMBFlickrNodeProperty_SortOrder] intValue];
-}
-
-@end
=======================================
--- /trunk/IMBFlickrObject.h Mon Jan 3 15:11:51 2011
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- iMedia Browser Framework <
http://karelia.com/imedia/>
-
- Copyright (c) 2005-2011 by Karelia Software et al.
-
- iMedia Browser is based on code originally developed by Jason Terhorst,
- further developed for Sandvox by Greg Hulands, Dan Wood, and Terrence
Talbot.
- The new architecture for version 2.0 was developed by Peter Baumgartner.
- Contributions have also been made by Matt Gough, Martin Wennerberg and
others
- as indicated in source files.
-
- The iMedia Browser Framework is licensed under the following terms:
-
- Permission is hereby granted, free of charge, to any person obtaining a
copy
- of this software and associated documentation files (the "Software"), to
deal
- in all or substantial portions of the Software without restriction,
including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
following
- conditions:
-
- Redistributions of source code must retain the original terms stated here,
- including this list of conditions, the disclaimer noted below, and the
- following copyright notice: Copyright (c) 2005-2011 by Karelia Software
et al.
-
- Redistributions in binary form must include, in an end-user-visible
manner,
- e.g., About window, Acknowledgments window, or similar, either a) the
original
- terms stated here, including this list of conditions, the disclaimer noted
- below, and the aforementioned copyright notice, or b) the aforementioned
- copyright notice and a link to
karelia.com/imedia.
-
- Neither the name of Karelia Software, nor Sandvox, nor the names of
- contributors to iMedia Browser may be used to endorse or promote products
- derived from the Software without prior and express written permission
from
- Karelia Software or individual contributors, as appropriate.
-
- Disclaimer: THE SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND
CONTRIBUTORS
- "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE,
- AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH, THE
- SOFTWARE OR THE USE OF, OR OTHER DEALINGS IN, THE SOFTWARE.
-*/
-
-
-// Author: Peter Baumgartner
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-#pragma mark HEADERS
-
-#import <iMedia/IMBObject.h>
-
-
-//----------------------------------------------------------------------------------------------------------------------
-
-
-@interface IMBFlickrObject : IMBObject
-
-@end
-
-
-//----------------------------------------------------------------------------------------------------------------------
=======================================
***Additional files exist in this changeset.***