diff options
author | George Hazan <ghazan@miranda.im> | 2017-03-07 22:32:21 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-03-07 22:32:21 +0300 |
commit | 0bc0ec3803c1d95798e551ec7c1d431d2ac98075 (patch) | |
tree | 4df455c15d2c9abc174b32bc7df5c309e6d9aef2 /plugins/TabSRMM/src | |
parent | 9dcd3da1170b80281bfe51717c186049365b3044 (diff) |
fix for writing options into db
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r-- | plugins/TabSRMM/src/containeroptions.cpp | 5 | ||||
-rw-r--r-- | plugins/TabSRMM/src/globals.cpp | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/plugins/TabSRMM/src/containeroptions.cpp b/plugins/TabSRMM/src/containeroptions.cpp index 3e2e70249c..bda98baadf 100644 --- a/plugins/TabSRMM/src/containeroptions.cpp +++ b/plugins/TabSRMM/src/containeroptions.cpp @@ -261,8 +261,7 @@ INT_PTR CALLBACK DlgProcContainerOptions(HWND hwndDlg, UINT msg, WPARAM wParam, if (pContainer->settings != &PluginConfig.globalContainerSettings) {
char szCname[40];
mir_snprintf(szCname, "%s%d_Blob", CNT_BASEKEYNAME, pContainer->iContainerIndex);
- pContainer->settings->fPrivate = false;
- db_set_blob(0, SRMSGMOD_T, szCname, pContainer->settings, sizeof(TContainerSettings));
+ Utils::WriteContainerSettingsToDB(0, pContainer->settings, szCname);
mir_free(pContainer->settings);
}
pContainer->settings = &PluginConfig.globalContainerSettings;
@@ -355,7 +354,7 @@ INT_PTR CALLBACK DlgProcContainerOptions(HWND hwndDlg, UINT msg, WPARAM wParam, if (BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_CNTPRIVATE)) {
ReloadGlobalContainerSettings(true);
- ::db_set_blob(0, SRMSGMOD_T, CNT_KEYNAME, &PluginConfig.globalContainerSettings, sizeof(TContainerSettings));
+ Utils::WriteContainerSettingsToDB(0, &PluginConfig.globalContainerSettings, nullptr);
}
else {
char *szSetting = "CNTW_";
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp index ac23004e1c..4260385af8 100644 --- a/plugins/TabSRMM/src/globals.cpp +++ b/plugins/TabSRMM/src/globals.cpp @@ -494,7 +494,7 @@ int CGlobals::OkToExit(WPARAM, LPARAM) CMimAPI::m_shutDown = true;
PluginConfig.globalContainerSettings.fPrivate = false;
- ::db_set_blob(0, SRMSGMOD_T, CNT_KEYNAME, &PluginConfig.globalContainerSettings, sizeof(TContainerSettings));
+ Utils::WriteContainerSettingsToDB(0, &PluginConfig.globalContainerSettings, nullptr);
return 0;
}
|