diff options
author | George Hazan <ghazan@miranda.im> | 2022-09-26 18:24:31 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2022-09-26 18:24:31 +0300 |
commit | dc2a4dc50d6cc3e7bd513122756dd39141d7887e (patch) | |
tree | 41a7592c091bea75b3b258523728f3c59a12dd60 /protocols/JabberG/src | |
parent | 30a9e9e370aa9aff9f64158aa0942b471621a7ef (diff) |
fixes #3205 (Jabber: добавить редактирование в списки)
Diffstat (limited to 'protocols/JabberG/src')
-rw-r--r-- | protocols/JabberG/src/jabber_iqid_muc.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/protocols/JabberG/src/jabber_iqid_muc.cpp b/protocols/JabberG/src/jabber_iqid_muc.cpp index 72deebab0f..c360edaa30 100644 --- a/protocols/JabberG/src/jabber_iqid_muc.cpp +++ b/protocols/JabberG/src/jabber_iqid_muc.cpp @@ -171,6 +171,7 @@ public: edtFilter(this, IDC_FILTER)
{
m_list.OnClick = Callback(this, &CJabberMucJidListDlg::list_OnClick);
+ m_list.OnBuildMenu = Callback(this, &CJabberMucJidListDlg::list_OnMenu);
btnApply.OnClick = Callback(this, &CJabberMucJidListDlg::onClick_Apply);
btnReset.OnClick = Callback(this, &CJabberMucJidListDlg::onClick_Reset);
@@ -326,6 +327,20 @@ public: }
}
+ void list_OnMenu(CContextMenuPos *pos)
+ {
+ HMENU hMenu = CreatePopupMenu();
+ AppendMenuW(hMenu, MF_STRING, 1, TranslateT("Copy jid"));
+
+ if (TrackPopupMenu(hMenu, TPM_RETURNCMD | TPM_BOTTOMALIGN, pos->pt.x, pos->pt.y, 0, m_hwnd, nullptr)) {
+ wchar_t buf[JABBER_MAX_JID_LEN];
+ m_list.GetItemText(pos->iCurr, 0, buf, _countof(buf));
+ Utils_ClipboardCopy(buf);
+ }
+
+ DestroyMenu(hMenu);
+ }
+
void onClick_Apply(CCtrlButton*)
{
FillJidList(true);
|