//----------------------------------------------------------------------------------------
// UpdateActionStates
//----------------------------------------------------------------------------------------
void
CZPAssetsTVActionComponent::UpdateActionStates(
	IActiveContext* ac, IActionStateList *listToUpdate, GSysPoint mousePoint, IPMUnknown* widget)
{
	do
	{
		int actionIDListLen = listToUpdate->Length();
		for(int i=0; i < actionIDListLen; ++i)
		{
			ActionID actionID = listToUpdate->GetNthAction(i);
			int16 state = listToUpdate->GetNthActionState(i);
			switch (actionID.Get())
			{
				case kIZPRenameAssetActionID:
				{
					if (this->CanRenameAsset(widget))
						state = kEnabledAction;
					else
						state = kDisabled_Unselected;
					break;
				}
				default:
					break;
			}
			listToUpdate->SetNthActionState(i, state);
		}
	}while(kFalse);
}
//----------------------------------------------------------------------------------------
// DoAction
//----------------------------------------------------------------------------------------
void
CZPAssetsTVActionComponent::DoAction(
	IActiveContext* ac, ActionID actionID, GSysPoint mousePoint, IPMUnknown* widget)
{
	LogFunctionEnterExit;
	
	switch (actionID.Get())
	{
		case kIZPRenameAssetActionID:
		{
			this->RenameAsset(widget);
			break;
		}
		default:
			break;
	}
}
/* DoAction
*/
void IDShortcutsActionComponent::DoAction(IActiveContext* ac, ActionID actionID, GSysPoint mousePoint, IPMUnknown* widget)
{
	switch (actionID.Get())
	{

		case kIDShortcutsPopupAboutThisActionID:
		case kIDShortcutsAboutActionID:
		{
			this->DoAbout();
			break;
		}
					


		default:
		{
			break;
		}
	}
}
//----------------------------------------------------------------------------------------
// RebuildMenu
//----------------------------------------------------------------------------------------
void
CZPTVHeaderDynamicMenu::RebuildMenu(
	ActionID					dynamicActionID,
	IPMUnknown*					widget)
{

	do
	{
		InterfacePtr<IActiveContext> ac(gSession->GetActiveContext(), UseDefaultIID());
		if(!ac)
			break;

		switch (dynamicActionID.Get())
		{
			case kIZMTVHeaderShowColumnsActionID:
				this->RebuildShowColumnsMenu( dynamicActionID, widget );
				break;
		}
	}while( false );
}
//----------------------------------------------------------------------------------------
// IsActionHidden
//----------------------------------------------------------------------------------------
bool16
CZPUISuppressedActions::IsActionHidden(
	ActionID action) const
{
	switch( action.Get() )
	{
		case kSLRelinkAssignmentActionID:					//Change assignment location.
		case kSLAssignmentOptionsActionID:					//Hide assignment options
		case kPackageAssignmentActionID:					//All package relation actions
		case kPackageAndEmailAssignmentActionID:
		case kForwardPackagedAssignmentActionID:
		case kForwardAndEmailPackagedAssignmentActionID:
		case kReturnPackagedAssignmentActionID:
		case kReturnAndEmailPackagedAssignmentActionID:
		case kOpenPackagedAssignmentActionID:
		case kCancelPackagedAssignmentActionID:
			return kTrue;
	}
	return kFalse;
}