Source/AICoreComponentLoader.m
author Frank Dowsett <wixardy@adium.im>
Fri, 18 Feb 2011 15:44:06 -0500
changeset 3670 add0c83648a5
parent 3650 50dc6de6048f
child 3679 f4294bb53b0f
permissions -rw-r--r--
Massive changes to dock icon drawing:
- Use NSDockTile for badging fixes #13439
- Remove flashing of the contact name* fixes #14452
- Use a constant size instead of the current screen's size fixes #13088

Fixes #616

*It's superfluous and may have been broken in 1.3 based on the reports from after 1.4 was released.
0
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
     1
/*
1855
c58dd7827295 Overzealous search & destroy there
David Smith <catfish.man@gmail.com>
parents: 1854
diff changeset
     2
 * Adium is the legal property of its developers, whose names are listed in the copyright file included
0
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
     3
 * with this source distribution.
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
     4
 *
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify it under the terms of the GNU
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
     6
 * General Public License as published by the Free Software Foundation; either version 2 of the License,
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
     7
 * or (at your option) any later version.
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
     8
 *
1855
c58dd7827295 Overzealous search & destroy there
David Smith <catfish.man@gmail.com>
parents: 1854
diff changeset
     9
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
0
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    10
 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    11
 * Public License for more details.
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    12
 *
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    13
 * You should have received a copy of the GNU General Public License along with this program; if not,
1855
c58dd7827295 Overzealous search & destroy there
David Smith <catfish.man@gmail.com>
parents: 1854
diff changeset
    14
 * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
0
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    15
 */
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    16
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    17
/*!
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    18
 * @class AICoreComponentLoader
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    19
 * @brief Core - Component Loader
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    20
 *
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    21
 * Loads integrated plugins.  Component classes to load are determined by CoreComponents.plist
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    22
 */
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    23
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    24
#import "AICoreComponentLoader.h"
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    25
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    26
//#define COMPONENT_LOAD_TIMING
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    27
#ifdef COMPONENT_LOAD_TIMING
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    28
NSTimeInterval aggregateComponentLoadingTime = 0.0;
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    29
#endif
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    30
84
3b5f51e77592 Switch all of our private method categories over to the new objc way of doing it (documented at http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Articles/chapter_4_section_5.html#//apple_ref/doc/uid/TP30001163-CH20-SW2). This enforces having implementations for them, and in the process turned up a vast number of methods we had deleted the impl for but not the declaration. loc -= 198;
David Smith
parents: 75
diff changeset
    31
@interface AICoreComponentLoader ()
0
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    32
- (void)loadComponents;
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    33
@end
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    34
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    35
@implementation AICoreComponentLoader
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    36
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    37
/*!
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    38
 * @brief Init
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    39
 */
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    40
- (id)init
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    41
{
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    42
	if ((self = [super init])) {
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    43
		components = [[NSMutableDictionary alloc] init];
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    44
		
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    45
		[self loadComponents];
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    46
	}
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    47
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    48
	return self;
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    49
}
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    50
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    51
/*!
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    52
 * @brief Deallocate
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    53
 */
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    54
- (void)dealloc
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    55
{
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    56
	[components release];
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    57
	[super dealloc];
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    58
}
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    59
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    60
#pragma mark -
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    61
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    62
/*!
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    63
 * @brief Load integrated components
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    64
 */
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    65
- (void)loadComponents
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    66
{
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    67
	//Fetch the list of components to load
1854
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
    68
	NSArray *componentClassNames = [NSArray arrayWithObjects: 
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
    69
		@"AIAccountListPreferencesPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
    70
		@"AIAccountMenuAccessPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
    71
		@"AIAliasSupportPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
    72
		@"AIAppearancePreferencesPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
    73
		@"AIAutoLinkingPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
    74
		@"AIAutoReplyPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
    75
		@"AIChatConsolidationPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
    76
		@"AIChatCyclingPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
    77
		@"AIContactAwayPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
    78
		@"AIContactIdlePlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
    79
		@"AIContactInfoWindowPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
    80
		@"AIContactListEditorPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
    81
		@"AIContactOnlineSincePlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
    82
		@"AIContactSortSelectionPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
    83
		@"AIContactStatusColoringPlugin",
3670
add0c83648a5 Massive changes to dock icon drawing:
Frank Dowsett <wixardy@adium.im>
parents: 3650
diff changeset
    84
		@"AIDockNameOverlay",
1854
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
    85
		@"AIContactStatusEventsPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
    86
		@"AIDockAccountStatusPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
    87
		@"AIDockBehaviorPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
    88
		@"AIDualWindowInterfacePlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
    89
		@"AIEventSoundsPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
    90
		@"AIExtendedStatusPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
    91
		@"AILoggerPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
    92
		@"AIMessageAliasPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
    93
		@"AINewMessagePanelPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
    94
		@"AINudgeBuzzHandlerPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
    95
		@"AIContactVisibilityControlPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
    96
		@"AISCLViewPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
    97
		@"AIStandardToolbarItemsPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
    98
		@"AIStateMenuPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
    99
		@"AIStatusChangedMessagesPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   100
		@"AITabStatusIconsPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   101
		@"BGContactNotesPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   102
		@"BGEmoticonMenuPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   103
		@"CBActionSupportPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   104
		@"CBContactCountingDisplayPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   105
		@"CBContactLastSeenPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   106
		@"CBStatusMenuItemPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   107
		@"DCInviteToChatPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   108
		@"DCJoinChatPanelPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   109
		@"DCMessageContextDisplayPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   110
		@"AIAddBookmarkPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   111
		@"ESAccountEvents",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   112
		@"ESAccountNetworkConnectivityPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   113
		@"ESAnnouncerPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   114
		@"ESApplescriptContactAlertPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   115
		@"ESBlockingPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   116
		@"ESContactClientPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   117
		@"ESContactServersideDisplayName",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   118
		@"ESFileTransferMessagesPlugin",
2056
21b77b18ba6c Actually load the metas and collapsed groups tooltip plugin. Fixes a regression introduced in 1679180a5b2d.
Colin Barrett <colin@springsandstruts.com>
parents: 1947
diff changeset
   119
		@"AIListObjectContentsPlugin",
1854
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   120
		@"ESOpenMessageWindowContactAlertPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   121
		@"ESSafariLinkToolbarItemPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   122
		@"ESSendMessageContactAlertPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   123
		@"ESUserIconHandlingPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   124
		@"ErrorMessageHandlerPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   125
		@"GBApplescriptFiltersPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   126
		@"SAContactOnlineForPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   127
		@"SHLinkManagementPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   128
		@"ESGlobalEventsPreferencesPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   129
		@"ESGeneralPreferencesPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   130
		@"NEHGrowlPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   131
		@"ESSecureMessagingPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   132
		@"ESStatusPreferencesPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   133
		@"AIAutomaticStatus",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   134
		@"ESAwayStatusWindowPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   135
		@"RAFBlockEditorPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   136
		@"SMContactListShowBehaviorPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   137
		@"ESiTunesPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   138
		@"ESPersonalPreferencesPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   139
		@"AIXtrasManager",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   140
		@"OWSpellingPerContactPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   141
		@"GBQuestionHandlerPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   142
		@"AINulRemovalPlugin",
2795
74a33a2e7467 Add a "Default font remover" plugin. Refs #12906 (though really fixes it).
Zachary West <zacw@adium.im>
parents: 2389
diff changeset
   143
		@"AIDefaultFontRemovalPlugin",
1854
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   144
		@"AIAdvancedPreferencesPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   145
		@"GBImportPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   146
		@"AIMentionEventPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   147
		@"AITwitterIMPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   148
		@"AITwitterPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   149
		@"AILaconicaPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   150
		@"AITwitterURLHandler",
2277
150e268bff74 Format our action links into an overall classed span, and class the left and right parenthesis so they can be easily hidden/removed. Refs #12049.
Zachary West <zacw@adium.im>
parents: 2101
diff changeset
   151
		@"AITwitterActionsHTMLFilter",
1854
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   152
		@"AIURLShortenerPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   153
		@"AIGroupChatStatusTooltipPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   154
		@"AIRealNameTooltip",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   155
		@"AIUserHostTooltip",
3650
50dc6de6048f Use the topic of an multi-user bookmark as the status.
Thijs Alkemade <thijsalkemade@gmail.com>
parents: 3259
diff changeset
   156
		@"AIUnreadMessagesTooltip",
1854
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   157
		@"AIIRCChannelLinker",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   158
		@"AIURLHandlerPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   159
		@"AIJumpControlPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   160
		@"AIWebKitMessageViewPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   161
		@"AWBonjourPlugin",
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   162
		@"CBPurpleServicePlugin",
2344
b5f68ee73ac3 An image uploader plugin. Found in the same locations as "Replace with Shortened URL."
Zachary West <zacw@adium.im>
parents: 2277
diff changeset
   163
		@"AIImageUploaderPlugin",
2389
9b5721fa5865 Using an unpublished (but provided by pic.im) API, provide the pic.im server with information about tweets we send.
Zachary West <zacw@adium.im>
parents: 2344
diff changeset
   164
		@"AITwitterStatusFollowup",
3259
a71c719e9271 Add a "Do Nothing" event. Technically a "do nothing further" event as it will keep the events that have already been added. Fixes #3590.
Frank Dowsett <wixardy@adium.im>
parents: 2795
diff changeset
   165
		@"AIDoNothingContactAlertPlugin",
1854
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   166
		nil
92a365c3eacf Make this multiline for easier merging
David Smith <catfish.man@gmail.com>
parents: 1853
diff changeset
   167
	];
0
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   168
	//Load each component
1853
48fa97bafbf8 Loading core components from a plist seems fairly pointless to me.
David Smith <catfish.man@gmail.com>
parents: 1816
diff changeset
   169
	for (NSString *className in componentClassNames) {
48fa97bafbf8 Loading core components from a plist seems fairly pointless to me.
David Smith <catfish.man@gmail.com>
parents: 1816
diff changeset
   170
			
0
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   171
#ifdef COMPONENT_LOAD_TIMING
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   172
		NSDate *start = [NSDate date];
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   173
#endif
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   174
		NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   175
		Class class;
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   176
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   177
		if (className && (class = NSClassFromString(className))) {
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   178
			id <AIPlugin>	object = [[class alloc] init];
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   179
1855
c58dd7827295 Overzealous search & destroy there
David Smith <catfish.man@gmail.com>
parents: 1854
diff changeset
   180
			NSAssert1(object, @"Failed to load %@", className);
0
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   181
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   182
			[object installPlugin];
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   183
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   184
			[components setObject:object forKey:className];
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   185
			[object release];
2101
967d93f1c6ad OCD indentation fix (mostly just trying out the rebase plugin)
David Smith <catfish.man@gmail.com>
parents: 2057
diff changeset
   186
		} else {
967d93f1c6ad OCD indentation fix (mostly just trying out the rebase plugin)
David Smith <catfish.man@gmail.com>
parents: 2057
diff changeset
   187
			NSAssert1(NO, @"Failed to load %@", className);
967d93f1c6ad OCD indentation fix (mostly just trying out the rebase plugin)
David Smith <catfish.man@gmail.com>
parents: 2057
diff changeset
   188
		}
0
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   189
		[pool release];
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   190
#ifdef COMPONENT_LOAD_TIMING
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   191
		NSTimeInterval t = -[start timeIntervalSinceNow];
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   192
		aggregateComponentLoadingTime += t;
1855
c58dd7827295 Overzealous search & destroy there
David Smith <catfish.man@gmail.com>
parents: 1854
diff changeset
   193
		AILog(@"Loaded component: %@ in %f seconds", className, t);
0
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   194
#endif
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   195
	}
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   196
#ifdef COMPONENT_LOAD_TIMING
1855
c58dd7827295 Overzealous search & destroy there
David Smith <catfish.man@gmail.com>
parents: 1854
diff changeset
   197
	AILog(@"Total time spent loading components: %f", aggregateComponentLoadingTime);
0
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   198
#endif
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   199
}
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   200
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   201
- (void)controllerDidLoad
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   202
{
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   203
}
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   204
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   205
/*!
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   206
 * @brief Close integreated components
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   207
 */
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   208
- (void)controllerWillClose
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   209
{
1873
67b0c2dd9383 Fix something Zac noticed
David Smith <catfish.man@gmail.com>
parents: 1855
diff changeset
   210
	for (id <AIPlugin> plugin in [components objectEnumerator]) {
0
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   211
		[[NSNotificationCenter defaultCenter] removeObserver:plugin];
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   212
		[plugin uninstallPlugin];
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   213
	}
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   214
}
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   215
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   216
#pragma mark -
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   217
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   218
/*!
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   219
 * @brief Retrieve a component plugin by its class name
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   220
 */
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   221
- (id <AIPlugin>)pluginWithClassName:(NSString *)className {
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   222
	return [components objectForKey:className];
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   223
}
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   224
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   225
@end