From 97eb95cd8aecd628d82d3aee30b81e567beb7754 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 10 Jul 2013 14:27:45 +0000 Subject: almost all old helpers replaced with smart pointers git-svn-id: http://svn.miranda-ng.org/main/trunk@5307 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/JabberG/src/jabber_notes.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'protocols/JabberG/src/jabber_notes.cpp') diff --git a/protocols/JabberG/src/jabber_notes.cpp b/protocols/JabberG/src/jabber_notes.cpp index 435eb17903..382c63cc98 100644 --- a/protocols/JabberG/src/jabber_notes.cpp +++ b/protocols/JabberG/src/jabber_notes.cpp @@ -853,14 +853,11 @@ INT_PTR __cdecl CJabberProto::OnMenuHandleNotes(WPARAM, LPARAM) INT_PTR __cdecl CJabberProto::OnMenuSendNote(WPARAM wParam, LPARAM) { - if ( !wParam) return 0; - - TCHAR szClientJid[ JABBER_MAX_JID_LEN ]; - GetClientJID( JGetStringT((HANDLE)wParam, "jid"), szClientJid, SIZEOF(szClientJid)); - - CNoteItem *pItem = new CNoteItem(NULL, szClientJid); - CJabberDlgBase *pDlg = new CJabberDlgNoteItem(this, pItem, &CJabberProto::ProcessOutgoingNote); - pDlg->Show(); + if (wParam) { + CNoteItem *pItem = new CNoteItem(NULL, ptrT( db_get_tsa((HANDLE)wParam, m_szModuleName, "jid"))); + CJabberDlgBase *pDlg = new CJabberDlgNoteItem(this, pItem, &CJabberProto::ProcessOutgoingNote); + pDlg->Show(); + } return 0; } -- cgit v1.2.3