From 411735c18a498b8a5aafd32ba1c8cae3ff52c650 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Sat, 27 Feb 2016 16:13:53 +0000 Subject: Dropbox: renamed setting name git-svn-id: http://svn.miranda-ng.org/main/trunk@16364 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Dropbox/src/dropbox_options.cpp | 9 ++++++--- plugins/Dropbox/src/dropbox_services.cpp | 6 ++++-- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'plugins') diff --git a/plugins/Dropbox/src/dropbox_options.cpp b/plugins/Dropbox/src/dropbox_options.cpp index 6d39f8beee..b2c22cf153 100644 --- a/plugins/Dropbox/src/dropbox_options.cpp +++ b/plugins/Dropbox/src/dropbox_options.cpp @@ -69,14 +69,16 @@ void CDropboxOptionsInterception::OnInitDialog() int count; PROTOACCOUNT** accounts; Proto_EnumAccounts(&count, &accounts); - const char* interceptedProtos = db_get_sa(NULL, MODULE, "InterceptedProtos"); + const char *interceptedAccounts = db_get_sa(NULL, MODULE, "InterceptedAccounts"); + if (interceptedAccounts == NULL) + interceptedAccounts = db_get_sa(NULL, MODULE, "InterceptedProtos"); for (int i = 0; i < count; i++) { PROTOACCOUNT *acc = accounts[i]; if (strstr(acc->szProtoName, MODULE) || strstr(acc->szProtoName, "Meta")) continue; int iItem = m_accounts.AddItem(mir_tstrdup(acc->tszAccountName), -1, (LPARAM)acc); m_accounts.SetItem(iItem, 1, mir_a2t(acc->szProtoName)); - if (interceptedProtos && strstr(interceptedProtos, acc->szModuleName)) + if (interceptedAccounts && strstr(interceptedAccounts, acc->szModuleName)) m_accounts.SetCheckState(iItem, TRUE); } @@ -121,7 +123,8 @@ void CDropboxOptionsInterception::OnApply() interceptedProtos.AppendFormat("%s\t", acc->szModuleName); interceptedProtos.TrimRight(); } - db_set_s(NULL, MODULE, "InterceptedProtos", interceptedProtos); + db_set_s(NULL, MODULE, "InterceptedAccounts", interceptedProtos); + db_unset(NULL, MODULE, "InterceptedProtos"); } ///////////////////////////////////////////////////////////////////////////////// diff --git a/plugins/Dropbox/src/dropbox_services.cpp b/plugins/Dropbox/src/dropbox_services.cpp index 85c5e1c661..441afaf517 100644 --- a/plugins/Dropbox/src/dropbox_services.cpp +++ b/plugins/Dropbox/src/dropbox_services.cpp @@ -75,8 +75,10 @@ INT_PTR CDropbox::ProtoSendFileInterceptor(WPARAM wParam, LPARAM lParam) CCSDATA *pccsd = (CCSDATA*)lParam; const char *proto = GetContactProto(pccsd->hContact); - const char *interceptedProtos = db_get_sa(NULL, MODULE, "InterceptedProtos"); - if (interceptedProtos == NULL || strstr(interceptedProtos, proto) == NULL) + const char *interceptedAccounts = db_get_sa(NULL, MODULE, "InterceptedAccounts"); + if (interceptedAccounts == NULL) + interceptedAccounts = db_get_sa(NULL, MODULE, "InterceptedProtos"); + if (interceptedAccounts == NULL || strstr(interceptedAccounts, proto) == NULL) return CALLSERVICE_NOTFOUND; return ProtoSendFile(wParam, lParam); -- cgit v1.2.3