コード例 #1
0
ファイル: TContact.cpp プロジェクト: tcolussi/Cambrian-src
void
TContact::TreeItemContact_DeleteFromNavigationTree_MB(PA_DELETING)
	{
	EAnswer eAnswer = EMessageBoxQuestion("Are you sure you want to remove peer $S?", &m_strJidBare);
	if (eAnswer != eAnswerYes)
		return;
	Vault_WriteEventsToDiskIfModified();	// Always save the Chat Log. This is important because if the user wants to add the contact again, he/she will recover the entire Chat Log.
	m_pAccount->m_pProfileParent->DeleteContact(PA_DELETING this);
	Configuration_Save();		// Save the configuration to make sure the contact does not re-appear in case of a power failure or if the application crashes
	}
コード例 #2
0
void
TAccountXmpp::TreeItemAccount_DeleteFromNavigationTree_MB(PA_DELETING)
	{
	const int cContacts =  m_arraypaContacts.GetSize();
	if (cContacts > 0)
		{
		if (EMessageBoxQuestion("Are you sure you want to remove the account $S and its $i peers?", &m_strJID, cContacts) != eAnswerYes)
			return;
		}
	m_pProfileParent->DeleteAccount(PA_DELETING this);
	}