summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-10-24 20:31:35 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-10-24 20:31:35 +0300
commit4a86731399f158e08ec272fe9a5fc0f0fa0dbad6 (patch)
tree1dfa56ec4ab92f594ea83989efb52094940e765d /src
parent3737eafbc89c31085e18d21d6db6e71e9515dd52 (diff)
fixes #4756 (Плагины сообшений: отдать доступность кнопок форматирования полностью на откуп протоколу)
Diffstat (limited to 'src')
-rw-r--r--src/core/stdmsg/res/resource.rc2
-rw-r--r--src/core/stdmsg/src/msgdialog.cpp1
-rw-r--r--src/core/stdmsg/src/msgoptions.cpp4
-rw-r--r--src/core/stdmsg/src/resource.h1
-rw-r--r--src/core/stdmsg/src/srmm.cpp1
-rw-r--r--src/core/stdmsg/src/stdafx.h2
-rw-r--r--src/mir_app/src/srmm_base.cpp4
7 files changed, 3 insertions, 12 deletions
diff --git a/src/core/stdmsg/res/resource.rc b/src/core/stdmsg/res/resource.rc
index e5f80a1d86..b269bcbe14 100644
--- a/src/core/stdmsg/res/resource.rc
+++ b/src/core/stdmsg/res/resource.rc
@@ -56,8 +56,6 @@ BEGIN
CONTROL "Show character count",IDC_CHARCOUNT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,173,289,8
CONTROL "Show toolbar buttons on top row",IDC_SHOWBUTTONLINE,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,185,289,8
- CONTROL "Allow BBCode formatting in outgoing messages",IDC_SEND_FORMAT,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,198,289,8
LTEXT "Show warning when message has not been received after",IDC_STATIC,8,213,211,8
EDITTEXT IDC_SECONDS,223,211,25,12,ES_AUTOHSCROLL
LTEXT "seconds",IDC_STATIC,253,213,44,8
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp
index 5e8c39785f..a4d182eaa0 100644
--- a/src/core/stdmsg/src/msgdialog.cpp
+++ b/src/core/stdmsg/src/msgdialog.cpp
@@ -55,7 +55,6 @@ CMsgDialog::CMsgDialog(CTabbedWindow *pOwner, MCONTACT hContact) :
m_autoClose = 0;
m_forceResizable = true;
m_bNoActivate = g_plugin.bDoNotStealFocus;
- m_bSendFormat = g_plugin.bSendFormat;
g_arDialogs.insert(this);
diff --git a/src/core/stdmsg/src/msgoptions.cpp b/src/core/stdmsg/src/msgoptions.cpp
index a73eaf6d40..2eae075286 100644
--- a/src/core/stdmsg/src/msgoptions.cpp
+++ b/src/core/stdmsg/src/msgoptions.cpp
@@ -147,7 +147,7 @@ class COptionMainDlg : public CDlgBase
{
CCtrlEdit edtNFlash, edtAvatarH, edtSecs;
CCtrlCheck chkAutoMin, chkAutoClose, chkSavePerContact, chkDoNotStealFocus, chkStatusWin;
- CCtrlCheck chkDelTemp, chkCascade, chkCharCount, chkCtrlSupport, chkSendFormat;
+ CCtrlCheck chkDelTemp, chkCascade, chkCharCount, chkCtrlSupport;
CCtrlCheck chkAvatar, chkLimitAvatar;
CCtrlCheck chkShowSend, chkShowButtons;
@@ -199,7 +199,6 @@ public:
chkAutoClose(this, IDC_AUTOCLOSE),
chkCharCount(this, IDC_CHARCOUNT),
chkStatusWin(this, IDC_STATUSWIN),
- chkSendFormat(this, IDC_SEND_FORMAT),
chkLimitAvatar(this, IDC_LIMITAVATARH),
chkShowButtons(this, IDC_SHOWBUTTONLINE),
chkCtrlSupport(this, IDC_CTRLSUPPORT),
@@ -226,7 +225,6 @@ public:
CreateLink(chkAutoClose, g_plugin.bAutoClose);
CreateLink(chkShowSend, g_plugin.bSendButton);
CreateLink(chkCharCount, g_plugin.bShowReadChar);
- CreateLink(chkSendFormat, g_plugin.bSendFormat);
CreateLink(chkStatusWin, g_plugin.bUseStatusWinIcon);
CreateLink(chkShowButtons, g_plugin.bShowButtons);
CreateLink(chkCtrlSupport, g_plugin.bCtrlSupport);
diff --git a/src/core/stdmsg/src/resource.h b/src/core/stdmsg/src/resource.h
index f5de2ae35b..a07a6b7bb6 100644
--- a/src/core/stdmsg/src/resource.h
+++ b/src/core/stdmsg/src/resource.h
@@ -81,7 +81,6 @@
#define IDC_SHOWBUTTONLINE 1042
#define IDC_LOADUNREAD 1043
#define IDC_SHOWBUTTONLINE2 1043
-#define IDC_SEND_FORMAT 1043
#define IDC_LOADCOUNT 1044
#define IDC_LOADTIMEN 1045
#define IDC_LOADTIMESPIN 1046
diff --git a/src/core/stdmsg/src/srmm.cpp b/src/core/stdmsg/src/srmm.cpp
index fef28a5a02..63d7e2481f 100644
--- a/src/core/stdmsg/src/srmm.cpp
+++ b/src/core/stdmsg/src/srmm.cpp
@@ -64,7 +64,6 @@ CMPlugin::CMPlugin() :
bAutoClose(SRMM_MODULE, "AutoClose", false),
bShowNames(SRMM_MODULE, "ShowNames", false),
bShowFormat(SRMM_MODULE, "ShowFormatting", true),
- bSendFormat(SRMM_MODULE, "SendFormat", false),
bSendButton(SRMM_MODULE, "UseSendButton", false),
bCtrlSupport(SRMM_MODULE, "SupportCtrlUpDn", true),
bShowReadChar(SRMM_MODULE, "ShowCharCount", false),
diff --git a/src/core/stdmsg/src/stdafx.h b/src/core/stdmsg/src/stdafx.h
index bfdf282fe5..27a9c076e3 100644
--- a/src/core/stdmsg/src/stdafx.h
+++ b/src/core/stdmsg/src/stdafx.h
@@ -162,7 +162,7 @@ struct CMPlugin : public PLUGIN<CMPlugin>
// private chat log options
CMOption<bool> bShowButtons, bSendButton, bShowTyping, bShowTypingWin, bShowTypingTray, bShowTypingClist;
CMOption<bool> bShowIcons, bShowTime, bShowDate, bShowAvatar, bShowNames, bShowSecs, bShowReadChar;
- CMOption<bool> bAutoClose, bAutoMin, bTypingNew, bTypingUnknown, bCtrlSupport, bShowFormat, bSendFormat;
+ CMOption<bool> bAutoClose, bAutoMin, bTypingNew, bTypingUnknown, bCtrlSupport, bShowFormat;
CMOption<bool> bSavePerContact, bDoNotStealFocus, bCascade, bDeleteTempCont, bUseStatusWinIcon, bAutoCopy;
CMOption<bool> bLimitAvatarHeight;
diff --git a/src/mir_app/src/srmm_base.cpp b/src/mir_app/src/srmm_base.cpp
index 66a7fb9d86..b53ca52b13 100644
--- a/src/mir_app/src/srmm_base.cpp
+++ b/src/mir_app/src/srmm_base.cpp
@@ -546,9 +546,7 @@ bool CSrmmBaseDialog::OnInitDialog()
// three buttons below are initiated inside this call, so button creation must precede subclassing
Srmm_CreateToolbarIcons(this, isChat() ? BBBF_ISCHATBUTTON : BBBF_ISIMBUTTON);
- if ((CallContactService(m_hContact, PS_GETCAPS, PFLAGNUM_4) & PF4_SERVERFORMATTING) == 0)
- m_bSendFormat = false;
-
+ m_bSendFormat = ((CallContactService(m_hContact, PS_GETCAPS, PFLAGNUM_4) & PF4_SERVERFORMATTING) != 0);
if (!m_bSendFormat) {
m_btnBold.Disable();
m_btnItalic.Disable();