summaryrefslogtreecommitdiff
path: root/plugins/QuickContacts/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/QuickContacts/src')
-rw-r--r--plugins/QuickContacts/src/options.cpp16
-rw-r--r--plugins/QuickContacts/src/quickcontacts.cpp40
2 files changed, 28 insertions, 28 deletions
diff --git a/plugins/QuickContacts/src/options.cpp b/plugins/QuickContacts/src/options.cpp
index 8e9edec9af..69e6b0968e 100644
--- a/plugins/QuickContacts/src/options.cpp
+++ b/plugins/QuickContacts/src/options.cpp
@@ -37,14 +37,14 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
// Initializations needed by options
void LoadOptions()
{
- opts.last_sent_enable = DBGetContactSettingByte(NULL, MODULE_NAME, "EnableLastSentTo", TRUE);
- opts.last_sent_msg_type = DBGetContactSettingWord(NULL, MODULE_NAME, "MsgTypeRec", TYPE_GLOBAL);
- opts.hide_from_offline_proto = DBGetContactSettingByte(NULL, MODULE_NAME, "HideOfflineFromOfflineProto", TRUE);
- opts.group_append = DBGetContactSettingByte(NULL, MODULE_NAME, "AppendGroupName", FALSE);
- opts.group_column = DBGetContactSettingByte(NULL, MODULE_NAME, "GroupColumn", FALSE);
- opts.group_column_left = DBGetContactSettingByte(NULL, MODULE_NAME, "GroupColumnLeft", FALSE);
- opts.hide_subcontacts = DBGetContactSettingByte(NULL, MODULE_NAME, "HideSubcontacts", TRUE);
- opts.keep_subcontacts_from_offline = DBGetContactSettingByte(NULL, MODULE_NAME, "KeepSubcontactsFromOffline", TRUE);
+ opts.last_sent_enable = db_get_b(NULL, MODULE_NAME, "EnableLastSentTo", TRUE);
+ opts.last_sent_msg_type = db_get_w(NULL, MODULE_NAME, "MsgTypeRec", TYPE_GLOBAL);
+ opts.hide_from_offline_proto = db_get_b(NULL, MODULE_NAME, "HideOfflineFromOfflineProto", TRUE);
+ opts.group_append = db_get_b(NULL, MODULE_NAME, "AppendGroupName", FALSE);
+ opts.group_column = db_get_b(NULL, MODULE_NAME, "GroupColumn", FALSE);
+ opts.group_column_left = db_get_b(NULL, MODULE_NAME, "GroupColumnLeft", FALSE);
+ opts.hide_subcontacts = db_get_b(NULL, MODULE_NAME, "HideSubcontacts", TRUE);
+ opts.keep_subcontacts_from_offline = db_get_b(NULL, MODULE_NAME, "KeepSubcontactsFromOffline", TRUE);
}
int InitOptionsCallback(WPARAM wParam,LPARAM lParam)
diff --git a/plugins/QuickContacts/src/quickcontacts.cpp b/plugins/QuickContacts/src/quickcontacts.cpp
index 2a653dbd21..100cfe9b69 100644
--- a/plugins/QuickContacts/src/quickcontacts.cpp
+++ b/plugins/QuickContacts/src/quickcontacts.cpp
@@ -220,11 +220,11 @@ int EventAdded(WPARAM wparam, LPARAM lparam)
DBEVENTINFO dbei = { sizeof(dbei) };
db_event_get((HANDLE)lparam, &dbei);
if ( !(dbei.flags & DBEF_SENT) || (dbei.flags & DBEF_READ)
- || !DBGetContactSettingByte(NULL, MODULE_NAME, "EnableLastSentTo", 0)
- || DBGetContactSettingWord(NULL, MODULE_NAME, "MsgTypeRec", TYPE_GLOBAL) != TYPE_GLOBAL)
+ || !db_get_b(NULL, MODULE_NAME, "EnableLastSentTo", 0)
+ || db_get_w(NULL, MODULE_NAME, "MsgTypeRec", TYPE_GLOBAL) != TYPE_GLOBAL)
return 0;
- DBWriteContactSettingDword(NULL, MODULE_NAME, "LastSentTo", (DWORD)(HANDLE)wparam);
+ db_set_dw(NULL, MODULE_NAME, "LastSentTo", (DWORD)(HANDLE)wparam);
return 0;
}
@@ -332,7 +332,7 @@ int GetStatus(HANDLE hContact, char *proto = NULL)
if (proto == NULL)
return ID_STATUS_OFFLINE;
- return DBGetContactSettingWord(hContact, proto, "Status", ID_STATUS_OFFLINE);
+ return db_get_w(hContact, proto, "Status", ID_STATUS_OFFLINE);
}
@@ -349,10 +349,10 @@ void FreeContacts()
void LoadContacts(HWND hwndDlg, BOOL show_all)
{
BOOL metacontactsEnabled = (metacontacts_proto != NULL
- && DBGetContactSettingByte(0, metacontacts_proto, "Enabled", 1));
+ && db_get_b(0, metacontacts_proto, "Enabled", 1));
// Read last-sent-to contact from db and set handle as window-userdata
- HANDLE hlastsent = (HANDLE)DBGetContactSettingDword(NULL, MODULE_NAME, "LastSentTo", -1);
+ HANDLE hlastsent = (HANDLE)db_get_dw(NULL, MODULE_NAME, "LastSentTo", -1);
SetWindowLongPtr(hwndMain, GWLP_USERDATA, (LONG)hlastsent);
// enumerate all contacts and write them to the array
@@ -388,7 +388,7 @@ void LoadContacts(HWND hwndDlg, BOOL show_all)
char setting[128];
mir_snprintf(setting, sizeof(setting), "ShowOffline%s", pszProto);
- if (!DBGetContactSettingByte(NULL, MODULE_NAME, setting, FALSE))
+ if (!db_get_b(NULL, MODULE_NAME, setting, FALSE))
continue;
// Check if proto offline
@@ -412,7 +412,7 @@ void LoadContacts(HWND hwndDlg, BOOL show_all)
{
char setting[128];
mir_snprintf(setting, sizeof(setting), "ShowOffline%s", metacontacts_proto);
- if (DBGetContactSettingByte(NULL, MODULE_NAME, setting, FALSE))
+ if (db_get_b(NULL, MODULE_NAME, setting, FALSE))
continue;
}
}
@@ -426,12 +426,12 @@ void LoadContacts(HWND hwndDlg, BOOL show_all)
if (opts.group_append)
{
DBVARIANT dbv;
- if (DBGetContactSettingTString(hMeta == NULL ? hContact : hMeta, "CList", "Group", &dbv) == 0)
+ if (db_get_ts(hMeta == NULL ? hContact : hMeta, "CList", "Group", &dbv) == 0)
{
if (dbv.ptszVal != NULL)
lstrcpyn(contact->szgroup, dbv.ptszVal, SIZEOF(contact->szgroup));
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
}
@@ -831,9 +831,9 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
LoadContacts(hwndDlg, FALSE);
EnableButtons(hwndDlg, NULL);
- if (DBGetContactSettingByte(NULL, MODULE_NAME, "EnableLastSentTo", 0))
+ if (db_get_b(NULL, MODULE_NAME, "EnableLastSentTo", 0))
{
- int pos = GetItemPos((HANDLE) DBGetContactSettingDword(NULL, MODULE_NAME, "LastSentTo", -1));
+ int pos = GetItemPos((HANDLE) db_get_dw(NULL, MODULE_NAME, "LastSentTo", -1));
if (pos != -1)
{
@@ -868,7 +868,7 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
CallService(MS_CLIST_CONTACTDOUBLECLICKED, (WPARAM) hContact, 0);
- DBWriteContactSettingDword(NULL, MODULE_NAME, "LastSentTo", (DWORD) hContact);
+ db_set_dw(NULL, MODULE_NAME, "LastSentTo", (DWORD) hContact);
SendMessage(hwndDlg, WM_CLOSE, 0, 0);
break;
}
@@ -888,7 +888,7 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
CallService(MS_MSG_SENDMESSAGET, (WPARAM) hContact, 0);
- DBWriteContactSettingDword(NULL, MODULE_NAME, "LastSentTo", (DWORD) hContact);
+ db_set_dw(NULL, MODULE_NAME, "LastSentTo", (DWORD) hContact);
SendMessage(hwndDlg, WM_CLOSE, 0, 0);
break;
}
@@ -912,7 +912,7 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
CallService(MS_VOICESERVICE_CALL, (WPARAM) hContact, 0);
- DBWriteContactSettingDword(NULL, MODULE_NAME, "LastSentTo", (DWORD) hContact);
+ db_set_dw(NULL, MODULE_NAME, "LastSentTo", (DWORD) hContact);
SendMessage(hwndDlg, WM_CLOSE, 0, 0);
break;
}
@@ -933,7 +933,7 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
CallService(MS_FILE_SENDFILE, (WPARAM) hContact, 0);
- DBWriteContactSettingDword(NULL, MODULE_NAME, "LastSentTo", (DWORD) hContact);
+ db_set_dw(NULL, MODULE_NAME, "LastSentTo", (DWORD) hContact);
SendMessage(hwndDlg, WM_CLOSE, 0, 0);
break;
}
@@ -954,7 +954,7 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
CallService(MS_URL_SENDURL, (WPARAM) hContact, 0);
- DBWriteContactSettingDword(NULL, MODULE_NAME, "LastSentTo", (DWORD) hContact);
+ db_set_dw(NULL, MODULE_NAME, "LastSentTo", (DWORD) hContact);
SendMessage(hwndDlg, WM_CLOSE, 0, 0);
break;
}
@@ -975,7 +975,7 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
CallService(MS_USERINFO_SHOWDIALOG, (WPARAM) hContact, 0);
- DBWriteContactSettingDword(NULL, MODULE_NAME, "LastSentTo", (DWORD) hContact);
+ db_set_dw(NULL, MODULE_NAME, "LastSentTo", (DWORD) hContact);
SendMessage(hwndDlg, WM_CLOSE, 0, 0);
break;
}
@@ -996,7 +996,7 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
CallService(MS_HISTORY_SHOWCONTACTHISTORY, (WPARAM) hContact, 0);
- DBWriteContactSettingDword(NULL, MODULE_NAME, "LastSentTo", (DWORD) hContact);
+ db_set_dw(NULL, MODULE_NAME, "LastSentTo", (DWORD) hContact);
SendMessage(hwndDlg, WM_CLOSE, 0, 0);
break;
}
@@ -1027,7 +1027,7 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(ret),MPCF_CONTACTMENU),(LPARAM) hContact);
}
- DBWriteContactSettingDword(NULL, MODULE_NAME, "LastSentTo", (DWORD) hContact);
+ db_set_dw(NULL, MODULE_NAME, "LastSentTo", (DWORD) hContact);
break;
}
case HOTKEY_ALL_CONTACTS: