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 --- plugins/Scriver/src/msgoptions.cpp | 8 ++++---- plugins/Scriver/src/msgs.h | 4 ---- plugins/Scriver/src/msgutils.cpp | 2 +- plugins/Scriver/src/srmm.cpp | 1 - plugins/Scriver/src/stdafx.h | 2 +- 5 files changed, 6 insertions(+), 11 deletions(-) (limited to 'plugins/Scriver') diff --git a/plugins/Scriver/src/msgoptions.cpp b/plugins/Scriver/src/msgoptions.cpp index 7e6dddeccb..3be675019a 100644 --- a/plugins/Scriver/src/msgoptions.cpp +++ b/plugins/Scriver/src/msgoptions.cpp @@ -585,7 +585,7 @@ public: bool OnInitDialog() override { - switch (g_plugin.iHistoryMode) { + switch (Srmm::iHistoryMode) { case LOADHISTORY_UNREAD: chkLoadUnread.SetState(true); break; @@ -617,11 +617,11 @@ public: bool OnApply() override { if (chkLoadCount.GetState()) - g_plugin.iHistoryMode = LOADHISTORY_COUNT; + Srmm::iHistoryMode = LOADHISTORY_COUNT; else if (chkLoadTime.GetState()) - g_plugin.iHistoryMode = LOADHISTORY_TIME; + Srmm::iHistoryMode = LOADHISTORY_TIME; else - g_plugin.iHistoryMode = LOADHISTORY_UNREAD; + Srmm::iHistoryMode = LOADHISTORY_UNREAD; FreeMsgLogIcons(); LoadMsgLogIcons(); diff --git a/plugins/Scriver/src/msgs.h b/plugins/Scriver/src/msgs.h index ea3c677e43..1b6e3572d9 100644 --- a/plugins/Scriver/src/msgs.h +++ b/plugins/Scriver/src/msgs.h @@ -209,10 +209,6 @@ int IsAutoPopup(MCONTACT hContact); void LoadMsgDlgFont(int i, LOGFONT *lf, COLORREF *colour); extern int fontOptionsListSize; -#define LOADHISTORY_UNREAD 0 -#define LOADHISTORY_COUNT 1 -#define LOADHISTORY_TIME 2 - #define SRMSGSET_BKGCOLOUR "BkgColour" #define SRMSGDEFSET_BKGCOLOUR GetSysColor(COLOR_WINDOW) #define SRMSGSET_INPUTBKGCOLOUR "InputBkgColour" diff --git a/plugins/Scriver/src/msgutils.cpp b/plugins/Scriver/src/msgutils.cpp index 327733cc9f..05159ea6ba 100644 --- a/plugins/Scriver/src/msgutils.cpp +++ b/plugins/Scriver/src/msgutils.cpp @@ -117,7 +117,7 @@ bool CMsgDialog::GetFirstEvent() bool notifyUnread = false; if (m_hContact) { - int historyMode = g_plugin.iHistoryMode; + int historyMode = Srmm::iHistoryMode; // This finds the first message to display, it works like shit m_hDbEventFirst = db_event_firstUnread(m_hContact); if (m_hDbEventFirst != 0) { diff --git a/plugins/Scriver/src/srmm.cpp b/plugins/Scriver/src/srmm.cpp index 242673aefa..1785af45fc 100644 --- a/plugins/Scriver/src/srmm.cpp +++ b/plugins/Scriver/src/srmm.cpp @@ -109,7 +109,6 @@ CMPlugin::CMPlugin() : iActiveAlpha(SRMM_MODULE, "ActiveAlpha", 0), iInactiveAlpha(SRMM_MODULE, "InactiveAlpha", 0), iMsgTimeout(SRMM_MODULE, "MessageTimeout", 10), - iHistoryMode(SRMM_MODULE, "LoadHistory", LOADHISTORY_UNREAD), iAutoResizeLines(SRMM_MODULE, "AutoResizeLines", 2), bSoundsFocus(CHAT_MODULE, "SoundsFocus", false), diff --git a/plugins/Scriver/src/stdafx.h b/plugins/Scriver/src/stdafx.h index 731e44ad23..dac05cfe58 100644 --- a/plugins/Scriver/src/stdafx.h +++ b/plugins/Scriver/src/stdafx.h @@ -79,7 +79,7 @@ struct CMPlugin : public PLUGIN CMOption bGroupMessages, bMarkFollowups, bMsgOnNewline, bDrawLines, bHideNames, bIndentText; CMOption bUseTabs, bLimitTabs, bLimitChatTabs, bLimitNames, bSeparateChats, bTabCloseButton, bHideOneTab, bTabsAtBottom, bSwitchToActive; CMOption bShowTyping, bShowTypingWin, bShowTypingTray, bShowTypingClist, bShowTypingSwitch; - CMOption iFlashCount, iHistoryMode; + CMOption iFlashCount; CMOption iLimitNames, iLimitTabs, iLimitChatTabs, iLoadCount, iLoadTime, iIndentSize, iAutoResizeLines; CMOption iPopFlags, iMsgTimeout, iActiveAlpha, iInactiveAlpha; -- cgit v1.2.3