summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_chat.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-08-15 17:06:37 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-08-15 17:06:37 +0300
commit9f5f4958b7a890482997dffef7c9cf4bf95f0ba4 (patch)
tree9ae68a4427d07302e965b1eed762ed12254d959b /protocols/JabberG/src/jabber_chat.cpp
parent961841cda97a18f5d0392e8c81c8c9b1650a6572 (diff)
AVS: contact options dialog -> UI classes
Diffstat (limited to 'protocols/JabberG/src/jabber_chat.cpp')
-rw-r--r--protocols/JabberG/src/jabber_chat.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp
index c4bd6bb3d6..16483bcb9b 100644
--- a/protocols/JabberG/src/jabber_chat.cpp
+++ b/protocols/JabberG/src/jabber_chat.cpp
@@ -34,7 +34,7 @@ enum {
IDM_ROLE, IDM_AFFLTN,
- IDM_CONFIG, IDM_NICK, IDM_DESTROY, IDM_INVITE, IDM_BOOKMARKS, IDM_LEAVE, IDM_TOPIC,
+ IDM_CONFIG, IDM_NICK, IDM_AVATAR, IDM_DESTROY, IDM_INVITE, IDM_BOOKMARKS, IDM_LEAVE, IDM_TOPIC,
IDM_LST_PARTICIPANT, IDM_LST_MODERATOR,
IDM_LST_MEMBER, IDM_LST_ADMIN, IDM_LST_OWNER, IDM_LST_BAN,
@@ -388,6 +388,7 @@ static gc_item sttLogListItems[] =
{ LPGENW("&Room options"), 0, MENU_NEWPOPUP },
{ LPGENW("View/change &topic"), IDM_TOPIC, MENU_POPUPITEM },
{ LPGENW("Add to &bookmarks"), IDM_BOOKMARKS, MENU_POPUPITEM },
+ { LPGENW("Change &avatar"), IDM_AVATAR, MENU_POPUPITEM },
{ LPGENW("&Configure..."), IDM_CONFIG, MENU_POPUPITEM },
{ LPGENW("&Destroy room"), IDM_DESTROY, MENU_POPUPITEM },
@@ -465,6 +466,10 @@ static gc_item sttListItems[] =
{ LPGENW("Copy in-room JID"), IDM_CPY_INROOMJID, MENU_ITEM }
};
+static uint32_t sttModeratorItems[] = { IDM_LST_PARTICIPANT, IDM_AVATAR, 0 };
+static uint32_t sttAdminItems[] = { IDM_LST_MODERATOR, IDM_LST_MEMBER, IDM_LST_ADMIN, IDM_LST_OWNER, IDM_LST_BAN, 0 };
+static uint32_t sttOwnerItems[] = { IDM_CONFIG, IDM_DESTROY, 0 };
+
int CJabberProto::JabberGcMenuHook(WPARAM, LPARAM lParam)
{
GCMENUITEMS* gcmi = (GCMENUITEMS*)lParam;
@@ -489,10 +494,6 @@ int CJabberProto::JabberGcMenuHook(WPARAM, LPARAM lParam)
if (gcmi->Type == MENU_ON_LOG) {
static wchar_t url_buf[1024] = { 0 };
- static uint32_t sttModeratorItems[] = { IDM_LST_PARTICIPANT, 0 };
- static uint32_t sttAdminItems[] = { IDM_LST_MODERATOR, IDM_LST_MEMBER, IDM_LST_ADMIN, IDM_LST_OWNER, IDM_LST_BAN, 0 };
- static uint32_t sttOwnerItems[] = { IDM_CONFIG, IDM_DESTROY, 0 };
-
sttSetupGcMenuItem(_countof(sttLogListItems), sttLogListItems, 0, FALSE);
int idx = IDM_LINK0;
@@ -1194,6 +1195,10 @@ static void sttLogListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK *g
ppro->AdminGet(roomJid, JABBER_FEAT_MUC_ADMIN, "affiliation", "owner", &CJabberProto::OnIqResultMucGetOwnerList, gch->si->pDlg);
break;
+ case IDM_AVATAR:
+ CallService(MS_AV_CONTACTOPTIONS, gch->si->hContact, LPARAM(gch->si->pDlg ? gch->si->pDlg->GetHwnd() : nullptr));
+ break;
+
case IDM_TOPIC:
szTitle.Format(TranslateT("Set topic for %s"), gch->si->ptszID);
szBuffer = Utf2T(item->getTemp()->m_szStatusMessage);