summaryrefslogtreecommitdiff
path: root/plugins/StatusPlugins/AdvancedAutoAway/options.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-10-10 15:13:20 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-10-10 15:13:20 +0000
commit45a5b1f9b7709f8d93b57abea7ba46b44eac5707 (patch)
tree03f5a5db7a5e8a951951710a3d383a936a14ce74 /plugins/StatusPlugins/AdvancedAutoAway/options.cpp
parenteb25a0d7ed0da6bd4630c553be933df5bd46b6b9 (diff)
- MS_CLIST_GETSTATUSMODEDESCRIPTION replaced with the direct clist call
- crazy & obsolete constant GSMDF_PREFIXONLINE removed git-svn-id: http://svn.miranda-ng.org/main/trunk@6428 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/StatusPlugins/AdvancedAutoAway/options.cpp')
-rw-r--r--plugins/StatusPlugins/AdvancedAutoAway/options.cpp25
1 files changed, 12 insertions, 13 deletions
diff --git a/plugins/StatusPlugins/AdvancedAutoAway/options.cpp b/plugins/StatusPlugins/AdvancedAutoAway/options.cpp
index 329b83a986..9eb70c5307 100644
--- a/plugins/StatusPlugins/AdvancedAutoAway/options.cpp
+++ b/plugins/StatusPlugins/AdvancedAutoAway/options.cpp
@@ -136,8 +136,8 @@ static INT_PTR CALLBACK DlgProcAutoAwayRulesOpts(HWND hwndDlg, UINT msg, WPARAM
{
for ( int i=0; i < optionSettings->getCount(); i++ ) {
TAAAProtoSetting& p = (*optionSettings)[i];
- int item = SendDlgItemMessage( hwndDlg, IDC_PROTOCOL, CB_ADDSTRING, 0, ( LPARAM )p.tszAccName );
- SendDlgItemMessage( hwndDlg, IDC_PROTOCOL, CB_SETITEMDATA, item, (LPARAM)&p );
+ int item = SendDlgItemMessage(hwndDlg, IDC_PROTOCOL, CB_ADDSTRING, 0, (LPARAM)p.tszAccName );
+ SendDlgItemMessage(hwndDlg, IDC_PROTOCOL, CB_SETITEMDATA, item, (LPARAM)&p );
}
}
// set cursor to first protocol
@@ -178,9 +178,9 @@ static INT_PTR CALLBACK DlgProcAutoAwayRulesOpts(HWND hwndDlg, UINT msg, WPARAM
else
flags = 0;
for(i=0;i<sizeof(statusModeList)/sizeof(statusModeList[0]);i++) {
- if ((flags&statusModePf2List[i]) || (statusModePf2List[i] == PF2_OFFLINE) || (bSettingSame)) {
- lvItem.pszText = ( TCHAR* )CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, statusModeList[i], GSMDF_TCHAR );
- lvItem.lParam = ( LPARAM )statusModePf2List[i];
+ if ((flags&statusModePf2List[i]) || (statusModePf2List[i] == PF2_OFFLINE) || (bSettingSame)) {
+ lvItem.pszText = pcli->pfnGetStatusModeDescription(statusModeList[i], 0);
+ lvItem.lParam = (LPARAM)statusModePf2List[i];
ListView_InsertItem(hList,&lvItem);
ListView_SetCheckState(hList, lvItem.iItem, setting->statusFlags&statusModePf2List[i]?TRUE:FALSE);
lvItem.iItem++;
@@ -202,11 +202,11 @@ static INT_PTR CALLBACK DlgProcAutoAwayRulesOpts(HWND hwndDlg, UINT msg, WPARAM
SendDlgItemMessage(hwndDlg, IDC_LV2STATUS, CB_RESETCONTENT, 0, 0);
for ( i=0; i < SIZEOF(statusModeList); i++ ) {
if ( (flags & statusModePf2List[i]) || statusModePf2List[i] == PF2_OFFLINE || bSettingSame ) {
- TCHAR *statusMode = ( TCHAR* )CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, statusModeList[i], GSMDF_TCHAR );
- item = SendDlgItemMessage(hwndDlg,IDC_LV1STATUS,CB_ADDSTRING,0,(LPARAM)statusMode);
- item = SendDlgItemMessage(hwndDlg,IDC_LV2STATUS,CB_ADDSTRING,0,(LPARAM)statusMode);
- SendDlgItemMessage(hwndDlg,IDC_LV1STATUS,CB_SETITEMDATA,item,(LPARAM)statusModeList[i]);
- SendDlgItemMessage(hwndDlg,IDC_LV2STATUS,CB_SETITEMDATA,item,(LPARAM)statusModeList[i]);
+ TCHAR *statusMode = pcli->pfnGetStatusModeDescription(statusModeList[i], 0);
+ item = SendDlgItemMessage(hwndDlg, IDC_LV1STATUS, CB_ADDSTRING, 0, (LPARAM)statusMode);
+ item = SendDlgItemMessage(hwndDlg, IDC_LV2STATUS, CB_ADDSTRING, 0, (LPARAM)statusMode);
+ SendDlgItemMessage(hwndDlg, IDC_LV1STATUS, CB_SETITEMDATA, item, (LPARAM)statusModeList[i]);
+ SendDlgItemMessage(hwndDlg, IDC_LV2STATUS, CB_SETITEMDATA, item, (LPARAM)statusModeList[i]);
if (statusModeList[i] == setting->lv1Status) {
SendDlgItemMessage(hwndDlg,IDC_LV1STATUS,CB_SETCURSEL,(WPARAM)item,0);
@@ -229,9 +229,8 @@ static INT_PTR CALLBACK DlgProcAutoAwayRulesOpts(HWND hwndDlg, UINT msg, WPARAM
setting->lv1Status = (int)SendDlgItemMessage(hwndDlg, IDC_LV1STATUS, CB_GETITEMDATA, SendDlgItemMessage(hwndDlg, IDC_LV1STATUS, CB_GETCURSEL, 0, 0), 0);
{
TCHAR setNaStr[256];
- mir_sntprintf(setNaStr, SIZEOF(setNaStr), TranslateT("minutes of %s mode"),
- CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, setting->lv1Status, GSMDF_TCHAR ));
- SetDlgItemText(hwndDlg,IDC_SETNASTR,setNaStr);
+ mir_sntprintf(setNaStr, SIZEOF(setNaStr), TranslateT("minutes of %s mode"), pcli->pfnGetStatusModeDescription(setting->lv1Status, 0));
+ SetDlgItemText(hwndDlg, IDC_SETNASTR, setNaStr);
}
break;