Changeset 13378 for platform/iphoto
- Timestamp:
- 06/07/08 17:09:24 (5 years ago)
- Location:
- platform/iphoto/mixi.iPhotoExporter
- Files:
-
- 5 added
- 3 modified
-
Controller.m (modified) (7 diffs)
-
box.xib (modified) (11 diffs)
-
installer.pmdoc (added)
-
installer.pmdoc/01mixi-contents.xml (added)
-
installer.pmdoc/01mixi.xml (added)
-
installer.pmdoc/index.xml (added)
-
mixi.iPhotoExporter.xcodeproj/project.pbxproj (modified) (2 diffs)
-
mixi.iPhotoExporter_Prefix.pch (added)
Legend:
- Unmodified
- Added
- Removed
-
platform/iphoto/mixi.iPhotoExporter/Controller.m
r12986 r13378 103 103 - (unsigned int)comboBox:(NSComboBox *)aComboBox indexOfItemWithStringValue:(NSString *)aString 104 104 { 105 NSLog(@"1");106 105 return [mMixi indexOfObjectIdenticalTo: aString]; 107 106 } … … 110 109 { 111 110 id s = [mMixi title: index]; 112 NSLog(@"%d: %@", index, s);113 111 return s; 114 112 } … … 116 114 - (int)numberOfItemsInComboBox:(NSComboBox *)aComboBox 117 115 { 118 NSLog(@"3");119 120 116 return [mMixi count]; 121 117 } … … 147 143 id user = [NSString stringWithString:mEmail.stringValue]; 148 144 id password = [NSString stringWithString:mPassword.stringValue]; 149 NSLog(@"login %@/%@", user ,password);150 145 @try { 151 146 [mLoggingIn setHidden:NO]; … … 221 216 - (NSData*)dataWithFilenameAsVGA:(NSString*)filename portrait:(bool)isPortrait { 222 217 NSImage* image = [[[NSImage alloc] initWithContentsOfFile:filename] autorelease]; 223 NSBitmapImageRep* rep = [NSBitmapImageRep imageRepWithData:[image TIFFRepresentation]];224 225 int x = [rep pixelsWide];226 int y = [rep pixelsHigh];218 219 NSSize size = [image size]; 220 int x = size.width; 221 int y = size.height; 227 222 228 223 int maxX = (isPortrait) ? 480 : 640; … … 237 232 x = x * (maxY / y); 238 233 } 239 234 240 235 NSSize vga; 241 236 vga.width = x; 242 237 vga.height = y; 243 238 239 NSBitmapImageRep* rep = [NSBitmapImageRep imageRepWithData:[image TIFFRepresentation]]; 240 [rep setPixelsHigh:y]; 241 [rep setPixelsWide:x]; 242 [rep setSize:vga]; 243 244 NSImage* vgaImage = [[[NSImage alloc] initWithSize:vga] autorelease]; 245 [vgaImage lockFocus]; 244 246 [image setScalesWhenResized:YES]; 245 247 [image setSize:vga]; 246 248 [image compositeToPoint:NSZeroPoint operation:NSCompositeCopy]; 247 248 NSBitmapImageRep* bitmapRep = [NSBitmapImageRep imageRepWithData:[image TIFFRepresentation]]; 249 [vgaImage unlockFocus]; 250 251 NSBitmapImageRep* bitmapRep = [NSBitmapImageRep imageRepWithData:[vgaImage TIFFRepresentation]]; 249 252 NSMutableDictionary* d = [[[NSMutableDictionary alloc] init] autorelease]; 250 253 [d setObject:[NSNumber numberWithFloat: 0.9] forKey:NSImageCompressionFactor]; … … 377 380 if ( size >= [mMixi filesizeLimit] ) { 378 381 bool isPortrait = [mExportMgr imageIsPortraitAtIndex:i]; 379 [mMixi uploadData:[self dataWithFilenameAsVGA:filename portrait:isPortrait] withTitle:title]; 382 NSData* data = [self dataWithFilenameAsVGA:filename portrait:isPortrait]; 383 [data writeToFile:[NSString stringWithFormat:@"/home/kuma/Desktop/VGA%i.jpg", i] 384 atomically:YES]; 385 [mMixi uploadData:data withTitle:title]; 380 386 } else { 381 387 [mMixi upload:filename withTitle:title]; -
platform/iphoto/mixi.iPhotoExporter/box.xib
r12986 r13378 4 4 <int key="IBDocument.SystemTarget">1050</int> 5 5 <string key="IBDocument.SystemVersion">9D34</string> 6 <string key="IBDocument.InterfaceBuilderVersion">6 58</string>6 <string key="IBDocument.InterfaceBuilderVersion">667</string> 7 7 <string key="IBDocument.AppKitVersion">949.33</string> 8 8 <string key="IBDocument.HIToolboxVersion">352.00</string> 9 9 <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> 10 10 <bool key="EncodedWithXMLCoder">YES</bool> 11 <integer value=" 167"/>11 <integer value="3"/> 12 12 </object> 13 13 <object class="NSArray" key="IBDocument.PluginDependencies"> … … 35 35 <string key="NSWindowClass">NSWindow</string> 36 36 <nil key="NSViewClass"/> 37 <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string> 37 38 <object class="NSView" key="NSWindowView" id="1034055239"> 38 39 <reference key="NSNextResponder"/> … … 554 555 <bool key="NSTransparent">NO</bool> 555 556 </object> 557 <object class="NSTextField" id="393929586"> 558 <reference key="NSNextResponder" ref="599662859"/> 559 <int key="NSvFlags">268</int> 560 <string key="NSFrame">{{373, 375}, {63, 17}}</string> 561 <reference key="NSSuperview" ref="599662859"/> 562 <bool key="NSEnabled">YES</bool> 563 <object class="NSTextFieldCell" key="NSCell" id="1066455973"> 564 <int key="NSCellFlags">68288064</int> 565 <int key="NSCellFlags2">272630784</int> 566 <string key="NSContents">version 2</string> 567 <reference key="NSSupport" ref="160256621"/> 568 <reference key="NSControlView" ref="393929586"/> 569 <reference key="NSBackgroundColor" ref="318985993"/> 570 <reference key="NSTextColor" ref="692540182"/> 571 </object> 572 </object> 556 573 </object> 557 574 <string key="NSFrame">{{1, 1}, {444, 392}}</string> … … 565 582 <int key="NSCellFlags">67239424</int> 566 583 <int key="NSCellFlags2">0</int> 567 <string key="NSContents">Mixi iPhotoExporter</string>584 <string key="NSContents">Mixi Exporter</string> 568 585 <reference key="NSSupport" ref="26"/> 569 586 <reference key="NSBackgroundColor" ref="1031996357"/> … … 824 841 <reference ref="881448237"/> 825 842 <reference ref="663836867"/> 843 <reference ref="393929586"/> 826 844 </object> 827 845 <reference key="parent" ref="1034055239"/> … … 1026 1044 <reference key="object" ref="675631688"/> 1027 1045 <reference key="parent" ref="663836867"/> 1046 </object> 1047 <object class="IBObjectRecord"> 1048 <int key="objectID">180</int> 1049 <reference key="object" ref="393929586"/> 1050 <object class="NSMutableArray" key="children"> 1051 <bool key="EncodedWithXMLCoder">YES</bool> 1052 <reference ref="1066455973"/> 1053 </object> 1054 <reference key="parent" ref="704025722"/> 1055 </object> 1056 <object class="IBObjectRecord"> 1057 <int key="objectID">181</int> 1058 <reference key="object" ref="1066455973"/> 1059 <reference key="parent" ref="393929586"/> 1028 1060 </object> 1029 1061 </object> … … 1041 1073 <string>1.NSWindowTemplate.visibleAtLaunch</string> 1042 1074 <string>1.windowTemplate.hasMinSize</string> 1075 <string>1.windowTemplate.maxSize</string> 1043 1076 <string>1.windowTemplate.minSize</string> 1044 1077 <string>10.IBPluginDependency</string> … … 1065 1098 <string>171.IBPluginDependency</string> 1066 1099 <string>172.IBPluginDependency</string> 1100 <string>180.IBPluginDependency</string> 1101 <string>181.IBPluginDependency</string> 1067 1102 <string>2.IBPluginDependency</string> 1068 1103 <string>3.CustomClassName</string> … … 1084 1119 <reference ref="8"/> 1085 1120 <integer value="1"/> 1121 <string>{3.40282e+38, 3.40282e+38}</string> 1086 1122 <string>{0, 0}</string> 1087 1123 <string>com.apple.InterfaceBuilder.CocoaPlugin</string> … … 1103 1139 <string>com.apple.InterfaceBuilder.CocoaPlugin</string> 1104 1140 <string>{{526, 240}, {226, 4}}</string> 1141 <string>com.apple.InterfaceBuilder.CocoaPlugin</string> 1142 <string>com.apple.InterfaceBuilder.CocoaPlugin</string> 1105 1143 <string>com.apple.InterfaceBuilder.CocoaPlugin</string> 1106 1144 <string>com.apple.InterfaceBuilder.CocoaPlugin</string> … … 1138 1176 </object> 1139 1177 <nil key="sourceID"/> 1140 <int key="maxID">1 79</int>1178 <int key="maxID">181</int> 1141 1179 </object> 1142 1180 <object class="IBClassDescriber" key="IBDocument.Classes"> -
platform/iphoto/mixi.iPhotoExporter/mixi.iPhotoExporter.xcodeproj/project.pbxproj
r12986 r13378 282 282 GCC_WARN_UNUSED_VARIABLE = YES; 283 283 ONLY_ACTIVE_ARCH = YES; 284 OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)"; 284 285 PREBINDING = NO; 285 286 SDKROOT = macosx10.4; … … 294 295 GCC_WARN_ABOUT_RETURN_TYPE = YES; 295 296 GCC_WARN_UNUSED_VARIABLE = YES; 297 OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)"; 296 298 PREBINDING = NO; 297 299 SDKROOT = macosx10.4;
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)