From 744dda0a74a4afa69bb2e27088f1c0f01a8891d9 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 12 Nov 2024 18:00:55 +0300 Subject: SRMM options unification --- src/core/stdmsg/src/msgdialog.cpp | 2 +- src/core/stdmsg/src/msgoptions.cpp | 8 ++++---- src/core/stdmsg/src/msgs.h | 5 ----- src/core/stdmsg/src/srmm.cpp | 1 - src/core/stdmsg/src/stdafx.h | 1 - 5 files changed, 5 insertions(+), 12 deletions(-) (limited to 'src/core/stdmsg') 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 CMOption msgTimeout; CMOption nFlashMax; - CMOption iLoadHistory; CMOption nLoadCount, nLoadTime; bool bSmileyInstalled = false; -- cgit v1.2.3