summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protocols/WhatsApp/res/whatsapp.rc4
-rw-r--r--protocols/WhatsApp/src/options.cpp7
-rw-r--r--protocols/WhatsApp/src/resource.h1
3 files changed, 11 insertions, 1 deletions
diff --git a/protocols/WhatsApp/res/whatsapp.rc b/protocols/WhatsApp/res/whatsapp.rc
index eb7f75d60f..c134163fa5 100644
--- a/protocols/WhatsApp/res/whatsapp.rc
+++ b/protocols/WhatsApp/res/whatsapp.rc
@@ -44,7 +44,9 @@ BEGIN
LTEXT "Default group:",IDC_STATIC,4,23,55,10
EDITTEXT IDC_DEFGROUP,62,21,119,12,ES_AUTOHSCROLL
CONTROL "Do not open chat windows on creation",IDC_HIDECHATS,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,0,37,182,10
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,0,57,182,10
+ LTEXT "Device name:",IDC_STATIC,4,39,55,10
+ EDITTEXT IDC_DEVICE_NAME,62,38,119,12,ES_AUTOHSCROLL
END
IDD_OPTIONS DIALOGEX 0, 0, 305, 188
diff --git a/protocols/WhatsApp/src/options.cpp b/protocols/WhatsApp/src/options.cpp
index 40b1bd4b74..0da3576456 100644
--- a/protocols/WhatsApp/src/options.cpp
+++ b/protocols/WhatsApp/src/options.cpp
@@ -32,6 +32,13 @@ public:
CreateLink(chkHideChats, ppro->m_bHideGroupchats);
}
+ bool OnInitDialog() override
+ {
+ if (!m_proto->getMStringA(DBKEY_ID).IsEmpty())
+ edtDevName.Disable();
+ return true;
+ }
+
bool OnApply() override
{
if (mir_wstrlen(m_proto->m_wszNick)) {
diff --git a/protocols/WhatsApp/src/resource.h b/protocols/WhatsApp/src/resource.h
index 8b20f44e5c..e245d1deec 100644
--- a/protocols/WhatsApp/src/resource.h
+++ b/protocols/WhatsApp/src/resource.h
@@ -9,6 +9,7 @@
#define IDC_HIDECHATS 1000
#define IDC_DEFGROUP 1001
#define IDC_QRPIC 1002
+#define IDC_DEFGROUP2 1002
#define IDC_CLIST 1003
#define IDC_NEWJID 1004
#define IDC_NICK 1005