From 8bd43ae4f790fcefecbcf1950ef4f36d1c4a6d20 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 2 Aug 2022 18:00:02 +0300 Subject: UInfoEx: advanced options dialog -> UI classes --- plugins/UserInfoEx/res/resource.rc | 1 - plugins/UserInfoEx/src/ctrl_contact.cpp | 4 +- plugins/UserInfoEx/src/dlg_propsheet.cpp | 6 +- .../UserInfoEx/src/ex_import/dlg_ExImModules.cpp | 2 +- .../UserInfoEx/src/ex_import/dlg_ExImProgress.cpp | 2 +- plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp | 2 +- plugins/UserInfoEx/src/init.cpp | 6 + plugins/UserInfoEx/src/mir_db.cpp | 2 +- plugins/UserInfoEx/src/mir_icolib.cpp | 2 +- plugins/UserInfoEx/src/mir_icolib.h | 3 - plugins/UserInfoEx/src/psp_anniversary.cpp | 2 +- plugins/UserInfoEx/src/psp_options.cpp | 145 +++++++++------------ plugins/UserInfoEx/src/resource.h | 1 - plugins/UserInfoEx/src/stdafx.h | 3 + plugins/UserInfoEx/src/svc_constants.h | 2 - plugins/UserInfoEx/src/svc_email.cpp | 4 +- plugins/UserInfoEx/src/svc_refreshci.cpp | 2 +- 17 files changed, 84 insertions(+), 105 deletions(-) diff --git a/plugins/UserInfoEx/res/resource.rc b/plugins/UserInfoEx/res/resource.rc index b2d0d9acc4..53d4c6779a 100644 --- a/plugins/UserInfoEx/res/resource.rc +++ b/plugins/UserInfoEx/res/resource.rc @@ -339,7 +339,6 @@ BEGIN "Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,67,290,10 CONTROL "Enable extended 'send/receive e-mail' service (*)",CHECK_OPT_SREMAIL_ENABLED, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,91,275,10 - CONTROL "Use Windows timezone",CHECK_OPT_AUTOTIMEZONE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,106,275,10 LTEXT "(*) Requires Miranda to be restarted.",IDC_STATIC,11,207,167,8 PUSHBUTTON "Reset factory defaults",BTN_OPT_RESET,209,204,95,14 END diff --git a/plugins/UserInfoEx/src/ctrl_contact.cpp b/plugins/UserInfoEx/src/ctrl_contact.cpp index 9ec68ef570..4e90b1ed2e 100644 --- a/plugins/UserInfoEx/src/ctrl_contact.cpp +++ b/plugins/UserInfoEx/src/ctrl_contact.cpp @@ -152,7 +152,7 @@ static INT_PTR CALLBACK DlgProc_EMail(HWND hDlg, UINT msg, WPARAM wParam, LPARAM SetUserData(hDlg, lParam); SendDlgItemMessage(hDlg, IDC_HEADERBAR, WM_SETICON, 0, (LPARAM)g_plugin.getIcon(IDI_DLG_EMAIL, true)); - if (g_plugin.getByte(SET_ICONS_BUTTONS, 1)) { + if (g_plugin.bButtonIcons) { SendDlgItemMessage(hDlg, IDOK, BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(IDI_BTN_OK)); SendDlgItemMessage(hDlg, IDCANCEL, BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(IDI_BTN_CLOSE)); } @@ -246,7 +246,7 @@ INT_PTR CALLBACK DlgProc_Phone(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam SetUserData(hDlg, lParam); SendDlgItemMessage(hDlg, IDC_HEADERBAR, WM_SETICON, 0, (LPARAM)g_plugin.getIcon(IDI_DLG_PHONE, TRUE)); - if (g_plugin.getByte(SET_ICONS_BUTTONS, 1)) { + if (g_plugin.bButtonIcons) { SendDlgItemMessage(hDlg, IDOK, BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(IDI_BTN_OK)); SendDlgItemMessage(hDlg, IDCANCEL, BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(IDI_BTN_CLOSE)); } diff --git a/plugins/UserInfoEx/src/dlg_propsheet.cpp b/plugins/UserInfoEx/src/dlg_propsheet.cpp index 445833be29..c93136e8fb 100644 --- a/plugins/UserInfoEx/src/dlg_propsheet.cpp +++ b/plugins/UserInfoEx/src/dlg_propsheet.cpp @@ -854,7 +854,7 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar { IDI_BTN_APPLY, BM_SETIMAGE, IDAPPLY } }; - const int numIconsToSet = g_plugin.getByte(SET_ICONS_BUTTONS, 1) ? _countof(idIcon) : 1; + const int numIconsToSet = g_plugin.bButtonIcons ? _countof(idIcon) : 1; IcoLib_SetCtrlIcons(hDlg, idIcon, numIconsToSet); @@ -954,7 +954,7 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar case ACKTYPE_GETINFO: // is contact the owner of the dialog or any metasubcontact of the owner? skip handling otherwise! if (ack->hContact != pPs->hContact) { - if (!g_plugin.getByte(SET_META_SCAN, TRUE)) + if (!g_plugin.bMetaScan) break; for (i = 0; i < pPs->nSubContacts; i++) { @@ -1021,7 +1021,7 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar if (hContact != pPs->hContact) { if (pPs->hContact != db_mc_getMeta(hContact)) break; - if (!g_plugin.getByte(SET_META_SCAN, TRUE)) + if (!g_plugin.bMetaScan) break; } diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp b/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp index 773edbab63..8fba18e0b7 100644 --- a/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp +++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp @@ -165,7 +165,7 @@ INT_PTR CALLBACK SelectModulesToExport_DlgProc(HWND hDlg, UINT uMsg, WPARAM wPar { IDI_EXPORT, BM_SETIMAGE, IDOK }, { IDI_BTN_CLOSE, BM_SETIMAGE, IDCANCEL } }; - const int numIconsToSet = g_plugin.getByte(SET_ICONS_BUTTONS, 1) ? _countof(idIcon) : 2; + const int numIconsToSet = g_plugin.bButtonIcons ? _countof(idIcon) : 2; IcoLib_SetCtrlIcons(hDlg, idIcon, numIconsToSet); // create imagelist for treeview diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.cpp b/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.cpp index f16f5048e5..5a49125c94 100644 --- a/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.cpp +++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.cpp @@ -42,7 +42,7 @@ INT_PTR CALLBACK DlgProcProgress(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lPar { switch (msg) { case WM_INITDIALOG: - IcoLib_SetCtrlIcons(hDlg, idIcon, g_plugin.getByte(SET_ICONS_BUTTONS, 1) ? _countof(idIcon) : 2); + IcoLib_SetCtrlIcons(hDlg, idIcon, g_plugin.bButtonIcons ? _countof(idIcon) : 2); TranslateDialogDefault(hDlg); SendDlgItemMessage(hDlg, IDCANCEL, BUTTONTRANSLATE, NULL, NULL); diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp index f4ea0a1e10..366ab181db 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp @@ -35,7 +35,7 @@ INT_PTR CALLBACK DlgProc_DataHistory(HWND hDlg, UINT msg, WPARAM wParam, LPARAM { IDI_EXPORT, BM_SETIMAGE, IDOK }, { IDI_BTN_CLOSE, BM_SETIMAGE, IDCANCEL } }; - const int numIconsToSet = g_plugin.getByte(SET_ICONS_BUTTONS, 1) ? _countof(idIcon) : 2; + const int numIconsToSet = g_plugin.bButtonIcons ? _countof(idIcon) : 2; IcoLib_SetCtrlIcons(hDlg, idIcon, numIconsToSet); SendDlgItemMessage(hDlg, IDOK, BUTTONTRANSLATE, NULL, NULL); diff --git a/plugins/UserInfoEx/src/init.cpp b/plugins/UserInfoEx/src/init.cpp index 4961c6f5e6..4753ffa949 100644 --- a/plugins/UserInfoEx/src/init.cpp +++ b/plugins/UserInfoEx/src/init.cpp @@ -46,6 +46,12 @@ static PLUGININFOEX pluginInfoEx = CMPlugin::CMPlugin() : PLUGIN(MODULENAME, pluginInfoEx), + // Advanced options + bCheckVersion(MODULENAME, "CheckIconPackVersion", true), + bMetaScan(MODULENAME, "MetaScan", true), + bButtonIcons(MODULENAME, "ButtonIcons", true), + bEmailService(MODULENAME, "emailEx", true), + // Propsheet options bAero(MODULENAME, "AeroAdaption", true), bReadOnly(MODULENAME, "PBCIReadOnly", false), diff --git a/plugins/UserInfoEx/src/mir_db.cpp b/plugins/UserInfoEx/src/mir_db.cpp index ba5c612a45..176753d2cc 100644 --- a/plugins/UserInfoEx/src/mir_db.cpp +++ b/plugins/UserInfoEx/src/mir_db.cpp @@ -88,7 +88,7 @@ bool IsMeta(LPCSTR pszModule) bool IsMetaAndScan(LPCSTR pszModule) { - return 0 != g_plugin.getByte(SET_META_SCAN, TRUE) && IsMeta(pszModule); + return 0 != g_plugin.bMetaScan && IsMeta(pszModule); } } /* namespace Module */ diff --git a/plugins/UserInfoEx/src/mir_icolib.cpp b/plugins/UserInfoEx/src/mir_icolib.cpp index 941fd25a4c..03afde115a 100644 --- a/plugins/UserInfoEx/src/mir_icolib.cpp +++ b/plugins/UserInfoEx/src/mir_icolib.cpp @@ -154,7 +154,7 @@ wchar_t *IcoLib_GetDefaultIconFileName() static HINSTANCE IcoLib_CheckIconPackVersion(wchar_t *szIconPack) { - if (g_plugin.getByte(SET_ICONS_CHECKFILEVERSION, TRUE)) { + if (g_plugin.bCheckVersion) { if (szIconPack) { wchar_t szAbsolutePath[MAX_PATH]; PathToAbsoluteW(szIconPack, szAbsolutePath); diff --git a/plugins/UserInfoEx/src/mir_icolib.h b/plugins/UserInfoEx/src/mir_icolib.h index 342af48002..930682a95d 100644 --- a/plugins/UserInfoEx/src/mir_icolib.h +++ b/plugins/UserInfoEx/src/mir_icolib.h @@ -29,9 +29,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define SECT_TREE LPGEN("Extended user info") "/" LPGEN("Treeview") #define SECT_REMIND LPGEN("Extended user info") "/" LPGEN("Reminder") -#define SET_ICONS_CHECKFILEVERSION "CheckIconPackVersion" -#define SET_ICONS_BUTTONS "ButtonIcons" - #define ICONINDEX(id) max((min((id), IDI_LASTICON)) - IDI_FIRST_ICON, 0) struct ICONCTRL diff --git a/plugins/UserInfoEx/src/psp_anniversary.cpp b/plugins/UserInfoEx/src/psp_anniversary.cpp index 5e929ace4e..7906b47b35 100644 --- a/plugins/UserInfoEx/src/psp_anniversary.cpp +++ b/plugins/UserInfoEx/src/psp_anniversary.cpp @@ -34,7 +34,7 @@ static INT_PTR CALLBACK DlgProc_AnniversaryEditor(HWND m_hwnd, UINT uMsg, WPARAM SetUserData(m_hwnd, lParam); // set icons - if (g_plugin.getByte(SET_ICONS_BUTTONS, 1)) { + if (g_plugin.bButtonIcons) { SendDlgItemMessage(m_hwnd, IDOK, BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(IDI_BTN_OK)); SendDlgItemMessage(m_hwnd, IDCANCEL, BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(IDI_BTN_CLOSE)); } diff --git a/plugins/UserInfoEx/src/psp_options.cpp b/plugins/UserInfoEx/src/psp_options.cpp index d153747d9b..3ffb988525 100644 --- a/plugins/UserInfoEx/src/psp_options.cpp +++ b/plugins/UserInfoEx/src/psp_options.cpp @@ -290,93 +290,71 @@ static INT_PTR CALLBACK DlgProc_CommonOpts(HWND hDlg, UINT uMsg, WPARAM wParam, ///////////////////////////////////////////////////////////////////////////////////////// // Advanced options dialog -static INT_PTR CALLBACK DlgProc_AdvancedOpts(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) +class CAdvancedOptsDlg : public CDlgBase { - static uint8_t bInitialized = 0; + CCtrlCheck chkVersion, chkMetaScan, chkButtonIcons, chkEmail; + CCtrlButton btnReset; - switch (uMsg) { - case WM_INITDIALOG: - TranslateDialogDefault(hDlg); - bInitialized = 0; - - DBGetCheckBtn(hDlg, CHECK_OPT_ICOVERSION, SET_ICONS_CHECKFILEVERSION, TRUE); - DBGetCheckBtn(hDlg, CHECK_OPT_BUTTONICONS, SET_ICONS_BUTTONS, TRUE); - DBGetCheckBtn(hDlg, CHECK_OPT_METASCAN, SET_META_SCAN, TRUE); - DBGetCheckBtn(hDlg, CHECK_OPT_SREMAIL_ENABLED, SET_EXTENDED_EMAILSERVICE, TRUE); - CheckDlgButton(hDlg, CHECK_OPT_AUTOTIMEZONE, BST_CHECKED); - EnableWindow(GetDlgItem(hDlg, CHECK_OPT_AUTOTIMEZONE), FALSE); - - bInitialized = 1; - return TRUE; +public: + CAdvancedOptsDlg() : + CDlgBase(g_plugin, IDD_OPT_ADVANCED), + btnReset(this, BTN_OPT_RESET), + chkEmail(this, CHECK_OPT_SREMAIL_ENABLED), + chkVersion(this, CHECK_OPT_ICOVERSION), + chkMetaScan(this, CHECK_OPT_METASCAN), + chkButtonIcons(this, CHECK_OPT_BUTTONICONS) + { + CreateLink(chkEmail, g_plugin.bEmailService); + CreateLink(chkVersion, g_plugin.bCheckVersion); + CreateLink(chkMetaScan, g_plugin.bMetaScan); + CreateLink(chkButtonIcons, g_plugin.bButtonIcons); - case WM_NOTIFY: - switch (((LPNMHDR)lParam)->code) { - case PSN_APPLY: - DBWriteCheckBtn(hDlg, CHECK_OPT_ICOVERSION, SET_ICONS_CHECKFILEVERSION); - DBWriteCheckBtn(hDlg, CHECK_OPT_BUTTONICONS, SET_ICONS_BUTTONS); - DBWriteCheckBtn(hDlg, CHECK_OPT_METASCAN, SET_META_SCAN); + btnReset.OnClick = Callback(this, &CAdvancedOptsDlg::onClick_Reset); + } - DBWriteCheckBtn(hDlg, CHECK_OPT_SREMAIL_ENABLED, SET_EXTENDED_EMAILSERVICE); + void onClick_Reset(CCtrlButton *) + { + uint8_t WantReset = MsgBox(m_hwnd, + MB_ICON_WARNING | MB_YESNO, + LPGENW("Question"), + LPGENW("Reset factory defaults"), + LPGENW("This will delete all settings, you've made!\nAll TreeView settings, window positions and any other settings!\n\nAre you sure to proceed?")); + + if (!WantReset) + return; + + DB::CEnumList Settings; + + // delete all skin icons + if (!Settings.EnumSettings(NULL, "SkinIcons")) + for (auto &s : Settings) + if (mir_strncmpi(s, "UserInfoEx", 10) == 0) + db_unset(0, "SkinIcons", s); + + // delete global settings + db_delete_module(NULL, USERINFO"Ex"); + db_delete_module(NULL, USERINFO"ExW"); + + // delete old contactsettings + for (auto &hContact : Contacts()) { + db_unset(hContact, USERINFO, "PListColWidth0"); + db_unset(hContact, USERINFO, "PListColWidth1"); + db_unset(hContact, USERINFO, "PListColWidth2"); + db_unset(hContact, USERINFO, "EMListColWidth0"); + db_unset(hContact, USERINFO, "EMListColWidth1"); + db_unset(hContact, USERINFO, "BirthRemind"); + db_unset(hContact, USERINFO, "RemindBirthday"); + db_unset(hContact, USERINFO, "RemindDaysErlier"); + db_unset(hContact, USERINFO, "vCardPath"); + + db_delete_module(hContact, USERINFO"Ex"); + db_delete_module(hContact, USERINFO"ExW"); } - break; - case WM_COMMAND: - switch (LOWORD(wParam)) { - case CHECK_OPT_ICOVERSION: - case CHECK_OPT_BUTTONICONS: - case CHECK_OPT_METASCAN: - case CHECK_OPT_SREMAIL_ENABLED: - case CHECK_OPT_AUTOTIMEZONE: - if (bInitialized) - NotifyParentOfChange(hDlg); - break; - - case BTN_OPT_RESET: - uint8_t WantReset = MsgBox(hDlg, - MB_ICON_WARNING | MB_YESNO, - LPGENW("Question"), - LPGENW("Reset factory defaults"), - LPGENW("This will delete all settings, you've made!\nAll TreeView settings, window positions and any other settings!\n\nAre you sure to proceed?")); - - if (WantReset) { - DB::CEnumList Settings; - - // delete all skin icons - if (!Settings.EnumSettings(NULL, "SkinIcons")) - for (auto &s : Settings) - if (mir_strncmpi(s, "UserInfoEx", 10) == 0) - db_unset(0, "SkinIcons", s); - - // delete global settings - db_delete_module(NULL, USERINFO"Ex"); - db_delete_module(NULL, USERINFO"ExW"); - - // delete old contactsettings - for (auto &hContact : Contacts()) { - db_unset(hContact, USERINFO, "PListColWidth0"); - db_unset(hContact, USERINFO, "PListColWidth1"); - db_unset(hContact, USERINFO, "PListColWidth2"); - db_unset(hContact, USERINFO, "EMListColWidth0"); - db_unset(hContact, USERINFO, "EMListColWidth1"); - db_unset(hContact, USERINFO, "BirthRemind"); - db_unset(hContact, USERINFO, "RemindBirthday"); - db_unset(hContact, USERINFO, "RemindDaysErlier"); - db_unset(hContact, USERINFO, "vCardPath"); - - db_delete_module(hContact, USERINFO"Ex"); - db_delete_module(hContact, USERINFO"ExW"); - } - - SendMessage(GetParent(hDlg), PSM_FORCECHANGED, NULL, NULL); - MsgBox(hDlg, MB_ICON_INFO, - LPGENW("Ready"), - LPGENW("Everything is done!"), - LPGENW("All settings are reset to default values now!")); - } - } + SendMessage(m_hwndParent, PSM_FORCECHANGED, NULL, NULL); + MsgBox(m_hwnd, MB_ICON_INFO, LPGENW("Ready"), LPGENW("Everything is done!"), LPGENW("All settings are reset to default values now!")); } - return FALSE; -} +}; ///////////////////////////////////////////////////////////////////////////////////////// // Details options dialog @@ -743,14 +721,13 @@ int OnInitOptions(WPARAM wParam, LPARAM) // Advanced page odp.szTab.a = LPGEN("Advanced"); - odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_ADVANCED); - odp.pfnDlgProc = DlgProc_AdvancedOpts; + odp.pszTemplate = 0; + odp.pfnDlgProc = 0; + odp.pDialog = new CAdvancedOptsDlg(); g_plugin.addOptions(wParam, &odp); // Details Dialog page odp.szTab.a = LPGEN("Details dialog"); - odp.pszTemplate = 0; - odp.pfnDlgProc = 0; odp.pDialog = new CDetailsOptsDlg(); g_plugin.addOptions(wParam, &odp); diff --git a/plugins/UserInfoEx/src/resource.h b/plugins/UserInfoEx/src/resource.h index 8a97761ddd..7303f1affc 100644 --- a/plugins/UserInfoEx/src/resource.h +++ b/plugins/UserInfoEx/src/resource.h @@ -177,7 +177,6 @@ #define TXT_HISTORY1 1551 #define GROUP_STATS 1553 #define BTN_BROWSEDIR 1555 -#define CHECK_OPT_AUTOTIMEZONE 1561 #define CHECK_OPT_SREMAIL_ENABLED 1562 #define IDNONE 1565 #define CHECK_OPT_READONLYLABEL 1566 diff --git a/plugins/UserInfoEx/src/stdafx.h b/plugins/UserInfoEx/src/stdafx.h index 7c43b96d5f..ccced93f66 100644 --- a/plugins/UserInfoEx/src/stdafx.h +++ b/plugins/UserInfoEx/src/stdafx.h @@ -107,6 +107,9 @@ struct CMPlugin : public PLUGIN { CMPlugin(); + // Advanced options + CMOption bCheckVersion, bMetaScan, bButtonIcons, bEmailService; + // Prop sheet options CMOption bShowColours, bTreeGroups, bSortTree, bReadOnly, bChangeDetails, bAero; CMOption clrNormal, clrCustom, clrBoth, clrChanged, clrMeta; diff --git a/plugins/UserInfoEx/src/svc_constants.h b/plugins/UserInfoEx/src/svc_constants.h index da9304a742..814d36d134 100644 --- a/plugins/UserInfoEx/src/svc_constants.h +++ b/plugins/UserInfoEx/src/svc_constants.h @@ -50,7 +50,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define SET_MI_STATUS "miStatus" #define SET_MI_ACCOUNT "miAccount" -#define SET_EXTENDED_EMAILSERVICE "emailEx" #define SET_CLIST_EXTRAICON_GENDER "GenderColumn" #define SET_CLIST_EXTRAICON_GENDER2 "cliGender" #define SET_CLIST_EXTRAICON_COUNTRY "CountryColumn" @@ -58,7 +57,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define SET_CLIST_EXTRAICON_EMAIL "cliEmail" #define SET_CLIST_EXTRAICON_PHONE "cliPhone" #define SET_OPT_AUTOTIMEZONE "AutoTimezone" -#define SET_META_SCAN "MetaScan" // database settings (general psp) #define SET_ME_PASSWORD "Password" diff --git a/plugins/UserInfoEx/src/svc_email.cpp b/plugins/UserInfoEx/src/svc_email.cpp index 873328b6fb..63fa25c30b 100644 --- a/plugins/UserInfoEx/src/svc_email.cpp +++ b/plugins/UserInfoEx/src/svc_email.cpp @@ -134,7 +134,7 @@ static int OnPreBuildMenu(WPARAM wParam, LPARAM) void SvcEMailRebuildMenu() { - if (g_plugin.getByte(SET_EXTENDED_EMAILSERVICE, TRUE)) { + if (g_plugin.bEmailService) { if (!hPrebuildMenuHook) hPrebuildMenuHook = HookEvent(ME_CLIST_PREBUILDCONTACTMENU, OnPreBuildMenu); @@ -166,7 +166,7 @@ void SvcEMailRebuildMenu() void SvcEMailLoadModule() { - if (g_plugin.getByte(SET_EXTENDED_EMAILSERVICE, TRUE)) { + if (g_plugin.bEmailService) { // create own email send command DestroyServiceFunction(MS_EMAIL_SENDEMAIL); CreateServiceFunction(MS_EMAIL_SENDEMAIL, MenuCommand); diff --git a/plugins/UserInfoEx/src/svc_refreshci.cpp b/plugins/UserInfoEx/src/svc_refreshci.cpp index 9f3c93d349..77a2076b48 100644 --- a/plugins/UserInfoEx/src/svc_refreshci.cpp +++ b/plugins/UserInfoEx/src/svc_refreshci.cpp @@ -225,7 +225,7 @@ class CDlgUpdProgress : public CUpdProgress { IDI_BTN_DOWNARROW, BM_SETIMAGE, IDSKIP }, { IDI_BTN_CLOSE, BM_SETIMAGE, IDCANCEL } }; - IcoLib_SetCtrlIcons(hWnd, idIcon, g_plugin.getByte(SET_ICONS_BUTTONS, 1) ? 2 : 1); + IcoLib_SetCtrlIcons(hWnd, idIcon, g_plugin.bButtonIcons ? 2 : 1); SendDlgItemMessage(hWnd, IDCANCEL, BUTTONTRANSLATE, NULL, NULL); SendDlgItemMessage(hWnd, IDSKIP, BUTTONTRANSLATE, NULL, NULL); -- cgit v1.2.3