adium 2345:45e6508d3b79: Not all that sure how this code got dup...
commits at adium.im
commits at adium.im
Wed May 27 01:51:58 UTC 2009
details: http://hg.adium.im/adium/rev/45e6508d3b79
revision: 2345:45e6508d3b79
author: Zachary West <zacw at adium.im>
date: Tue May 26 21:51:53 2009 -0400
Not all that sure how this code got duplicated. :o weird.
diffstat:
Plugins/Image Uploading Plugin/AIImageUploaderWindowController.m | 8 -
Plugins/Image Uploading Plugin/AIPicImImageUploader.m | 70 -----------
2 files changed, 0 insertions(+), 78 deletions(-)
diffs (96 lines):
diff -r b5f68ee73ac3 -r 45e6508d3b79 Plugins/Image Uploading Plugin/AIImageUploaderWindowController.m
--- a/Plugins/Image Uploading Plugin/AIImageUploaderWindowController.m Tue May 26 21:49:21 2009 -0400
+++ b/Plugins/Image Uploading Plugin/AIImageUploaderWindowController.m Tue May 26 21:51:53 2009 -0400
@@ -56,14 +56,6 @@
[button_cancel setLocalizedString:AILocalizedStringFromTable(@"Cancel", @"Buttons", nil)];
}
-- (void)windowDidLoad
-{
- [super windowDidLoad];
-
- [label_uploadingImage setLocalizedString:[AILocalizedString(@"Uploading image to server", nil) stringByAppendingEllipsis]];
- [button_cancel setLocalizedString:AILocalizedStringFromTable(@"Cancel", @"Buttons", nil)];
-}
-
- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo
{
[sheet orderOut:nil];
diff -r b5f68ee73ac3 -r 45e6508d3b79 Plugins/Image Uploading Plugin/AIPicImImageUploader.m
--- a/Plugins/Image Uploading Plugin/AIPicImImageUploader.m Tue May 26 21:49:21 2009 -0400
+++ b/Plugins/Image Uploading Plugin/AIPicImImageUploader.m Tue May 26 21:51:53 2009 -0400
@@ -212,74 +212,4 @@
NSLog(@"%@", response);
}
-#pragma mark Response parsing
-
-- (void)parserDidStartDocument:(NSXMLParser *)parser
-{
- currentElement = response;
-}
-
-- (void)parser:(NSXMLParser *)parser
-parseErrorOccurred:(NSError *)error
-{
- AILogWithSignature(@"%@", [error localizedDescription]);
-
- [responseParser release]; responseParser = nil;
-
- [uploader errorWithMessage:[error localizedDescription] forChat:chat];
-}
-
-- (void)parser:(NSXMLParser *)parser
-didStartElement:(NSString *)elementName
- namespaceURI:(NSString *)namespaceURI
- qualifiedName:(NSString *)qualifiedName
- attributes:(NSDictionary *)attributes
-{
- if (elementName) {
- NSMutableDictionary *dict = [NSMutableDictionary dictionary];
-
- [currentElement setValue:dict forKey:elementName];
-
- lastElement = currentElement;
- currentElement = dict;
- }
-
- [currentElement addEntriesFromDictionary:attributes];
-}
-
-- (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName
-{
- // We don't see anything more than 2-deep. We don't need to check more.
- currentElement = lastElement;
-}
-
-- (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string
-{
- if (![currentElement objectForKey:@"value"]) {
- [currentElement setValue:[NSMutableString string] forKey:@"value"];
- }
-
- [[currentElement objectForKey:@"value"] appendString:string];
-}
-
-- (void)parserDidEndDocument:(NSXMLParser *)parser
-{
- [responseParser release]; responseParser = nil;
-
- [self finishResponse];
-}
-
-- (void)finishResponse
-{
- NSDictionary *status = [[response objectForKey:@"trim"] objectForKey:@"status"];
-
- if ([[status objectForKey:@"result"] isCaseInsensitivelyEqualToString:@"error"]) {
- [uploader errorWithMessage:[status objectForKey:@"message"] forChat:chat];
- } else {
- // TODO when api key :(
- }
-
- NSLog(@"%@", response);
-}
-
@end
More information about the commits
mailing list