summaryrefslogtreecommitdiff
path: root/protocols/ICQ-WIM
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/ICQ-WIM')
-rw-r--r--protocols/ICQ-WIM/res/resources.rc9
-rw-r--r--protocols/ICQ-WIM/src/resource.h2
-rw-r--r--protocols/ICQ-WIM/src/server.cpp1
-rw-r--r--protocols/ICQ-WIM/src/userinfo.cpp37
4 files changed, 48 insertions, 1 deletions
diff --git a/protocols/ICQ-WIM/res/resources.rc b/protocols/ICQ-WIM/res/resources.rc
index 5f2ec57b50..6be7abd7fa 100644
--- a/protocols/ICQ-WIM/res/resources.rc
+++ b/protocols/ICQ-WIM/res/resources.rc
@@ -168,6 +168,15 @@ BEGIN
EDITTEXT IDC_PHONE,74,34,139,10,ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP
END
+IDD_ABOUT DIALOGEX 0, 0, 222, 132
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
+EXSTYLE WS_EX_CONTROLPARENT
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ LTEXT "About:",IDC_STATIC,5,5,212,8
+ EDITTEXT IDC_ABOUT,5,15,212,112,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN | WS_VSCROLL
+END
+
IDD_LOGINPW DIALOGEX 0, 0, 157, 70
STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Enter ICQ Password"
diff --git a/protocols/ICQ-WIM/src/resource.h b/protocols/ICQ-WIM/src/resource.h
index 38a48a0d35..f4bfda4f5b 100644
--- a/protocols/ICQ-WIM/src/resource.h
+++ b/protocols/ICQ-WIM/src/resource.h
@@ -15,6 +15,7 @@
#define IDD_EDITGROUPS 111
#define IDD_FORWARD 112
#define IDI_FORWARD 113
+#define IDD_ABOUT 114
#define IDC_PASSWORD 1001
#define IDC_UIN 1002
#define IDC_UIN2 1003
@@ -25,6 +26,7 @@
#define IDC_SENDSMS 1008
#define IDC_CODE 1009
#define IDC_ONLINESINCE 1010
+#define IDC_ABOUT 1011
#define IDC_NICK 1012
#define IDC_LASTSEEN 1014
#define IDC_SAVEPASS 1015
diff --git a/protocols/ICQ-WIM/src/server.cpp b/protocols/ICQ-WIM/src/server.cpp
index abba88aa22..506b0651fb 100644
--- a/protocols/ICQ-WIM/src/server.cpp
+++ b/protocols/ICQ-WIM/src/server.cpp
@@ -386,6 +386,7 @@ MCONTACT CIcqProto::ParseBuddyInfo(const JSONNode &buddy, MCONTACT hContact, boo
Contact::PutOnList(hContact);
}
+ Json2string(hContact, buddy, "about", "About", bIsPartial);
Json2string(hContact, buddy, "emailId", "Email", bIsPartial);
Json2string(hContact, buddy, "cellNumber", "Cellular", bIsPartial);
Json2string(hContact, buddy, "workNumber", "CompanyPhone", bIsPartial);
diff --git a/protocols/ICQ-WIM/src/userinfo.cpp b/protocols/ICQ-WIM/src/userinfo.cpp
index d41ab0f9f5..2563925ff5 100644
--- a/protocols/ICQ-WIM/src/userinfo.cpp
+++ b/protocols/ICQ-WIM/src/userinfo.cpp
@@ -74,6 +74,35 @@ struct IcqUserInfoDlg : public CUserInfoPageDlg
}
};
+struct IcqAboutDlg : public CUserInfoPageDlg
+{
+ CIcqProto *ppro;
+
+ IcqAboutDlg(CIcqProto *_ppro) :
+ CUserInfoPageDlg(g_plugin, IDD_ABOUT),
+ ppro(_ppro)
+ {}
+
+ bool IsEmpty() const override
+ {
+ return ppro->getMStringW(m_hContact, "About").IsEmpty();
+ }
+
+ bool OnRefresh() override
+ {
+ SetDlgItemTextW(m_hwnd, IDC_ABOUT, ppro->getMStringW(m_hContact, "About"));
+ return false;
+ }
+
+ int Resizer(UTILRESIZECONTROL *urc) override
+ {
+ if (urc->wId == IDC_ABOUT)
+ return RD_ANCHORX_WIDTH | RD_ANCHORY_HEIGHT;
+
+ return RD_ANCHORX_LEFT | RD_ANCHORY_TOP;
+ }
+};
+
int CIcqProto::OnUserInfoInit(WPARAM wParam, LPARAM hContact)
{
if (hContact && mir_strcmp(Proto_GetBaseAccountName(hContact), m_szModuleName))
@@ -84,11 +113,17 @@ int CIcqProto::OnUserInfoInit(WPARAM wParam, LPARAM hContact)
USERINFOPAGE uip = {};
uip.flags = ODPF_UNICODE | ODPF_USERINFOTAB | ODPF_DONTTRANSLATE;
- uip.szTitle.w = L"ICQ";
uip.szGroup.w = m_tszUserName;
uip.szProto = m_szModuleName;
+
+ uip.szTitle.w = L"ICQ";
uip.position = -1900000000;
uip.pDialog = new IcqUserInfoDlg(this);
g_plugin.addUserInfo(wParam, &uip);
+
+ uip.szTitle.w = TranslateT("About");
+ uip.position = -1900000001;
+ uip.pDialog = new IcqAboutDlg(this);
+ g_plugin.addUserInfo(wParam, &uip);
return 0;
}