From 7dc299c08b20c787a3eeb90d5ca61d89b31495b5 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 3 Jan 2025 16:45:17 +0300 Subject: =?UTF-8?q?fixes=20#4823=20(Notes=20and=20Reminders:=20=D0=BD?= =?UTF-8?q?=D0=B5=D0=BE=D1=87=D0=B5=D0=B2=D0=B8=D0=B4=D0=B5=D0=BD=20=D0=B8?= =?UTF-8?q?=D0=BD=D1=82=D0=B5=D1=80=D0=B2=D0=B0=D0=BB=20=D0=BF=D0=BE=D0=B2?= =?UTF-8?q?=D1=82=D0=BE=D1=80=D1=8F=D1=8E=D1=89=D0=B5=D0=B3=D0=BE=D1=81?= =?UTF-8?q?=D1=8F=20=D0=BD=D0=B0=D0=BF=D0=BE=D0=BC=D0=B8=D0=BD=D0=B0=D0=BD?= =?UTF-8?q?=D0=B8=D1=8F)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/NotesAndReminders/src/reminders.cpp | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) (limited to 'plugins/NotesAndReminders/src/reminders.cpp') diff --git a/plugins/NotesAndReminders/src/reminders.cpp b/plugins/NotesAndReminders/src/reminders.cpp index a4853349ea..63264c0e9c 100644 --- a/plugins/NotesAndReminders/src/reminders.cpp +++ b/plugins/NotesAndReminders/src/reminders.cpp @@ -751,6 +751,14 @@ protected: mir_subclassWindow(m_date.GetHwnd(), DatePickerWndProc); } + void PopulateRepeatCombo(CCtrlCombo &ctrl) + { + ctrl.AddString(TranslateT("Don't repeat"), REPEAT::NONE); + ctrl.AddString(TranslateT("Repeat daily"), REPEAT::DAILY); + ctrl.AddString(TranslateT("Repeat weekly"), REPEAT::WEEKLY); + ctrl.AddString(TranslateT("Repeat monthly"), REPEAT::MONTHLY); + } + /////////////////////////////////////////////////////////////////////////////////////// // NOTE: may seem like a bit excessive time converstion and handling, but this is // done in order to gracefully handle crossing daylight saving boundaries @@ -1115,16 +1123,20 @@ public: BringWindowToTop(m_hwnd); - PopulateTimeOffsetCombo(); - - cmbRemindAgainIn.SetCurSel(0); - chkAfter.SetState(true); - chkOnDate.SetState(false); - if (m_pReminder->RepeatMode) { chkOnDate.Hide(); chkAfter.Disable(); cmbRemindAgainIn.Disable(); + + PopulateRepeatCombo(cmbRemindAgainIn); + cmbRemindAgainIn.SetCurSel(m_pReminder->RepeatMode); + } + else { + PopulateTimeOffsetCombo(); + + cmbRemindAgainIn.SetCurSel(0); + chkAfter.SetState(true); + chkOnDate.SetState(false); } edtText.SendMsg(EM_LIMITTEXT, MAX_REMINDER_LEN, 0); @@ -1341,10 +1353,7 @@ public: bool OnInitDialog() override { // populate repeat mode combo - cmbMode.AddString(TranslateT("Don't repeat"), REPEAT::NONE); - cmbMode.AddString(TranslateT("Repeat daily"), REPEAT::DAILY); - cmbMode.AddString(TranslateT("Repeat weekly"), REPEAT::WEEKLY); - cmbMode.AddString(TranslateT("Repeat monthly"), REPEAT::MONTHLY); + PopulateRepeatCombo(cmbMode); SYSTEMTIME tm; // opening the edit reminder dialog (uses same dialog resource as add reminder) -- cgit v1.2.3