From b02e4589fbe33a2f623f044c2056a831f47bbe37 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 22 Dec 2013 20:06:54 +0000 Subject: - options setting fix; - even that cycle is useless; git-svn-id: http://svn.miranda-ng.org/main/trunk@7344 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/UserInfoEx/src/psp_options.cpp | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) (limited to 'plugins/UserInfoEx/src/psp_options.cpp') 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); -- cgit v1.2.3