diff options
Diffstat (limited to 'plugins/WhenWasIt/src')
-rw-r--r-- | plugins/WhenWasIt/src/options.cpp | 32 | ||||
-rw-r--r-- | plugins/WhenWasIt/src/resource.h | 3 |
2 files changed, 14 insertions, 21 deletions
diff --git a/plugins/WhenWasIt/src/options.cpp b/plugins/WhenWasIt/src/options.cpp index cd4fb8463d..d4f90d3125 100644 --- a/plugins/WhenWasIt/src/options.cpp +++ b/plugins/WhenWasIt/src/options.cpp @@ -71,10 +71,23 @@ static wchar_t* strtrim(wchar_t *str) class COptionsDlg : public CDlgBase { CCtrlButton btnPreview; - CCtrlCheck chkPopups, chkClistIcon, chkDialog, chkOncePerDay; + CCtrlCheck chkPopups, chkDialog, chkOncePerDay; CCtrlCombo cmbAge, cmbLClick, cmbRClick, cmbNotify; CCtrlColor clrFore, clrBack; + SIZE oldPopupsSize, oldDialogSize; + + UI_MESSAGE_MAP(COptionsDlg, CDlgBase); + UI_MESSAGE(WM_INITDIALOG, OnInitWindow); + UI_MESSAGE_MAP_END(); + + INT_PTR OnInitWindow(UINT, WPARAM, LPARAM) + { + oldPopupsSize = GetControlTextSize(GetDlgItem(m_hwnd, IDC_USE_POPUPS)); + oldDialogSize = GetControlTextSize(GetDlgItem(m_hwnd, IDC_USE_DIALOG)); + return FALSE; + } + public: COptionsDlg() : CDlgBase(g_plugin, IDD_OPT_WWI), @@ -87,7 +100,6 @@ public: cmbRClick(this, IDC_RIGHT_CLICK), chkPopups(this, IDC_USE_POPUPS), chkDialog(this, IDC_USE_DIALOG), - chkClistIcon(this, IDC_USE_CLISTICON), chkOncePerDay(this, IDC_ONCE_PER_DAY) { CreateLink(clrFore, g_plugin.foreground); @@ -97,18 +109,12 @@ public: chkPopups.OnChange = Callback(this, &COptionsDlg::onChange_Popups); chkDialog.OnChange = Callback(this, &COptionsDlg::onChange_Dialog); - chkClistIcon.OnChange = Callback(this, &COptionsDlg::onChange_ClistIcon); chkOncePerDay.OnChange = Callback(this, &COptionsDlg::onChange_OncePerDay); } bool OnInitDialog() override { - SIZE oldPopupsSize = GetControlTextSize(chkPopups.GetHwnd()); - SIZE oldClistIconSize = GetControlTextSize(chkClistIcon.GetHwnd()); - SIZE oldDialogSize = GetControlTextSize(GetDlgItem(m_hwnd, IDC_USE_DIALOG)); - EnlargeControl(chkPopups.GetHwnd(), GetDlgItem(m_hwnd, IDC_POPUPS_STATIC), oldPopupsSize); - EnlargeControl(chkClistIcon.GetHwnd(), GetDlgItem(m_hwnd, IDC_CLIST_STATIC), oldClistIconSize); EnlargeControl(GetDlgItem(m_hwnd, IDC_USE_DIALOG), GetDlgItem(m_hwnd, IDC_DIALOG_STATIC), oldDialogSize); for (auto &it : szShowAgeMode) @@ -155,9 +161,6 @@ public: CheckDlgButton(m_hwnd, IDC_USE_DIALOG, (g_plugin.bUseDialog) ? BST_CHECKED : BST_UNCHECKED); chkPopups.SetState(g_plugin.bUsePopups); - - chkClistIcon.SetState(true); - chkClistIcon.Disable(); return true; } @@ -220,13 +223,6 @@ public: cmbRClick.Enable(bEnable); } - void onChange_ClistIcon(CCtrlCheck *pCheck) - { - bool bEnable = pCheck->GetState(); - EnableWindow(GetDlgItem(m_hwnd, IDC_CLIST_STATIC), bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_ADVANCED_ICON), bEnable); - } - void onChange_Dialog(CCtrlCheck *pCheck) { bool bEnable = pCheck->GetState(); diff --git a/plugins/WhenWasIt/src/resource.h b/plugins/WhenWasIt/src/resource.h index 063a8e2ef8..debc690fbe 100644 --- a/plugins/WhenWasIt/src/resource.h +++ b/plugins/WhenWasIt/src/resource.h @@ -27,14 +27,11 @@ #define IDD_ADD_ANNIVERSARY 127
#define IDD_UPCOMING 128
#define IDC_USE_POPUPS 1002
-#define IDC_USE_CLISTICON 1003
#define IDC_USE_DIALOG 1004
#define IDC_DAYS_IN_ADVANCE 1005
-#define IDC_ADVANCED_ICON 1008
#define IDC_CHECK_INTERVAL 1009
#define IDC_POPUP_TIMEOUT 1010
#define IDC_POPUPS_STATIC 1011
-#define IDC_CLIST_STATIC 1012
#define IDC_BACKGROUND 1014
#define IDC_FOREGROUND 1015
#define IDC_BIRTHDAYS_LIST 1016
|