From 0bc0ec3803c1d95798e551ec7c1d431d2ac98075 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 7 Mar 2017 22:32:21 +0300 Subject: fix for writing options into db --- plugins/TabSRMM/src/containeroptions.cpp | 5 ++--- plugins/TabSRMM/src/globals.cpp | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'plugins') 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; } -- cgit v1.2.3