summaryrefslogtreecommitdiff
path: root/src/core/stdfile
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/stdfile')
-rw-r--r--src/core/stdfile/src/file.cpp2
-rw-r--r--src/core/stdfile/src/filerecvdlg.cpp6
-rw-r--r--src/core/stdfile/src/filexferdlg.cpp6
3 files changed, 8 insertions, 6 deletions
diff --git a/src/core/stdfile/src/file.cpp b/src/core/stdfile/src/file.cpp
index cd106fedba..df862eb0ca 100644
--- a/src/core/stdfile/src/file.cpp
+++ b/src/core/stdfile/src/file.cpp
@@ -101,7 +101,7 @@ void PushFileEvent(MCONTACT hContact, MEVENT hdbe, LPARAM lParam)
cle.hContact = hContact;
cle.hDbEvent = hdbe;
cle.lParam = lParam;
- if (g_plugin.getByte("AutoAccept", 0) && !db_get_b(hContact, "CList", "NotOnList", 0)) {
+ if (g_plugin.getByte("AutoAccept", 0) && Contact_OnList(hContact)) {
CreateDialogParam(g_plugin.getInst(), MAKEINTRESOURCE(IDD_FILERECV), NULL, DlgProcRecvFile, (LPARAM)&cle);
}
else {
diff --git a/src/core/stdfile/src/filerecvdlg.cpp b/src/core/stdfile/src/filerecvdlg.cpp
index 2fe57e4935..6c14b8d406 100644
--- a/src/core/stdfile/src/filerecvdlg.cpp
+++ b/src/core/stdfile/src/filerecvdlg.cpp
@@ -250,7 +250,7 @@ INT_PTR CALLBACK DlgProcRecvFile(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
ptrW info(Contact_GetInfo(CNF_UNIQUEID, dat->hContact));
SetDlgItemText(hwndDlg, IDC_NAME, (info) ? info : contactName);
- if (db_get_b(dat->hContact, "CList", "NotOnList", 0)) {
+ if (!Contact_OnList(dat->hContact)) {
RECT rcBtn1, rcBtn2, rcDateCtrl;
GetWindowRect(GetDlgItem(hwndDlg, IDC_ADD), &rcBtn1);
GetWindowRect(GetDlgItem(hwndDlg, IDC_USERMENU), &rcBtn2);
@@ -261,7 +261,7 @@ INT_PTR CALLBACK DlgProcRecvFile(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
//don't check auto-min here to fix BUG#647620
PostMessage(hwndDlg, WM_COMMAND, MAKEWPARAM(IDOK, BN_CLICKED), (LPARAM)GetDlgItem(hwndDlg, IDOK));
}
- if (!db_get_b(dat->hContact, "CList", "NotOnList", 0))
+ if (Contact_OnList(dat->hContact))
ShowWindow(GetDlgItem(hwndDlg, IDC_ADD), SW_HIDE);
}
return TRUE;
@@ -348,7 +348,7 @@ INT_PTR CALLBACK DlgProcRecvFile(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
case IDC_ADD:
Contact_Add(dat->hContact, hwndDlg);
- if (!db_get_b(dat->hContact, "CList", "NotOnList", 0))
+ if (Contact_OnList(dat->hContact))
ShowWindow(GetDlgItem(hwndDlg, IDC_ADD), SW_HIDE);
break;
diff --git a/src/core/stdfile/src/filexferdlg.cpp b/src/core/stdfile/src/filexferdlg.cpp
index 9f8bc128f8..adaa06e9cf 100644
--- a/src/core/stdfile/src/filexferdlg.cpp
+++ b/src/core/stdfile/src/filexferdlg.cpp
@@ -245,8 +245,10 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
CreateDirectoryTreeW(dat->szSavePath);
dat->fs = (HANDLE)ProtoChainSend(dat->hContact, PSS_FILEALLOW, (WPARAM)dat->fs, (LPARAM)dat->szSavePath);
dat->transferStatus.szWorkingDir.w = mir_wstrdup(dat->szSavePath);
- if (db_get_b(dat->hContact, "CList", "NotOnList", 0)) dat->resumeBehaviour = FILERESUME_ASK;
- else dat->resumeBehaviour = g_plugin.getByte("IfExists", FILERESUME_ASK);
+ if (!Contact_OnList(dat->hContact))
+ dat->resumeBehaviour = FILERESUME_ASK;
+ else
+ dat->resumeBehaviour = g_plugin.getByte("IfExists", FILERESUME_ASK);
SetFtStatus(hwndDlg, LPGENW("Waiting for connection..."), FTS_TEXT);
}