From ccde738e49d3102681ab38c6b3e250e9fb57c8bb Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 16 Sep 2024 19:21:57 +0300 Subject: =?UTF-8?q?fixes=20#4675=20(=D0=9D=D0=B5=20=D1=80=D0=B0=D0=B1?= =?UTF-8?q?=D0=BE=D1=82=D0=B0=D1=8E=D1=82=20=D0=BA=D0=BD=D0=BE=D0=BF=D0=BA?= =?UTF-8?q?=D0=B8=20=D1=84=D0=BE=D1=80=D0=BC=D0=B0=D1=82=D0=B8=D1=80=D0=BE?= =?UTF-8?q?=D0=B2=D0=B0=D0=BD=D0=B8=D1=8F=20=D0=B2=20StdMsg/Scriver)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/stdmsg/res/resource.rc | 47 +++++++------ src/core/stdmsg/src/msgdialog.cpp | 9 ++- src/core/stdmsg/src/msgoptions.cpp | 4 +- src/core/stdmsg/src/msgs.h | 1 + src/core/stdmsg/src/resource.h | 4 +- src/core/stdmsg/src/srmm.cpp | 1 + src/core/stdmsg/src/stdafx.h | 2 +- src/core/stdmsg/stdmsg.vcxproj | 44 ++++++++++++ src/core/stdmsg/stdmsg.vcxproj.filters | 124 +++++++++++++++++++++++++++++++++ 9 files changed, 209 insertions(+), 27 deletions(-) (limited to 'src/core/stdmsg') diff --git a/src/core/stdmsg/res/resource.rc b/src/core/stdmsg/res/resource.rc index fc41cbb773..ef192315c9 100644 --- a/src/core/stdmsg/res/resource.rc +++ b/src/core/stdmsg/res/resource.rc @@ -36,29 +36,31 @@ BEGIN CONTROL "Don't steal focus",IDC_DONOTSTEALFOCUS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,22,21,130,10 LTEXT "Maximum number of flashes (0 = indefinite)",IDC_STATIC,7,35,151,8 EDITTEXT IDC_NFLASHES,160,33,25,12,ES_AUTOHSCROLL | ES_NUMBER - CONTROL "Close the message window on send",IDC_AUTOCLOSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,50,289,10 - CONTROL "Minimize the message window on send",IDC_AUTOMIN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,62,289,10 + CONTROL "Close the message window on send",IDC_AUTOCLOSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,50,289,8 + CONTROL "Minimize the message window on send",IDC_AUTOMIN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,62,289,8 CONTROL "Use the contact's status icon as the window icon",IDC_STATUSWIN, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,75,290,10 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,74,290,8 CONTROL "Save the window size and location individually for each contact",IDC_SAVEPERCONTACT, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,88,289,10 - CONTROL "Cascade new windows",IDC_CASCADE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,100,289,10 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,86,289,8 + CONTROL "Cascade new windows",IDC_CASCADE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,98,289,8 CONTROL "Support Ctrl+Up/Down in message area to show previously sent messages",IDC_CTRLSUPPORT, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,112,289,10 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,110,289,8 CONTROL "Delete temporary contacts when closing message window",IDC_DELTEMP, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,124,287,10 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,122,287,8 CONTROL "Enable avatar support in the message window",IDC_AVATARSUPPORT, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,137,289,10 - CONTROL "Limit avatar height to",IDC_LIMITAVATARH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,22,151,126,10 - EDITTEXT IDC_AVATARHEIGHT,150,150,28,13,ES_AUTOHSCROLL - LTEXT "pixels",IDC_STATIC,183,152,35,8 - CONTROL "Show 'Send' button",IDC_SHOWSENDBTN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,166,135,10 - CONTROL "Show character count",IDC_CHARCOUNT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,179,135,10 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,135,289,8 + CONTROL "Limit avatar height to",IDC_LIMITAVATARH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,22,148,126,10 + EDITTEXT IDC_AVATARHEIGHT,150,146,28,13,ES_AUTOHSCROLL + LTEXT "pixels",IDC_STATIC,183,148,35,8 + CONTROL "Show 'Send' button",IDC_SHOWSENDBTN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,161,289,8 + 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,192,139,10 - LTEXT "Show warning when message has not been received after",IDC_STATIC,8,208,211,8 - EDITTEXT IDC_SECONDS,223,206,25,12,ES_AUTOHSCROLL - LTEXT "seconds",IDC_STATIC,253,208,44,8 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,185,289,8 + CONTROL "Use BBCodes to send format inside 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 END IDD_MSGSENDERROR DIALOGEX 0, 0, 187, 110 @@ -243,12 +245,6 @@ GUIDELINES DESIGNINFO BEGIN IDD_OPT_MSGDLG, DIALOG BEGIN - VERTGUIDE, 7 - VERTGUIDE, 22 - VERTGUIDE, 51 - VERTGUIDE, 148 - VERTGUIDE, 297 - VERTGUIDE, 300 BOTTOMMARGIN, 231 END @@ -519,6 +515,11 @@ BEGIN 0 END +IDD_OPT_MSGDLG AFX_DIALOG_LAYOUT +BEGIN + 0 +END + #endif // English (United States) resources ///////////////////////////////////////////////////////////////////////////// diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index eedfacbb33..b7cdfbdc3c 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -71,6 +71,7 @@ void CMsgDialog::Init() m_autoClose = 0; m_forceResizable = true; m_bNoActivate = g_plugin.bDoNotStealFocus; + m_bSendFormat = g_plugin.bSendFormat; g_arDialogs.insert(this); @@ -319,7 +320,7 @@ void CMsgDialog::onClick_Ok(CCtrlButton *pButton) if (isChat()) { CMStringW ptszText(ptrW(mir_utf8decodeW(msgText))); - g_chatApi.DoRtfToTags(ptszText, 0, nullptr); + DoRtfToTags(ptszText); ptszText.Trim(); m_cmdList.insert(mir_wstrdup(ptszText)); @@ -1320,6 +1321,12 @@ bool CMsgDialog::GetFirstEvent() return true; } +void CMsgDialog::GetInputFont(LOGFONTW &lf, COLORREF &bg, COLORREF &fg) const +{ + bg = g_plugin.getDword(SRMSGSET_BKGCOLOUR, SRMSGDEFSET_BKGCOLOUR); + LoadMsgDlgFont(MSGFONTID_MESSAGEAREA, &lf, &fg); +} + void CMsgDialog::NotifyTyping(int mode) { if (!m_hContact) diff --git a/src/core/stdmsg/src/msgoptions.cpp b/src/core/stdmsg/src/msgoptions.cpp index 2eae075286..a73eaf6d40 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; + CCtrlCheck chkDelTemp, chkCascade, chkCharCount, chkCtrlSupport, chkSendFormat; CCtrlCheck chkAvatar, chkLimitAvatar; CCtrlCheck chkShowSend, chkShowButtons; @@ -199,6 +199,7 @@ 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), @@ -225,6 +226,7 @@ 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/msgs.h b/src/core/stdmsg/src/msgs.h index 315709ed02..440d13f7b4 100644 --- a/src/core/stdmsg/src/msgs.h +++ b/src/core/stdmsg/src/msgs.h @@ -138,6 +138,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; bool IsActive() const override; void LoadSettings() override; void OnOptionsApplied() override; diff --git a/src/core/stdmsg/src/resource.h b/src/core/stdmsg/src/resource.h index dbdb870663..8e5b4ea0d7 100644 --- a/src/core/stdmsg/src/resource.h +++ b/src/core/stdmsg/src/resource.h @@ -79,6 +79,8 @@ #define IDC_LOADCOUNTSPIN 1040 #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 @@ -196,7 +198,7 @@ // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 291 +#define _APS_NEXT_RESOURCE_VALUE 293 #define _APS_NEXT_COMMAND_VALUE 40019 #define _APS_NEXT_CONTROL_VALUE 1620 #define _APS_NEXT_SYMED_VALUE 101 diff --git a/src/core/stdmsg/src/srmm.cpp b/src/core/stdmsg/src/srmm.cpp index 63d7e2481f..fef28a5a02 100644 --- a/src/core/stdmsg/src/srmm.cpp +++ b/src/core/stdmsg/src/srmm.cpp @@ -64,6 +64,7 @@ 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 27a9c076e3..bfdf282fe5 100644 --- a/src/core/stdmsg/src/stdafx.h +++ b/src/core/stdmsg/src/stdafx.h @@ -162,7 +162,7 @@ struct CMPlugin : public PLUGIN // private chat log options CMOption bShowButtons, bSendButton, bShowTyping, bShowTypingWin, bShowTypingTray, bShowTypingClist; CMOption bShowIcons, bShowTime, bShowDate, bShowAvatar, bShowNames, bShowSecs, bShowReadChar; - CMOption bAutoClose, bAutoMin, bTypingNew, bTypingUnknown, bCtrlSupport, bShowFormat; + CMOption bAutoClose, bAutoMin, bTypingNew, bTypingUnknown, bCtrlSupport, bShowFormat, bSendFormat; CMOption bSavePerContact, bDoNotStealFocus, bCascade, bDeleteTempCont, bUseStatusWinIcon, bAutoCopy; CMOption bLimitAvatarHeight; diff --git a/src/core/stdmsg/stdmsg.vcxproj b/src/core/stdmsg/stdmsg.vcxproj index c083c48a66..6e5440ec01 100644 --- a/src/core/stdmsg/stdmsg.vcxproj +++ b/src/core/stdmsg/stdmsg.vcxproj @@ -53,4 +53,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/core/stdmsg/stdmsg.vcxproj.filters b/src/core/stdmsg/stdmsg.vcxproj.filters index 1996b04a19..68c5c47780 100644 --- a/src/core/stdmsg/stdmsg.vcxproj.filters +++ b/src/core/stdmsg/stdmsg.vcxproj.filters @@ -73,4 +73,128 @@ Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + + + Resource Files + + + Resource Files + + + Resource Files + + \ No newline at end of file -- cgit v1.2.3