summaryrefslogtreecommitdiff
path: root/plugins/Clist_nicer/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-04-10 13:59:56 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-04-10 13:59:56 +0000
commit11c3c76e22bb5778da1f14041fd6bac50d2cc747 (patch)
tree1c1edf060013f496032d6b1335f42aa8bda9aaec /plugins/Clist_nicer/src
parente45f1b91312d3fdea8727135580004d3558435e9 (diff)
fix for clist options from StdClist propagated to Clist_blind & Clist_nicer
git-svn-id: http://svn.miranda-ng.org/main/trunk@12735 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_nicer/src')
-rw-r--r--plugins/Clist_nicer/src/clistopts.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/plugins/Clist_nicer/src/clistopts.cpp b/plugins/Clist_nicer/src/clistopts.cpp
index 46132bff24..42799811f1 100644
--- a/plugins/Clist_nicer/src/clistopts.cpp
+++ b/plugins/Clist_nicer/src/clistopts.cpp
@@ -99,25 +99,27 @@ INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
Utils::enableDlgControl(hwndDlg, IDC_PRIMARYSTATUS, FALSE);
}
SendDlgItemMessage(hwndDlg, IDC_CYCLETIMESPIN, UDM_SETRANGE, 0, MAKELONG(120, 1));
- SendDlgItemMessage(hwndDlg, IDC_CYCLETIMESPIN, UDM_SETPOS, 0, MAKELONG(cfg::getWord("CList", "CycleTime", SETTING_CYCLETIME_DEFAULT), 0)); {
- int i, count, item;
+ SendDlgItemMessage(hwndDlg, IDC_CYCLETIMESPIN, UDM_SETPOS, 0, MAKELONG(cfg::getWord("CList", "CycleTime", SETTING_CYCLETIME_DEFAULT), 0));
+ {
+ ptrA szPrimaryStatus(db_get_sa(NULL, "CList", "PrimaryStatus"));
+
+ int item = SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_ADDSTRING, 0, (LPARAM)TranslateT("Global"));
+ SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_SETITEMDATA, item, (LPARAM)0);
+
+ int count;
PROTOACCOUNT **accs;
- DBVARIANT dbv = { DBVT_DELETED };
- db_get(NULL, "CList", "PrimaryStatus", &dbv);
ProtoEnumAccounts(&count, &accs);
- item = SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_ADDSTRING, 0, (LPARAM)TranslateT("Global"));
- SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_SETITEMDATA, item, (LPARAM)0);
- for (i = 0; i < count; i++) {
+ for (int i = 0; i < count; i++) {
if (!IsAccountEnabled(accs[i]) || CallProtoService(accs[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0) == 0)
continue;
item = SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_ADDSTRING, 0, (LPARAM)accs[i]->tszAccountName);
SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_SETITEMDATA, item, (LPARAM)accs[i]);
- if (dbv.type == DBVT_ASCIIZ && !mir_strcmp(dbv.pszVal, accs[i]->szModuleName))
+ if (!mir_strcmp(szPrimaryStatus, accs[i]->szModuleName))
SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_SETCURSEL, item, 0);
}
}
- if (-1 == (int)SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_GETCURSEL, 0, 0))
+ if (CB_ERR == (int)SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_GETCURSEL, 0, 0))
SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_SETCURSEL, 0, 0);
SendDlgItemMessage(hwndDlg, IDC_BLINKSPIN, UDM_SETBUDDY, (WPARAM)GetDlgItem(hwndDlg, IDC_BLINKTIME), 0);
SendDlgItemMessage(hwndDlg, IDC_BLINKSPIN, UDM_SETRANGE, 0, MAKELONG(0x3FFF, 250));