summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2023-03-24 16:03:18 +0300
committerGeorge Hazan <ghazan@miranda.im>2023-03-24 16:03:18 +0300
commit94759bc4f0b907778691293e3e50814d3a4071b1 (patch)
tree6f613271aa20cbd60be7d2402f811a0e044ac5d4
parent6468923dbf305d8cdba7ca66b4b921acb8eef460 (diff)
chat options' usage unification
-rw-r--r--plugins/Scriver/src/chat_options.cpp2
-rw-r--r--plugins/Scriver/src/msgdialog.cpp2
-rw-r--r--plugins/Scriver/src/msgutils.cpp3
-rw-r--r--src/mir_app/src/chat_svc.cpp2
-rw-r--r--src/mir_app/src/srmm_base.cpp4
5 files changed, 7 insertions, 6 deletions
diff --git a/plugins/Scriver/src/chat_options.cpp b/plugins/Scriver/src/chat_options.cpp
index 58e2f5a502..a9a6830c8b 100644
--- a/plugins/Scriver/src/chat_options.cpp
+++ b/plugins/Scriver/src/chat_options.cpp
@@ -298,7 +298,7 @@ public:
mir_free(pszText);
g_Settings.bStripFormat = db_get_b(0, CHAT_MODULE, "TrimFormatting", 0) != 0;
- g_Settings.bLogIndentEnabled = (db_get_b(0, CHAT_MODULE, "LogIndentEnabled", 1) != 0) ? TRUE : FALSE;
+ g_Settings.bLogIndentEnabled = Chat::bLogIndentEnabled;
g_chatApi.MM_FontsChanged();
return true;
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp
index d918961932..12bfe4855d 100644
--- a/plugins/Scriver/src/msgdialog.cpp
+++ b/plugins/Scriver/src/msgdialog.cpp
@@ -1189,7 +1189,7 @@ INT_PTR CMsgDialog::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
int font = ih > ih2 ? ih : ih2;
int height = db_get_b(0, CHAT_MODULE, "NicklistRowDist", 12);
// make sure we have space for icon!
- if (db_get_b(0, CHAT_MODULE, "ShowContactStatus", 0))
+ if (Chat::bShowContactStatus)
font = font > 16 ? font : 16;
mis->itemHeight = height > font ? height : font;
}
diff --git a/plugins/Scriver/src/msgutils.cpp b/plugins/Scriver/src/msgutils.cpp
index b982bc5326..dff0e00e10 100644
--- a/plugins/Scriver/src/msgutils.cpp
+++ b/plugins/Scriver/src/msgutils.cpp
@@ -625,8 +625,9 @@ void CMsgDialog::UpdateOptions()
int ih2 = Chat_GetTextPixelSize(L"AQG_glo'", g_Settings.UserListHeadingsFont, false);
int height = db_get_b(0, CHAT_MODULE, "NicklistRowDist", 12);
int font = ih > ih2 ? ih : ih2;
+
// make sure we have space for icon!
- if (db_get_b(0, CHAT_MODULE, "ShowContactStatus", 0))
+ if (Chat::bShowContactStatus)
font = font > 16 ? font : 16;
m_nickList.SendMsg(LB_SETITEMHEIGHT, 0, height > font ? height : font);
diff --git a/src/mir_app/src/chat_svc.cpp b/src/mir_app/src/chat_svc.cpp
index 64132cdde5..6d994c9f38 100644
--- a/src/mir_app/src/chat_svc.cpp
+++ b/src/mir_app/src/chat_svc.cpp
@@ -101,7 +101,7 @@ static int FontsChanged(WPARAM, LPARAM)
LoadMsgLogBitmaps();
SetIndentSize();
- g_Settings->bLogIndentEnabled = (db_get_b(0, CHAT_MODULE, "LogIndentEnabled", 1) != 0) ? TRUE : FALSE;
+ g_Settings->bLogIndentEnabled = Chat::bLogIndentEnabled;
g_chatApi.MM_FontsChanged();
Chat_UpdateOptions();
diff --git a/src/mir_app/src/srmm_base.cpp b/src/mir_app/src/srmm_base.cpp
index 2f0fc7e044..a5bb705ae9 100644
--- a/src/mir_app/src/srmm_base.cpp
+++ b/src/mir_app/src/srmm_base.cpp
@@ -53,9 +53,9 @@ CSrmmBaseDialog::CSrmmBaseDialog(CMPluginBase &pPlugin, int idDialog, SESSION_IN
m_hContact(0),
m_clrInputBG(GetSysColor(COLOR_WINDOW))
{
- m_bFilterEnabled = db_get_b(0, CHAT_MODULE, "FilterEnabled", 0) != 0;
- m_bNicklistEnabled = db_get_b(0, CHAT_MODULE, "ShowNicklist", 1) != 0;
+ m_bFilterEnabled = Chat::bFilterEnabled;
m_iLogFilterFlags = Chat::iFilterFlags;
+ m_bNicklistEnabled = Chat::bShowNicklist;
m_btnColor.OnClick = Callback(this, &CSrmmBaseDialog::onClick_Color);
m_btnBkColor.OnClick = Callback(this, &CSrmmBaseDialog::onClick_BkColor);