summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-11-12 18:00:55 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-11-12 18:00:55 +0300
commit744dda0a74a4afa69bb2e27088f1c0f01a8891d9 (patch)
tree0d260fc4dd522f8869adcd96a4039c5f65f4d132 /src/core
parentf7bbaf7fd984d26dbc150d9743aa14cd5dd23a8c (diff)
SRMM options unification
Diffstat (limited to 'src/core')
-rw-r--r--src/core/stdmsg/src/msgdialog.cpp2
-rw-r--r--src/core/stdmsg/src/msgoptions.cpp8
-rw-r--r--src/core/stdmsg/src/msgs.h5
-rw-r--r--src/core/stdmsg/src/srmm.cpp1
-rw-r--r--src/core/stdmsg/src/stdafx.h1
5 files changed, 5 insertions, 12 deletions
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp
index ef9cf07067..4b481a6eba 100644
--- a/src/core/stdmsg/src/msgdialog.cpp
+++ b/src/core/stdmsg/src/msgdialog.cpp
@@ -1242,7 +1242,7 @@ bool CMsgDialog::GetFirstEvent()
DB::ECPTR pCursor(DB::EventsRev(m_hContact, m_hDbEventFirst));
- switch (g_plugin.iLoadHistory) {
+ switch (Srmm::iHistoryMode) {
case LOADHISTORY_COUNT:
for (int i = g_plugin.nLoadCount; i--;) {
MEVENT hPrevEvent = pCursor.FetchNext();
diff --git a/src/core/stdmsg/src/msgoptions.cpp b/src/core/stdmsg/src/msgoptions.cpp
index 2eae075286..6020167100 100644
--- a/src/core/stdmsg/src/msgoptions.cpp
+++ b/src/core/stdmsg/src/msgoptions.cpp
@@ -335,7 +335,7 @@ public:
bool OnInitDialog() override
{
- switch (g_plugin.iLoadHistory) {
+ switch (Srmm::iHistoryMode) {
case LOADHISTORY_UNREAD:
chkLoadUnread.SetState(true);
break;
@@ -360,11 +360,11 @@ public:
bool OnApply() override
{
if (chkLoadCount.GetState())
- g_plugin.iLoadHistory = LOADHISTORY_COUNT;
+ Srmm::iHistoryMode = LOADHISTORY_COUNT;
else if (chkLoadTime.GetState())
- g_plugin.iLoadHistory = LOADHISTORY_TIME;
+ Srmm::iHistoryMode = LOADHISTORY_TIME;
else
- g_plugin.iLoadHistory = LOADHISTORY_UNREAD;
+ Srmm::iHistoryMode = LOADHISTORY_UNREAD;
g_plugin.nLoadCount = spinCount.GetPosition();
g_plugin.nLoadTime = spinTime.GetPosition();
diff --git a/src/core/stdmsg/src/msgs.h b/src/core/stdmsg/src/msgs.h
index 582d8fa4d0..56ec7164ba 100644
--- a/src/core/stdmsg/src/msgs.h
+++ b/src/core/stdmsg/src/msgs.h
@@ -175,11 +175,6 @@ int OptInitialise(WPARAM, LPARAM);
bool LoadMsgDlgFont(int i, LOGFONT* lf, COLORREF* colour);
-#define LOADHISTORY_UNREAD 0
-#define LOADHISTORY_COUNT 1
-#define LOADHISTORY_TIME 2
-
-#define SRMSGMOD "SRMsg"
#define DBSAVEDMSG "SavedMsg"
#define SRMSGSET_TYPING "SupportTyping"
diff --git a/src/core/stdmsg/src/srmm.cpp b/src/core/stdmsg/src/srmm.cpp
index 63d7e2481f..af9f94f750 100644
--- a/src/core/stdmsg/src/srmm.cpp
+++ b/src/core/stdmsg/src/srmm.cpp
@@ -80,7 +80,6 @@ CMPlugin::CMPlugin() :
msgTimeout(SRMM_MODULE, "MessageTimeout", 65000),
- iLoadHistory(SRMM_MODULE, "LoadHistory", LOADHISTORY_UNREAD),
nLoadCount(SRMM_MODULE, "LoadCount", 10),
nLoadTime(SRMM_MODULE, "LoadTime", 10),
diff --git a/src/core/stdmsg/src/stdafx.h b/src/core/stdmsg/src/stdafx.h
index 27a9c076e3..9dc20f0b12 100644
--- a/src/core/stdmsg/src/stdafx.h
+++ b/src/core/stdmsg/src/stdafx.h
@@ -178,7 +178,6 @@ struct CMPlugin : public PLUGIN<CMPlugin>
CMOption<uint32_t> msgTimeout;
CMOption<uint32_t> nFlashMax;
- CMOption<uint8_t> iLoadHistory;
CMOption<uint16_t> nLoadCount, nLoadTime;
bool bSmileyInstalled = false;