diff options
author | George Hazan <george.hazan@gmail.com> | 2025-01-03 16:45:17 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2025-01-03 16:45:17 +0300 |
commit | 7dc299c08b20c787a3eeb90d5ca61d89b31495b5 (patch) | |
tree | d36c2bd8e55c040ead4a715375715eb245964e8c /plugins/NotesAndReminders/src/reminders.cpp | |
parent | 96982848831badb4584210332afe870caa22a48b (diff) |
fixes #4823 (Notes and Reminders: неочевиден интервал повторяющегося напоминания)
Diffstat (limited to 'plugins/NotesAndReminders/src/reminders.cpp')
-rw-r--r-- | plugins/NotesAndReminders/src/reminders.cpp | 29 |
1 files changed, 19 insertions, 10 deletions
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)
|