diff options
author | George Hazan <george.hazan@gmail.com> | 2013-12-22 20:06:54 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-12-22 20:06:54 +0000 |
commit | b02e4589fbe33a2f623f044c2056a831f47bbe37 (patch) | |
tree | 3307971f0da39f44dca3c7c4099a9a2e5a241e49 /plugins/UserInfoEx/src/psp_options.cpp | |
parent | 4c940062ccbf560f057b22a9a5dabe72f17a1222 (diff) |
- options setting fix;
- even that cycle is useless;
git-svn-id: http://svn.miranda-ng.org/main/trunk@7344 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/UserInfoEx/src/psp_options.cpp')
-rw-r--r-- | plugins/UserInfoEx/src/psp_options.cpp | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/plugins/UserInfoEx/src/psp_options.cpp b/plugins/UserInfoEx/src/psp_options.cpp index a79e2ea8be..b4267d85f0 100644 --- a/plugins/UserInfoEx/src/psp_options.cpp +++ b/plugins/UserInfoEx/src/psp_options.cpp @@ -322,8 +322,8 @@ static INT_PTR CALLBACK DlgProc_CommonOpts(HWND hDlg, UINT uMsg, WPARAM wParam, CheckDlgButton(hDlg, CHECK_OPT_EMAILICON, g_eiEmail);
CheckDlgButton(hDlg, CHECK_OPT_PHONEICON, g_eiPhone);
CheckDlgButton(hDlg, CHECK_OPT_HOMEPAGEICON, g_eiHome);
- CheckDlgButton(hDlg, CHECK_OPT_FLAGSUNKNOWN, gFlagsOpts.bUseUnknownFlag);
- CheckDlgButton(hDlg, CHECK_OPT_FLAGSMSGSTATUS, gFlagsOpts.bShowStatusIconFlag);
+ CheckDlgButton(hDlg, CHECK_OPT_FLAGSUNKNOWN, g_bUseUnknownFlag);
+ CheckDlgButton(hDlg, CHECK_OPT_FLAGSMSGSTATUS, g_bShowStatusIconFlag);
// misc
DBGetCheckBtn(hDlg, CHECK_OPT_ZODIACAVATAR, SET_ZODIAC_AVATARS, FALSE);
@@ -344,28 +344,26 @@ static INT_PTR CALLBACK DlgProc_CommonOpts(HWND hDlg, UINT uMsg, WPARAM wParam, RebuildMenu();
// extra icon settings
- BOOL FlagsClistChange = 0;
- BOOL FlagsMsgWndChange = 0;
+ bool FlagsClistChange = false, FlagsMsgWndChange = false;
- BYTE valNew = IsDlgButtonChecked(hDlg, CHECK_OPT_FLAGSUNKNOWN);
- if (gFlagsOpts.bUseUnknownFlag != valNew) {
- gFlagsOpts.bUseUnknownFlag = valNew;
+ bool valNew = IsDlgButtonChecked(hDlg, CHECK_OPT_FLAGSUNKNOWN) != 0;
+ if (g_bUseUnknownFlag != valNew) {
+ g_bUseUnknownFlag = valNew;
db_set_b(NULL, MODNAMEFLAGS, "UseUnknownFlag", valNew);
- FlagsClistChange++;
- FlagsMsgWndChange++;
+ FlagsClistChange = true;
+ FlagsMsgWndChange = true;
}
- valNew = IsDlgButtonChecked(hDlg, CHECK_OPT_FLAGSMSGSTATUS);
- if (gFlagsOpts.bShowStatusIconFlag != valNew) {
- gFlagsOpts.bShowStatusIconFlag = valNew;
+ valNew = IsDlgButtonChecked(hDlg, CHECK_OPT_FLAGSMSGSTATUS) != 0;
+ if (g_bShowStatusIconFlag != valNew) {
+ g_bShowStatusIconFlag = valNew;
db_set_b(NULL, MODNAMEFLAGS, "ShowStatusIconFlag", valNew);
- FlagsMsgWndChange++;
+ FlagsMsgWndChange = true;
}
- if (SvcHomepageEnableExtraIcons(0 != IsDlgButtonChecked(hDlg, CHECK_OPT_HOMEPAGEICON), true) ||
- SvcEMailEnableExtraIcons(0 != IsDlgButtonChecked(hDlg, CHECK_OPT_EMAILICON), true) ||
- SvcPhoneEnableExtraIcons(0 != IsDlgButtonChecked(hDlg, CHECK_OPT_PHONEICON), true) ||
- SvcGenderEnableExtraIcons(0 != IsDlgButtonChecked(hDlg, CHECK_OPT_GENDER), true))
- FlagsClistChange = true;
+ FlagsClistChange |= SvcHomepageEnableExtraIcons(0 != IsDlgButtonChecked(hDlg, CHECK_OPT_HOMEPAGEICON), true);
+ FlagsClistChange |= SvcEMailEnableExtraIcons(0 != IsDlgButtonChecked(hDlg, CHECK_OPT_EMAILICON), true);
+ FlagsClistChange |= SvcPhoneEnableExtraIcons(0 != IsDlgButtonChecked(hDlg, CHECK_OPT_PHONEICON), true);
+ FlagsClistChange |= SvcGenderEnableExtraIcons(0 != IsDlgButtonChecked(hDlg, CHECK_OPT_GENDER), true);
if (FlagsClistChange) pcli->pfnSetAllExtraIcons(NULL);
if (FlagsMsgWndChange) UpdateStatusIcons(NULL);
|