adium/adium

Deprecation updates for loadNibNamed.

2014-01-08, Frank Dowsett
8f08f2a98915
Parents 45371f759b13
Children 9dae21c7e554
Deprecation updates for loadNibNamed.
--- a/Frameworks/Adium Framework/Source/AIAccountViewController.m Wed Jan 08 15:24:13 2014 -0500
+++ b/Frameworks/Adium Framework/Source/AIAccountViewController.m Wed Jan 08 15:24:30 2014 -0500
@@ -60,7 +60,6 @@
- (id)init
{
NSBundle *ourBundle = [NSBundle bundleForClass:[AIAccountViewController class]];
- NSDictionary *nameTable = [NSDictionary dictionaryWithObject:self forKey:@"NSOwner"];
if ((self = [super init]))
{
@@ -69,14 +68,14 @@
//Load custom views for our subclass (If our subclass specifies a nib name)
if ([self nibName]) {
- [NSBundle loadNibNamed:[self nibName] owner:self];
+ [[NSBundle mainBundle] loadNibNamed:[self nibName] owner:self topLevelObjects:nil];
}
//Load our default views if necessary
- if (!view_setup) [ourBundle loadNibFile:@"AccountSetup" externalNameTable:nameTable withZone:nil];
- if (!view_profile) [ourBundle loadNibFile:@"AccountProfile" externalNameTable:nameTable withZone:nil];
- if (!view_options) [ourBundle loadNibFile:@"AccountOptions" externalNameTable:nameTable withZone:nil];
- if (!view_privacy) [ourBundle loadNibFile:@"AccountPrivacy" externalNameTable:nameTable withZone:nil];
+ if (!view_setup) [ourBundle loadNibNamed:@"AccountSetup" owner:self topLevelObjects:nil];
+ if (!view_profile) [ourBundle loadNibNamed:@"AccountProfile" owner:self topLevelObjects:nil];
+ if (!view_options) [ourBundle loadNibNamed:@"AccountOptions" owner:self topLevelObjects:nil];
+ if (!view_privacy) [ourBundle loadNibNamed:@"AccountPrivacy" owner:self topLevelObjects:nil];
[self localizeStrings];
}
--- a/Frameworks/Adium Framework/Source/AIConsoleController.m Wed Jan 08 15:24:13 2014 -0500
+++ b/Frameworks/Adium Framework/Source/AIConsoleController.m Wed Jan 08 15:24:30 2014 -0500
@@ -31,9 +31,7 @@
- (IBAction)showWindow:(id)sender {
if (!consoleWindow) {
//Load the window if it's not already loaded
- [[NSBundle bundleForClass:[AIConsoleController class]] loadNibFile:@"AIConsole"
- externalNameTable:[NSDictionary dictionaryWithObject:self forKey:NSNibOwner]
- withZone:NULL];
+ [[NSBundle bundleForClass:[AIConsoleController class]] loadNibNamed:@"AIConsole" owner:self topLevelObjects:nil];
if (!consoleWindow) AILogWithSignature(@"Unable to load AIConsole!");
}
--- a/Frameworks/Adium Framework/Source/AIModularPane.m Wed Jan 08 15:24:13 2014 -0500
+++ b/Frameworks/Adium Framework/Source/AIModularPane.m Wed Jan 08 15:24:30 2014 -0500
@@ -57,7 +57,7 @@
{
if (!view) {
//Load and configure our view
- [NSBundle loadNibNamed:[self nibName] owner:self];
+ [[NSBundle mainBundle] loadNibNamed:[self nibName] owner:self topLevelObjects:nil];
[self viewDidLoad];
[self localizePane];
if (![self resizable]) [view setAutoresizingMask:(NSViewMaxYMargin)];
--- a/Frameworks/Adium Framework/Source/AISortController.m Wed Jan 08 15:24:13 2014 -0500
+++ b/Frameworks/Adium Framework/Source/AISortController.m Wed Jan 08 15:24:30 2014 -0500
@@ -90,7 +90,7 @@
- (NSView *)configureView
{
if (!configureView)
- [NSBundle loadNibNamed:[self configureNibName] owner:self];
+ [[NSBundle mainBundle] loadNibNamed:[self configureNibName] owner:self topLevelObjects:nil];
[self viewDidLoad];
--- a/Frameworks/Adium Framework/Source/DCJoinChatViewController.m Wed Jan 08 15:24:13 2014 -0500
+++ b/Frameworks/Adium Framework/Source/DCJoinChatViewController.m Wed Jan 08 15:24:30 2014 -0500
@@ -48,7 +48,7 @@
NSString *nibName = [self nibName];
if (nibName)
{
- [NSBundle loadNibNamed:nibName owner:self];
+ [[NSBundle mainBundle] loadNibNamed:nibName owner:self topLevelObjects:nil];
}
}
--- a/Plugins/Dual Window Interface/AIMessageViewController.m Wed Jan 08 15:24:13 2014 -0500
+++ b/Plugins/Dual Window Interface/AIMessageViewController.m Wed Jan 08 15:24:30 2014 -0500
@@ -99,7 +99,7 @@
topBarControllers = [[NSMutableArray alloc] initWithCapacity:0];
//Load the view containing our controls
- [NSBundle loadNibNamed:MESSAGE_VIEW_NIB owner:self];
+ [[NSBundle mainBundle] loadNibNamed:MESSAGE_VIEW_NIB owner:self topLevelObjects:nil];
//Register for the various notification we need
[[NSNotificationCenter defaultCenter] addObserver:self
--- a/Plugins/Emoticons/AIEmoticonPackPreviewController.m Wed Jan 08 15:24:13 2014 -0500
+++ b/Plugins/Emoticons/AIEmoticonPackPreviewController.m Wed Jan 08 15:24:30 2014 -0500
@@ -37,7 +37,7 @@
emoticonPack = inPack;
preferences = inPreferences;
- [NSBundle loadNibNamed:@"EmoticonPackPreview" owner:self];
+ [[NSBundle mainBundle] loadNibNamed:@"EmoticonPackPreview" owner:self topLevelObjects:nil];
}
return self;
--- a/Plugins/Purple Service/AMPurpleRequestFieldsController.m Wed Jan 08 15:24:13 2014 -0500
+++ b/Plugins/Purple Service/AMPurpleRequestFieldsController.m Wed Jan 08 15:24:30 2014 -0500
@@ -112,7 +112,7 @@
account = _account;
field = _field;
- [NSBundle loadNibNamed:[self nibName] owner:self];
+ [[NSBundle mainBundle] loadNibNamed:[self nibName] owner:self topLevelObjects:nil];
height = view.frame.size.height;
--- a/Source/AIAccountProxySettings.m Wed Jan 08 15:24:13 2014 -0500
+++ b/Source/AIAccountProxySettings.m Wed Jan 08 15:24:30 2014 -0500
@@ -45,7 +45,7 @@
{
if ((self = [super init])) {
//Load our view
- [NSBundle loadNibNamed:@"AccountProxy" owner:self];
+ [[NSBundle mainBundle] loadNibNamed:@"AccountProxy" owner:self topLevelObjects:nil];
//Setup our menu
[popUpButton_proxy setMenu:[self _proxyMenu]];
--- a/Source/AIAddressBookInspectorPane.m Wed Jan 08 15:24:13 2014 -0500
+++ b/Source/AIAddressBookInspectorPane.m Wed Jan 08 15:24:30 2014 -0500
@@ -31,7 +31,7 @@
- (id)init
{
if ((self = [super init])) {
- [NSBundle loadNibNamed:[self nibName] owner:self];
+ [[NSBundle mainBundle] loadNibNamed:[self nibName] owner:self topLevelObjects:nil];
[label_notes setLocalizedString:AILocalizedString(@"Notes:", "Label beside the field for contact notes in the Settings tab of the Get Info window")];
[button_chooseCard setLocalizedString:[AILocalizedStringFromTable(@"Choose Address Book Card", @"Buttons", "Button title to choose an Address Book card for a contact") stringByAppendingEllipsis]];
--- a/Source/AIAdvancedInspectorPane.m Wed Jan 08 15:24:13 2014 -0500
+++ b/Source/AIAdvancedInspectorPane.m Wed Jan 08 15:24:30 2014 -0500
@@ -44,7 +44,7 @@
{
self = [super init];
if (self != nil) {
- [NSBundle loadNibNamed:[self nibName] owner:self];
+ [[NSBundle mainBundle] loadNibNamed:[self nibName] owner:self topLevelObjects:nil];
//Load Encryption menus
[popUp_encryption setMenu:[adium.contentController encryptionMenuNotifyingTarget:self withDefault:YES]];
--- a/Source/AIContactListUserPictureMenuController.h Wed Jan 08 15:24:13 2014 -0500
+++ b/Source/AIContactListUserPictureMenuController.h Wed Jan 08 15:24:30 2014 -0500
@@ -36,7 +36,7 @@
NSArray *images;
@private
- NSMutableArray *AI_topLevelObjects;
+ NSArray *AI_topLevelObjects;
}
@property (weak) IBOutlet NSMenu *menu;
--- a/Source/AIContactListUserPictureMenuController.m Wed Jan 08 15:24:13 2014 -0500
+++ b/Source/AIContactListUserPictureMenuController.m Wed Jan 08 15:24:30 2014 -0500
@@ -63,10 +63,9 @@
- (id)initWithNibName:(NSString *)nibName imagePicker:(AIContactListImagePicker *)picker
{
self = [super init];
- if ([[NSBundle mainBundle] loadNibFile:nibName
- externalNameTable:[NSDictionary dictionaryWithObjectsAndKeys:self, NSNibOwner, AI_topLevelObjects, NSNibTopLevelObjects, nil]
- withZone:nil]) {
-
+ NSArray *topObjects;
+ if ([[NSBundle mainBundle] loadNibNamed:nibName owner:self topLevelObjects:&topObjects]) {
+ AI_topLevelObjects = topObjects;
[self setImagePicker:picker];
[imagePicker setMaxSize:NSMakeSize(128.0f, 128.0f)];
--- a/Source/AIEventsInspectorPane.m Wed Jan 08 15:24:13 2014 -0500
+++ b/Source/AIEventsInspectorPane.m Wed Jan 08 15:24:30 2014 -0500
@@ -26,7 +26,7 @@
{
self = [super init];
if (self != nil) {
- [NSBundle loadNibNamed:[self nibName] owner:self];
+ [[NSBundle mainBundle] loadNibNamed:[self nibName] owner:self topLevelObjects:nil];
//Other init goes here.
}
return self;
--- a/Source/AIInfoInspectorPane.m Wed Jan 08 15:24:13 2014 -0500
+++ b/Source/AIInfoInspectorPane.m Wed Jan 08 15:24:30 2014 -0500
@@ -54,7 +54,7 @@
self = [super init];
if (self != nil) {
//Load Bundle
- [NSBundle loadNibNamed:[self nibName] owner:self];
+ [[NSBundle mainBundle] loadNibNamed:[self nibName] owner:self topLevelObjects:nil];
//Register as AIListObjectObserver
[[AIContactObserverManager sharedManager] registerListObjectObserver:self];
//Setup for userIcon
--- a/Source/AIInterfaceController.m Wed Jan 08 15:24:13 2014 -0500
+++ b/Source/AIInterfaceController.m Wed Jan 08 15:24:30 2014 -0500
@@ -1852,7 +1852,7 @@
NSFontPanel *fontPanel = [NSFontPanel sharedFontPanel];
if (!fontPanelAccessoryView) {
- [NSBundle loadNibNamed:@"FontPanelAccessoryView" owner:self];
+ [[NSBundle mainBundle] loadNibNamed:@"FontPanelAccessoryView" owner:self topLevelObjects:nil];
[fontPanel setAccessoryView:fontPanelAccessoryView];
[button_fontPanelSetAsDefault setLocalizedString:AILocalizedString(@"Save This Setting As My Default Font", "Appears in the Format > Show Fonts window. You are limited for horizontal space, so try to keep it at most the length of the English string.")];
--- a/Source/AIListWindowController.m Wed Jan 08 15:24:13 2014 -0500
+++ b/Source/AIListWindowController.m Wed Jan 08 15:24:30 2014 -0500
@@ -90,7 +90,7 @@
previousAlpha = 0;
typeToFindEnabled = ![[NSUserDefaults standardUserDefaults] boolForKey:@"AIDisableContactListTypeToFind"];
- [NSBundle loadNibNamed:@"Filter Bar" owner:self];
+ [[NSBundle mainBundle] loadNibNamed:@"Filter Bar" owner:self topLevelObjects:nil];
[self setContactList:contactList];
}
--- a/Source/AILogViewerWindowController.m Wed Jan 08 15:24:13 2014 -0500
+++ b/Source/AILogViewerWindowController.m Wed Jan 08 15:24:30 2014 -0500
@@ -2260,7 +2260,7 @@
- (void)installToolbar
{
- [NSBundle loadNibNamed:[self dateItemNibName] owner:self];
+ [[NSBundle mainBundle] loadNibNamed:[self dateItemNibName] owner:self topLevelObjects:nil];
NSToolbar *toolbar = [[NSToolbar alloc] initWithIdentifier:TOOLBAR_LOG_VIEWER];
NSToolbarItem *toolbarItem;
--- a/Source/AIPreferenceWindowController.m Wed Jan 08 15:24:13 2014 -0500
+++ b/Source/AIPreferenceWindowController.m Wed Jan 08 15:24:30 2014 -0500
@@ -273,10 +273,7 @@
[self openSearchIndex];
//Load the nib
- if ([[NSBundle mainBundle] loadNibFile:@"Preferences"
- externalNameTable:[NSDictionary dictionaryWithObjectsAndKeys:self, NSNibOwner, AI_topLevelObjects, NSNibTopLevelObjects, nil]
- withZone:nil]) {
- }
+ [[NSBundle mainBundle] loadNibNamed:@"Preferences" owner:self topLevelObjects:nil];
}
- (void)awakeFromNib
--- a/Source/AIXtrasManager.m Wed Jan 08 15:24:13 2014 -0500
+++ b/Source/AIXtrasManager.m Wed Jan 08 15:24:30 2014 -0500
@@ -253,9 +253,9 @@
if (xtra) {
//[showInfoControl setHidden:NO];
if(showInfo)
- [NSBundle loadNibNamed:@"XtraInfoView" owner:self];
+ [[NSBundle mainBundle] loadNibNamed:@"XtraInfoView" owner:self topLevelObjects:nil];
else {
- [NSBundle loadNibNamed:@"XtraPreviewImageView" owner:self];
+ [[NSBundle mainBundle] loadNibNamed:@"XtraPreviewImageView" owner:self topLevelObjects:nil];
/* NSString * xtraType = [xtra type];
if ([xtraType isEqualToString:AIXtraTypeEmoticons])
--- a/Source/ESFileTransferProgressRow.m Wed Jan 08 15:24:13 2014 -0500
+++ b/Source/ESFileTransferProgressRow.m Wed Jan 08 15:24:30 2014 -0500
@@ -53,7 +53,7 @@
bytesSentQueue = [[NSMutableArray alloc] init];
updateTickQueue = [[NSMutableArray alloc] init];
- [NSBundle loadNibNamed:@"ESFileTransferProgressView" owner:self];
+ [[NSBundle mainBundle] loadNibNamed:@"ESFileTransferProgressView" owner:self topLevelObjects:nil];
}
return self;
--- a/Source/XtrasInstaller.m Wed Jan 08 15:24:13 2014 -0500
+++ b/Source/XtrasInstaller.m Wed Jan 08 15:24:30 2014 -0500
@@ -71,7 +71,7 @@
if ([[url host] isEqualToString:@"xtras.adium.im"] || [[url host] isEqualToString:@"www.adiumxtras.com"] || ALLOW_UNTRUSTED_XTRAS) {
NSURL *urlToDownload;
- [NSBundle loadNibNamed:@"XtraProgressWindow" owner:self];
+ [[NSBundle mainBundle] loadNibNamed:@"XtraProgressWindow" owner:self topLevelObjects:nil];
[progressBar setUsesThreadedAnimation:YES];
xtraName = nil;