"settings.mute.try-resume-media-on-unmute": "Versuche Medien beim Wiederherstellen wieder abzuspielen.",
"settings.quiet-hours.intro": "Während der Ruhezeit schaltet WinMute alle Audiogeräte auf Stumm und stellt anschließend die Lautstärke wieder her.",
"settings.quiet-hours.enable": "Ruhzeit aktivieren",
- "settings.quiet-hours.start-time-label": "Beginn:",
- "settings.quiet-hours.end-time-label": "Ende:",
+ "settings.quiet-hours.start-time-label": "Beginn",
+ "settings.quiet-hours.end-time-label": "Ende",
"settings.quiet-hours.force-unmute": "Lautstärkewiederherstellung erzwingen",
"settings.quiet-hours.force-unmute-description": "Die Lautstärke wird von allen Audiogeräten wiederhergestellt, unabhängig davon ob diese vor der Ruhezeit stumm geschaltet waren, oder nicht.",
"settings.quiet-hours.show-notifications": "Benachrichtigungen zur Ruhezeit anzeigen",
"settings.mute.try-resume-media-on-unmute": "Try resuming media when unmuting.",
"settings.quiet-hours.intro": "During Quiet Hours WinMute automatically mutes the computers audio devices and unmutes them afterwards.",
"settings.quiet-hours.enable": "Enable Quiet Hours",
- "settings.quiet-hours.start-time-label": "Start time:",
- "settings.quiet-hours.end-time-label": "End time:",
+ "settings.quiet-hours.start-time-label": "Start time",
+ "settings.quiet-hours.end-time-label": "End time",
"settings.quiet-hours.force-unmute": "Force unmute",
"settings.quiet-hours.force-unmute-description": "If force unmute is enabled, WinMute will unmute the computers audio devices when quiet hours end and not take into account if they were already muted before quiet hours started.",
"settings.quiet-hours.show-notifications": "Show Quiet Hours notifications",
return TRUE;
}
case WM_COMMAND:
- if (LOWORD(wParam) == IDOK)
- {
+ if (LOWORD(wParam) == IDOK) {
HWND hStart = GetDlgItem(hDlg, IDC_QUIET_HOURS_START_PICKER);
HWND hEnd = GetDlgItem(hDlg, IDC_QUIET_HOURS_END_PICKER);
SYSTEMTIME start{};
SetupListView(hQuietHoursTimes);
- for (const auto &t : settings->GetQuietHoursTimes())
- {
+ for (const auto &t : settings->GetQuietHoursTimes()) {
auto *entry = new QuietHoursEntry();
entry->start = t.first;
entry->end = t.second;
case WM_NOTIFY:
{
const NMHDR *pnmh = reinterpret_cast<const NMHDR *>(lParam);
- if (pnmh->idFrom == IDC_QUIET_HOURS_TIMES && pnmh->code == LVN_ITEMCHANGED)
- {
+ if (pnmh->idFrom == IDC_QUIET_HOURS_TIMES && pnmh->code == LVN_ITEMCHANGED) {
HWND hQuietHoursTimes = GetDlgItem(hDlg, IDC_QUIET_HOURS_TIMES);
const bool qhEnabled = Button_GetCheck(GetDlgItem(hDlg, IDC_ENABLEQUIETHOURS)) == BST_CHECKED;
UpdateButtonStates(hDlg, hQuietHoursTimes, qhEnabled);
+ } else if (pnmh->idFrom == IDC_QUIET_HOURS_TIMES && pnmh->code == NM_DBLCLK) {
+ auto nmItemActivate = reinterpret_cast<const LPNMITEMACTIVATE>(lParam);
+ if (nmItemActivate->iItem != -1) {
+ SendMessage(hDlg, WM_COMMAND, MAKEWPARAM(IDC_QUIET_HOURS_EDIT, 0), 0);
+ }
}
return 0;
}
const int entries = ListView_GetItemCount(hQuietHoursTimes);
std::vector<std::pair<DWORD, DWORD>> times;
times.reserve(entries);
- for (int i = 0; i < entries; ++i)
- {
+ for (int i = 0; i < entries; ++i) {
LVITEM lvi{};
lvi.iItem = i;
lvi.mask = LVIF_PARAM;
LVITEM lvi{};
lvi.mask = LVIF_PARAM;
lvi.iItem = sel;
- if (ListView_GetItem(hQuietHoursTimes, &lvi) && lvi.lParam != 0)
- {
+ if (ListView_GetItem(hQuietHoursTimes, &lvi) && lvi.lParam != 0) {
QuietHoursEntry *entry = reinterpret_cast<QuietHoursEntry *>(lvi.lParam);
QuietHoursEntry editCopy = *entry;
if (DialogBoxParam(
MAKEINTRESOURCE(IDD_SETTINGS_QUIETHOURS_ADD),
hDlg,
Settings_QuietHoursAddDlgProc,
- reinterpret_cast<LPARAM>(&editCopy)) == 0)
- {
- if (HasOverlapWithExistingEntries(hQuietHoursTimes, &editCopy, sel))
- {
+ reinterpret_cast<LPARAM>(&editCopy)) == 0) {
+ if (HasOverlapWithExistingEntries(hQuietHoursTimes, &editCopy, sel)) {
ShowOverlapError(hDlg);
- }
- else
- {
+ } else {
entry->start = editCopy.start;
entry->end = editCopy.end;
UpdateListViewItem(hQuietHoursTimes, sel, entry);