summaryrefslogtreecommitdiff
path: root/protocols/Dummy/src/dummy_proto.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-01-20 11:57:43 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-01-20 11:57:43 +0300
commit3420f0f1d98d5c7076f4cb9c6ea23b2e4ab462e1 (patch)
tree96364f577cfe62e8bb61f2c7948c545a6a89025c /protocols/Dummy/src/dummy_proto.cpp
parent3d56e7622af87e2f39ba759ee3761dafc8278d56 (diff)
Dummy: the support for Discord accounts disabled in the trunk version
Diffstat (limited to 'protocols/Dummy/src/dummy_proto.cpp')
-rw-r--r--protocols/Dummy/src/dummy_proto.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/protocols/Dummy/src/dummy_proto.cpp b/protocols/Dummy/src/dummy_proto.cpp
index 37e2aa3958..27d2858600 100644
--- a/protocols/Dummy/src/dummy_proto.cpp
+++ b/protocols/Dummy/src/dummy_proto.cpp
@@ -17,11 +17,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdafx.h"
-const ttemplate templates[DUMMY_PROTO_COUNT] =
+const ttemplate templates[] =
{
{ LPGEN("Custom"), "", "" },
{ "AIM", "SN", LPGEN("Screen name") },
+#ifndef MIRANDA_VERSION_ISALPHA
{ "Discord", "id", LPGEN("Discord ID") },
+#endif
{ "EmLAN", "Nick", LPGEN("User name") },
{ "Facebook", "ID", LPGEN("Facebook ID") },
{ "GG", "UIN", LPGEN("Gadu-Gadu number") },
@@ -45,6 +47,7 @@ const ttemplate templates[DUMMY_PROTO_COUNT] =
{ "WhatsApp", "ID", LPGEN("WhatsApp ID") },
{ "XFire", "Username", LPGEN("Username") },
{ "Yahoo", "yahoo_id", LPGEN("ID") },
+ { 0, 0, 0 }
};
void CDummyProto::SearchIdAckThread(void *targ)
@@ -101,6 +104,21 @@ int CDummyProto::getTemplateId()
return 0;
}
+void CDummyProto::selectTemplate(HWND hwndDlg, int templateId)
+{
+ // Enable custom fields when selected custom template
+ EnableWindow(GetDlgItem(hwndDlg, IDC_ID_TEXT), templateId == 0);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_ID_SETTING), templateId == 0);
+
+ ptrA tszIdText(templateId > 0 ? mir_strdup(Translate(templates[templateId].text)) : getStringA(DUMMY_ID_TEXT));
+ if (tszIdText != NULL)
+ SetDlgItemTextA(hwndDlg, IDC_ID_TEXT, tszIdText);
+
+ ptrA tszIdSetting(templateId > 0 ? mir_strdup(templates[templateId].setting) : getStringA(DUMMY_ID_SETTING));
+ if (tszIdSetting != NULL)
+ SetDlgItemTextA(hwndDlg, IDC_ID_SETTING, tszIdSetting);
+}
+
INT_PTR CDummyProto::GetCaps(int type, MCONTACT)
{
switch(type) {