summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2023-03-30 13:29:59 +0300
committerGeorge Hazan <ghazan@miranda.im>2023-03-30 13:29:59 +0300
commit3b358f31e21e97978db552a2535c056d866b51cf (patch)
tree53a396f90dc685c6fd664bde117e2511c3f7030c /src/core
parent7c437a1c960f301af9596e06e505c24b02ae266d (diff)
massive code cleaning after regression caused by #3210
Diffstat (limited to 'src/core')
-rw-r--r--src/core/stdmsg/res/resource.rc71
-rw-r--r--src/core/stdmsg/src/msglog.cpp12
-rw-r--r--src/core/stdmsg/src/msgoptions.cpp4
-rw-r--r--src/core/stdmsg/src/resource.h3
-rw-r--r--src/core/stdmsg/src/srmm.cpp1
-rw-r--r--src/core/stdmsg/src/stdafx.h2
6 files changed, 46 insertions, 47 deletions
diff --git a/src/core/stdmsg/res/resource.rc b/src/core/stdmsg/res/resource.rc
index 6da7098b6f..caf2ea092c 100644
--- a/src/core/stdmsg/res/resource.rc
+++ b/src/core/stdmsg/res/resource.rc
@@ -34,10 +34,8 @@ BEGIN
LTEXT "Automatically popup window when:",IDC_STATIC,7,7,141,13
CONTROL "",IDC_POPLIST,"SysTreeView32",TVS_DISABLEDRAGDROP | TVS_NOTOOLTIPS | TVS_NOHSCROLL | TVS_NONEVENHEIGHT | WS_BORDER | WS_TABSTOP,199,6,98,42
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,141,8
EDITTEXT IDC_NFLASHES,150,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 "Use the contact's status icon as the window icon",IDC_STATUSWIN,
@@ -51,15 +49,13 @@ BEGIN
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,124,287,10
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
- CONTROL "Show toolbar buttons on top row",IDC_SHOWBUTTONLINE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,192,139,10
-
+ 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
@@ -93,27 +89,28 @@ BEGIN
CONTROL "",IDC_AVATAR,"Button",BS_OWNERDRAW | NOT WS_VISIBLE,1,127,6,13
END
-IDD_OPT_MSGLOG DIALOGEX 0, 0, 311, 164
+IDD_OPT_MSGLOG DIALOGEX 0, 0, 311, 171
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
- GROUPBOX "Message window event log",IDC_STMSGLOGGROUP,4,5,303,94
- CONTROL "Show icons",IDC_SHOWLOGICONS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,17,154,10
- CONTROL "Show names",IDC_SHOWNAMES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,29,154,10
- CONTROL "Show timestamp",IDC_SHOWTIMES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,41,154,10
- CONTROL "Show seconds",IDC_SHOWSECS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,53,143,10
- CONTROL "Show dates",IDC_SHOWDATES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,65,143,10
- CONTROL "Show formatting",IDC_SHOWFORMATTING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,77,126,10
- GROUPBOX "Load history events",IDC_STATIC,4,101,303,58
- CONTROL "Load unread events only",IDC_LOADUNREAD,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,8,113,138,10
- CONTROL "Load number of previous events",IDC_LOADCOUNT,"Button",BS_AUTORADIOBUTTON,8,125,138,10
- EDITTEXT IDC_LOADCOUNTN,151,124,33,12,ES_RIGHT | ES_NUMBER | WS_DISABLED
- CONTROL "Spin1",IDC_LOADCOUNTSPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK | WS_DISABLED,174,147,11,14
- CONTROL "Load previous events less than",IDC_LOADTIME,"Button",BS_AUTORADIOBUTTON,8,137,141,10
- EDITTEXT IDC_LOADTIMEN,151,136,33,12,ES_RIGHT | ES_NUMBER | WS_DISABLED
- CONTROL "Spin1",IDC_LOADTIMESPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK | WS_DISABLED,174,163,11,14
- LTEXT "minutes old",IDC_STMINSOLD,189,138,82,8,WS_DISABLED
+ GROUPBOX "Message window event log",IDC_STMSGLOGGROUP,4,5,303,101
+ CONTROL "Show icons",IDC_SHOWLOGICONS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,17,280,10
+ CONTROL "Show names",IDC_SHOWNAMES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,29,280,10
+ CONTROL "Show timestamp",IDC_SHOWTIMES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,41,280,10
+ CONTROL "Show seconds",IDC_SHOWSECS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,53,268,10
+ CONTROL "Show dates",IDC_SHOWDATES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,65,268,10
+ CONTROL "Show formatting",IDC_SHOWFORMATTING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,77,280,10
+ GROUPBOX "Load history events",IDC_STATIC,4,110,303,52
+ CONTROL "Load unread events only",IDC_LOADUNREAD,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,8,122,138,10
+ CONTROL "Load number of previous events",IDC_LOADCOUNT,"Button",BS_AUTORADIOBUTTON,8,134,138,10
+ EDITTEXT IDC_LOADCOUNTN,151,133,33,12,ES_RIGHT | ES_NUMBER | WS_DISABLED
+ CONTROL "Spin1",IDC_LOADCOUNTSPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK | WS_DISABLED,185,132,11,14
+ CONTROL "Load previous events less than",IDC_LOADTIME,"Button",BS_AUTORADIOBUTTON,8,146,141,10
+ EDITTEXT IDC_LOADTIMEN,151,145,33,12,ES_RIGHT | ES_NUMBER | WS_DISABLED
+ CONTROL "Spin1",IDC_LOADTIMESPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK | WS_DISABLED,184,144,11,14
+ LTEXT "minutes old",IDC_STMINSOLD,189,147,82,8,WS_DISABLED
+ CONTROL "Automatically copy selected text",IDC_AUTOCOPY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,90,280,10
END
IDD_OPT_TABS DIALOGEX 0, 0, 283, 80
@@ -216,6 +213,7 @@ BEGIN
CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,183,178,11,14
END
+
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
@@ -252,11 +250,7 @@ BEGIN
IDD_OPT_MSGLOG, DIALOG
BEGIN
- VERTGUIDE, 10
- VERTGUIDE, 148
- VERTGUIDE, 156
- VERTGUIDE, 169
- VERTGUIDE, 300
+ BOTTOMMARGIN, 162
END
IDD_OPT_MSGTYPE, DIALOG
@@ -266,22 +260,6 @@ BEGIN
TOPMARGIN, 7
END
- IDD_CHANNEL, DIALOG
- BEGIN
- RIGHTMARGIN, 251
- VERTGUIDE, 8
- VERTGUIDE, 172
- VERTGUIDE, 182
- VERTGUIDE, 237
- HORZGUIDE, 8
- HORZGUIDE, 23
- HORZGUIDE, 70
- HORZGUIDE, 96
- HORZGUIDE, 102
- HORZGUIDE, 108
- HORZGUIDE, 121
- END
-
IDD_CONTAINER, DIALOG
BEGIN
END
@@ -519,6 +497,11 @@ BEGIN
0
END
+IDD_OPT_MSGLOG AFX_DIALOG_LAYOUT
+BEGIN
+ 0
+END
+
#endif // English (United States) resources
/////////////////////////////////////////////////////////////////////////////
diff --git a/src/core/stdmsg/src/msglog.cpp b/src/core/stdmsg/src/msglog.cpp
index f97f361bb6..149b4ef18a 100644
--- a/src/core/stdmsg/src/msglog.cpp
+++ b/src/core/stdmsg/src/msglog.cpp
@@ -617,6 +617,18 @@ INT_PTR CLogWindow::WndProc(UINT msg, WPARAM wParam, LPARAM lParam)
}
break;
+ case WM_LBUTTONUP:
+ if (g_plugin.bAutoCopy) {
+ m_rtf.SendMsg(EM_EXGETSEL, 0, (LPARAM)&sel);
+ if (sel.cpMin != sel.cpMax) {
+ m_rtf.SendMsg(WM_COPY, 0, 0);
+ sel.cpMin = sel.cpMax;
+ m_rtf.SendMsg(EM_EXSETSEL, 0, (LPARAM)&sel);
+ }
+ SetFocus(m_pDlg.m_message.GetHwnd());
+ }
+ break;
+
case WM_KEYDOWN:
bool isShift = (GetKeyState(VK_SHIFT) & 0x8000) != 0;
bool isCtrl = (GetKeyState(VK_CONTROL) & 0x8000) != 0;
diff --git a/src/core/stdmsg/src/msgoptions.cpp b/src/core/stdmsg/src/msgoptions.cpp
index 2a645aee61..2988457505 100644
--- a/src/core/stdmsg/src/msgoptions.cpp
+++ b/src/core/stdmsg/src/msgoptions.cpp
@@ -301,7 +301,7 @@ class COptionLogDlg : public CDlgBase
HBRUSH hBkgColourBrush;
CCtrlCheck chkLoadUnread, chkLoadCount, chkLoadTime, chkDate, chkTime, chkSecs, chkIcons;
- CCtrlCheck chkShowNames, chkFormat;
+ CCtrlCheck chkShowNames, chkFormat, chkAutoCopy;
CCtrlSpin spinCount, spinTime;
public:
@@ -312,6 +312,7 @@ public:
chkTime(this, IDC_SHOWTIMES),
chkIcons(this, IDC_SHOWLOGICONS),
chkFormat(this, IDC_SHOWFORMATTING),
+ chkAutoCopy(this, IDC_AUTOCOPY),
chkLoadTime(this, IDC_LOADTIME),
chkShowNames(this, IDC_SHOWNAMES),
chkLoadCount(this, IDC_LOADCOUNT),
@@ -328,6 +329,7 @@ public:
CreateLink(chkTime, g_plugin.bShowTime);
CreateLink(chkIcons, g_plugin.bShowIcons);
CreateLink(chkFormat, g_plugin.bShowFormat);
+ CreateLink(chkAutoCopy, g_plugin.bAutoCopy);
CreateLink(chkShowNames, g_plugin.bShowNames);
}
diff --git a/src/core/stdmsg/src/resource.h b/src/core/stdmsg/src/resource.h
index dd65d2d386..457d5b3e3b 100644
--- a/src/core/stdmsg/src/resource.h
+++ b/src/core/stdmsg/src/resource.h
@@ -53,6 +53,7 @@
#define IDI_INCOMING 276
#define IDI_OUTGOING 277
#define IDI_EXCL 282
+#define IDC_AUTOCOPY 1001
#define IDC_SPLITTERX 1003
#define IDC_AUTOCLOSE 1004
#define IDC_AUTOMIN 1005
@@ -60,7 +61,7 @@
#define IDC_SPLITTERY 1008
#define IDC_CHECKBOXES 1018
#define IDC_NICKLISTBKG 1021
-#define IDC_NICKROW 1024
+#define IDC_NICKROW 1022
#define IDC_LOGLIMIT 1024
#define IDC_NICKROW2 1025
#define IDC_SHOWNAMES 1026
diff --git a/src/core/stdmsg/src/srmm.cpp b/src/core/stdmsg/src/srmm.cpp
index 0731ff17ae..f76b4b8c85 100644
--- a/src/core/stdmsg/src/srmm.cpp
+++ b/src/core/stdmsg/src/srmm.cpp
@@ -60,6 +60,7 @@ CMPlugin::CMPlugin() :
bCascade(SRMM_MODULE, "Cascade", true),
bAutoMin(SRMM_MODULE, "AutoMin", false),
+ bAutoCopy(SRMM_MODULE, "AutoCopy", true),
bAutoClose(SRMM_MODULE, "AutoClose", false),
bShowNames(SRMM_MODULE, "ShowNames", false),
bShowFormat(SRMM_MODULE, "ShowFormatting", true),
diff --git a/src/core/stdmsg/src/stdafx.h b/src/core/stdmsg/src/stdafx.h
index 130dc2e4a3..8e2b93764c 100644
--- a/src/core/stdmsg/src/stdafx.h
+++ b/src/core/stdmsg/src/stdafx.h
@@ -156,7 +156,7 @@ struct CMPlugin : public PLUGIN<CMPlugin>
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;
- CMOption<bool> bSavePerContact, bDoNotStealFocus, bCascade, bDeleteTempCont, bUseStatusWinIcon;
+ CMOption<bool> bSavePerContact, bDoNotStealFocus, bCascade, bDeleteTempCont, bUseStatusWinIcon, bAutoCopy;
CMOption<bool> bLimitAvatarHeight;
CMOption<uint16_t> iAvatarHeight;