void
ITreeItem::TreeItem_MarkForDeletion()
	{
	m_uFlagsTreeItem |= (FTI_kfTreeItem_DoNotSerializeToDisk | FTI_kfObjectInvisible);	// If an object is not serialized to disk, then it should not be visible in the Navigation Tree
	TreeItemW_RemoveFromNavigationTree();
	}
Exemple #2
0
//	TContact::ITreeItem::TreeItem_EDoMenuAction()
EMenuAction
TContact::TreeItem_EDoMenuAction(EMenuAction eMenuAction)
	{
	const int iGroup = eMenuAction - eMenuSpecialAction_GroupFirst;
	if (iGroup >= 0)
		{
		Contact_AddToGroup(iGroup);
		return ezMenuActionNone;
		}
	switch (eMenuAction)
		{
	case eMenuAction_GroupNew:
		Contact_AddToGroup(iGroup);	// Any out of range value will create a new group
		return ezMenuActionNone;
	case eMenuAction_ContactInvite:
		ChatLog_PwGetLayout_NZ()->WidgetContactInvitation_Show();
		//MessageLog_AppendTextFormatCo(d_coBlack, "eMenuAction_ContactInvite\n");
		return ezMenuActionNone;
	case eMenuAction_ContactSendFile:
		DisplayDialogSendFile();
		return ezMenuActionNone;
	case eMenuAction_ContactRemove:
		TreeItemContact_DeleteFromNavigationTree_MB();
		return ezMenuActionNone;
	case eMenuAction_ContactUndelete:
		TreeItemW_RemoveFromNavigationTree();			// Remove the contact from the 'deleted items'
		TreeItemContact_DisplayWithinNavigationTreeAndClearInvisibleFlag();	// Display the contact with the other contacts
		TreeItemW_SelectWithinNavigationTreeExpanded();
		return ezMenuActionNone;
	case eMenuAction_ContactApprove:
		m_uFlagsContact &= ~FC_kfContactUnsolicited;
		TreeItemContact_UpdateIcon();		// Remove the gray color
		return ezMenuActionNone;
	case eMenuAction_ContactSubscribe:
		m_pAccount->Contact_RosterSubscribe(this);
		return ezMenuActionNone;
	case eMenuAction_ContactUnsubscribe:
		m_pAccount->Contact_RosterUnsubscribe(this);
		return ezMenuActionNone;
	case eMenuAction_ContactPing:
		Xmpp_Ping();
		return ezMenuActionNone;
	case eMenuAction_ContactProperties:
		DisplayDialogProperties();
		return ezMenuActionNone;
	case eMenuAction_Contact_SubMenuView_Transactions:
		TreeItemW_DisplayTransactionsBitcoin();
		return ezMenuActionNone;
	case eMenuAction_Contact_SubMenuView_Recommendations:
		XcpApi_Invoke_RecommendationsGet();
		if (!m_binXmlRecommendations.FIsEmptyBinary())
			Contact_RecommendationsDisplayWithinNavigationTree(TRUE);
		return ezMenuActionNone;
	case eMenuSpecialAction_ITreeItemRenamed:
		TreeItemContact_GenerateDisplayNameFromJid();
		TreeItemContact_UpdateNameDisplayOfAliases();
		goto Default;
	default:
		Default:
		return ITreeItemChatLogEvents::TreeItem_EDoMenuAction(eMenuAction);
		} // switch
	} // TreeItem_EDoMenuAction()