summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-05-25 11:02:42 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-05-25 11:02:42 +0000
commit13de244e9d4454d23b6f8fbc52a498d368298ad2 (patch)
tree9d7b960c0f5c8c9a1d579d935b700497541461ac /plugins
parent0e44a2ba9f07013b3c2c54deef1fbbc845ab6bda (diff)
clist modern options fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@171 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Modernb/modern_statusbar_options.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/plugins/Modernb/modern_statusbar_options.cpp b/plugins/Modernb/modern_statusbar_options.cpp
index 6e46584b8d..7bea01fe57 100644
--- a/plugins/Modernb/modern_statusbar_options.cpp
+++ b/plugins/Modernb/modern_statusbar_options.cpp
@@ -82,8 +82,7 @@ static void UpdateStatusBarOptionsDisplay(HWND hwndDlg)
BOOL perProto = (BOOL)IsDlgButtonChecked(hwndDlg,IDC_STATUSBAR_PER_PROTO);
HWND hwndComboBox = GetDlgItem( hwndDlg, IDC_STATUSBAR_PROTO_LIST );
StatusBarProtocolOptions sbpo;
- int curSelProto = SendMessage(hwndComboBox, CB_GETCURSEL, 0, 0) - 1; //first entry is the combo box is a constant.
-
+ int curSelProto = SendMessage(hwndComboBox, CB_GETITEMDATA, SendMessage(hwndComboBox, CB_GETCURSEL, 0, 0), NULL) - 1; //first entry is the combo box is a constant.
if (curSelProto < 0)
perProto = FALSE;
@@ -169,8 +168,7 @@ static void UpdateStatusBarOptionsDisplay(HWND hwndDlg)
LOGFONTA lf;
BOOL perProto = IsDlgButtonChecked(hwndDlg, IDC_STATUSBAR_PER_PROTO);
HWND hwndComboBox = GetDlgItem( hwndDlg, IDC_STATUSBAR_PROTO_LIST );
- int curSelProto = SendMessage(hwndComboBox, CB_GETCURSEL, 0, 0) - 1; //first entry in the combo box is a constant
-
+ int curSelProto = SendMessage(hwndComboBox, CB_GETITEMDATA, SendMessage(hwndComboBox, CB_GETCURSEL, 0, 0), NULL) - 1; //first entry is the combo box is a constant.
if (curSelProto < 0)
perProto = FALSE;
@@ -203,17 +201,15 @@ static void UpdateStatusBarOptionsDisplay(HWND hwndDlg)
SetWindowLongPtr(GetDlgItem(hwndDlg,IDC_STATUSBAR_PROTO_LIST),GWLP_USERDATA,(LONG_PTR)dat);
SendMessage(hwndComboBox, CB_ADDSTRING, 0, (LPARAM)TranslateT( "<<Global>>" ));
+ SendMessage(hwndComboBox, CB_SETITEMDATA, 0, (LPARAM)0);
for ( i = 0; i < count; i++ )
{
- szName = accs[i]->szProtoName;
+ szName = accs[i]->szModuleName;
dat[i].szName = szName;
-#ifdef UNICODE
- SendMessage(hwndComboBox, CB_ADDSTRING, 0, (LPARAM)accs[i]->tszAccountName);
-#else
- SendMessage(hwndComboBox, CB_ADDSTRING, 0, (LPARAM)accs[i]->tszAccountName);
-#endif
+ DWORD dwNewId = SendMessage(hwndComboBox, CB_ADDSTRING, 0, (LPARAM)accs[i]->tszAccountName);
+ SendMessage(hwndComboBox, CB_SETITEMDATA, dwNewId, (LPARAM)(i+1));
mir_snprintf(buf, SIZEOF(buf), "SBarAccountIsCustom_%s", szName);
dat[i].AccountIsCustomized = ModernGetSettingByte(NULL,"CLUI", buf, SETTING_SBARACCOUNTISCUSTOM_DEFAULT);