- ローカライズ追加
- 各ポップアップメニューのデフォルト値対応
- バージョン変更
@@ -19,7 +19,7 @@ | ||
19 | 19 | <key>CFBundleSignature</key> |
20 | 20 | <string>????</string> |
21 | 21 | <key>CFBundleVersion</key> |
22 | - <string>0.0.4</string> | |
22 | + <string>0.1.0</string> | |
23 | 23 | <key>NSPrincipalClass</key> |
24 | 24 | <string>iPhotoUploader</string> |
25 | 25 | <key>NSMainNibFile</key> |
@@ -134,10 +134,11 @@ | ||
134 | 134 | origFormat = [PUImageProcessor formatWithPath:path]; |
135 | 135 | selectedFormat = [[self valueForKeyPath:@"service.param.format"] intValue]; |
136 | 136 | selectedSize = [[self valueForKeyPath:@"service.param.size"] intValue]; |
137 | - NSLog(@"original format %d", origFormat); | |
138 | - NSLog(@"selected format %d", selectedFormat); | |
139 | - NSLog(@"selected size %d", selectedSize); | |
137 | +// NSLog(@"original format %d", origFormat); | |
138 | +// NSLog(@"selected format %d", selectedFormat); | |
139 | +// NSLog(@"selected size %d", selectedSize); | |
140 | 140 | if (![[self valueForKeyPath:@"service.spec.formats"] containsObject:[NSNumber numberWithInt:origFormat]] && selectedFormat == kPUImageFormat_Original) { |
141 | + NSRunAlertPanel(LOCALIZED(@"Invalid Format"), [path lastPathComponent], @"OK", @"", @""); | |
141 | 142 | goto loop_end; |
142 | 143 | } |
143 | 144 |
@@ -147,6 +148,7 @@ | ||
147 | 148 | NSString* toPath = [dir stringByAppendingPathComponent:[[[path lastPathComponent] stringByDeletingPathExtension] stringByAppendingPathExtension:[[PUImageProcessor stringFromFormat:selectedFormat] lowercaseString]]]; |
148 | 149 | NSLog(@"converted path %@", toPath); |
149 | 150 | if (![PUImageProcessor convertImage:path toPath:toPath format:selectedFormat size:selectedSize]) { |
151 | + NSRunAlertPanel(LOCALIZED(@"Convert Failed"), [path lastPathComponent], @"OK", @"", @""); | |
150 | 152 | goto loop_end; |
151 | 153 | } |
152 | 154 | [photo setValue:toPath forKey:@"path"]; |
@@ -167,7 +169,7 @@ | ||
167 | 169 | [NSApp endSheet:o_prgWindow]; |
168 | 170 | [o_prgWindow orderOut:nil]; |
169 | 171 | [o_prgBar stopAnimation:nil]; |
170 | - NSRunAlertPanel(LOCALIZED(@"Convert Failed"), @"", @"OK", @"", @""); | |
172 | + NSRunAlertPanel(LOCALIZED(@"Upload Failed"), @"", @"OK", @"", @""); | |
171 | 173 | |
172 | 174 | if (m_delegate && [m_delegate respondsToSelector:@selector(serviceManagerDidFinishExport:)]) { |
173 | 175 | [m_delegate serviceManagerDidFinishExport:self]; |
@@ -269,6 +271,9 @@ | ||
269 | 271 | if (_formatStr) { |
270 | 272 | [_formatStr release]; |
271 | 273 | } |
274 | + if (![[self valueForKeyPath:@"service.spec.formats"] containsObject:value]) { | |
275 | + value = LOCALIZED(@"Original"); | |
276 | + } | |
272 | 277 | _formatStr = [value retain]; |
273 | 278 | |
274 | 279 | PUImageFormat format; |
@@ -153,6 +153,9 @@ | ||
153 | 153 | [m_albumDic setObject:album forKey:[album valueForKey:@"title"]]; |
154 | 154 | } |
155 | 155 | [self setValue:[m_albumDic allKeys] forKeyPath:@"albums"]; |
156 | + if ([_albums count] > 0) { | |
157 | + [self setValue:[_albums objectAtIndex:0] forKeyPath:@"param.albumTitle"]; | |
158 | + } | |
156 | 159 | } |
157 | 160 | |
158 | 161 | [request release]; |
@@ -153,7 +153,9 @@ | ||
153 | 153 | [m_albumDic setObject:album forKey:[album valueForKey:@"name"]]; |
154 | 154 | } |
155 | 155 | [self setValue:[m_albumDic allKeys] forKey:@"albums"]; |
156 | -// NSLog(@"%@", [_albumMenu description]); | |
156 | + if ([_albums count] > 0) { | |
157 | + [self setValue:[_albums objectAtIndex:0] forKeyPath:@"param.albumTitle"]; | |
158 | + } | |
157 | 159 | } |
158 | 160 | |
159 | 161 | [request release]; |