diff options
author | George Hazan <george.hazan@gmail.com> | 2013-07-10 14:27:45 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-07-10 14:27:45 +0000 |
commit | 97eb95cd8aecd628d82d3aee30b81e567beb7754 (patch) | |
tree | ada84b3b7b20bc1f5ab6b490286ab1d41529108f /protocols/JabberG/src/jabber_notes.cpp | |
parent | 3bcc4ebb3e1a43574fb934a80903feaa56642089 (diff) |
almost all old helpers replaced with smart pointers
git-svn-id: http://svn.miranda-ng.org/main/trunk@5307 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_notes.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_notes.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
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;
}
|