Don't validate command menu items when no list objects are selected.
authorZachary West <zacw@adiumx.com>
Thu Apr 09 02:14:33 2009 +0000 (2009-04-09)
changeset 1618d11404141154
parent 1617 6f97091397c9
child 1619 b6e64cfa97bf
Don't validate command menu items when no list objects are selected.
Plugins/Purple Service/ESIRCAccount.m
     1.1 --- a/Plugins/Purple Service/ESIRCAccount.m	Thu Apr 09 02:11:29 2009 +0000
     1.2 +++ b/Plugins/Purple Service/ESIRCAccount.m	Thu Apr 09 02:14:33 2009 +0000
     1.3 @@ -437,7 +437,13 @@
     1.4  - (BOOL)validateMenuItem:(NSMenuItem *)menuItem
     1.5  {
     1.6  	AIOperationRequirement req = menuItem.tag;
     1.7 -	AIGroupChatFlags flags = [self flagsInChat:adium.interfaceController.activeChat];
     1.8 +	AIChat *chat = adium.interfaceController.activeChat;
     1.9 +	
    1.10 +	if (!chat.chatContainer.messageViewController.selectedListObjects.count) {
    1.11 +		return NO;
    1.12 +	}
    1.13 +	
    1.14 +	AIGroupChatFlags flags = [self flagsInChat:chat];
    1.15  	
    1.16  	switch (req) {
    1.17  		case AIRequiresHalfop: