diff options
author | George Hazan <george.hazan@gmail.com> | 2023-12-03 15:47:12 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-12-03 15:47:12 +0300 |
commit | 0805744c4b2f73149d27f5fbadb767d3d5bd50b1 (patch) | |
tree | fed632071267b83ece5bb710c2c1f08d9c477cba /src/core | |
parent | 6936e530d411a5d516e13e86022fb064dd342f77 (diff) |
SRMM: quote panel
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/stdmsg/res/resource.rc | 17 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgdialog.cpp | 42 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgs.h | 2 | ||||
-rw-r--r-- | src/core/stdmsg/src/resource.h | 16 |
4 files changed, 57 insertions, 20 deletions
diff --git a/src/core/stdmsg/res/resource.rc b/src/core/stdmsg/res/resource.rc index 5a567442a8..48b936936b 100644 --- a/src/core/stdmsg/res/resource.rc +++ b/src/core/stdmsg/res/resource.rc @@ -1,7 +1,6 @@ // Microsoft Visual C++ generated resource script.
//
#include "..\src\resource.h"
-#include "..\..\include\chat_resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
@@ -9,6 +8,7 @@ // Generated from the TEXTINCLUDE 2 resource.
//
#include <winres.h>
+#include "..\..\include\chat_resource.h"
#include "..\..\include\statusmodes.h"
/////////////////////////////////////////////////////////////////////////////
@@ -82,12 +82,14 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN
CONTROL "",IDC_SRMM_MESSAGE,"RichEdit50W",WS_VSCROLL | WS_TABSTOP | 0x1144,1,111,208,29,WS_EX_ACCEPTFILES | WS_EX_STATICEDGE
LTEXT "",IDC_FRAME,1,111,208,29,NOT WS_VISIBLE | WS_CLIPSIBLINGS
- DEFPUSHBUTTON "&Send",IDOK,212,111,39,29
- CONTROL "",IDC_SRMM_LOG,"RichEdit50W",WS_VSCROLL | WS_TABSTOP | 0x844,1,16,250,91,WS_EX_STATICEDGE
- CONTROL "",IDC_SPLITTERX,"Static",SS_ENHMETAFILE,172,23,10,73
- CONTROL "",IDC_SPLITTERY,"Static",SS_ENHMETAFILE,0,108,251,2
+ DEFPUSHBUTTON "&Send",IDOK,212,110,39,29
+ CONTROL "",IDC_SRMM_LOG,"RichEdit50W",WS_VSCROLL | WS_TABSTOP | 0x844,1,5,175,91,WS_EX_STATICEDGE
+ CONTROL "",IDC_SPLITTERX,"Static",SS_ENHMETAFILE,180,4,2,89
+ CONTROL "",IDC_SPLITTERY,"Static",SS_ENHMETAFILE,0,108,251,1
LISTBOX IDC_SRMM_NICKLIST,182,2,69,94,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | NOT WS_BORDER | WS_VSCROLL | WS_TABSTOP,WS_EX_STATICEDGE
CONTROL "",IDC_AVATAR,"Button",BS_OWNERDRAW | NOT WS_VISIBLE,1,127,6,13
+ CONTROL "",IDC_SRMM_QUOTE,"RichEdit50W",ES_AUTOHSCROLL | WS_DISABLED | WS_BORDER | WS_TABSTOP,0,95,235,16
+ CONTROL "",IDC_SRMM_CLOSEQUOTE,"MButtonClass", WS_TABSTOP,237,97,16,16
END
IDD_OPT_MSGHIST DIALOGEX 0, 0, 311, 171
@@ -336,13 +338,14 @@ END 1 TEXTINCLUDE
BEGIN
- "..\\sxr\\resource.h\0"
+ "..\\src\\resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include <winres.h>\r\n"
- "#include ""statusmodes.h""\r\n"
+ "#include ""..\\..\\include\\chat_resource.h""\r\n"
+ "#include ""..\\..\\include\\statusmodes.h""\r\n"
"\0"
END
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index ad51592f24..c9caf7fe33 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -489,16 +489,34 @@ LBL_CalcBottom: return RD_ANCHORX_WIDTH | RD_ANCHORY_CUSTOM;
case IDC_SRMM_MESSAGE:
- case IDC_FRAME:
urc->rcItem.right = bSend ? urc->dlgNewSize.cx - 64 : urc->dlgNewSize.cx;
urc->rcItem.top = underTB;
+ if (m_hQuoteEvent)
+ urc->rcItem.top += 22;
urc->rcItem.bottom = urc->dlgNewSize.cy - 1;
if (g_plugin.bShowAvatar && m_avatarPic)
urc->rcItem.left = m_avatarWidth + 4;
- if (urc->wId == IDC_FRAME) {
- urc->rcItem.left--; urc->rcItem.top--;
- urc->rcItem.right++; urc->rcItem.bottom++;
- }
+ m_rcMessage = urc->rcItem;
+ return RD_ANCHORX_CUSTOM | RD_ANCHORY_CUSTOM;
+
+ case IDC_SRMM_QUOTE:
+ urc->rcItem = m_rcMessage;
+ urc->rcItem.top -= 22;
+ urc->rcItem.bottom = m_rcMessage.top;
+ urc->rcItem.right -= 22;
+ return RD_ANCHORX_CUSTOM | RD_ANCHORY_CUSTOM;
+
+ case IDC_SRMM_CLOSEQUOTE:
+ urc->rcItem = m_rcMessage;
+ urc->rcItem.top -= 22;
+ urc->rcItem.bottom = m_rcMessage.top;
+ urc->rcItem.left = m_rcMessage.right - 22;
+ return RD_ANCHORX_CUSTOM | RD_ANCHORY_CUSTOM;
+
+ case IDC_FRAME:
+ urc->rcItem = m_rcMessage;
+ urc->rcItem.left--; urc->rcItem.top--;
+ urc->rcItem.right++; urc->rcItem.bottom++;
return RD_ANCHORX_CUSTOM | RD_ANCHORY_CUSTOM;
case IDC_AVATAR:
@@ -871,12 +889,14 @@ LRESULT CMsgDialog::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam) }
break;
- case WM_SETFOCUS: {
- const char* enc = (const char*)CallProtoService(m_szProto, PS_GETCAPS, PFLAG_GETCURRENTENCRYPTION, m_hContact);
- if (enc == (const char *)CALLSERVICE_NOTFOUND)
- enc = nullptr;
- ShowWindow(GetDlgItem(m_hwnd, IDC_FRAME), enc ? SW_SHOW : SW_HIDE);
- }
+ case WM_SETFOCUS:
+ {
+ const char *enc = (const char *)CallProtoService(m_szProto, PS_GETCAPS, PFLAG_GETCURRENTENCRYPTION, m_hContact);
+ if (enc == (const char *)CALLSERVICE_NOTFOUND)
+ enc = nullptr;
+ ShowWindow(GetDlgItem(m_hwnd, IDC_FRAME), enc ? SW_SHOW : SW_HIDE);
+ }
+ break;
case WM_KEYDOWN:
bool isShift = (GetKeyState(VK_SHIFT) & 0x8000) != 0;
diff --git a/src/core/stdmsg/src/msgs.h b/src/core/stdmsg/src/msgs.h index 48c68fe5a9..5e40d57e0a 100644 --- a/src/core/stdmsg/src/msgs.h +++ b/src/core/stdmsg/src/msgs.h @@ -60,7 +60,7 @@ class CMsgDialog : public CSrmmBaseDialog int m_iSplitterX, m_iSplitterY;
SIZE m_minEditBoxSize;
RECT m_minEditInit;
- RECT m_rcLog;
+ RECT m_rcLog, m_rcMessage;
// tab autocomplete
int m_iTabStart = 0;
diff --git a/src/core/stdmsg/src/resource.h b/src/core/stdmsg/src/resource.h index e0436a8abd..aaefd5ce20 100644 --- a/src/core/stdmsg/src/resource.h +++ b/src/core/stdmsg/src/resource.h @@ -1,6 +1,6 @@ //{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
-// Used by resource.rc
+// Used by W:\miranda-ng\src\core\stdmsg\res\resource.rc
//
#define IDD_MSGSENDERROR 102
#define IDD_OPTIONS2 103
@@ -151,6 +151,20 @@ #define IDC_USETABS 1620
#define IDC_CLOSETABS 1621
#define IDC_TABSBOTTOM 1623
+#define IDC_SRMM_COLOR 3001
+#define IDC_SRMM_BKGCOLOR 3002
+#define IDC_SRMM_BOLD 3003
+#define IDC_SRMM_ITALICS 3004
+#define IDC_SRMM_UNDERLINE 3005
+#define IDC_SRMM_FILTER 3006
+#define IDC_SRMM_CHANMGR 3007
+#define IDC_SRMM_SHOWNICKLIST 3008
+#define IDC_SRMM_HISTORY 3009
+#define IDC_SRMM_NICKLIST 3010
+#define IDC_SRMM_LOG 3011
+#define IDC_SRMM_MESSAGE 3012
+#define IDC_SRMM_QUOTE 3013
+#define IDC_SRMM_CLOSEQUOTE 3014
#define IDM_CUT 40000
#define IDM_COPY 40001
#define IDM_PASTE 40002
|