summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2016-12-28 10:17:05 +0300
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2016-12-28 10:19:20 +0300
commit4efdd531337b74d819a40c87c454a0fa1f6ca838 (patch)
treee9794181dbf711557be2ad9308186815dcc041dd /plugins
parentaf26c57ec9299cbdd12430e22873dcb3747ce429 (diff)
plugins:
alarms: "selected days" mode db write/load fix, ui fix
Diffstat (limited to 'plugins')
-rwxr-xr-xplugins/Alarms/src/alarmlist.cpp13
-rwxr-xr-xplugins/Alarms/src/options.cpp3
2 files changed, 11 insertions, 5 deletions
diff --git a/plugins/Alarms/src/alarmlist.cpp b/plugins/Alarms/src/alarmlist.cpp
index 6988f436f6..d9bb0ed360 100755
--- a/plugins/Alarms/src/alarmlist.cpp
+++ b/plugins/Alarms/src/alarmlist.cpp
@@ -279,6 +279,10 @@ void LoadAlarms()
break;
case OC_WEEKDAYS:
break;
+ case OC_SELECTED_DAYS:
+ mir_snprintf(buff, "SelectedDays%d", i);
+ alarm.day_mask = db_get_dw(0, MODULE, buff, alarm.day_mask);
+ break;
case OC_DAILY:
break;
case OC_MONTHLY:
@@ -327,9 +331,6 @@ void LoadAlarms()
mir_snprintf(buff, "Flags%d", i);
alarm.flags = db_get_dw(0, MODULE, buff, alarm.flags);
- mir_snprintf(buff, "SelectedDays%d", i);
- alarm.flags = db_get_dw(0, MODULE, buff, alarm.day_mask);
-
alarm.id = next_alarm_id++;
alarms.push_back(&alarm);
}
@@ -365,6 +366,10 @@ void SaveAlarms()
break;
case OC_WEEKDAYS:
break;
+ case OC_SELECTED_DAYS:
+ mir_snprintf(buff, "SelectedDays%d", index);
+ db_set_dw(0, MODULE, buff, i->day_mask);
+ break;
case OC_WEEKLY:
mir_snprintf(buff, "STDayOfWeek%d", index);
db_set_w(0, MODULE, buff, i->time.wDayOfWeek);
@@ -402,8 +407,6 @@ void SaveAlarms()
mir_snprintf(buff, "Flags%d", index);
db_set_dw(0, MODULE, buff, i->flags);
- mir_snprintf(buff, "SelectedDays%d", index);
- db_set_dw(0, MODULE, buff, i->day_mask);
}
db_set_w(0, MODULE, "Count", index);
}
diff --git a/plugins/Alarms/src/options.cpp b/plugins/Alarms/src/options.cpp
index 381e38b674..dbc5cf3dcc 100755
--- a/plugins/Alarms/src/options.cpp
+++ b/plugins/Alarms/src/options.cpp
@@ -591,6 +591,9 @@ static INT_PTR CALLBACK DlgProcAddEdit(HWND hwndDlg, UINT msg, WPARAM wParam, LP
SendMessage(hwndDlg, WMU_UPDATETIME, 0, 0);
SendMessage(hwndDlg, WMU_SETTIME, 0, 0);
break;
+ case IDC_CHK_DAY1: case IDC_CHK_DAY2: case IDC_CHK_DAY3: case IDC_CHK_DAY4: case IDC_CHK_DAY5: case IDC_CHK_DAY6: case IDC_CHK_DAY7:
+ EnableWindow(GetDlgItem(hwndDlg, IDOK), TRUE);
+ break;
case IDC_CHK_ACOMMAND:
bChecked = IsDlgButtonChecked(hwndDlg, IDC_CHK_ACOMMAND) != 0;