summaryrefslogtreecommitdiff
path: root/plugins/Dropbox
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2016-02-27 16:13:53 +0000
committerAlexander Lantsev <aunsane@gmail.com>2016-02-27 16:13:53 +0000
commit411735c18a498b8a5aafd32ba1c8cae3ff52c650 (patch)
tree8b552627a46ee1fc2a2f9f2db45fb387865d03c8 /plugins/Dropbox
parentce1317d110f70eee0d835ffa3c761168e2f5e9b7 (diff)
Dropbox: renamed setting name
git-svn-id: http://svn.miranda-ng.org/main/trunk@16364 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dropbox')
-rw-r--r--plugins/Dropbox/src/dropbox_options.cpp9
-rw-r--r--plugins/Dropbox/src/dropbox_services.cpp6
2 files changed, 10 insertions, 5 deletions
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);