summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-03-07 19:00:31 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-03-07 19:00:31 +0300
commitdb9ffeb3a32a652da31c0233987001bc56447dfd (patch)
tree86d816a27099d20663b2fff3dd4a4e29d1bed78d
parent0042f7550ab3d69d742c3ef90383fcdff446f850 (diff)
compatibility fix for old profiles
-rw-r--r--plugins/TabSRMM/src/msgs.h2
-rw-r--r--plugins/TabSRMM/src/utils.cpp8
2 files changed, 4 insertions, 6 deletions
diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h
index a13f0bfd28..98d4722382 100644
--- a/plugins/TabSRMM/src/msgs.h
+++ b/plugins/TabSRMM/src/msgs.h
@@ -156,7 +156,7 @@ struct TLogTheme
struct TContainerSettings
{
- bool fPrivate;
+ BOOL fPrivate;
DWORD dwFlags;
DWORD dwFlagsEx;
DWORD dwTransparency;
diff --git a/plugins/TabSRMM/src/utils.cpp b/plugins/TabSRMM/src/utils.cpp
index 06e25df02d..20fef2d1ed 100644
--- a/plugins/TabSRMM/src/utils.cpp
+++ b/plugins/TabSRMM/src/utils.cpp
@@ -498,16 +498,14 @@ int Utils::ReadContainerSettingsFromDB(const MCONTACT hContact, TContainerSettin
{
memcpy(cs, &PluginConfig.globalContainerSettings, sizeof(TContainerSettings));
+ if (hContact == 0 && szKey == 0)
+ cs->iSplitterX = M.GetDword("splitsplitx", db_get_dw(0, CHAT_MODULE, "SplitterX", 150));
+
DBVARIANT dbv = { 0 };
if (0 == db_get(hContact, SRMSGMOD_T, szKey ? szKey : CNT_KEYNAME, &dbv)) {
if (dbv.type == DBVT_BLOB && dbv.cpbVal > 0 && dbv.cpbVal <= sizeof(TContainerSettings)) {
::memcpy((void*)cs, (void*)dbv.pbVal, dbv.cpbVal);
::db_free(&dbv);
- if (hContact == 0 && szKey == 0) {
- cs->fPrivate = false;
- cs->iSplitterX = M.GetDword("splitsplitx", db_get_dw(0, CHAT_MODULE, "SplitterX", 150));
- }
-
return 0;
}
cs->fPrivate = false;