summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/Scriver/res/resource.rc6
-rw-r--r--plugins/Scriver/src/msgoptions.cpp14
2 files changed, 10 insertions, 10 deletions
diff --git a/plugins/Scriver/res/resource.rc b/plugins/Scriver/res/resource.rc
index 18b887e848..3324c7bfe1 100644
--- a/plugins/Scriver/res/resource.rc
+++ b/plugins/Scriver/res/resource.rc
@@ -134,13 +134,13 @@ BEGIN
GROUPBOX "Preload",IDC_STATIC,0,166,304,50
CONTROL "Unread events only",IDC_LOADUNREAD,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,8,177,138,10
CONTROL "Last",IDC_LOADCOUNT,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,8,189,138,10
- CONTROL "Events in the last",IDC_LOADTIME,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,8,201,138,10
+ CONTROL "Events in the last",IDC_LOADTIME,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,8,202,138,8
EDITTEXT IDC_LOADCOUNTN,150,187,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,173,188,10,14
- LTEXT "events",IDC_LOADCOUNTTEXT2,185,187,90,8,WS_DISABLED
+ LTEXT "events",IDC_LOADCOUNTTEXT2,185,189,90,10,WS_DISABLED
EDITTEXT IDC_LOADTIMEN,150,200,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,175,200,11,14
- LTEXT "minutes",IDC_STMINSOLD,185,201,90,8,WS_DISABLED
+ LTEXT "minutes",IDC_STMINSOLD,185,202,90,8,WS_DISABLED
END
IDD_OPT_MSGTYPE DIALOGEX 0, 0, 283, 252
diff --git a/plugins/Scriver/src/msgoptions.cpp b/plugins/Scriver/src/msgoptions.cpp
index 09c66ce93d..01a240729e 100644
--- a/plugins/Scriver/src/msgoptions.cpp
+++ b/plugins/Scriver/src/msgoptions.cpp
@@ -583,13 +583,13 @@ public:
{
switch (g_plugin.iHistoryMode) {
case LOADHISTORY_UNREAD:
- CheckDlgButton(m_hwnd, IDC_LOADUNREAD, BST_CHECKED);
+ chkLoadUnread.SetState(true);
break;
case LOADHISTORY_COUNT:
- CheckDlgButton(m_hwnd, IDC_LOADCOUNT, BST_CHECKED);
+ chkLoadCount.SetState(true);
break;
case LOADHISTORY_TIME:
- CheckDlgButton(m_hwnd, IDC_LOADTIME, BST_CHECKED);
+ chkLoadTime.SetState(true);
break;
}
@@ -612,9 +612,9 @@ public:
bool OnApply() override
{
- if (IsDlgButtonChecked(m_hwnd, IDC_LOADCOUNT))
+ if (chkLoadCount.GetState())
g_plugin.iHistoryMode = LOADHISTORY_COUNT;
- else if (IsDlgButtonChecked(m_hwnd, IDC_LOADTIME))
+ else if (chkLoadTime.GetState())
g_plugin.iHistoryMode = LOADHISTORY_TIME;
else
g_plugin.iHistoryMode = LOADHISTORY_UNREAD;
@@ -631,12 +631,12 @@ public:
void onChange_Time(CCtrlCheck*)
{
- int bChecked = IsDlgButtonChecked(m_hwnd, IDC_LOADCOUNT);
+ int bChecked = chkLoadCount.GetState();
EnableWindow(GetDlgItem(m_hwnd, IDC_LOADCOUNTN), bChecked);
spinCount.Enable(bChecked);
EnableWindow(GetDlgItem(m_hwnd, IDC_LOADCOUNTTEXT2), bChecked);
- bChecked = IsDlgButtonChecked(m_hwnd, IDC_LOADTIME);
+ bChecked = chkLoadTime.GetState();
EnableWindow(GetDlgItem(m_hwnd, IDC_LOADTIMEN), bChecked);
spinTime.Enable(bChecked);
EnableWindow(GetDlgItem(m_hwnd, IDC_STMINSOLD), bChecked);