summaryrefslogtreecommitdiff
path: root/plugins/Scriver
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 /plugins/Scriver
parentf7bbaf7fd984d26dbc150d9743aa14cd5dd23a8c (diff)
SRMM options unification
Diffstat (limited to 'plugins/Scriver')
-rw-r--r--plugins/Scriver/src/msgoptions.cpp8
-rw-r--r--plugins/Scriver/src/msgs.h4
-rw-r--r--plugins/Scriver/src/msgutils.cpp2
-rw-r--r--plugins/Scriver/src/srmm.cpp1
-rw-r--r--plugins/Scriver/src/stdafx.h2
5 files changed, 6 insertions, 11 deletions
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<CMPlugin>
CMOption<uint8_t> bGroupMessages, bMarkFollowups, bMsgOnNewline, bDrawLines, bHideNames, bIndentText;
CMOption<uint8_t> bUseTabs, bLimitTabs, bLimitChatTabs, bLimitNames, bSeparateChats, bTabCloseButton, bHideOneTab, bTabsAtBottom, bSwitchToActive;
CMOption<uint8_t> bShowTyping, bShowTypingWin, bShowTypingTray, bShowTypingClist, bShowTypingSwitch;
- CMOption<uint8_t> iFlashCount, iHistoryMode;
+ CMOption<uint8_t> iFlashCount;
CMOption<uint16_t> iLimitNames, iLimitTabs, iLimitChatTabs, iLoadCount, iLoadTime, iIndentSize, iAutoResizeLines;
CMOption<uint32_t> iPopFlags, iMsgTimeout, iActiveAlpha, iInactiveAlpha;