--- a/Adium.xcodeproj/project.pbxproj Tue Jun 04 23:54:22 2013 -0400
+++ b/Adium.xcodeproj/project.pbxproj Wed Jun 05 23:31:24 2013 +0200
@@ -1345,6 +1345,14 @@
761D58801636C60100210B12 /* AINewMessageTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 761D587F1636C60100210B12 /* AINewMessageTableView.m */; };
761D58831636EDE100210B12 /* AINewMessageTextFieldCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 761D58821636EDE100210B12 /* AINewMessageTextFieldCell.m */; };
761D58861636F94300210B12 /* AINewMessageSearchField.m in Sources */ = {isa = PBXBuildFile; fileRef = 761D58851636F94200210B12 /* AINewMessageSearchField.m */; };
+ 7652804C175FC0F500710EC8 /* RequestFieldBoolean.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7652803F175FC0EB00710EC8 /* RequestFieldBoolean.xib */; }; + 7652804D175FC0F500710EC8 /* RequestFieldChoice.xib in Resources */ = {isa = PBXBuildFile; fileRef = 76528040175FC0EB00710EC8 /* RequestFieldChoice.xib */; }; + 7652804E175FC0F500710EC8 /* RequestFieldInteger.xib in Resources */ = {isa = PBXBuildFile; fileRef = 76528041175FC0EB00710EC8 /* RequestFieldInteger.xib */; }; + 7652804F175FC0F500710EC8 /* RequestFieldList.xib in Resources */ = {isa = PBXBuildFile; fileRef = 76528042175FC0EB00710EC8 /* RequestFieldList.xib */; }; + 76528050175FC0F500710EC8 /* RequestFieldString.xib in Resources */ = {isa = PBXBuildFile; fileRef = 76528043175FC0EB00710EC8 /* RequestFieldString.xib */; }; + 76528054175FCEF700710EC8 /* RequestFieldMultilineString.xib in Resources */ = {isa = PBXBuildFile; fileRef = 76528052175FCEF700710EC8 /* RequestFieldMultilineString.xib */; }; + 76528055175FCEF700710EC8 /* RequestFieldSecureString.xib in Resources */ = {isa = PBXBuildFile; fileRef = 76528053175FCEF700710EC8 /* RequestFieldSecureString.xib */; }; + 7652805A175FD35B00710EC8 /* RequestFieldMultiList.xib in Resources */ = {isa = PBXBuildFile; fileRef = 76528059175FD35B00710EC8 /* RequestFieldMultiList.xib */; }; 765F5DC51635934400C57904 /* AIRejoinGroupChatTopBar.xib in Resources */ = {isa = PBXBuildFile; fileRef = 765F5DC71635934400C57904 /* AIRejoinGroupChatTopBar.xib */; };
7664EAA5162E086A008CF995 /* libffi.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7664EAA4162E086A008CF995 /* libffi.framework */; };
7664EAA6162E0874008CF995 /* libffi.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 7664EAA4162E086A008CF995 /* libffi.framework */; };
@@ -4413,6 +4421,14 @@
761D58821636EDE100210B12 /* AINewMessageTextFieldCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AINewMessageTextFieldCell.m; path = Source/AINewMessageTextFieldCell.m; sourceTree = "<group>"; };
761D58841636F94200210B12 /* AINewMessageSearchField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AINewMessageSearchField.h; path = Source/AINewMessageSearchField.h; sourceTree = "<group>"; };
761D58851636F94200210B12 /* AINewMessageSearchField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AINewMessageSearchField.m; path = Source/AINewMessageSearchField.m; sourceTree = "<group>"; };
+ 7652803F175FC0EB00710EC8 /* RequestFieldBoolean.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = RequestFieldBoolean.xib; path = "Plugins/Purple Service/Request UI/RequestFieldBoolean.xib"; sourceTree = "<group>"; }; + 76528040175FC0EB00710EC8 /* RequestFieldChoice.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = RequestFieldChoice.xib; path = "Plugins/Purple Service/Request UI/RequestFieldChoice.xib"; sourceTree = "<group>"; }; + 76528041175FC0EB00710EC8 /* RequestFieldInteger.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = RequestFieldInteger.xib; path = "Plugins/Purple Service/Request UI/RequestFieldInteger.xib"; sourceTree = "<group>"; }; + 76528042175FC0EB00710EC8 /* RequestFieldList.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = RequestFieldList.xib; path = "Plugins/Purple Service/Request UI/RequestFieldList.xib"; sourceTree = "<group>"; }; + 76528043175FC0EB00710EC8 /* RequestFieldString.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = RequestFieldString.xib; path = "Plugins/Purple Service/Request UI/RequestFieldString.xib"; sourceTree = "<group>"; }; + 76528052175FCEF700710EC8 /* RequestFieldMultilineString.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = RequestFieldMultilineString.xib; path = "Plugins/Purple Service/Request UI/RequestFieldMultilineString.xib"; sourceTree = "<group>"; }; + 76528053175FCEF700710EC8 /* RequestFieldSecureString.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = RequestFieldSecureString.xib; path = "Plugins/Purple Service/Request UI/RequestFieldSecureString.xib"; sourceTree = "<group>"; }; + 76528059175FD35B00710EC8 /* RequestFieldMultiList.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = RequestFieldMultiList.xib; path = "Plugins/Purple Service/Request UI/RequestFieldMultiList.xib"; sourceTree = "<group>"; }; 765F5DC61635934400C57904 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/AIRejoinGroupChatTopBar.xib; sourceTree = "<group>"; };
7664EAA4162E086A008CF995 /* libffi.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = libffi.framework; path = Frameworks/libffi.framework; sourceTree = "<group>"; };
766ABAB41306D1020049FFB7 /* AIUnreadMessagesTooltip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AIUnreadMessagesTooltip.h; path = Source/AIUnreadMessagesTooltip.h; sourceTree = "<group>"; };
@@ -6094,6 +6110,14 @@
34C2CF8F0633405C0018E5D2 /* Request UI */ = {
+ 7652803F175FC0EB00710EC8 /* RequestFieldBoolean.xib */, + 76528040175FC0EB00710EC8 /* RequestFieldChoice.xib */, + 76528041175FC0EB00710EC8 /* RequestFieldInteger.xib */, + 76528059175FD35B00710EC8 /* RequestFieldMultiList.xib */, + 76528042175FC0EB00710EC8 /* RequestFieldList.xib */, + 76528043175FC0EB00710EC8 /* RequestFieldString.xib */, + 76528052175FCEF700710EC8 /* RequestFieldMultilineString.xib */, + 76528053175FCEF700710EC8 /* RequestFieldSecureString.xib */, 34AEE7E808E35A5800AE1C78 /* ESPurpleRequestAbstractWindowController.h */,
34AEE7E908E35A5800AE1C78 /* ESPurpleRequestAbstractWindowController.m */,
3499F4A706309AF60035B468 /* ESPurpleRequestWindowController.h */,
@@ -9653,6 +9677,14 @@
34D8153F13B663650022C8C4 /* AIFacebookXMPPOauthWebViewWindow.xib in Resources */,
5A22D6E214834F44004E15F7 /* AIFacebookXMPPAccountView.xib in Resources */,
769D634B17393CBE008B97BC /* AMPurpleJabberDiscoveryBrowser.xib in Resources */,
+ 7652804C175FC0F500710EC8 /* RequestFieldBoolean.xib in Resources */, + 7652804D175FC0F500710EC8 /* RequestFieldChoice.xib in Resources */, + 7652804E175FC0F500710EC8 /* RequestFieldInteger.xib in Resources */, + 7652804F175FC0F500710EC8 /* RequestFieldList.xib in Resources */, + 76528050175FC0F500710EC8 /* RequestFieldString.xib in Resources */, + 76528054175FCEF700710EC8 /* RequestFieldMultilineString.xib in Resources */, + 76528055175FCEF700710EC8 /* RequestFieldSecureString.xib in Resources */, + 7652805A175FD35B00710EC8 /* RequestFieldMultiList.xib in Resources */, runOnlyForDeploymentPostprocessing = 0;
--- a/Plugins/Purple Service/AMPurpleRequestFieldsController.m Tue Jun 04 23:54:22 2013 -0400
+++ b/Plugins/Purple Service/AMPurpleRequestFieldsController.m Wed Jun 05 23:31:24 2013 +0200
@@ -16,6 +16,7 @@
#import "AMPurpleRequestFieldsController.h"
#import <AIUtilities/AIImageAdditions.h>
+#import <AIUtilities/AIMenuAdditions.h> #import <AIUtilities/AIStringAdditions.h>
@@ -26,43 +27,70 @@
@interface AMPurpleRequestField : NSObject {
PurpleRequestField *field;
CBPurpleAccount *account;
+ IBOutlet NSTextView *label; - (id)initWithAccount:(CBPurpleAccount*)_account requestField:(PurpleRequestField*)_field;
-- (void)applyValue:(NSString*)value;
+- (NSAttributedString *)label; @interface AMPurpleRequestFieldString : AMPurpleRequestField {
+ IBOutlet NSTextField *textField; +@interface AMPurpleRequestFieldSecureString : AMPurpleRequestField { + IBOutlet NSSecureTextField *maskedField; +@interface AMPurpleRequestFieldMultilineString : AMPurpleRequestField { + IBOutlet NSTextView *textView; @interface AMPurpleRequestFieldInteger : AMPurpleRequestField {
+ IBOutlet NSTextField *textField; @interface AMPurpleRequestFieldBoolean : AMPurpleRequestField {
+ IBOutlet NSButton *checkBox; @interface AMPurpleRequestFieldChoice : AMPurpleRequestField {
+ IBOutlet NSPopUpButton *popUp; @interface AMPurpleRequestFieldList : AMPurpleRequestField {
+ IBOutlet NSPopUpButton *popUp; +@interface AMPurpleRequestFieldMultiList : AMPurpleRequestField { + IBOutlet NSPopUpButton *popDown; +- (IBAction)didSelect:(id)sender; @interface AMPurpleRequestFieldLabel : AMPurpleRequestField {
+ IBOutlet NSTextView *labelview; @@ -83,83 +111,182 @@
if((self = [super init])) {
+ [NSBundle loadNibNamed:[self nibName] owner:self]; + height = view.frame.size.height; + NSInteger dh = height - label.frame.size.height; + [[label textStorage] setAttributedString:[self label]]; + [label setHorizontallyResizable:FALSE]; + [label setTextContainerInset:NSMakeSize(0, 0)]; + if (height < label.frame.size.height + dh) { + height = label.frame.size.height + dh; -- (NSXMLElement*)xhtml {
- NSXMLElement *result = [NSXMLNode elementWithName:@"div"];
- [result addAttribute:[NSXMLNode attributeWithName:@"class" stringValue:@"field"]];
- const char *labelstr = purple_request_field_get_label(field);
- NSXMLElement *label = [NSXMLNode elementWithName:@"label" stringValue:[NSString stringWithUTF8String:labelstr]];
- [label addAttribute:[NSXMLNode attributeWithName:@"for" stringValue:[self key]]];
- [result addChild:[NSXMLNode elementWithName:@"div"
- children:[NSArray arrayWithObject:label]
- attributes:[NSArray arrayWithObject:[NSXMLNode attributeWithName:@"class" stringValue:@"label"]]]];
- return [NSString stringWithFormat:@"%p",self];
+- (NSAttributedString *)label + const char *labelstr = purple_request_field_get_label(field); + NSString *labelString = [NSString stringWithUTF8String:labelstr]; + char endsWith = [labelString lastCharacter]; + if (endsWith == ':' || endsWith == ';' || endsWith == ',' || endsWith == '.' || endsWith == '?') { + labelString = [labelString substringToIndex:[labelString length] - 1]; + labelString = [labelString stringByAppendingString:@":"]; + NSMutableParagraphStyle *rightAlign = [[NSMutableParagraphStyle alloc] init]; + [rightAlign setAlignment:NSRightTextAlignment]; + NSAttributedString *labelText = [[NSAttributedString alloc] initWithString:labelString + NSParagraphStyleAttributeName: rightAlign, + NSFontAttributeName: [NSFont systemFontOfSize:[NSFont systemFontSize]] + return [labelText autorelease]; + return [[[NSAttributedString alloc] initWithString:@""] autorelease]; -- (void)applyValue:(NSString*)value {
- NSLog(@"Applied the value \"%@\" to an AMPurpleRequestField!", value);
@implementation AMPurpleRequestFieldString
-- (NSXMLElement*)xhtml {
- NSXMLElement *result = [super xhtml];
- const char *defaultvalue = purple_request_field_string_get_default_value(field);
- BOOL isMultiline = (purple_request_field_string_is_multiline(field) == TRUE) ? YES : NO;
- BOOL isEditable = (purple_request_field_string_is_editable(field) == TRUE) ? YES : NO;
- BOOL isMasked = (purple_request_field_string_is_masked(field) == TRUE) ? YES : NO;
- BOOL isVisible = (purple_request_field_is_visible(field) == TRUE) ? YES : NO;
- NSXMLElement *textinput;
+ return @"RequestFieldString"; + AILogWithSignature(@"Appending this to the window"); + NSString *defaultvalue = [NSString stringWithUTF8String:purple_request_field_string_get_default_value(field)]; + BOOL isEditable = purple_request_field_string_is_editable(field); + BOOL isVisible = purple_request_field_is_visible(field); + if (!isVisible) return nil; + [textField setEditable:isEditable]; + [textField setStringValue:defaultvalue];
- textinput = [NSXMLNode elementWithName:@"textarea"];
- [textinput addAttribute:[NSXMLNode attributeWithName:@"rows" stringValue:@"5"]];
- [textinput addAttribute:[NSXMLNode attributeWithName:@"cols" stringValue:@"40"]];
- [textinput setStringValue:[NSString stringWithUTF8String:defaultvalue]];
- textinput = [NSXMLNode elementWithName:@"input"];
- [textinput addAttribute:[NSXMLNode attributeWithName:@"type" stringValue:isMasked?@"password":@"text"]];
- [textinput addAttribute:[NSXMLNode attributeWithName:@"type" stringValue:@"hidden"]];
- [textinput addAttribute:[NSXMLNode attributeWithName:@"size" stringValue:@"50"]];
- [textinput addAttribute:[NSXMLNode attributeWithName:@"value" stringValue:[NSString stringWithUTF8String:defaultvalue]]];
- [textinput addAttribute:[NSXMLNode attributeWithName:@"name" stringValue:[self key]]];
- [textinput addAttribute:[NSXMLNode attributeWithName:@"readonly" stringValue:@"readonly"]];
- [result addChild:[NSXMLNode elementWithName:@"div"
- children:[NSArray arrayWithObject:textinput]
- attributes:[NSArray arrayWithObject:[NSXMLNode attributeWithName:@"class" stringValue:@"input"]]]];
+ BOOL isVisible = purple_request_field_is_visible(field); + purple_request_field_string_set_value(field, purple_request_field_string_get_default_value(field)); + purple_request_field_string_set_value(field, [[textField stringValue] UTF8String]);
+@implementation AMPurpleRequestFieldSecureString + return @"RequestFieldSecureString"; -- (void)applyValue:(NSString*)value {
- purple_request_field_string_set_value(field, [value UTF8String]);
+ AILogWithSignature(@"Appending this to the window"); + NSString *defaultvalue = [NSString stringWithUTF8String:purple_request_field_string_get_default_value(field)]; + BOOL isEditable = purple_request_field_string_is_editable(field); + BOOL isVisible = purple_request_field_is_visible(field); + if (!isVisible) return nil; + [maskedField setEditable:isEditable]; + [maskedField setStringValue:defaultvalue]; + BOOL isVisible = purple_request_field_is_visible(field); + purple_request_field_string_set_value(field, purple_request_field_string_get_default_value(field)); + purple_request_field_string_set_value(field, [[maskedField stringValue] UTF8String]); +@implementation AMPurpleRequestFieldMultilineString + return @"RequestFieldMultilineString"; + AILogWithSignature(@"Appending this to the window"); + NSString *defaultvalue = [NSString stringWithUTF8String:purple_request_field_string_get_default_value(field)]; + BOOL isEditable = purple_request_field_string_is_editable(field); + BOOL isVisible = purple_request_field_is_visible(field); + if (!isVisible) return nil; + [[textView enclosingScrollView] setHasVerticalScroller:TRUE]; + [textView setEditable:isEditable]; + [[textView textStorage] setAttributedString:[[[NSAttributedString alloc] initWithString:defaultvalue] autorelease]]; + if (height < textView.frame.size.height + 15) { + height = textView.frame.size.height + 15; + [view setFrame:NSMakeRect(0, 0, view.frame.size.width, height)]; + BOOL isVisible = purple_request_field_is_visible(field); + purple_request_field_string_set_value(field, purple_request_field_string_get_default_value(field)); + purple_request_field_string_set_value(field, [[[textView textStorage] string] UTF8String]); @@ -167,175 +294,257 @@
@implementation AMPurpleRequestFieldInteger
-- (NSXMLElement*)xhtml {
- NSXMLElement *result = [super xhtml];
- NSInteger defaultvalue = purple_request_field_int_get_default_value(field);
- NSXMLElement *textinput = [NSXMLNode elementWithName:@"input"];
- [textinput addAttribute:[NSXMLNode attributeWithName:@"type" stringValue:@"text"]];
- [textinput addAttribute:[NSXMLNode attributeWithName:@"value" stringValue:[NSString stringWithFormat:@"%ld",defaultvalue]]];
- [textinput addAttribute:[NSXMLNode attributeWithName:@"name" stringValue:[self key]]];
- // XXX add javascript to make sure this is integer-only
- [result addChild:[NSXMLNode elementWithName:@"div"
- children:[NSArray arrayWithObject:textinput]
- attributes:[NSArray arrayWithObject:[NSXMLNode attributeWithName:@"class" stringValue:@"input"]]]];
+ return @"RequestFieldInteger"; -- (void)applyValue:(NSString*)value {
- purple_request_field_int_set_value(field, [value intValue]);
+ NSInteger defaultvalue = purple_request_field_int_get_default_value(field); + [textField setIntegerValue:defaultvalue]; + purple_request_field_int_set_value(field, [textField intValue]); @implementation AMPurpleRequestFieldBoolean
-- (NSXMLElement*)xhtml {
- NSXMLElement *result = [super xhtml];
- BOOL defaultvalue = (purple_request_field_bool_get_default_value(field) == TRUE) ? YES : NO;
- NSXMLElement *checkbox = [NSXMLNode elementWithName:@"input"];
- [checkbox addAttribute:[NSXMLNode attributeWithName:@"type" stringValue:@"checkbox"]];
- [checkbox addAttribute:[NSXMLNode attributeWithName:@"value" stringValue:[self key]]];
- [checkbox addAttribute:[NSXMLNode attributeWithName:@"name" stringValue:[self key]]];
+ return @"RequestFieldBoolean";
- [checkbox addAttribute:[NSXMLNode attributeWithName:@"checked" stringValue:@"checked"]];
+ BOOL defaultvalue = purple_request_field_bool_get_default_value(field); + [checkBox setState:defaultvalue]; - [result addChild:[NSXMLNode elementWithName:@"div"
- children:[NSArray arrayWithObject:checkbox]
- attributes:[NSArray arrayWithObject:[NSXMLNode attributeWithName:@"class" stringValue:@"input"]]]];
- purple_request_field_bool_set_value(field, FALSE); // since we won't get an -applyValue: message when the checkbox isn't checked, assume false for now. This might be changed later.
+ purple_request_field_bool_set_value(field, [checkBox state] == NSOnState); -- (void)applyValue:(NSString*)value {
- purple_request_field_bool_set_value(field, TRUE);
+- (NSAttributedString *)label + const char *labelstr = purple_request_field_get_label(field); + NSString *labelString = [NSString stringWithUTF8String:labelstr]; + char endsWith = [labelString lastCharacter]; + if (endsWith == '.' || endsWith == '?') { + labelString = [labelString substringToIndex:[labelString length] - 1]; + NSAttributedString *labelText = [[NSAttributedString alloc] initWithString:labelString + attributes:@{ NSFontAttributeName: [NSFont systemFontOfSize:[NSFont systemFontSize]] }]; + return [labelText autorelease]; + return [[[NSAttributedString alloc] initWithString:@""] autorelease]; @implementation AMPurpleRequestFieldChoice
-- (NSXMLElement*)xhtml {
- NSXMLElement *result = [super xhtml];
+ return @"RequestFieldChoice"; GList *labels = purple_request_field_choice_get_labels(field);
- guint len = g_list_length(labels);
- NSInteger defaultvalue = purple_request_field_choice_get_default_value(field);
+ NSInteger defaultvalue = purple_request_field_choice_get_default_value(field); + [view setFrame:NSMakeRect(0, 0, view.frame.size.width, height)]; - // Apple HIG: Don't use checkboxes for lists of more than 5 items, use a popupbutton instead
- NSXMLElement *popup = [NSXMLNode elementWithName:@"select"];
- [popup addAttribute:[NSXMLNode attributeWithName:@"name" stringValue:[self key]]];
- for(label = labels; label; label = g_list_next(label), ++i) {
- const char *labelstr = label->data;
- NSXMLElement *option = [NSXMLNode elementWithName:@"option" stringValue:[NSString stringWithUTF8String:labelstr]];
- [option addAttribute:[NSXMLNode attributeWithName:@"value" stringValue:[NSString stringWithFormat:@"%lu",i]]];
- [option addAttribute:[NSXMLNode attributeWithName:@"selected" stringValue:@"selected"]];
- [popup addChild:option];
- [result addChild:[NSXMLNode elementWithName:@"div"
- children:[NSArray arrayWithObject:popup]
- attributes:[NSArray arrayWithObject:[NSXMLNode attributeWithName:@"class" stringValue:@"input"]]]];
- NSMutableArray *radios = [NSMutableArray array];
- for(label = labels; label; label = g_list_next(label), ++i) {
- const char *labelstr = label->data;
- NSXMLElement *radiobutton = [NSXMLNode elementWithName:@"input"];
- [radiobutton addAttribute:[NSXMLNode attributeWithName:@"type" stringValue:@"radio"]];
- [radiobutton addAttribute:[NSXMLNode attributeWithName:@"value" stringValue:[NSString stringWithFormat:@"%lu",i]]];
- [radiobutton addAttribute:[NSXMLNode attributeWithName:@"name" stringValue:[self key]]];
- [radiobutton addAttribute:[NSXMLNode attributeWithName:@"checked" stringValue:@"checked"]];
- [radios addObject:radiobutton];
- [radios addObject:[NSXMLNode textWithStringValue:[NSString stringWithUTF8String:labelstr]]];
- [result addChild:[NSXMLNode elementWithName:@"div"
- attributes:[NSArray arrayWithObject:[NSXMLNode attributeWithName:@"class" stringValue:@"input"]]]];
+ [popUp removeAllItems]; + for (; labels; labels = labels->next) { + [popUp addItemWithTitle:[NSString stringWithUTF8String:(char *)labels->data]];
+ if (defaultvalue < [popUp numberOfItems]) { + [popUp selectItemAtIndex:defaultvalue]; -- (void)applyValue:(NSString*)value {
- purple_request_field_choice_set_value(field, [value intValue]);
+ purple_request_field_choice_set_value(field, (int)[popUp indexOfItem:[popUp selectedItem]]); @implementation AMPurpleRequestFieldList
-- (NSXMLElement*)xhtml {
- NSXMLElement *result = [super xhtml];
- BOOL isMultiSelect = (purple_request_field_list_get_multi_select(field) == TRUE) ? YES : NO;
+ return @"RequestFieldList"; - NSXMLElement *list = [NSXMLNode elementWithName:@"select"];
- [list addAttribute:[NSXMLNode attributeWithName:@"name" stringValue:[self key]]];
+ GList *items = purple_request_field_list_get_items(field); + [popUp removeAllItems];
- [list addAttribute:[NSXMLNode attributeWithName:@"multiple" stringValue:@"multiple"]];
- const GList *items = purple_request_field_list_get_items(field);
- guint len = g_list_length((GList*)items);
- // show all items up to 10
- [list addAttribute:[NSXMLNode attributeWithName:@"size" stringValue:[NSString stringWithFormat:@"%u",(len>10)?10:len]]];
- for(item = items; item; item = g_list_next(item)) {
- const char *labelstr = item->data;
- NSXMLElement *option = [NSXMLNode elementWithName:@"option" stringValue:[NSString stringWithUTF8String:labelstr]];
- if(purple_request_field_list_is_selected(field, labelstr))
- [option addAttribute:[NSXMLNode attributeWithName:@"selected" stringValue:@"selected"]];
- [list addChild:option];
- [result addChild:[NSXMLNode elementWithName:@"div"
- children:[NSArray arrayWithObject:list]
- attributes:[NSArray arrayWithObject:[NSXMLNode attributeWithName:@"class" stringValue:@"input"]]]];
+ for (i = 0; items; items = items->next, i++) { + NSString *item = [NSString stringWithUTF8String:items->data]; + [popUp addItemWithTitle:item]; + if (purple_request_field_list_is_selected(field, items->data)) { + [popUp selectItemAtIndex:i]; purple_request_field_list_clear_selected(field);
+ text = [[[popUp selectedItem] title] UTF8String]; + items = g_list_prepend(items, (gpointer)text); + purple_request_field_list_set_selected(field, items); +@implementation AMPurpleRequestFieldMultiList + return @"RequestFieldMultiList"; -- (void)applyValue:(NSString*)value {
- purple_request_field_list_add_selected(field, [value UTF8String]);
+ GList *items = purple_request_field_list_get_items(field); + [popDown removeAllItems]; + [popDown addItemWithTitle:AILocalizedString(@"Select...", "Used in the request UI for popdown buttons")]; + for (i = 0; items; items = items->next, i++) { + NSMenuItem *menuItem = [[NSMenuItem alloc] initWithTitle:[NSString stringWithUTF8String:items->data] + action:@selector(didSelect:) + if(purple_request_field_list_is_selected(field, items->data)) { + [menuItem setState:NSOnState]; + [[popDown menu] addItem:menuItem]; +- (IBAction)didSelect:(id)sender + NSInteger state = [sender state]; + if (state == NSOnState) + [sender setState:state]; + purple_request_field_list_clear_selected(field); + for (NSMenuItem *item in [[popDown menu] itemArray]) { + if ([item state] == NSOnState) { + text = [[item title] UTF8String]; + items = g_list_prepend(items, (gpointer)text); + purple_request_field_list_set_selected(field, items); @implementation AMPurpleRequestFieldLabel
+ return @"RequestFieldLabel";
+ [[labelview textStorage] setAttributedString:self.label]; + [labelview setFont:[NSFont systemFontOfSize:[NSFont systemFontSize]]]; + [labelview setHorizontallyResizable:FALSE]; + [labelview setTextContainerInset:NSMakeSize(0, 0)]; + [view setFrame:NSMakeRect(0, 0, view.frame.size.width, height)]; + const char *labelstr = purple_request_field_get_label(field); + NSString *labelString = [NSString stringWithUTF8String:labelstr]; @@ -345,54 +554,6 @@
@implementation AMPurpleRequestFieldImage
-- (NSXMLElement*)xhtml {
- NSXMLElement *result = [super xhtml];
- //unsigned int scale_x = purple_request_field_image_get_scale_x(field);
- //unsigned int scale_y = purple_request_field_image_get_scale_y(field);
- //This could be base 64 encoded and embedded directly, but it seems like a heavy fix...
- NSData *data = [NSData dataWithBytes:purple_request_field_image_get_buffer(field)
- length:purple_request_field_image_get_size(field)];
- NSString *extension = [NSImage extensionForBitmapImageFileType:[NSImage fileTypeOfData:data]];
- //We don't know what it is; try to make a png out of it
- NSImage *image = [[NSImage alloc] initWithData:data];
- NSData *imageTIFFData = [image TIFFRepresentation];
- NSBitmapImageRep *bitmapRep = [NSBitmapImageRep imageRepWithData:imageTIFFData];
- data = [bitmapRep representationUsingType:NSPNGFileType properties:nil];
- NSString *filename = [[[NSString stringWithFormat:@"TEMP-Image_%@",[self key]] stringByAppendingPathExtension:extension] safeFilenameString];
- NSString *imagePath = [[adium cachesPath] stringByAppendingPathComponent:filename];
- NSXMLElement *imageElement = [NSXMLNode elementWithName:@"image"];
- if ([data writeToFile:imagePath atomically:YES]) {
- [imageElement addAttribute:[NSXMLNode attributeWithName:@"src" stringValue:[[NSURL fileURLWithPath:imagePath] absoluteString]]];
- [imageElement addAttribute:[NSXMLNode attributeWithName:@"name" stringValue:[self key]]];
- [result addChild:[NSXMLNode elementWithName:@"div"
- children:[NSArray arrayWithObject:imageElement]
- attributes:[NSArray arrayWithObject:[NSXMLNode attributeWithName:@"class" stringValue:@"image"]]]];
- AILogWithSignature(@"Failed to write image to %@",imagePath);
-@interface AMPurpleRequestFieldsController ()
-- (void)loadForm:(NSXMLDocument*)doc;
-- (void)webviewWindowWillClose:(NSNotification *)notification;
@implementation AMPurpleRequestFieldsController
@@ -416,152 +577,28 @@
- NSXMLElement *root = [NSXMLNode elementWithName:@"html"];
- [root addNamespace:[NSXMLNode namespaceWithName:@"" stringValue:@"http://www.w3.org/1999/xhtml"]];
- NSXMLElement *head = [NSXMLNode elementWithName:@"head"];
- [head addChild:[NSXMLNode elementWithName:@"style" children:[NSArray arrayWithObject:
- [NSXMLNode textWithStringValue:
- @" font-family:'Lucida Grande';"
- @" font-weight: normal;"
- @" font-weight: normal;"
- @" position: relative;"
- @" display: table-row;"
- @" display: table-cell;"
- @" padding-right: .2em;"
- @" vertical-align: top;"
- @" display: table-cell;"
- @" padding-left: .2em;"
- @" vertical-align: top;"
- @" margin-right: 10px;"
- @" margin-right: 20px;"
- @" position: absolute;"
- @" border-color: #000;"
- @" border-width: 1px 0 0 0;"
- @" border-style: solid;"
- ]] attributes:[NSArray arrayWithObject:
- [NSXMLNode attributeWithName:@"type" stringValue:@"text/css"]]]];
- NSXMLElement *titleelem = [NSXMLNode elementWithName:@"title" stringValue:title];
- [head addChild:titleelem];
- NSXMLElement *body = [NSXMLNode elementWithName:@"body"];
- NSXMLElement *formnode = [NSXMLNode elementWithName:@"form" children:nil attributes:[NSArray arrayWithObjects:
- [NSXMLNode attributeWithName:@"action" stringValue:@"http://www.adium.im/XMPP/form"],
- [NSXMLNode attributeWithName:@"method" stringValue:@"POST"],nil]];
- [body addChild:formnode];
+ [primaryTextField setStringValue:primary ?: @""]; - NSXMLElement *formwrapper = [NSXMLNode elementWithName:@"div"];
- [formwrapper addAttribute:[NSXMLNode attributeWithName:@"id" stringValue:@"formwrapper"]];
- [formnode addChild:formwrapper];
- NSXMLElement *form2 = [NSXMLNode elementWithName:@"div"];
- [form2 addAttribute:[NSXMLNode attributeWithName:@"id" stringValue:@"form2"]];
- [formwrapper addChild:form2];
- NSXMLElement *heading = [NSXMLNode elementWithName:@"h1" stringValue:title];
- [formwrapper addChild:heading];
- NSXMLElement *heading2 = [NSXMLNode elementWithName:@"h2" stringValue:primary];
- [formwrapper addChild:heading2];
- NSXMLElement *heading3 = [NSXMLNode elementWithName:@"h3" stringValue:secondary];
- [formwrapper addChild:heading3];
- NSXMLElement *formdiv = [NSXMLNode elementWithName:@"div"];
- [formdiv addAttribute:[NSXMLNode attributeWithName:@"id" stringValue:@"formtable"]];
- [formwrapper addChild:formdiv];
+ if (secondary && ![secondary isEqualToString:primary]) { + [secondaryTextField setStringValue:secondary]; + [secondaryTextField setStringValue:@""]; - fieldobjects = [[NSMutableDictionary alloc] init];
+ fieldobjects = [[NSMutableArray alloc] init]; GList *gl = purple_request_fields_get_groups(fields);
PurpleRequestFieldGroup *group;
- NSXMLElement *fieldset;
- guint len = g_list_length(gl);
+ CGFloat availableHeight = contentView.frame.size.height; //Look through each group, processing each field and transforming it into an Objective C object
for (; gl != NULL; gl = gl->next) {
- // only display groups when there's more than one
- fieldset = [NSXMLNode elementWithName:@"fieldset"];
- [formdiv addChild:fieldset];
- const char *fieldtitle = purple_request_field_group_get_title(group);
- [fieldset addChild:[NSXMLNode elementWithName:@"legend" stringValue:[NSString stringWithUTF8String:fieldtitle]]];
field_list = purple_request_field_group_get_fields(group);
@@ -569,104 +606,130 @@
PurpleRequestField *field;
AMPurpleRequestField *fieldobject = nil;
field = (PurpleRequestField *)fl->data;
+ Class fieldobjectClass = NULL; switch(purple_request_field_get_type(field)) {
- case PURPLE_REQUEST_FIELD_STRING:
- fieldobject = [[AMPurpleRequestFieldString alloc] initWithAccount:account requestField:field];
+ case PURPLE_REQUEST_FIELD_STRING: { + BOOL isMultiline = purple_request_field_string_is_multiline(field); + BOOL isMasked = purple_request_field_string_is_masked(field); + fieldobjectClass = [AMPurpleRequestFieldSecureString class]; + fieldobjectClass = [AMPurpleRequestFieldMultilineString class]; + fieldobjectClass = [AMPurpleRequestFieldString class]; case PURPLE_REQUEST_FIELD_INTEGER:
- fieldobject = [[AMPurpleRequestFieldInteger alloc] initWithAccount:account requestField:field];
+ fieldobjectClass = [AMPurpleRequestFieldInteger class]; case PURPLE_REQUEST_FIELD_BOOLEAN:
- fieldobject = [[AMPurpleRequestFieldBoolean alloc] initWithAccount:account requestField:field];
+ fieldobjectClass = [AMPurpleRequestFieldBoolean class]; case PURPLE_REQUEST_FIELD_CHOICE:
- fieldobject = [[AMPurpleRequestFieldChoice alloc] initWithAccount:account requestField:field];
+ fieldobjectClass = [AMPurpleRequestFieldChoice class]; - case PURPLE_REQUEST_FIELD_LIST:
- fieldobject = [[AMPurpleRequestFieldList alloc] initWithAccount:account requestField:field];
+ case PURPLE_REQUEST_FIELD_LIST: { + BOOL isMultiSelect = purple_request_field_list_get_multi_select(field); + fieldobjectClass = [AMPurpleRequestFieldMultiList class]; + fieldobjectClass = [AMPurpleRequestFieldList class]; case PURPLE_REQUEST_FIELD_LABEL:
- fieldobject = [[AMPurpleRequestFieldLabel alloc] initWithAccount:account requestField:field];
+ fieldobjectClass = [AMPurpleRequestFieldLabel class]; case PURPLE_REQUEST_FIELD_IMAGE:
- fieldobject = [[AMPurpleRequestFieldImage alloc] initWithAccount:account requestField:field];
+ fieldobjectClass = [AMPurpleRequestFieldImage class];
- case PURPLE_REQUEST_FIELD_ACCOUNT:
- fieldobject = [[AMPurpleRequestFieldAccount alloc] initWithAccount:account requestField:field];
+ fieldobject = [[fieldobjectClass alloc] initWithAccount:account requestField:field]; //Keep objects for later processing of the form
- [fieldobjects setObject:fieldobject forKey:[fieldobject key]];
- //Insert the field into the XHTML document
- [fieldset addChild:[fieldobject xhtml]];
+ [fieldobjects addObject:fieldobject]; + NSView *view = [fieldobject makeView]; + CGFloat height = view.frame.size.height; + AILogWithSignature(@"Resizing by %f", height); + [contentView addSubview:view]; + availableHeight -= height; + if (availableHeight < 0) { + [contentView setFrame:NSMakeRect(contentView.frame.origin.x, + contentView.frame.origin.y + availableHeight, + contentView.frame.size.width, + contentView.frame.size.height - availableHeight)]; + [view setFrameOrigin:NSMakePoint(0.0, availableHeight)]; + [view setFrameSize:NSMakeSize(contentView.frame.size.width, view.frame.size.height)];
- [formnode addChild:[NSXMLNode elementWithName:@"div" children:[NSArray arrayWithObjects:
- [NSXMLNode elementWithName:@"input" children:nil attributes:[NSArray arrayWithObjects:
- [NSXMLNode attributeWithName:@"type" stringValue:@"submit"],
- [NSXMLNode attributeWithName:@"id" stringValue:@"cancel"],
- [NSXMLNode attributeWithName:@"value" stringValue:cancelText],nil]],
- [NSXMLNode elementWithName:@"input" children:nil attributes:[NSArray arrayWithObjects:
- [NSXMLNode attributeWithName:@"type" stringValue:@"submit"],
- [NSXMLNode attributeWithName:@"id" stringValue:@"submit"],
- [NSXMLNode attributeWithName:@"value" stringValue:okText],nil]],
- nil] attributes:[NSArray arrayWithObject:[NSXMLElement attributeWithName:@"id" stringValue:@"submitbuttons"]]]];
- NSXMLDocument *doc = [NSXMLNode documentWithRootElement:root];
- [doc setCharacterEncoding:@"UTF-8"];
- [doc setDocumentContentKind:NSXMLDocumentXHTMLKind];
[[self window] setTitle:title];
[[self window] setTitle:AILocalizedString(@"Form","Generic fields request window title")];
- //Code here originally made the webview transparent; the result is an all-black window. I don't think this is desired.
- if ([webview respondsToSelector:@selector(setBackgroundColor:)]) {
- //As of Safari 3.0, we must call setBackgroundColor: to make the webview transparent
- [webview setBackgroundColor:[NSColor clearColor]];
- [webview setDrawsBackground:NO];
- [self performSelector:@selector(loadForm:) withObject:doc afterDelay:0.0];
- [[NSNotificationCenter defaultCenter] addObserver:self
- selector:@selector(webviewWindowWillClose:)
- name:NSWindowWillCloseNotification
+ if (_okcb) [okButton setTitle:okText]; + else [okButton setHidden:TRUE]; + if (_cancelcb) [cancelButton setTitle:cancelText]; + else [cancelButton setHidden:TRUE]; + [[self window] makeKeyAndOrderFront:nil]; return [self retain]; // keep us as long as the form is open
- [fieldobjects release];
+- (IBAction)submit:(id)sender + for (AMPurpleRequestField *fieldobject in fieldobjects) { + ((PurpleRequestFieldsCb)okcb)(userData, fields); -- (void)loadForm:(NSXMLDocument*)doc {
- NSData *formdata = [doc XMLDataWithOptions:NSXMLDocumentTidyHTML | NSXMLDocumentIncludeContentTypeDeclaration];
- [[webview mainFrame] loadData:formdata MIMEType:@"application/xhtml+xml" textEncodingName:@"UTF-8" baseURL:nil];
+- (IBAction)cancel:(id)sender + ((PurpleRequestFieldsCb)cancelcb)(userData, fields);
+ [fieldobjects release]; @@ -683,74 +746,4 @@
[super purpleRequestClose];
-#pragma mark WebView Delegate Methods
-- (void)webviewWindowWillClose:(NSNotification *)notification {
- [webview setPolicyDelegate:nil];
- ((PurpleRequestFieldsCb)okcb)(userData, fields);
- ((PurpleRequestFieldsCb)cancelcb)(userData, fields);
- [self autorelease]; // no we don't need us no longer, commit suicide
-- (void)webView:(WebView *)webView decidePolicyForNavigationAction:(NSDictionary *)actionInformation
- request:(NSURLRequest *)request
- frame:(WebFrame *)frame
- decisionListener:(id<WebPolicyDecisionListener>)listener
- if ([[[request URL] scheme] isEqualToString:@"applewebdata"] || [[[request URL] scheme] isEqualToString:@"about"])
- if ([[[request URL] absoluteString] isEqualToString:@"http://www.adium.im/XMPP/form"]) {
- NSString *info = [[NSString alloc] initWithData:[request HTTPBody] encoding:NSUTF8StringEncoding];
- NSArray *formfields = [info componentsSeparatedByString:@"&"];
- for (field in formfields) {
- NSArray *keyvalue = [field componentsSeparatedByString:@"="];
- if ([keyvalue count] != 2)
- NSString *key = [[[keyvalue objectAtIndex:0] mutableCopy] autorelease];
- [(NSMutableString *)key replaceOccurrencesOfString:@"+"
- options:NSLiteralSearch
- range:NSMakeRange(0,[key length])];
- key = (NSString *)CFURLCreateStringByReplacingPercentEscapesUsingEncoding(kCFAllocatorDefault,
- (CFStringRef)@"", kCFStringEncodingUTF8);
- NSString *value = [[[keyvalue objectAtIndex:1] mutableCopy] autorelease];
- [(NSMutableString *)value replaceOccurrencesOfString:@"+"
- options:NSLiteralSearch
- range:NSMakeRange(0,[value length])];
- value = (NSString *)CFURLCreateStringByReplacingPercentEscapesUsingEncoding(kCFAllocatorDefault,
- (CFStringRef)@"", kCFStringEncodingUTF8);
- [[fieldobjects objectForKey:key] applyValue:value];
--- a/Plugins/Purple Service/AMPurpleRequestFieldsWindow.xib Tue Jun 04 23:54:22 2013 -0400
+++ b/Plugins/Purple Service/AMPurpleRequestFieldsWindow.xib Wed Jun 05 23:31:24 2013 +0200
@@ -2,23 +2,27 @@
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00">
<int key="IBDocument.SystemTarget">1060</int>
- <string key="IBDocument.SystemVersion">11D50b</string>
- <string key="IBDocument.InterfaceBuilderVersion">2182</string>
- <string key="IBDocument.AppKitVersion">1138.32</string>
- <string key="IBDocument.HIToolboxVersion">568.00</string>
- <dictionary class="NSMutableDictionary" key="IBDocument.PluginVersions">
- <string key="com.apple.InterfaceBuilder.CocoaPlugin">2182</string>
- <string key="com.apple.WebKitIBPlugin">1117</string>
+ <string key="IBDocument.SystemVersion">12D78</string> + <string key="IBDocument.InterfaceBuilderVersion">3084</string> + <string key="IBDocument.AppKitVersion">1187.37</string> + <string key="IBDocument.HIToolboxVersion">626.00</string> + <object class="NSMutableDictionary" key="IBDocument.PluginVersions"> + <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="NS.object.0">3084</string> <array key="IBDocument.IntegratedClassDependencies">
- <string>NSWindowTemplate</string>
+ <string>NSButton</string> + <string>NSButtonCell</string> + <string>NSCustomObject</string> + <string>NSScrollView</string> + <string>NSScroller</string> + <string>NSTextField</string> + <string>NSTextFieldCell</string> - <string>NSCustomObject</string>
- <string>WebView</string>
+ <string>NSWindowTemplate</string> <array key="IBDocument.PluginDependencies">
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.WebKitIBPlugin</string>
<object class="NSMutableDictionary" key="IBDocument.Metadata">
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
@@ -37,7 +41,7 @@
<object class="NSWindowTemplate" id="423208217">
<int key="NSWindowStyleMask">15</int>
<int key="NSWindowBacking">2</int>
- <string key="NSWindowRect">{{213, 400}, {632, 531}}</string>
+ <string key="NSWindowRect">{{213, 400}, {632, 448}}</string> <int key="NSWTFlags">1886912512</int>
<string key="NSWindowTitle">Form</string>
<object class="NSMutableString" key="NSWindowClass">
@@ -49,49 +53,197 @@
<nil key="NSUserInterfaceItemIdentifier"/>
<string key="NSWindowContentMinSize">{213, 107}</string>
<object class="NSView" key="NSWindowView" id="696685690">
- <nil key="NSNextResponder"/>
+ <reference key="NSNextResponder"/> <int key="NSvFlags">256</int>
<array class="NSMutableArray" key="NSSubviews">
- <object class="WebView" id="617683395">
+ <object class="NSTextField" id="911790859"> + <reference key="NSNextResponder" ref="696685690"/> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{17, 411}, {598, 17}}</string> + <reference key="NSSuperview" ref="696685690"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="406494393"/> + <string key="NSReuseIdentifierKey">_NS:1535</string> + <bool key="NSEnabled">YES</bool> + <object class="NSTextFieldCell" key="NSCell" id="663699470"> + <int key="NSCellFlags">68157504</int> + <int key="NSCellFlags2">272630784</int> + <string key="NSContents">Primary Label</string> + <object class="NSFont" key="NSSupport" id="668367454"> + <string key="NSName">LucidaGrande</string> + <double key="NSSize">13</double> + <int key="NSfFlags">1044</int> + <string key="NSCellIdentifier">_NS:1535</string> + <reference key="NSControlView" ref="911790859"/> + <object class="NSColor" key="NSBackgroundColor" id="363769515"> + <int key="NSColorSpace">6</int> + <string key="NSCatalogName">System</string> + <string key="NSColorName">controlColor</string> + <object class="NSColor" key="NSColor"> + <int key="NSColorSpace">3</int> + <bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes> + <object class="NSColor" key="NSTextColor" id="107122442"> + <int key="NSColorSpace">6</int> + <string key="NSCatalogName">System</string> + <string key="NSColorName">controlTextColor</string> + <object class="NSColor" key="NSColor"> + <int key="NSColorSpace">3</int> + <bytes key="NSWhite">MAA</bytes> + <bool key="NSAllowsLogicalLayoutDirection">NO</bool> + <object class="NSTextField" id="406494393"> + <reference key="NSNextResponder" ref="696685690"/> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{17, 386}, {598, 17}}</string> + <reference key="NSSuperview" ref="696685690"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="402336403"/> + <string key="NSReuseIdentifierKey">_NS:1535</string> + <bool key="NSEnabled">YES</bool> + <object class="NSTextFieldCell" key="NSCell" id="371986192"> + <int key="NSCellFlags">68157504</int> + <int key="NSCellFlags2">272630784</int> + <string key="NSContents">Secondary Label</string> + <reference key="NSSupport" ref="668367454"/> + <string key="NSCellIdentifier">_NS:1535</string> + <reference key="NSControlView" ref="406494393"/> + <reference key="NSBackgroundColor" ref="363769515"/> + <reference key="NSTextColor" ref="107122442"/> + <bool key="NSAllowsLogicalLayoutDirection">NO</bool> + <object class="NSScrollView" id="402336403"> <reference key="NSNextResponder" ref="696685690"/>
<int key="NSvFlags">274</int>
- <set class="NSMutableSet" key="NSDragTypes">
- <string>Apple HTML pasteboard type</string>
- <string>Apple PDF pasteboard type</string>
- <string>Apple PICT pasteboard type</string>
- <string>Apple URL pasteboard type</string>
- <string>Apple Web Archive pasteboard type</string>
- <string>NSColor pasteboard type</string>
- <string>NSFilenamesPboardType</string>
- <string>NSStringPboardType</string>
- <string>NeXT RTFD pasteboard type</string>
- <string>NeXT Rich Text Format v1.0 pasteboard type</string>
- <string>NeXT TIFF v4.0 pasteboard type</string>
- <string>WebURLsWithTitlesPboardType</string>
- <string>public.png</string>
- <string>public.url</string>
- <string>public.url-name</string>
- <string key="NSFrameSize">{632, 531}</string>
+ <array class="NSMutableArray" key="NSSubviews"> + <object class="NSClipView" id="194557458"> + <reference key="NSNextResponder" ref="402336403"/> + <int key="NSvFlags">2304</int> + <array class="NSMutableArray" key="NSSubviews"> + <object class="NSView" id="635820960"> + <reference key="NSNextResponder" ref="194557458"/> + <int key="NSvFlags">274</int> + <string key="NSFrameSize">{590, 315}</string> + <reference key="NSSuperview" ref="194557458"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="1031015333"/> + <string key="NSReuseIdentifierKey">_NS:13</string> + <string key="NSFrame">{{1, 1}, {590, 315}}</string> + <reference key="NSSuperview" ref="402336403"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="635820960"/> + <string key="NSReuseIdentifierKey">_NS:11</string> + <reference key="NSDocView" ref="635820960"/> + <reference key="NSBGColor" ref="363769515"/> + <int key="NScvFlags">4</int> + <object class="NSScroller" id="1031015333"> + <reference key="NSNextResponder" ref="402336403"/> + <int key="NSvFlags">-2147483392</int> + <string key="NSFrame">{{576, 1}, {15, 1}}</string> + <reference key="NSSuperview" ref="402336403"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="521634219"/> + <string key="NSReuseIdentifierKey">_NS:15</string> + <bool key="NSAllowsLogicalLayoutDirection">NO</bool> + <reference key="NSTarget" ref="402336403"/> + <string key="NSAction">_doScroller:</string> + <double key="NSCurValue">1</double> + <double key="NSPercent">0.96363627910614014</double> + <object class="NSScroller" id="521634219"> + <reference key="NSNextResponder" ref="402336403"/> + <int key="NSvFlags">-2147483392</int> + <string key="NSFrame">{{1, 2}, {575, 15}}</string> + <reference key="NSSuperview" ref="402336403"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="29510822"/> + <string key="NSReuseIdentifierKey">_NS:26</string> + <bool key="NSAllowsLogicalLayoutDirection">NO</bool> + <int key="NSsFlags">1</int> + <reference key="NSTarget" ref="402336403"/> + <string key="NSAction">_doScroller:</string> + <double key="NSPercent">0.50602412223815918</double> + <string key="NSFrame">{{20, 61}, {592, 317}}</string> <reference key="NSSuperview" ref="696685690"/>
+ <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="194557458"/> + <string key="NSReuseIdentifierKey">_NS:9</string> + <int key="NSsFlags">133682</int> + <reference key="NSVScroller" ref="1031015333"/> + <reference key="NSHScroller" ref="521634219"/> + <reference key="NSContentView" ref="194557458"/> + <double key="NSMinMagnification">0.25</double> + <double key="NSMaxMagnification">4</double> + <double key="NSMagnification">1</double> + <object class="NSButton" id="754074617"> + <reference key="NSNextResponder" ref="696685690"/> + <int key="NSvFlags">289</int> + <string key="NSFrame">{{559, 13}, {59, 32}}</string> + <reference key="NSSuperview" ref="696685690"/> + <reference key="NSWindow"/> <reference key="NSNextKeyView"/>
- <string key="FrameName"/>
- <string key="GroupName"/>
- <object class="WebPreferences" key="Preferences">
- <string key="Identifier"/>
- <dictionary class="NSMutableDictionary" key="Values">
- <integer value="12" key="WebKitDefaultFixedFontSize"/>
- <integer value="12" key="WebKitDefaultFontSize"/>
- <integer value="1" key="WebKitMinimumFontSize"/>
+ <string key="NSReuseIdentifierKey">_NS:9</string> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="437056631"> + <int key="NSCellFlags">67108864</int> + <int key="NSCellFlags2">134217728</int> + <string key="NSContents">OK</string> + <reference key="NSSupport" ref="668367454"/> + <string key="NSCellIdentifier">_NS:9</string> + <reference key="NSControlView" ref="754074617"/> + <int key="NSButtonFlags">-2038284288</int> + <int key="NSButtonFlags2">129</int> + <string key="NSAlternateContents"/> + <string type="base64-UTF8" key="NSKeyEquivalent">DQ</string> + <int key="NSPeriodicDelay">200</int> + <int key="NSPeriodicInterval">25</int> - <bool key="UseBackForwardList">NO</bool>
- <bool key="AllowsUndo">YES</bool>
+ <bool key="NSAllowsLogicalLayoutDirection">NO</bool> + <object class="NSButton" id="29510822"> + <reference key="NSNextResponder" ref="696685690"/> + <int key="NSvFlags">289</int> + <string key="NSFrame">{{477, 13}, {82, 32}}</string> + <reference key="NSSuperview" ref="696685690"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="754074617"/> + <string key="NSReuseIdentifierKey">_NS:9</string> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="21184638"> + <int key="NSCellFlags">67108864</int> + <int key="NSCellFlags2">134217728</int> + <string key="NSContents">Cancel</string> + <reference key="NSSupport" ref="668367454"/> + <string key="NSCellIdentifier">_NS:9</string> + <reference key="NSControlView" ref="29510822"/> + <int key="NSButtonFlags">-2038284288</int> + <int key="NSButtonFlags2">129</int> + <string key="NSAlternateContents"/> + <string type="base64-UTF8" key="NSKeyEquivalent">Gw</string> + <int key="NSPeriodicDelay">200</int> + <int key="NSPeriodicInterval">25</int> + <bool key="NSAllowsLogicalLayoutDirection">NO</bool> - <string key="NSFrameSize">{632, 531}</string>
+ <string key="NSFrameSize">{632, 448}</string> + <reference key="NSSuperview"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="911790859"/> - <string key="NSScreenRect">{{0, 0}, {1680, 1028}}</string>
+ <string key="NSScreenRect">{{0, 0}, {1920, 1080}}</string> <string key="NSMinSize">{213, 129}</string>
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
<string key="NSFrameAutosaveName">SmackXMPPFormWindow</string>
@@ -110,11 +262,59 @@
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
- <string key="label">webview</string>
+ <string key="label">primaryTextField</string> + <reference key="source" ref="859743899"/> + <reference key="destination" ref="911790859"/> + <int key="connectionID">21</int> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">secondaryTextField</string> + <reference key="source" ref="859743899"/> + <reference key="destination" ref="406494393"/> + <int key="connectionID">22</int> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">contentView</string> + <reference key="source" ref="859743899"/> + <reference key="destination" ref="635820960"/> + <int key="connectionID">45</int> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">submit:</string> <reference key="source" ref="859743899"/>
- <reference key="destination" ref="617683395"/>
+ <reference key="destination" ref="754074617"/> + <int key="connectionID">36</int> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">okButton</string> + <reference key="source" ref="859743899"/> + <reference key="destination" ref="754074617"/> - <int key="connectionID">9</int>
+ <int key="connectionID">38</int> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">cancelButton</string> + <reference key="source" ref="859743899"/> + <reference key="destination" ref="29510822"/> + <int key="connectionID">37</int> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">cancel:</string> + <reference key="source" ref="859743899"/> + <reference key="destination" ref="29510822"/> + <int key="connectionID">35</int> <object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
@@ -124,46 +324,6 @@
<int key="connectionID">10</int>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">downloadDelegate</string>
- <reference key="source" ref="617683395"/>
- <reference key="destination" ref="859743899"/>
- <int key="connectionID">11</int>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">frameLoadDelegate</string>
- <reference key="source" ref="617683395"/>
- <reference key="destination" ref="859743899"/>
- <int key="connectionID">12</int>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">policyDelegate</string>
- <reference key="source" ref="617683395"/>
- <reference key="destination" ref="859743899"/>
- <int key="connectionID">13</int>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">resourceLoadDelegate</string>
- <reference key="source" ref="617683395"/>
- <reference key="destination" ref="859743899"/>
- <int key="connectionID">14</int>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">UIDelegate</string>
- <reference key="source" ref="617683395"/>
- <reference key="destination" ref="859743899"/>
- <int key="connectionID">15</int>
<object class="IBMutableOrderedSet" key="objectRecords">
<array key="orderedObjects">
@@ -198,36 +358,123 @@
<int key="objectID">6</int>
<reference key="object" ref="696685690"/>
<array class="NSMutableArray" key="children">
- <reference ref="617683395"/>
+ <reference ref="911790859"/> + <reference ref="406494393"/> + <reference ref="402336403"/> + <reference ref="754074617"/> + <reference ref="29510822"/> <reference key="parent" ref="423208217"/>
<object class="IBObjectRecord">
- <int key="objectID">7</int>
- <reference key="object" ref="617683395"/>
- <reference key="parent" ref="696685690"/>
- <object class="IBObjectRecord">
<int key="objectID">-3</int>
<reference key="object" ref="980793937"/>
<reference key="parent" ref="0"/>
<string key="objectName">Application</string>
+ <object class="IBObjectRecord"> + <int key="objectID">17</int> + <reference key="object" ref="911790859"/> + <array class="NSMutableArray" key="children"> + <reference ref="663699470"/> + <reference key="parent" ref="696685690"/> + <object class="IBObjectRecord"> + <int key="objectID">18</int> + <reference key="object" ref="663699470"/> + <reference key="parent" ref="911790859"/> + <object class="IBObjectRecord"> + <int key="objectID">19</int> + <reference key="object" ref="406494393"/> + <array class="NSMutableArray" key="children"> + <reference ref="371986192"/> + <reference key="parent" ref="696685690"/> + <object class="IBObjectRecord"> + <int key="objectID">20</int> + <reference key="object" ref="371986192"/> + <reference key="parent" ref="406494393"/> + <object class="IBObjectRecord"> + <int key="objectID">41</int> + <reference key="object" ref="402336403"/> + <array class="NSMutableArray" key="children"> + <reference ref="635820960"/> + <reference ref="521634219"/> + <reference ref="1031015333"/> + <reference key="parent" ref="696685690"/> + <object class="IBObjectRecord"> + <int key="objectID">42</int> + <reference key="object" ref="635820960"/> + <reference key="parent" ref="402336403"/> + <object class="IBObjectRecord"> + <int key="objectID">43</int> + <reference key="object" ref="521634219"/> + <reference key="parent" ref="402336403"/> + <object class="IBObjectRecord"> + <int key="objectID">44</int> + <reference key="object" ref="1031015333"/> + <reference key="parent" ref="402336403"/> + <object class="IBObjectRecord"> + <int key="objectID">31</int> + <reference key="object" ref="754074617"/> + <array class="NSMutableArray" key="children"> + <reference ref="437056631"/> + <reference key="parent" ref="696685690"/> + <object class="IBObjectRecord"> + <int key="objectID">32</int> + <reference key="object" ref="437056631"/> + <reference key="parent" ref="754074617"/> + <object class="IBObjectRecord"> + <int key="objectID">33</int> + <reference key="object" ref="29510822"/> + <array class="NSMutableArray" key="children"> + <reference ref="21184638"/> + <reference key="parent" ref="696685690"/> + <object class="IBObjectRecord"> + <int key="objectID">34</int> + <reference key="object" ref="21184638"/> + <reference key="parent" ref="29510822"/> <dictionary class="NSMutableDictionary" key="flattenedProperties">
<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="-3.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="17.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="18.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="19.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="20.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="31.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="32.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="33.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="34.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="41.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="42.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="43.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="44.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> <string key="5.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="6.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="7.IBPluginDependency">com.apple.WebKitIBPlugin</string>
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
- <int key="maxID">16</int>
+ <int key="maxID">45</int> <object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -253,17 +500,49 @@
<object class="IBPartialClassDescription">
<string key="className">AMPurpleRequestFieldsController</string>
<string key="superclassName">ESPurpleRequestAbstractWindowController</string>
- <object class="NSMutableDictionary" key="outlets">
- <string key="NS.key.0">webview</string>
- <string key="NS.object.0">WebView</string>
- <object class="NSMutableDictionary" key="toOneOutletInfosByName">
- <string key="NS.key.0">webview</string>
- <object class="IBToOneOutletInfo" key="NS.object.0">
- <string key="name">webview</string>
- <string key="candidateClassName">WebView</string>
+ <dictionary class="NSMutableDictionary" key="actions"> + <string key="cancel:">id</string> + <string key="submit:">id</string> + <dictionary class="NSMutableDictionary" key="actionInfosByName"> + <object class="IBActionInfo" key="cancel:"> + <string key="name">cancel:</string> + <string key="candidateClassName">id</string> + <object class="IBActionInfo" key="submit:"> + <string key="name">submit:</string> + <string key="candidateClassName">id</string>
+ <dictionary class="NSMutableDictionary" key="outlets"> + <string key="cancelButton">NSButton</string> + <string key="contentView">NSView</string> + <string key="okButton">NSButton</string> + <string key="primaryTextField">NSTextField</string> + <string key="secondaryTextField">NSTextField</string> + <dictionary class="NSMutableDictionary" key="toOneOutletInfosByName"> + <object class="IBToOneOutletInfo" key="cancelButton"> + <string key="name">cancelButton</string> + <string key="candidateClassName">NSButton</string> + <object class="IBToOneOutletInfo" key="contentView"> + <string key="name">contentView</string> + <string key="candidateClassName">NSView</string> + <object class="IBToOneOutletInfo" key="okButton"> + <string key="name">okButton</string> + <string key="candidateClassName">NSButton</string> + <object class="IBToOneOutletInfo" key="primaryTextField"> + <string key="name">primaryTextField</string> + <string key="candidateClassName">NSTextField</string> + <object class="IBToOneOutletInfo" key="secondaryTextField"> + <string key="name">secondaryTextField</string> + <string key="candidateClassName">NSTextField</string> <object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/AMPurpleRequestFieldsController.h</string>
@@ -277,6 +556,24 @@
<string key="minorKey">./Classes/ESPurpleRequestAbstractWindowController.h</string>
+ <object class="IBPartialClassDescription"> + <string key="className">NSObject</string> + <object class="NSMutableDictionary" key="actions"> + <string key="NS.key.0">selectServiceType:</string> + <string key="NS.object.0">id</string> + <object class="NSMutableDictionary" key="actionInfosByName"> + <string key="NS.key.0">selectServiceType:</string> + <object class="IBActionInfo" key="NS.object.0"> + <string key="name">selectServiceType:</string> + <string key="candidateClassName">id</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBProjectSource</string> + <string key="minorKey">./Classes/NSObject.h</string> <int key="IBDocument.localizationMode">0</int>
@@ -285,10 +582,6 @@
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string>
<real value="1060" key="NS.object.0"/>
- <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
- <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string>
- <real value="1060" key="NS.object.0"/>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string>
<real value="3200" key="NS.object.0"/>