Permalink
Browse files

put some of the CC logos into the query editor

  • Loading branch information...
1 parent 13e6784 commit b8b3347304b0b7e60b78a52b3b7437f4fa13f51a @danwood danwood committed Apr 20, 2010
View
Binary file not shown.
View
@@ -71,7 +71,8 @@ typedef enum {
IMBFlickrNodeMethod_TextSearch = 0,
IMBFlickrNodeMethod_TagSearch,
IMBFlickrNodeMethod_Recent,
- IMBFlickrNodeMethod_MostInteresting
+ IMBFlickrNodeMethod_MostInteresting,
+ IMBFlickrNodeMethod_GetInfo
} IMBFlickrNodeMethod;
typedef enum {
View
@@ -530,6 +530,8 @@ + (NSString*) flickrMethodForMethodCode: (NSInteger) code {
return @"flickr.photos.getRecent";
} else if (code == IMBFlickrNodeMethod_MostInteresting) {
return @"flickr.interestingness.getList";
+ } else if (code == IMBFlickrNodeMethod_GetInfo) {
+ return @"flickr.photos.getInfo";
}
NSLog (@"Can't find Flickr method for method code.");
return nil;
@@ -558,7 +560,7 @@ + (NSString*) identifierWithMethod: (NSInteger) method query: (NSString*) query
} else if (method == IMBFlickrNodeMethod_Recent) {
flickrMethod = [flickrMethod stringByAppendingString:@"/recent"];
} else if (method == IMBFlickrNodeMethod_MostInteresting) {
- flickrMethod = [flickrMethod stringByAppendingString:@"/intersting"];
+ flickrMethod = [flickrMethod stringByAppendingString:@"/intersting"]; // Should this be interesting?
}
NSString* albumPath = [NSString stringWithFormat:@"/%@/%@", flickrMethod, query];
NSString* parserClassName = NSStringFromClass ([IMBFlickrParser class]);
View
@@ -354,6 +354,17 @@ - (IMBObjectPromise*) objectPromiseWithObjects: (NSArray*) inObjects {
return [[(IMBObjectPromise*)[IMBRemoteObjectPromise alloc] initWithObjects:inObjects] autorelease];
}
+// Convert metadata into human readable string...
+
+- (void) loadMetadataForObject:(IMBObject*)inObject
+{
+ return nil;
+}
+
+- (NSString*) metadataDescriptionForMetadata:(NSDictionary*)inMetadata
+{
+ return nil;
+}
#pragma mark
#pragma mark Properties
View
@@ -72,6 +72,7 @@
@private
IBOutlet NSArrayController* _queriesController;
IBOutlet NSTextField* _queryTitle;
+ IBOutlet NSPopUpButton *_licensePopup;
IMBFlickrParser* _parser;
}
View
@@ -57,7 +57,6 @@ of this software and associated documentation files (the "Software"), to deal
-
//----------------------------------------------------------------------------------------------------------------------
@implementation IMBFlickrQueryEditor
@@ -91,6 +90,21 @@ - (void) dealloc {
- (void) awakeFromNib {
[super awakeFromNib];
+ NSImage *noImage = [[[NSImage alloc] initByReferencingFile:[IMBBundle() pathForResource:@"any" ofType:@"pdf"]] autorelease];
+ NSImage *ccImage = [[[NSImage alloc] initByReferencingFile:[IMBBundle() pathForResource:@"CC" ofType:@"pdf"]] autorelease];
+ NSImage *reImage = [[[NSImage alloc] initByReferencingFile:[IMBBundle() pathForResource:@"remix" ofType:@"pdf"]] autorelease];
+ NSImage *coImage = [[[NSImage alloc] initByReferencingFile:[IMBBundle() pathForResource:@"commercial" ofType:@"pdf"]] autorelease];
+
+ [noImage setScalesWhenResized:YES]; [noImage setSize:NSMakeSize(16.0,16.0)];
+ [ccImage setScalesWhenResized:YES]; [ccImage setSize:NSMakeSize(16.0,16.0)];
+ [reImage setScalesWhenResized:YES]; [reImage setSize:NSMakeSize(16.0,16.0)];
+ [coImage setScalesWhenResized:YES]; [coImage setSize:NSMakeSize(16.0,16.0)];
+
+ [[_licensePopup itemAtIndex:[_licensePopup indexOfItemWithTag:0]] setImage:noImage];
+ [[_licensePopup itemAtIndex:[_licensePopup indexOfItemWithTag:1]] setImage:ccImage];
+ [[_licensePopup itemAtIndex:[_licensePopup indexOfItemWithTag:2]] setImage:reImage];
+ [[_licensePopup itemAtIndex:[_licensePopup indexOfItemWithTag:3]] setImage:coImage];
+
NSAssert (_queriesController != nil, @"Can't find '_queriesController'.");
NSAssert (_queryTitle != nil, @"Can't find '_queryTitle'.");
View
@@ -2,10 +2,10 @@
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
<data>
<int key="IBDocument.SystemTarget">1050</int>
- <string key="IBDocument.SystemVersion">10C540</string>
+ <string key="IBDocument.SystemVersion">10D573</string>
<string key="IBDocument.InterfaceBuilderVersion">740</string>
- <string key="IBDocument.AppKitVersion">1038.25</string>
- <string key="IBDocument.HIToolboxVersion">458.00</string>
+ <string key="IBDocument.AppKitVersion">1038.29</string>
+ <string key="IBDocument.HIToolboxVersion">460.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="NS.object.0">740</string>
@@ -200,27 +200,27 @@
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">400</int>
<int key="NSPeriodicInterval">75</int>
- <object class="NSMenuItem" key="NSMenuItem" id="513210645">
+ <object class="NSMenuItem" key="NSMenuItem" id="584836687">
<reference key="NSMenu" ref="377634357"/>
- <string key="NSTitle">Any</string>
+ <string key="NSTitle">Commercial Use</string>
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<int key="NSState">1</int>
<reference key="NSOnImage" ref="445966687"/>
<reference key="NSMixedImage" ref="528422078"/>
<string key="NSAction">_popUpItemAction:</string>
+ <int key="NSTag">3</int>
<reference key="NSTarget" ref="960019481"/>
</object>
<bool key="NSMenuItemRespectAlignment">YES</bool>
<object class="NSMenu" key="NSMenu" id="377634357">
<string key="NSTitle">OtherViews</string>
<object class="NSMutableArray" key="NSMenuItems">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="513210645"/>
- <object class="NSMenuItem" id="1051255482">
+ <object class="NSMenuItem" id="513210645">
<reference key="NSMenu" ref="377634357"/>
- <string key="NSTitle">Creative Commons</string>
+ <string key="NSTitle">Any</string>
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
@@ -229,31 +229,35 @@
<string key="NSAction">_popUpItemAction:</string>
<reference key="NSTarget" ref="960019481"/>
</object>
- <object class="NSMenuItem" id="155132932">
+ <object class="NSMenuItem" id="1051255482">
<reference key="NSMenu" ref="377634357"/>
- <string key="NSTitle">Derivative Works</string>
+ <string key="NSTitle">Creative Commons</string>
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="445966687"/>
<reference key="NSMixedImage" ref="528422078"/>
<string key="NSAction">_popUpItemAction:</string>
+ <int key="NSTag">1</int>
<reference key="NSTarget" ref="960019481"/>
</object>
- <object class="NSMenuItem" id="584836687">
+ <object class="NSMenuItem" id="155132932">
<reference key="NSMenu" ref="377634357"/>
- <string key="NSTitle">Commercial Use</string>
+ <string key="NSTitle">Derivative Works</string>
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="445966687"/>
<reference key="NSMixedImage" ref="528422078"/>
<string key="NSAction">_popUpItemAction:</string>
+ <int key="NSTag">2</int>
<reference key="NSTarget" ref="960019481"/>
</object>
+ <reference ref="584836687"/>
</object>
<reference key="NSMenuFont" ref="1071634256"/>
</object>
+ <int key="NSSelectedIndex">3</int>
<int key="NSPreferredEdge">1</int>
<bool key="NSUsesItemFromMenu">YES</bool>
<bool key="NSAltersState">YES</bool>
@@ -767,6 +771,14 @@
</object>
<int key="connectionID">168</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">_licensePopup</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="894740359"/>
+ </object>
+ <int key="connectionID">170</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -1204,7 +1216,7 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{648, 488}, {208, 83}}</string>
+ <string>{{648, 499}, {208, 83}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -1261,7 +1273,7 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">169</int>
+ <int key="maxID">170</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -1286,11 +1298,13 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
+ <string>_licensePopup</string>
<string>_queriesController</string>
<string>_queryTitle</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
+ <string>NSPopUpButton</string>
<string>NSArrayController</string>
<string>NSTextField</string>
</object>
@@ -1304,6 +1318,13 @@
<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">NSString+iMedia.h</string>
</object>
</object>
@@ -27,6 +27,14 @@
CE69E9DF114B05EA0016E5E0 /* firefox_bookmarksToolbar.png in Resources */ = {isa = PBXBuildFile; fileRef = CE69E9DA114B05EA0016E5E0 /* firefox_bookmarksToolbar.png */; };
CE69E9E0114B05EA0016E5E0 /* firefox_unfiledBookmarks.png in Resources */ = {isa = PBXBuildFile; fileRef = CE69E9DB114B05EA0016E5E0 /* firefox_unfiledBookmarks.png */; };
CE69E9E1114B05EA0016E5E0 /* firefox_tag.png in Resources */ = {isa = PBXBuildFile; fileRef = CE69E9DC114B05EA0016E5E0 /* firefox_tag.png */; };
+ CEF6539C117E5C29003FF1A5 /* Attribute.pdf in Resources */ = {isa = PBXBuildFile; fileRef = CEF65395117E5C28003FF1A5 /* Attribute.pdf */; };
+ CEF6539D117E5C29003FF1A5 /* CC.pdf in Resources */ = {isa = PBXBuildFile; fileRef = CEF65396117E5C28003FF1A5 /* CC.pdf */; };
+ CEF6539E117E5C29003FF1A5 /* commercial.pdf in Resources */ = {isa = PBXBuildFile; fileRef = CEF65397117E5C28003FF1A5 /* commercial.pdf */; };
+ CEF6539F117E5C29003FF1A5 /* noderivatives.pdf in Resources */ = {isa = PBXBuildFile; fileRef = CEF65398117E5C28003FF1A5 /* noderivatives.pdf */; };
+ CEF653A0117E5C29003FF1A5 /* noncommercial.pdf in Resources */ = {isa = PBXBuildFile; fileRef = CEF65399117E5C28003FF1A5 /* noncommercial.pdf */; };
+ CEF653A1117E5C29003FF1A5 /* remix.pdf in Resources */ = {isa = PBXBuildFile; fileRef = CEF6539A117E5C28003FF1A5 /* remix.pdf */; };
+ CEF653A2117E5C29003FF1A5 /* sharealike.pdf in Resources */ = {isa = PBXBuildFile; fileRef = CEF6539B117E5C28003FF1A5 /* sharealike.pdf */; };
+ CEF65426117E64FD003FF1A5 /* any.pdf in Resources */ = {isa = PBXBuildFile; fileRef = CEF65425117E64FA003FF1A5 /* any.pdf */; };
CEF686B51062D0BD005D7E72 /* IMBComboTableView.h in Headers */ = {isa = PBXBuildFile; fileRef = CEF686B31062D0BD005D7E72 /* IMBComboTableView.h */; settings = {ATTRIBUTES = (Public, ); }; };
CEF686B61062D0BD005D7E72 /* IMBComboTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = CEF686B41062D0BD005D7E72 /* IMBComboTableView.m */; };
CEF686BA1062D18F005D7E72 /* IMBComboTextCell.h in Headers */ = {isa = PBXBuildFile; fileRef = CEF686B81062D18F005D7E72 /* IMBComboTextCell.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -340,6 +348,14 @@
CE69E9DA114B05EA0016E5E0 /* firefox_bookmarksToolbar.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = firefox_bookmarksToolbar.png; sourceTree = "<group>"; };
CE69E9DB114B05EA0016E5E0 /* firefox_unfiledBookmarks.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = firefox_unfiledBookmarks.png; sourceTree = "<group>"; };
CE69E9DC114B05EA0016E5E0 /* firefox_tag.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = firefox_tag.png; sourceTree = "<group>"; };
+ CEF65395117E5C28003FF1A5 /* Attribute.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = Attribute.pdf; path = CC/Attribute.pdf; sourceTree = "<group>"; };
+ CEF65396117E5C28003FF1A5 /* CC.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = CC.pdf; path = CC/CC.pdf; sourceTree = "<group>"; };
+ CEF65397117E5C28003FF1A5 /* commercial.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = commercial.pdf; path = CC/commercial.pdf; sourceTree = "<group>"; };
+ CEF65398117E5C28003FF1A5 /* noderivatives.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = noderivatives.pdf; path = CC/noderivatives.pdf; sourceTree = "<group>"; };
+ CEF65399117E5C28003FF1A5 /* noncommercial.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = noncommercial.pdf; path = CC/noncommercial.pdf; sourceTree = "<group>"; };
+ CEF6539A117E5C28003FF1A5 /* remix.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = remix.pdf; path = CC/remix.pdf; sourceTree = "<group>"; };
+ CEF6539B117E5C28003FF1A5 /* sharealike.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = sharealike.pdf; path = CC/sharealike.pdf; sourceTree = "<group>"; };
+ CEF65425117E64FA003FF1A5 /* any.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = any.pdf; path = CC/any.pdf; sourceTree = "<group>"; };
CEF686B31062D0BD005D7E72 /* IMBComboTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IMBComboTableView.h; sourceTree = "<group>"; };
CEF686B41062D0BD005D7E72 /* IMBComboTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IMBComboTableView.m; sourceTree = "<group>"; };
CEF686B81062D18F005D7E72 /* IMBComboTextCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IMBComboTextCell.h; sourceTree = "<group>"; };
@@ -637,6 +653,7 @@
D099334E1011B22600C527B7 /* Test Application */,
0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */,
034768DFFF38A50411DB9C8B /* Products */,
+ CEF65425117E64FA003FF1A5 /* any.pdf */,
);
name = iMedia;
sourceTree = "<group>";
@@ -815,6 +832,13 @@
D023460410CA5E2C00E14112 /* load-more-normal.pdf */,
D023460510CA5E2C00E14112 /* load-more-pressed.pdf */,
D032CE40109B2F2200D84782 /* Flickr.png */,
+ CEF65395117E5C28003FF1A5 /* Attribute.pdf */,
+ CEF65396117E5C28003FF1A5 /* CC.pdf */,
+ CEF65397117E5C28003FF1A5 /* commercial.pdf */,
+ CEF65398117E5C28003FF1A5 /* noderivatives.pdf */,
+ CEF65399117E5C28003FF1A5 /* noncommercial.pdf */,
+ CEF6539A117E5C28003FF1A5 /* remix.pdf */,
+ CEF6539B117E5C28003FF1A5 /* sharealike.pdf */,
);
name = Flickr;
sourceTree = "<group>";
@@ -1351,6 +1375,14 @@
CE69E9DF114B05EA0016E5E0 /* firefox_bookmarksToolbar.png in Resources */,
CE69E9E0114B05EA0016E5E0 /* firefox_unfiledBookmarks.png in Resources */,
CE69E9E1114B05EA0016E5E0 /* firefox_tag.png in Resources */,
+ CEF6539C117E5C29003FF1A5 /* Attribute.pdf in Resources */,
+ CEF6539D117E5C29003FF1A5 /* CC.pdf in Resources */,
+ CEF6539E117E5C29003FF1A5 /* commercial.pdf in Resources */,
+ CEF6539F117E5C29003FF1A5 /* noderivatives.pdf in Resources */,
+ CEF653A0117E5C29003FF1A5 /* noncommercial.pdf in Resources */,
+ CEF653A1117E5C29003FF1A5 /* remix.pdf in Resources */,
+ CEF653A2117E5C29003FF1A5 /* sharealike.pdf in Resources */,
+ CEF65426117E64FD003FF1A5 /* any.pdf in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

0 comments on commit b8b3347

Please sign in to comment.