Index: trunk/tools/Snap-to-Commons/photopicker.xcodeproj/project.pbxproj |
— | — | @@ -32,6 +32,9 @@ |
33 | 33 | A159144712E0F69C0003BBE2 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A159144612E0F69C0003BBE2 /* MobileCoreServices.framework */; }; |
34 | 34 | A159144B12E0F6BE0003BBE2 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A159144A12E0F6BE0003BBE2 /* SystemConfiguration.framework */; }; |
35 | 35 | A1FECB2812E10D41007CF08C /* icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A1FECB2712E10D41007CF08C /* icon@2x.png */; }; |
| 36 | + A1FECB2C12E10DCA007CF08C /* ImageDetailsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A1FECB2A12E10DCA007CF08C /* ImageDetailsViewController.m */; }; |
| 37 | + A1FECB2D12E10DCA007CF08C /* ImageDetailsViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A1FECB2B12E10DCA007CF08C /* ImageDetailsViewController.xib */; }; |
| 38 | + A1FECB3E12E1105B007CF08C /* CommonsUpload.m in Sources */ = {isa = PBXBuildFile; fileRef = A1FECB3D12E1105B007CF08C /* CommonsUpload.m */; }; |
36 | 39 | F130561C10CEDA5C00271CD6 /* home-background.png in Resources */ = {isa = PBXBuildFile; fileRef = F130561B10CEDA5C00271CD6 /* home-background.png */; }; |
37 | 40 | F130561F10CEDBAC00271CD6 /* Configuration.m in Sources */ = {isa = PBXBuildFile; fileRef = F130561E10CEDBAC00271CD6 /* Configuration.m */; }; |
38 | 41 | F13056EF10CEEB3100271CD6 /* cancel-button-pressed.png in Resources */ = {isa = PBXBuildFile; fileRef = F13056ED10CEEB3100271CD6 /* cancel-button-pressed.png */; }; |
— | — | @@ -86,6 +89,11 @@ |
87 | 90 | A159144612E0F69C0003BBE2 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; }; |
88 | 91 | A159144A12E0F6BE0003BBE2 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; |
89 | 92 | A1FECB2712E10D41007CF08C /* icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon@2x.png"; sourceTree = "<group>"; }; |
| 93 | + A1FECB2912E10DCA007CF08C /* ImageDetailsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageDetailsViewController.h; sourceTree = "<group>"; }; |
| 94 | + A1FECB2A12E10DCA007CF08C /* ImageDetailsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageDetailsViewController.m; sourceTree = "<group>"; }; |
| 95 | + A1FECB2B12E10DCA007CF08C /* ImageDetailsViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = ImageDetailsViewController.xib; path = Classes/ImageDetailsViewController.xib; sourceTree = "<group>"; }; |
| 96 | + A1FECB3C12E1105B007CF08C /* CommonsUpload.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommonsUpload.h; sourceTree = "<group>"; }; |
| 97 | + A1FECB3D12E1105B007CF08C /* CommonsUpload.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CommonsUpload.m; sourceTree = "<group>"; }; |
90 | 98 | F130561B10CEDA5C00271CD6 /* home-background.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "home-background.png"; sourceTree = "<group>"; }; |
91 | 99 | F130561D10CEDBAC00271CD6 /* Configuration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Configuration.h; sourceTree = "<group>"; }; |
92 | 100 | F130561E10CEDBAC00271CD6 /* Configuration.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Configuration.m; sourceTree = "<group>"; }; |
— | — | @@ -133,6 +141,10 @@ |
134 | 142 | F1A269B010C9EA8A0044762E /* UIImage+PhotoPicker.m */, |
135 | 143 | A127DA3D12E0DF9700149FC9 /* SettingsViewController.h */, |
136 | 144 | A127DA3E12E0DF9700149FC9 /* SettingsViewController.m */, |
| 145 | + A1FECB2912E10DCA007CF08C /* ImageDetailsViewController.h */, |
| 146 | + A1FECB2A12E10DCA007CF08C /* ImageDetailsViewController.m */, |
| 147 | + A1FECB3C12E1105B007CF08C /* CommonsUpload.h */, |
| 148 | + A1FECB3D12E1105B007CF08C /* CommonsUpload.m */, |
137 | 149 | ); |
138 | 150 | path = Classes; |
139 | 151 | sourceTree = "<group>"; |
— | — | @@ -177,10 +189,11 @@ |
178 | 190 | F13056ED10CEEB3100271CD6 /* cancel-button-pressed.png */, |
179 | 191 | F13056EE10CEEB3100271CD6 /* cancel-button.png */, |
180 | 192 | F130561B10CEDA5C00271CD6 /* home-background.png */, |
| 193 | + 8D1107310486CEB800E47090 /* photopicker-Info.plist */, |
181 | 194 | 28AD733E0D9D9553002E5188 /* MainWindow.xib */, |
182 | 195 | A127DA3F12E0DF9700149FC9 /* SettingsViewController.xib */, |
183 | | - 8D1107310486CEB800E47090 /* photopicker-Info.plist */, |
184 | 196 | 2899E5210DE3E06400AC0155 /* PhotoPickerViewController.xib */, |
| 197 | + A1FECB2B12E10DCA007CF08C /* ImageDetailsViewController.xib */, |
185 | 198 | ); |
186 | 199 | name = Resources; |
187 | 200 | sourceTree = "<group>"; |
— | — | @@ -288,6 +301,7 @@ |
289 | 302 | 3A113EC910CF3C5500C9DDCF /* Entitlements.plist in Resources */, |
290 | 303 | A127DA4112E0DF9700149FC9 /* SettingsViewController.xib in Resources */, |
291 | 304 | A1FECB2812E10D41007CF08C /* icon@2x.png in Resources */, |
| 305 | + A1FECB2D12E10DCA007CF08C /* ImageDetailsViewController.xib in Resources */, |
292 | 306 | ); |
293 | 307 | runOnlyForDeploymentPostprocessing = 0; |
294 | 308 | }; |
— | — | @@ -314,6 +328,8 @@ |
315 | 329 | A1338B8C12E0F01700662B28 /* ASIInputStream.m in Sources */, |
316 | 330 | A1338B8D12E0F01700662B28 /* ASINetworkQueue.m in Sources */, |
317 | 331 | A159143312E0F6410003BBE2 /* Reachability.m in Sources */, |
| 332 | + A1FECB2C12E10DCA007CF08C /* ImageDetailsViewController.m in Sources */, |
| 333 | + A1FECB3E12E1105B007CF08C /* CommonsUpload.m in Sources */, |
318 | 334 | ); |
319 | 335 | runOnlyForDeploymentPostprocessing = 0; |
320 | 336 | }; |
Index: trunk/tools/Snap-to-Commons/Classes/ImageDetailsViewController.m |
— | — | @@ -0,0 +1,62 @@ |
| 2 | +// |
| 3 | +// ImageDetailsViewController.m |
| 4 | +// photopicker |
| 5 | +// |
| 6 | +// Created by Derk-Jan Hartman on 15-01-11. |
| 7 | +// Copyright 2011 Wikimedia Commons. All rights reserved. |
| 8 | +// |
| 9 | + |
| 10 | +#import "ImageDetailsViewController.h" |
| 11 | + |
| 12 | + |
| 13 | +@implementation ImageDetailsViewController |
| 14 | + |
| 15 | +@synthesize titleField; |
| 16 | +@synthesize descriptionText; |
| 17 | + |
| 18 | +// The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad. |
| 19 | +/* |
| 20 | +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { |
| 21 | + self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; |
| 22 | + if (self) { |
| 23 | + // Custom initialization. |
| 24 | + } |
| 25 | + return self; |
| 26 | +} |
| 27 | +*/ |
| 28 | + |
| 29 | +/* |
| 30 | +// Implement viewDidLoad to do additional setup after loading the view, typically from a nib. |
| 31 | +- (void)viewDidLoad { |
| 32 | + [super viewDidLoad]; |
| 33 | +} |
| 34 | +*/ |
| 35 | + |
| 36 | +/* |
| 37 | +// Override to allow orientations other than the default portrait orientation. |
| 38 | +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { |
| 39 | + // Return YES for supported orientations. |
| 40 | + return (interfaceOrientation == UIInterfaceOrientationPortrait); |
| 41 | +} |
| 42 | +*/ |
| 43 | + |
| 44 | +- (void)didReceiveMemoryWarning { |
| 45 | + // Releases the view if it doesn't have a superview. |
| 46 | + [super didReceiveMemoryWarning]; |
| 47 | + |
| 48 | + // Release any cached data, images, etc. that aren't in use. |
| 49 | +} |
| 50 | + |
| 51 | +- (void)viewDidUnload { |
| 52 | + [super viewDidUnload]; |
| 53 | + // Release any retained subviews of the main view. |
| 54 | + // e.g. self.myOutlet = nil; |
| 55 | +} |
| 56 | + |
| 57 | + |
| 58 | +- (void)dealloc { |
| 59 | + [super dealloc]; |
| 60 | +} |
| 61 | + |
| 62 | + |
| 63 | +@end |
Index: trunk/tools/Snap-to-Commons/Classes/Configuration.h |
— | — | @@ -14,3 +14,5 @@ |
15 | 15 | // FIXME insecure |
16 | 16 | #define COMMONS_PASSWORD_KEY @"CommonsPasswordKey" |
17 | 17 | |
| 18 | +#define DEFAULT_LICENSE @"{{cc-by-sa-3.0}}" |
| 19 | +#define APPLICATION_CATEGORY @"Images uploaded with WikiSnaps" |
\ No newline at end of file |
Index: trunk/tools/Snap-to-Commons/Classes/CommonsUpload.h |
— | — | @@ -0,0 +1,28 @@ |
| 2 | +// |
| 3 | +// CommonsUpload.h |
| 4 | +// photopicker |
| 5 | +// |
| 6 | +// Created by Derk-Jan Hartman on 15-01-11. |
| 7 | +// Copyright 2011 Wikimedia Commons. All rights reserved. |
| 8 | +// |
| 9 | + |
| 10 | +#import <Foundation/Foundation.h> |
| 11 | + |
| 12 | + |
| 13 | +@interface CommonsUpload : NSObject { |
| 14 | + UIImage *imageData; |
| 15 | + NSString *title; |
| 16 | + NSString *description; |
| 17 | + |
| 18 | +} |
| 19 | + |
| 20 | +@property (nonatomic, retain) UIImage *imageData; |
| 21 | +@property (nonatomic, retain) NSString *title; |
| 22 | +@property (nonatomic, retain) NSString *description; |
| 23 | + |
| 24 | + |
| 25 | +- (NSString *)getUploadText; |
| 26 | +- (NSString *)getUploadDescription; |
| 27 | + |
| 28 | + |
| 29 | +@end |
Index: trunk/tools/Snap-to-Commons/Classes/ImageDetailsViewController.xib |
— | — | @@ -0,0 +1,518 @@ |
| 2 | +<?xml version="1.0" encoding="UTF-8"?> |
| 3 | +<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10"> |
| 4 | + <data> |
| 5 | + <int key="IBDocument.SystemTarget">1056</int> |
| 6 | + <string key="IBDocument.SystemVersion">10H574</string> |
| 7 | + <string key="IBDocument.InterfaceBuilderVersion">823</string> |
| 8 | + <string key="IBDocument.AppKitVersion">1038.35</string> |
| 9 | + <string key="IBDocument.HIToolboxVersion">461.00</string> |
| 10 | + <object class="NSMutableDictionary" key="IBDocument.PluginVersions"> |
| 11 | + <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> |
| 12 | + <string key="NS.object.0">132</string> |
| 13 | + </object> |
| 14 | + <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> |
| 15 | + <bool key="EncodedWithXMLCoder">YES</bool> |
| 16 | + <integer value="1"/> |
| 17 | + </object> |
| 18 | + <object class="NSArray" key="IBDocument.PluginDependencies"> |
| 19 | + <bool key="EncodedWithXMLCoder">YES</bool> |
| 20 | + <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> |
| 21 | + </object> |
| 22 | + <object class="NSMutableDictionary" key="IBDocument.Metadata"> |
| 23 | + <bool key="EncodedWithXMLCoder">YES</bool> |
| 24 | + <object class="NSArray" key="dict.sortedKeys" id="0"> |
| 25 | + <bool key="EncodedWithXMLCoder">YES</bool> |
| 26 | + </object> |
| 27 | + <object class="NSMutableArray" key="dict.values"> |
| 28 | + <bool key="EncodedWithXMLCoder">YES</bool> |
| 29 | + </object> |
| 30 | + </object> |
| 31 | + <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000"> |
| 32 | + <bool key="EncodedWithXMLCoder">YES</bool> |
| 33 | + <object class="IBProxyObject" id="372490531"> |
| 34 | + <string key="IBProxiedObjectIdentifier">IBFilesOwner</string> |
| 35 | + <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> |
| 36 | + </object> |
| 37 | + <object class="IBProxyObject" id="975951072"> |
| 38 | + <string key="IBProxiedObjectIdentifier">IBFirstResponder</string> |
| 39 | + <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> |
| 40 | + </object> |
| 41 | + <object class="IBUIView" id="191373211"> |
| 42 | + <reference key="NSNextResponder"/> |
| 43 | + <int key="NSvFlags">274</int> |
| 44 | + <object class="NSMutableArray" key="NSSubviews"> |
| 45 | + <bool key="EncodedWithXMLCoder">YES</bool> |
| 46 | + <object class="IBUITextField" id="290235673"> |
| 47 | + <reference key="NSNextResponder" ref="191373211"/> |
| 48 | + <int key="NSvFlags">292</int> |
| 49 | + <string key="NSFrame">{{20, 20}, {280, 31}}</string> |
| 50 | + <reference key="NSSuperview" ref="191373211"/> |
| 51 | + <bool key="IBUIOpaque">NO</bool> |
| 52 | + <bool key="IBUIClipsSubviews">YES</bool> |
| 53 | + <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> |
| 54 | + <int key="IBUIContentVerticalAlignment">0</int> |
| 55 | + <string key="IBUIText"/> |
| 56 | + <int key="IBUIBorderStyle">3</int> |
| 57 | + <string key="IBUIPlaceholder">Title</string> |
| 58 | + <object class="NSColor" key="IBUITextColor"> |
| 59 | + <int key="NSColorSpace">3</int> |
| 60 | + <bytes key="NSWhite">MAA</bytes> |
| 61 | + <object class="NSColorSpace" key="NSCustomColorSpace"> |
| 62 | + <int key="NSID">2</int> |
| 63 | + </object> |
| 64 | + </object> |
| 65 | + <bool key="IBUIAdjustsFontSizeToFit">YES</bool> |
| 66 | + <float key="IBUIMinimumFontSize">17</float> |
| 67 | + <object class="IBUITextInputTraits" key="IBUITextInputTraits"> |
| 68 | + <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> |
| 69 | + </object> |
| 70 | + </object> |
| 71 | + <object class="IBUITextView" id="543862702"> |
| 72 | + <reference key="NSNextResponder" ref="191373211"/> |
| 73 | + <int key="NSvFlags">292</int> |
| 74 | + <string key="NSFrame">{{20, 59}, {280, 155}}</string> |
| 75 | + <reference key="NSSuperview" ref="191373211"/> |
| 76 | + <object class="NSColor" key="IBUIBackgroundColor"> |
| 77 | + <int key="NSColorSpace">1</int> |
| 78 | + <bytes key="NSRGB">MSAxIDEAA</bytes> |
| 79 | + </object> |
| 80 | + <bool key="IBUIClipsSubviews">YES</bool> |
| 81 | + <bool key="IBUIMultipleTouchEnabled">YES</bool> |
| 82 | + <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> |
| 83 | + <string key="IBUIText">Description</string> |
| 84 | + <object class="IBUITextInputTraits" key="IBUITextInputTraits"> |
| 85 | + <int key="IBUIAutocapitalizationType">2</int> |
| 86 | + <int key="IBUIAutocorrectionType">2</int> |
| 87 | + <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> |
| 88 | + </object> |
| 89 | + </object> |
| 90 | + </object> |
| 91 | + <string key="NSFrameSize">{320, 416}</string> |
| 92 | + <reference key="NSSuperview"/> |
| 93 | + <object class="NSColor" key="IBUIBackgroundColor"> |
| 94 | + <int key="NSColorSpace">10</int> |
| 95 | + <object class="NSImage" key="NSImage"> |
| 96 | + <int key="NSImageFlags">549453824</int> |
| 97 | + <string key="NSSize">{84, 1}</string> |
| 98 | + <object class="NSMutableArray" key="NSReps"> |
| 99 | + <bool key="EncodedWithXMLCoder">YES</bool> |
| 100 | + <object class="NSArray"> |
| 101 | + <bool key="EncodedWithXMLCoder">YES</bool> |
| 102 | + <integer value="0"/> |
| 103 | + <object class="NSBitmapImageRep"> |
| 104 | + <object class="NSData" key="NSTIFFRepresentation"> |
| 105 | + <bytes key="NS.bytes">TU0AKgAAAVjFzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/ |
| 106 | +y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/ |
| 107 | +xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/ |
| 108 | +xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/ |
| 109 | +xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/ |
| 110 | +xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P8ADQEAAAMAAAABAFQAAAEB |
| 111 | +AAMAAAABAAEAAAECAAMAAAAEAAAB+gEDAAMAAAABAAEAAAEGAAMAAAABAAIAAAERAAQAAAABAAAACAES |
| 112 | +AAMAAAABAAEAAAEVAAMAAAABAAQAAAEWAAMAAAABAAEAAAEXAAQAAAABAAABUAEcAAMAAAABAAEAAAFS |
| 113 | +AAMAAAABAAEAAAFTAAMAAAAEAAACAgAAAAAACAAIAAgACAABAAEAAQABA</bytes> |
| 114 | + </object> |
| 115 | + </object> |
| 116 | + </object> |
| 117 | + </object> |
| 118 | + <object class="NSColor" key="NSColor"> |
| 119 | + <int key="NSColorSpace">3</int> |
| 120 | + <bytes key="NSWhite">MCAwAA</bytes> |
| 121 | + </object> |
| 122 | + </object> |
| 123 | + <string key="IBUIColorCocoaTouchKeyPath">groupTableViewBackgroundColor</string> |
| 124 | + </object> |
| 125 | + <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/> |
| 126 | + <object class="IBUISimulatedNavigationBarMetrics" key="IBUISimulatedTopBarMetrics"> |
| 127 | + <bool key="IBUIPrompted">NO</bool> |
| 128 | + </object> |
| 129 | + <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> |
| 130 | + </object> |
| 131 | + </object> |
| 132 | + <object class="IBObjectContainer" key="IBDocument.Objects"> |
| 133 | + <object class="NSMutableArray" key="connectionRecords"> |
| 134 | + <bool key="EncodedWithXMLCoder">YES</bool> |
| 135 | + <object class="IBConnectionRecord"> |
| 136 | + <object class="IBCocoaTouchOutletConnection" key="connection"> |
| 137 | + <string key="label">view</string> |
| 138 | + <reference key="source" ref="372490531"/> |
| 139 | + <reference key="destination" ref="191373211"/> |
| 140 | + </object> |
| 141 | + <int key="connectionID">3</int> |
| 142 | + </object> |
| 143 | + <object class="IBConnectionRecord"> |
| 144 | + <object class="IBCocoaTouchOutletConnection" key="connection"> |
| 145 | + <string key="label">delegate</string> |
| 146 | + <reference key="source" ref="290235673"/> |
| 147 | + <reference key="destination" ref="372490531"/> |
| 148 | + </object> |
| 149 | + <int key="connectionID">6</int> |
| 150 | + </object> |
| 151 | + <object class="IBConnectionRecord"> |
| 152 | + <object class="IBCocoaTouchOutletConnection" key="connection"> |
| 153 | + <string key="label">delegate</string> |
| 154 | + <reference key="source" ref="543862702"/> |
| 155 | + <reference key="destination" ref="372490531"/> |
| 156 | + </object> |
| 157 | + <int key="connectionID">7</int> |
| 158 | + </object> |
| 159 | + <object class="IBConnectionRecord"> |
| 160 | + <object class="IBCocoaTouchOutletConnection" key="connection"> |
| 161 | + <string key="label">titleField</string> |
| 162 | + <reference key="source" ref="372490531"/> |
| 163 | + <reference key="destination" ref="290235673"/> |
| 164 | + </object> |
| 165 | + <int key="connectionID">8</int> |
| 166 | + </object> |
| 167 | + <object class="IBConnectionRecord"> |
| 168 | + <object class="IBCocoaTouchOutletConnection" key="connection"> |
| 169 | + <string key="label">descriptionText</string> |
| 170 | + <reference key="source" ref="372490531"/> |
| 171 | + <reference key="destination" ref="543862702"/> |
| 172 | + </object> |
| 173 | + <int key="connectionID">9</int> |
| 174 | + </object> |
| 175 | + </object> |
| 176 | + <object class="IBMutableOrderedSet" key="objectRecords"> |
| 177 | + <object class="NSArray" key="orderedObjects"> |
| 178 | + <bool key="EncodedWithXMLCoder">YES</bool> |
| 179 | + <object class="IBObjectRecord"> |
| 180 | + <int key="objectID">0</int> |
| 181 | + <reference key="object" ref="0"/> |
| 182 | + <reference key="children" ref="1000"/> |
| 183 | + <nil key="parent"/> |
| 184 | + </object> |
| 185 | + <object class="IBObjectRecord"> |
| 186 | + <int key="objectID">1</int> |
| 187 | + <reference key="object" ref="191373211"/> |
| 188 | + <object class="NSMutableArray" key="children"> |
| 189 | + <bool key="EncodedWithXMLCoder">YES</bool> |
| 190 | + <reference ref="290235673"/> |
| 191 | + <reference ref="543862702"/> |
| 192 | + </object> |
| 193 | + <reference key="parent" ref="0"/> |
| 194 | + </object> |
| 195 | + <object class="IBObjectRecord"> |
| 196 | + <int key="objectID">-1</int> |
| 197 | + <reference key="object" ref="372490531"/> |
| 198 | + <reference key="parent" ref="0"/> |
| 199 | + <string key="objectName">File's Owner</string> |
| 200 | + </object> |
| 201 | + <object class="IBObjectRecord"> |
| 202 | + <int key="objectID">-2</int> |
| 203 | + <reference key="object" ref="975951072"/> |
| 204 | + <reference key="parent" ref="0"/> |
| 205 | + </object> |
| 206 | + <object class="IBObjectRecord"> |
| 207 | + <int key="objectID">4</int> |
| 208 | + <reference key="object" ref="290235673"/> |
| 209 | + <reference key="parent" ref="191373211"/> |
| 210 | + </object> |
| 211 | + <object class="IBObjectRecord"> |
| 212 | + <int key="objectID">5</int> |
| 213 | + <reference key="object" ref="543862702"/> |
| 214 | + <reference key="parent" ref="191373211"/> |
| 215 | + </object> |
| 216 | + </object> |
| 217 | + </object> |
| 218 | + <object class="NSMutableDictionary" key="flattenedProperties"> |
| 219 | + <bool key="EncodedWithXMLCoder">YES</bool> |
| 220 | + <object class="NSArray" key="dict.sortedKeys"> |
| 221 | + <bool key="EncodedWithXMLCoder">YES</bool> |
| 222 | + <string>-1.CustomClassName</string> |
| 223 | + <string>-2.CustomClassName</string> |
| 224 | + <string>1.IBEditorWindowLastContentRect</string> |
| 225 | + <string>1.IBPluginDependency</string> |
| 226 | + <string>4.IBPluginDependency</string> |
| 227 | + <string>5.IBPluginDependency</string> |
| 228 | + </object> |
| 229 | + <object class="NSMutableArray" key="dict.values"> |
| 230 | + <bool key="EncodedWithXMLCoder">YES</bool> |
| 231 | + <string>ImageDetailsViewController</string> |
| 232 | + <string>UIResponder</string> |
| 233 | + <string>{{791, 124}, {320, 480}}</string> |
| 234 | + <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> |
| 235 | + <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> |
| 236 | + <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> |
| 237 | + </object> |
| 238 | + </object> |
| 239 | + <object class="NSMutableDictionary" key="unlocalizedProperties"> |
| 240 | + <bool key="EncodedWithXMLCoder">YES</bool> |
| 241 | + <reference key="dict.sortedKeys" ref="0"/> |
| 242 | + <object class="NSMutableArray" key="dict.values"> |
| 243 | + <bool key="EncodedWithXMLCoder">YES</bool> |
| 244 | + </object> |
| 245 | + </object> |
| 246 | + <nil key="activeLocalization"/> |
| 247 | + <object class="NSMutableDictionary" key="localizations"> |
| 248 | + <bool key="EncodedWithXMLCoder">YES</bool> |
| 249 | + <reference key="dict.sortedKeys" ref="0"/> |
| 250 | + <object class="NSMutableArray" key="dict.values"> |
| 251 | + <bool key="EncodedWithXMLCoder">YES</bool> |
| 252 | + </object> |
| 253 | + </object> |
| 254 | + <nil key="sourceID"/> |
| 255 | + <int key="maxID">9</int> |
| 256 | + </object> |
| 257 | + <object class="IBClassDescriber" key="IBDocument.Classes"> |
| 258 | + <object class="NSMutableArray" key="referencedPartialClassDescriptions"> |
| 259 | + <bool key="EncodedWithXMLCoder">YES</bool> |
| 260 | + <object class="IBPartialClassDescription"> |
| 261 | + <string key="className">ImageDetailsViewController</string> |
| 262 | + <string key="superclassName">UIViewController</string> |
| 263 | + <object class="NSMutableDictionary" key="outlets"> |
| 264 | + <bool key="EncodedWithXMLCoder">YES</bool> |
| 265 | + <object class="NSArray" key="dict.sortedKeys"> |
| 266 | + <bool key="EncodedWithXMLCoder">YES</bool> |
| 267 | + <string>descriptionText</string> |
| 268 | + <string>titleField</string> |
| 269 | + </object> |
| 270 | + <object class="NSMutableArray" key="dict.values"> |
| 271 | + <bool key="EncodedWithXMLCoder">YES</bool> |
| 272 | + <string>UITextView</string> |
| 273 | + <string>UITextField</string> |
| 274 | + </object> |
| 275 | + </object> |
| 276 | + <object class="NSMutableDictionary" key="toOneOutletInfosByName"> |
| 277 | + <bool key="EncodedWithXMLCoder">YES</bool> |
| 278 | + <object class="NSArray" key="dict.sortedKeys"> |
| 279 | + <bool key="EncodedWithXMLCoder">YES</bool> |
| 280 | + <string>descriptionText</string> |
| 281 | + <string>titleField</string> |
| 282 | + </object> |
| 283 | + <object class="NSMutableArray" key="dict.values"> |
| 284 | + <bool key="EncodedWithXMLCoder">YES</bool> |
| 285 | + <object class="IBToOneOutletInfo"> |
| 286 | + <string key="name">descriptionText</string> |
| 287 | + <string key="candidateClassName">UITextView</string> |
| 288 | + </object> |
| 289 | + <object class="IBToOneOutletInfo"> |
| 290 | + <string key="name">titleField</string> |
| 291 | + <string key="candidateClassName">UITextField</string> |
| 292 | + </object> |
| 293 | + </object> |
| 294 | + </object> |
| 295 | + <object class="IBClassDescriptionSource" key="sourceIdentifier"> |
| 296 | + <string key="majorKey">IBProjectSource</string> |
| 297 | + <string key="minorKey">Classes/ImageDetailsViewController.h</string> |
| 298 | + </object> |
| 299 | + </object> |
| 300 | + </object> |
| 301 | + <object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+"> |
| 302 | + <bool key="EncodedWithXMLCoder">YES</bool> |
| 303 | + <object class="IBPartialClassDescription"> |
| 304 | + <string key="className">NSObject</string> |
| 305 | + <object class="IBClassDescriptionSource" key="sourceIdentifier"> |
| 306 | + <string key="majorKey">IBFrameworkSource</string> |
| 307 | + <string key="minorKey">Foundation.framework/Headers/NSError.h</string> |
| 308 | + </object> |
| 309 | + </object> |
| 310 | + <object class="IBPartialClassDescription"> |
| 311 | + <string key="className">NSObject</string> |
| 312 | + <object class="IBClassDescriptionSource" key="sourceIdentifier"> |
| 313 | + <string key="majorKey">IBFrameworkSource</string> |
| 314 | + <string key="minorKey">Foundation.framework/Headers/NSFileManager.h</string> |
| 315 | + </object> |
| 316 | + </object> |
| 317 | + <object class="IBPartialClassDescription"> |
| 318 | + <string key="className">NSObject</string> |
| 319 | + <object class="IBClassDescriptionSource" key="sourceIdentifier"> |
| 320 | + <string key="majorKey">IBFrameworkSource</string> |
| 321 | + <string key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string> |
| 322 | + </object> |
| 323 | + </object> |
| 324 | + <object class="IBPartialClassDescription"> |
| 325 | + <string key="className">NSObject</string> |
| 326 | + <object class="IBClassDescriptionSource" key="sourceIdentifier"> |
| 327 | + <string key="majorKey">IBFrameworkSource</string> |
| 328 | + <string key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string> |
| 329 | + </object> |
| 330 | + </object> |
| 331 | + <object class="IBPartialClassDescription"> |
| 332 | + <string key="className">NSObject</string> |
| 333 | + <object class="IBClassDescriptionSource" key="sourceIdentifier"> |
| 334 | + <string key="majorKey">IBFrameworkSource</string> |
| 335 | + <string key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string> |
| 336 | + </object> |
| 337 | + </object> |
| 338 | + <object class="IBPartialClassDescription"> |
| 339 | + <string key="className">NSObject</string> |
| 340 | + <object class="IBClassDescriptionSource" key="sourceIdentifier"> |
| 341 | + <string key="majorKey">IBFrameworkSource</string> |
| 342 | + <string key="minorKey">Foundation.framework/Headers/NSObject.h</string> |
| 343 | + </object> |
| 344 | + </object> |
| 345 | + <object class="IBPartialClassDescription"> |
| 346 | + <string key="className">NSObject</string> |
| 347 | + <object class="IBClassDescriptionSource" key="sourceIdentifier"> |
| 348 | + <string key="majorKey">IBFrameworkSource</string> |
| 349 | + <string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string> |
| 350 | + </object> |
| 351 | + </object> |
| 352 | + <object class="IBPartialClassDescription"> |
| 353 | + <string key="className">NSObject</string> |
| 354 | + <object class="IBClassDescriptionSource" key="sourceIdentifier"> |
| 355 | + <string key="majorKey">IBFrameworkSource</string> |
| 356 | + <string key="minorKey">Foundation.framework/Headers/NSThread.h</string> |
| 357 | + </object> |
| 358 | + </object> |
| 359 | + <object class="IBPartialClassDescription"> |
| 360 | + <string key="className">NSObject</string> |
| 361 | + <object class="IBClassDescriptionSource" key="sourceIdentifier"> |
| 362 | + <string key="majorKey">IBFrameworkSource</string> |
| 363 | + <string key="minorKey">Foundation.framework/Headers/NSURL.h</string> |
| 364 | + </object> |
| 365 | + </object> |
| 366 | + <object class="IBPartialClassDescription"> |
| 367 | + <string key="className">NSObject</string> |
| 368 | + <object class="IBClassDescriptionSource" key="sourceIdentifier"> |
| 369 | + <string key="majorKey">IBFrameworkSource</string> |
| 370 | + <string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string> |
| 371 | + </object> |
| 372 | + </object> |
| 373 | + <object class="IBPartialClassDescription"> |
| 374 | + <string key="className">NSObject</string> |
| 375 | + <object class="IBClassDescriptionSource" key="sourceIdentifier"> |
| 376 | + <string key="majorKey">IBFrameworkSource</string> |
| 377 | + <string key="minorKey">UIKit.framework/Headers/UIAccessibility.h</string> |
| 378 | + </object> |
| 379 | + </object> |
| 380 | + <object class="IBPartialClassDescription"> |
| 381 | + <string key="className">NSObject</string> |
| 382 | + <object class="IBClassDescriptionSource" key="sourceIdentifier"> |
| 383 | + <string key="majorKey">IBFrameworkSource</string> |
| 384 | + <string key="minorKey">UIKit.framework/Headers/UINibLoading.h</string> |
| 385 | + </object> |
| 386 | + </object> |
| 387 | + <object class="IBPartialClassDescription"> |
| 388 | + <string key="className">NSObject</string> |
| 389 | + <object class="IBClassDescriptionSource" key="sourceIdentifier" id="553314074"> |
| 390 | + <string key="majorKey">IBFrameworkSource</string> |
| 391 | + <string key="minorKey">UIKit.framework/Headers/UIResponder.h</string> |
| 392 | + </object> |
| 393 | + </object> |
| 394 | + <object class="IBPartialClassDescription"> |
| 395 | + <string key="className">UIControl</string> |
| 396 | + <string key="superclassName">UIView</string> |
| 397 | + <object class="IBClassDescriptionSource" key="sourceIdentifier"> |
| 398 | + <string key="majorKey">IBFrameworkSource</string> |
| 399 | + <string key="minorKey">UIKit.framework/Headers/UIControl.h</string> |
| 400 | + </object> |
| 401 | + </object> |
| 402 | + <object class="IBPartialClassDescription"> |
| 403 | + <string key="className">UIResponder</string> |
| 404 | + <string key="superclassName">NSObject</string> |
| 405 | + <reference key="sourceIdentifier" ref="553314074"/> |
| 406 | + </object> |
| 407 | + <object class="IBPartialClassDescription"> |
| 408 | + <string key="className">UIScrollView</string> |
| 409 | + <string key="superclassName">UIView</string> |
| 410 | + <object class="IBClassDescriptionSource" key="sourceIdentifier"> |
| 411 | + <string key="majorKey">IBFrameworkSource</string> |
| 412 | + <string key="minorKey">UIKit.framework/Headers/UIScrollView.h</string> |
| 413 | + </object> |
| 414 | + </object> |
| 415 | + <object class="IBPartialClassDescription"> |
| 416 | + <string key="className">UISearchBar</string> |
| 417 | + <string key="superclassName">UIView</string> |
| 418 | + <object class="IBClassDescriptionSource" key="sourceIdentifier"> |
| 419 | + <string key="majorKey">IBFrameworkSource</string> |
| 420 | + <string key="minorKey">UIKit.framework/Headers/UISearchBar.h</string> |
| 421 | + </object> |
| 422 | + </object> |
| 423 | + <object class="IBPartialClassDescription"> |
| 424 | + <string key="className">UISearchDisplayController</string> |
| 425 | + <string key="superclassName">NSObject</string> |
| 426 | + <object class="IBClassDescriptionSource" key="sourceIdentifier"> |
| 427 | + <string key="majorKey">IBFrameworkSource</string> |
| 428 | + <string key="minorKey">UIKit.framework/Headers/UISearchDisplayController.h</string> |
| 429 | + </object> |
| 430 | + </object> |
| 431 | + <object class="IBPartialClassDescription"> |
| 432 | + <string key="className">UITextField</string> |
| 433 | + <string key="superclassName">UIControl</string> |
| 434 | + <object class="IBClassDescriptionSource" key="sourceIdentifier" id="599310836"> |
| 435 | + <string key="majorKey">IBFrameworkSource</string> |
| 436 | + <string key="minorKey">UIKit.framework/Headers/UITextField.h</string> |
| 437 | + </object> |
| 438 | + </object> |
| 439 | + <object class="IBPartialClassDescription"> |
| 440 | + <string key="className">UITextView</string> |
| 441 | + <string key="superclassName">UIScrollView</string> |
| 442 | + <object class="IBClassDescriptionSource" key="sourceIdentifier"> |
| 443 | + <string key="majorKey">IBFrameworkSource</string> |
| 444 | + <string key="minorKey">UIKit.framework/Headers/UITextView.h</string> |
| 445 | + </object> |
| 446 | + </object> |
| 447 | + <object class="IBPartialClassDescription"> |
| 448 | + <string key="className">UIView</string> |
| 449 | + <object class="IBClassDescriptionSource" key="sourceIdentifier"> |
| 450 | + <string key="majorKey">IBFrameworkSource</string> |
| 451 | + <string key="minorKey">UIKit.framework/Headers/UIPrintFormatter.h</string> |
| 452 | + </object> |
| 453 | + </object> |
| 454 | + <object class="IBPartialClassDescription"> |
| 455 | + <string key="className">UIView</string> |
| 456 | + <reference key="sourceIdentifier" ref="599310836"/> |
| 457 | + </object> |
| 458 | + <object class="IBPartialClassDescription"> |
| 459 | + <string key="className">UIView</string> |
| 460 | + <string key="superclassName">UIResponder</string> |
| 461 | + <object class="IBClassDescriptionSource" key="sourceIdentifier"> |
| 462 | + <string key="majorKey">IBFrameworkSource</string> |
| 463 | + <string key="minorKey">UIKit.framework/Headers/UIView.h</string> |
| 464 | + </object> |
| 465 | + </object> |
| 466 | + <object class="IBPartialClassDescription"> |
| 467 | + <string key="className">UIViewController</string> |
| 468 | + <object class="IBClassDescriptionSource" key="sourceIdentifier"> |
| 469 | + <string key="majorKey">IBFrameworkSource</string> |
| 470 | + <string key="minorKey">UIKit.framework/Headers/UINavigationController.h</string> |
| 471 | + </object> |
| 472 | + </object> |
| 473 | + <object class="IBPartialClassDescription"> |
| 474 | + <string key="className">UIViewController</string> |
| 475 | + <object class="IBClassDescriptionSource" key="sourceIdentifier"> |
| 476 | + <string key="majorKey">IBFrameworkSource</string> |
| 477 | + <string key="minorKey">UIKit.framework/Headers/UIPopoverController.h</string> |
| 478 | + </object> |
| 479 | + </object> |
| 480 | + <object class="IBPartialClassDescription"> |
| 481 | + <string key="className">UIViewController</string> |
| 482 | + <object class="IBClassDescriptionSource" key="sourceIdentifier"> |
| 483 | + <string key="majorKey">IBFrameworkSource</string> |
| 484 | + <string key="minorKey">UIKit.framework/Headers/UISplitViewController.h</string> |
| 485 | + </object> |
| 486 | + </object> |
| 487 | + <object class="IBPartialClassDescription"> |
| 488 | + <string key="className">UIViewController</string> |
| 489 | + <object class="IBClassDescriptionSource" key="sourceIdentifier"> |
| 490 | + <string key="majorKey">IBFrameworkSource</string> |
| 491 | + <string key="minorKey">UIKit.framework/Headers/UITabBarController.h</string> |
| 492 | + </object> |
| 493 | + </object> |
| 494 | + <object class="IBPartialClassDescription"> |
| 495 | + <string key="className">UIViewController</string> |
| 496 | + <string key="superclassName">UIResponder</string> |
| 497 | + <object class="IBClassDescriptionSource" key="sourceIdentifier"> |
| 498 | + <string key="majorKey">IBFrameworkSource</string> |
| 499 | + <string key="minorKey">UIKit.framework/Headers/UIViewController.h</string> |
| 500 | + </object> |
| 501 | + </object> |
| 502 | + </object> |
| 503 | + </object> |
| 504 | + <int key="IBDocument.localizationMode">0</int> |
| 505 | + <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string> |
| 506 | + <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults"> |
| 507 | + <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string> |
| 508 | + <integer value="1056" key="NS.object.0"/> |
| 509 | + </object> |
| 510 | + <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies"> |
| 511 | + <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string> |
| 512 | + <integer value="3000" key="NS.object.0"/> |
| 513 | + </object> |
| 514 | + <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool> |
| 515 | + <string key="IBDocument.LastKnownRelativeProjectPath">../photopicker.xcodeproj</string> |
| 516 | + <int key="IBDocument.defaultPropertyAccessControl">3</int> |
| 517 | + <string key="IBCocoaTouchPluginVersion">132</string> |
| 518 | + </data> |
| 519 | +</archive> |
Index: trunk/tools/Snap-to-Commons/Classes/CommonsUpload.m |
— | — | @@ -0,0 +1,36 @@ |
| 2 | +// |
| 3 | +// CommonsUpload.m |
| 4 | +// photopicker |
| 5 | +// |
| 6 | +// Created by Derk-Jan Hartman on 15-01-11. |
| 7 | +// Copyright 2011 Wikimedia Commons. All rights reserved. |
| 8 | +// |
| 9 | + |
| 10 | +#import "CommonsUpload.h" |
| 11 | +#import "Configuration.h" |
| 12 | + |
| 13 | + |
| 14 | +@implementation CommonsUpload |
| 15 | + |
| 16 | +@synthesize imageData, title, description; |
| 17 | + |
| 18 | +- (NSString *)getUploadText { |
| 19 | + return @""; |
| 20 | +} |
| 21 | + |
| 22 | +- (NSString *)getUploadDescription { |
| 23 | + NSDateFormatter *formatter = [[[NSDateFormatter alloc] init] autorelease]; |
| 24 | + [formatter setDateFormat:@"%Y-%m-%d"]; |
| 25 | + NSString *date = [formatter stringFromDate:[NSDate date] ]; |
| 26 | + |
| 27 | + return [NSString stringWithFormat: @"{{Information\n|Description={{en|1=%@}}\n|Author=[[User:%@]]\n|Source={{own}}\n|Date=%@\n|Permission=\n|other_versions=\n}}\n\n== {{int:license}} ==\n%@\n\n[[Category:%@]]", |
| 28 | + description, |
| 29 | + [[NSUserDefaults standardUserDefaults] valueForKey: COMMONS_USERNAME_KEY], |
| 30 | + date, |
| 31 | + DEFAULT_LICENSE, |
| 32 | + APPLICATION_CATEGORY, |
| 33 | + nil |
| 34 | + ]; |
| 35 | +} |
| 36 | + |
| 37 | +@end |
Index: trunk/tools/Snap-to-Commons/Classes/ImageDetailsViewController.h |
— | — | @@ -0,0 +1,21 @@ |
| 2 | +// |
| 3 | +// ImageDetailsViewController.h |
| 4 | +// photopicker |
| 5 | +// |
| 6 | +// Created by Derk-Jan Hartman on 15-01-11. |
| 7 | +// Copyright 2011 Wikimedia Commons. All rights reserved. |
| 8 | +// |
| 9 | + |
| 10 | +#import <UIKit/UIKit.h> |
| 11 | + |
| 12 | + |
| 13 | +@interface ImageDetailsViewController : UIViewController <UINavigationControllerDelegate, |
| 14 | + UITextFieldDelegate> { |
| 15 | + IBOutlet UITextField *titleField; |
| 16 | + IBOutlet UITextView *descriptionText; |
| 17 | +} |
| 18 | + |
| 19 | +@property (nonatomic, retain) UITextField *titleField; |
| 20 | +@property (nonatomic, retain) UITextView *descriptionText; |
| 21 | + |
| 22 | +@end |