summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-06-04 14:25:47 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-06-04 14:25:47 +0300
commite7bfca36fab763870bf30240ce279beca69a1ad1 (patch)
treee7a99a64da8f32aa02913ad280fbc17a7565b0aa /plugins
parent4b6f2b43bcfbe2bc8202723e301d6a68f48c10bd (diff)
Scriver:
- fixes #1404 (Scriver: cannot change "Send message on" settings) - fixes #1405 (Scriver: add "Send message on Ctrl+Enter")
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Scriver/res/resource.rc37
-rw-r--r--plugins/Scriver/src/msgoptions.cpp20
-rw-r--r--plugins/Scriver/src/msgs.h2
-rw-r--r--plugins/Scriver/src/resource.h7
4 files changed, 41 insertions, 25 deletions
diff --git a/plugins/Scriver/res/resource.rc b/plugins/Scriver/res/resource.rc
index 386ab3330b..f352a038b6 100644
--- a/plugins/Scriver/res/resource.rc
+++ b/plugins/Scriver/res/resource.rc
@@ -25,30 +25,31 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
// Dialog
//
-IDD_OPT_MSGDLG DIALOGEX 2, 0, 304, 230
+IDD_OPT_MSGDLG DIALOGEX 2, 0, 304, 186
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
- GROUPBOX "Behavior",IDC_STATIC,0,0,304,176
+ GROUPBOX "Behavior",IDC_STATIC,0,0,304,182
CONTROL "Automatically pop up the window when",IDC_AUTOPOPUP,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,12,155,10
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,12,155,10
CONTROL "Tree1",IDC_POPLIST,"SysTreeView32",TVS_DISABLEDRAGDROP | TVS_NOTOOLTIPS | TVS_NONEVENHEIGHT | WS_BORDER | WS_HSCROLL | WS_TABSTOP,163,12,98,44
CONTROL "and stay minimized",IDC_STAYMINIMIZED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,23,141,10
- CONTROL "Cascade new windows",IDC_CASCADE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,58,292,10
+ CONTROL "Cascade new windows",IDC_CASCADE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,58,293,10
CONTROL "Save size and location for each contact",IDC_SAVEPERCONTACT,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,69,292,10
- CONTROL "Minimize on send",IDC_AUTOMIN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,80,292,10
- CONTROL "Hide windows on close",IDC_HIDECONTAINERS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,91,292,10
- CONTROL "Send message on 'Enter'",IDC_SENDONENTER,"Button", BS_AUTORADIOBUTTON | WS_TABSTOP,8,102,292,10
- CONTROL "Send message on double 'Enter'",IDC_SENDONDBLENTER, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP,8,113,292,10
- CONTROL "Remember unsent messages",IDC_SAVEDRAFTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,124,292,10
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,69,293,10
+ CONTROL "Minimize on send",IDC_AUTOMIN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,80,293,10
+ CONTROL "Hide windows on close",IDC_HIDECONTAINERS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,91,293,10
+ CONTROL "Remember unsent messages",IDC_SAVEDRAFTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,103,293,10
CONTROL "Delete temporary contacts on closing",IDC_DELTEMP,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,135,292,10
- LTEXT "Show warning when message has not been received after",IDC_STATIC,8,148,201,8
- EDITTEXT IDC_SECONDS,213,146,35,12,ES_RIGHT | ES_NUMBER
- CONTROL "",IDC_SECONDSSPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,239,146,11,14
- LTEXT "seconds",IDC_STATIC,253,148,44,8
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,114,293,10
+ LTEXT "Show warning when message has not been received after",IDC_STATIC,6,127,201,8
+ EDITTEXT IDC_SECONDS,213,125,35,12,ES_RIGHT | ES_NUMBER
+ CONTROL "",IDC_SECONDSSPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,239,125,11,14
+ LTEXT "seconds",IDC_STATIC,253,127,44,8
+ CONTROL "Send message on 'Enter'",IDC_SENDONENTER,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,6,144,293,10
+ CONTROL "Send message on double 'Enter'",IDC_SENDONDBLENTER,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,6,156,293,10
+ CONTROL "Send message on 'Ctrl+Enter'",IDC_SENDONCTRLENTER,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,6,168,293,10
END
IDD_OPT_MSGTABS DIALOGEX 2, 0, 304, 230
@@ -333,11 +334,11 @@ GUIDELINES DESIGNINFO
BEGIN
IDD_OPT_MSGDLG, DIALOG
BEGIN
- VERTGUIDE, 8
+ VERTGUIDE, 6
VERTGUIDE, 22
VERTGUIDE, 51
- VERTGUIDE, 148
- VERTGUIDE, 300
+ VERTGUIDE, 90
+ VERTGUIDE, 299
END
IDD_OPT_MSGTABS, DIALOG
diff --git a/plugins/Scriver/src/msgoptions.cpp b/plugins/Scriver/src/msgoptions.cpp
index 44b1c84b95..2121c632df 100644
--- a/plugins/Scriver/src/msgoptions.cpp
+++ b/plugins/Scriver/src/msgoptions.cpp
@@ -225,6 +225,7 @@ static const struct CheckBoxValues_t statusValues[] =
class CMainOptionsDlg : public CBaseOptionDlg
{
CCtrlCheck chkAutoPopup, chkCascade, chkSavePerContact;
+ CCtrlCheck chkSendOnEnter, chkSendOnDblEnter, chkSendOnCtrlEnter;
CCtrlTreeView m_tree;
void FillCheckBoxTree(const struct CheckBoxValues_t *values, int nValues, DWORD style)
@@ -263,6 +264,9 @@ public:
m_tree(this, IDC_POPLIST),
chkCascade(this, IDC_CASCADE),
chkAutoPopup(this, IDC_AUTOPOPUP),
+ chkSendOnEnter(this, IDC_SENDONENTER),
+ chkSendOnDblEnter(this, IDC_SENDONDBLENTER),
+ chkSendOnCtrlEnter(this, IDC_SENDONCTRLENTER),
chkSavePerContact(this, IDC_SAVEPERCONTACT)
{
chkCascade.OnChange = Callback(this, &CMainOptionsDlg::onChange_Cascade);
@@ -275,19 +279,25 @@ public:
SetWindowLongPtr(m_tree.GetHwnd(), GWL_STYLE, (GetWindowLongPtr(m_tree.GetHwnd(), GWL_STYLE) & ~WS_BORDER) | TVS_NOHSCROLL | TVS_CHECKBOXES);
FillCheckBoxTree(statusValues, _countof(statusValues), db_get_dw(0, SRMM_MODULE, SRMSGSET_POPFLAGS, SRMSGDEFSET_POPFLAGS));
chkAutoPopup.SetState(db_get_b(0, SRMM_MODULE, SRMSGSET_AUTOPOPUP, SRMSGDEFSET_AUTOPOPUP));
+
CheckDlgButton(m_hwnd, IDC_STAYMINIMIZED, db_get_b(0, SRMM_MODULE, SRMSGSET_STAYMINIMIZED, SRMSGDEFSET_STAYMINIMIZED) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(m_hwnd, IDC_AUTOMIN, db_get_b(0, SRMM_MODULE, SRMSGSET_AUTOMIN, SRMSGDEFSET_AUTOMIN) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(m_hwnd, IDC_SAVEDRAFTS, db_get_b(0, SRMM_MODULE, SRMSGSET_SAVEDRAFTS, SRMSGDEFSET_SAVEDRAFTS) ? BST_CHECKED : BST_UNCHECKED);
-
+ CheckDlgButton(m_hwnd, IDC_HIDECONTAINERS, db_get_b(0, SRMM_MODULE, SRMSGSET_HIDECONTAINERS, SRMSGDEFSET_HIDECONTAINERS) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(m_hwnd, IDC_DELTEMP, db_get_b(0, SRMM_MODULE, SRMSGSET_DELTEMP, SRMSGDEFSET_DELTEMP) ? BST_CHECKED : BST_UNCHECKED);
+
SendDlgItemMessage(m_hwnd, IDC_SECONDSSPIN, UDM_SETRANGE, 0, MAKELONG(60, 4));
SendDlgItemMessage(m_hwnd, IDC_SECONDSSPIN, UDM_SETPOS, 0, db_get_dw(0, SRMM_MODULE, SRMSGSET_MSGTIMEOUT, SRMSGDEFSET_MSGTIMEOUT) / 1000);
chkCascade.SetState(db_get_b(0, SRMM_MODULE, SRMSGSET_CASCADE, SRMSGDEFSET_CASCADE));
chkSavePerContact.SetState(db_get_b(0, SRMM_MODULE, SRMSGSET_SAVEPERCONTACT, SRMSGDEFSET_SAVEPERCONTACT));
- CheckDlgButton(m_hwnd, IDC_SENDONENTER, db_get_b(0, SRMM_MODULE, SRMSGSET_SENDONENTER, SRMSGDEFSET_SENDONENTER) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(m_hwnd, IDC_SENDONDBLENTER, db_get_b(0, SRMM_MODULE, SRMSGSET_SENDONDBLENTER, SRMSGDEFSET_SENDONDBLENTER) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(m_hwnd, IDC_HIDECONTAINERS, db_get_b(0, SRMM_MODULE, SRMSGSET_HIDECONTAINERS, SRMSGDEFSET_HIDECONTAINERS) ? BST_CHECKED : BST_UNCHECKED);
+
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_SENDONENTER, SRMSGDEFSET_SENDONENTER))
+ CheckDlgButton(m_hwnd, IDC_SENDONENTER, BST_CHECKED);
+ else if (db_get_b(0, SRMM_MODULE, SRMSGSET_SENDONDBLENTER, SRMSGDEFSET_SENDONDBLENTER))
+ CheckDlgButton(m_hwnd, IDC_SENDONDBLENTER, BST_CHECKED);
+ else
+ CheckDlgButton(m_hwnd, IDC_SENDONCTRLENTER, BST_CHECKED);
onChange_AutoPopup(0);
}
@@ -305,6 +315,8 @@ public:
db_set_b(0, SRMM_MODULE, SRMSGSET_SENDONENTER, (BYTE)IsDlgButtonChecked(m_hwnd, IDC_SENDONENTER));
db_set_b(0, SRMM_MODULE, SRMSGSET_SENDONDBLENTER, (BYTE)IsDlgButtonChecked(m_hwnd, IDC_SENDONDBLENTER));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_SENDONCTRLENTER, (BYTE)IsDlgButtonChecked(m_hwnd, IDC_SENDONCTRLENTER));
+
db_set_b(0, SRMM_MODULE, SRMSGSET_SAVEPERCONTACT, chkSavePerContact.GetState());
db_set_b(0, SRMM_MODULE, SRMSGSET_CASCADE, chkCascade.GetState());
diff --git a/plugins/Scriver/src/msgs.h b/plugins/Scriver/src/msgs.h
index 2ca2855895..5abab8fe59 100644
--- a/plugins/Scriver/src/msgs.h
+++ b/plugins/Scriver/src/msgs.h
@@ -379,6 +379,8 @@ extern int fontOptionsListSize;
#define SRMSGDEFSET_SENDONENTER 1
#define SRMSGSET_SENDONDBLENTER "SendOnDblEnter"
#define SRMSGDEFSET_SENDONDBLENTER 0
+#define SRMSGSET_SENDONCTRLENTER "SendOnCtrlEnter"
+#define SRMSGDEFSET_SENDONCTRLENTER 0
#define SRMSGSET_SENDBUTTON "UseSendButton"
#define SRMSGDEFSET_SENDBUTTON 0
#define SRMSGSET_CHARCOUNT "ShowCharCount"
diff --git a/plugins/Scriver/src/resource.h b/plugins/Scriver/src/resource.h
index 37bb17e72b..138cce6651 100644
--- a/plugins/Scriver/src/resource.h
+++ b/plugins/Scriver/src/resource.h
@@ -94,23 +94,24 @@
#define IDC_USERELATIVEDATE 1025
#define IDC_USEIEVIEW 1026
#define IDC_FONTSCOLORS 1027
+#define IDC_LOADUNREAD 1031
#define IDC_SHOWLOGICONS 1032
#define IDC_SHOWTIMES 1033
#define IDC_SHOWDATES 1034
#define IDC_CLIST 1035
#define IDC_GROUPMESSAGES 1036
#define IDC_SAVEPERCONTACT 1037
+#define IDC_LOADCOUNT 1038
#define IDC_LOADCOUNTN 1039
#define IDC_LOADCOUNTSPIN 1040
#define IDC_SHOWSTATUSBAR 1041
#define IDC_SHOWTOOLBAR 1042
-#define IDC_LOADUNREAD 1043
#define IDC_SENDONENTER 1043
-#define IDC_LOADCOUNT 1044
#define IDC_SENDONDBLENTER 1044
#define IDC_LOADTIMEN 1045
#define IDC_LOADTIMESPIN 1046
#define IDC_LOADTIME 1047
+#define IDC_SENDONCTRLENTER 1048
#define IDC_SHOWTITLEBAR 1050
#define IDC_STMINSOLD 1051
#define IDC_SHOWPROGRESS 1052
@@ -247,7 +248,7 @@
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 102
+#define _APS_NEXT_RESOURCE_VALUE 103
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1003
#define _APS_NEXT_SYMED_VALUE 101