summaryrefslogtreecommitdiff
path: root/plugins/Scriver/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-09-16 19:21:57 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-09-16 19:21:57 +0300
commitccde738e49d3102681ab38c6b3e250e9fb57c8bb (patch)
tree20fc7d1da6b43ce9323dbdcba1b99605224a2931 /plugins/Scriver/src
parent41b98908e8f8b9014d1525d123c5a4c3b845230b (diff)
fixes #4675 (Не работают кнопки форматирования в StdMsg/Scriver)
Diffstat (limited to 'plugins/Scriver/src')
-rw-r--r--plugins/Scriver/src/msgdialog.cpp3
-rw-r--r--plugins/Scriver/src/msgoptions.cpp4
-rw-r--r--plugins/Scriver/src/msgs.h1
-rw-r--r--plugins/Scriver/src/msgutils.cpp6
-rw-r--r--plugins/Scriver/src/resource.h2
-rw-r--r--plugins/Scriver/src/srmm.cpp1
-rw-r--r--plugins/Scriver/src/stdafx.h2
7 files changed, 16 insertions, 3 deletions
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp
index 47f8893719..69783ba143 100644
--- a/plugins/Scriver/src/msgdialog.cpp
+++ b/plugins/Scriver/src/msgdialog.cpp
@@ -108,6 +108,7 @@ void CMsgDialog::Init()
SetParent(GetParentWindow(m_hContact, isChat()));
m_pParent = (ParentWindowData *)GetWindowLongPtr(m_hwndParent, GWLP_USERDATA);
+ m_bSendFormat = g_plugin.bSendFormat;
m_btnOk.OnClick = Callback(this, &CMsgDialog::onClick_Ok);
timerType.OnEvent = Callback(this, &CMsgDialog::onType);
@@ -329,7 +330,7 @@ void CMsgDialog::onClick_Ok(CCtrlButton *pButton)
if (isChat()) {
CMStringW ptszText(ptrW(mir_utf8decodeW(msi.sendBuffer)));
- g_chatApi.DoRtfToTags(ptszText, 0, nullptr);
+ DoRtfToTags(ptszText);
ptszText.Trim();
if (m_si->pMI->bAckMsg) {
diff --git a/plugins/Scriver/src/msgoptions.cpp b/plugins/Scriver/src/msgoptions.cpp
index 7e6dddeccb..473929fa5d 100644
--- a/plugins/Scriver/src/msgoptions.cpp
+++ b/plugins/Scriver/src/msgoptions.cpp
@@ -243,7 +243,7 @@ class CMainOptionsDlg : public CBaseOptionDlg
CCtrlSpin spinTimeout;
CCtrlCheck chkAutoMin, chkAutoPopup, chkCascade, chkSavePerContact, chkStayMinimized;
- CCtrlCheck chkSaveDrafts, chkDelTemp, chkHideContainer;
+ CCtrlCheck chkSaveDrafts, chkDelTemp, chkHideContainer, chkSendFormat;
CCtrlTreeView m_tree;
public:
@@ -255,6 +255,7 @@ public:
chkCascade(this, IDC_CASCADE),
chkDelTemp(this, IDC_DELTEMP),
chkAutoPopup(this, IDC_AUTOPOPUP),
+ chkSendFormat(this, IDC_SEND_FORMAT),
chkSaveDrafts(this, IDC_SAVEDRAFTS),
chkHideContainer(this, IDC_HIDECONTAINERS),
chkStayMinimized(this, IDC_STAYMINIMIZED),
@@ -264,6 +265,7 @@ public:
CreateLink(chkCascade, g_plugin.bCascade);
CreateLink(chkAutoMin, g_plugin.bAutoMin);
CreateLink(chkAutoPopup, g_plugin.bAutoPopup);
+ CreateLink(chkSendFormat, g_plugin.bSendFormat);
CreateLink(chkSaveDrafts, g_plugin.bSaveDrafts);
CreateLink(chkHideContainer, g_plugin.bHideContainer);
CreateLink(chkStayMinimized, g_plugin.bStayMinimized);
diff --git a/plugins/Scriver/src/msgs.h b/plugins/Scriver/src/msgs.h
index 28ec396099..3a71949364 100644
--- a/plugins/Scriver/src/msgs.h
+++ b/plugins/Scriver/src/msgs.h
@@ -132,6 +132,7 @@ public:
void DrawNickList(USERINFO *ui, DRAWITEMSTRUCT *dis) override;
void EventAdded(MEVENT, const DB::EventInfo &dbei) override;
bool GetFirstEvent() override;
+ void GetInputFont(LOGFONTW &lf, COLORREF &bg, COLORREF &fg) const override;
void LoadSettings() override;
void OnOptionsApplied() override;
void RemakeLog() override;
diff --git a/plugins/Scriver/src/msgutils.cpp b/plugins/Scriver/src/msgutils.cpp
index 9167a4f3dd..263afe7da8 100644
--- a/plugins/Scriver/src/msgutils.cpp
+++ b/plugins/Scriver/src/msgutils.cpp
@@ -170,6 +170,12 @@ bool CMsgDialog::GetFirstEvent()
return notifyUnread;
}
+void CMsgDialog::GetInputFont(LOGFONTW &lf, COLORREF &bg, COLORREF &fg) const
+{
+ bg = m_clrInputBG;
+ LoadMsgDlgFont(MSGFONTID_MESSAGEAREA, &lf, &fg);
+}
+
void CMsgDialog::FixTabIcons()
{
HICON hIcon;
diff --git a/plugins/Scriver/src/resource.h b/plugins/Scriver/src/resource.h
index 2f97993ce5..7f5bb9ed3d 100644
--- a/plugins/Scriver/src/resource.h
+++ b/plugins/Scriver/src/resource.h
@@ -127,6 +127,8 @@
#define IDC_NOTIFYTRAY 1607
#define IDC_NOTIFYBALLOON 1608
#define IDC_DELTEMP 1609
+#define IDC_DELTEMP2 1610
+#define IDC_SEND_FORMAT 1610
#define IDC_AVATARSUPPORT 1611
#define IDC_LIMITNAMES 1615
#define IDC_TRANSPARENCY 1616
diff --git a/plugins/Scriver/src/srmm.cpp b/plugins/Scriver/src/srmm.cpp
index 242673aefa..268a3bda76 100644
--- a/plugins/Scriver/src/srmm.cpp
+++ b/plugins/Scriver/src/srmm.cpp
@@ -56,6 +56,7 @@ CMPlugin::CMPlugin() :
bAutoClose(SRMM_MODULE, "AutoClose", false),
bAutoPopup(SRMM_MODULE, "AutoPopupMsg", false),
bSaveDrafts(SRMM_MODULE, "SaveDrafts", false),
+ bSendFormat(SRMM_MODULE, "SendFormat", false),
bTypingUnknown(SRMM_MODULE, "UnknownTyping", false),
bHideContainer(SRMM_MODULE, "HideContainers", false),
bStayMinimized(SRMM_MODULE, "StayMinimized", false),
diff --git a/plugins/Scriver/src/stdafx.h b/plugins/Scriver/src/stdafx.h
index 731e44ad23..15de6bab32 100644
--- a/plugins/Scriver/src/stdafx.h
+++ b/plugins/Scriver/src/stdafx.h
@@ -76,7 +76,7 @@ struct CMPlugin : public PLUGIN<CMPlugin>
CMOption<uint8_t> bUseTransparency, bTopmost, bAutoClose, bTypingNew, bTypingUnknown;
CMOption<uint8_t> bShowTitleBar, bShowStatusBar, bShowToolBar, bShowInfoBar;
CMOption<uint8_t> bShowAvatar, bShowProgress, bShowIcons, bShowTime, bShowSeconds, bShowDate, bLongDate, bRelativeDate;
- CMOption<uint8_t> bGroupMessages, bMarkFollowups, bMsgOnNewline, bDrawLines, bHideNames, bIndentText;
+ CMOption<uint8_t> bGroupMessages, bMarkFollowups, bMsgOnNewline, bDrawLines, bHideNames, bIndentText, bSendFormat;
CMOption<uint8_t> bUseTabs, bLimitTabs, bLimitChatTabs, bLimitNames, bSeparateChats, bTabCloseButton, bHideOneTab, bTabsAtBottom, bSwitchToActive;
CMOption<uint8_t> bShowTyping, bShowTypingWin, bShowTypingTray, bShowTypingClist, bShowTypingSwitch;
CMOption<uint8_t> iFlashCount, iHistoryMode;