qmsched: set minutes in 5-min steps

pull/1283/head
Richard de Boer 2022-01-12 19:09:00 +01:00
parent 73062edf83
commit 0b455f921c
No known key found for this signature in database
GPG Key ID: 8721727971871937
2 changed files with 7 additions and 18 deletions

View File

@ -5,3 +5,4 @@
0.05: Avoid immediately redrawing widgets on load
0.06: Fix: don't try to redraw widget when widgets not loaded
0.07: Option to switch theme
Changed time selection to 5-minute intervals

View File

@ -155,31 +155,19 @@ function showEditMenu(index) {
"< Cancel": () => showMainMenu(),
"Hours": {
value: hrs,
onchange: function(v) {
if (v<0) {v = 23;}
if (v>23) {v = 0;}
hrs = v;
this.value = v;
}, // no arrow fn -> preserve 'this'
min:0, max:23, wrap:true,
onchange: v => {hrs = v;},
},
"Minutes": {
value: mins,
onchange: function(v) {
if (v<0) {v = 59;}
if (v>59) {v = 0;}
mins = v;
this.value = v;
}, // no arrow fn -> preserve 'this'
min:0, max:55, step:5, wrap:true,
onchange: v => {mins = v;},
},
"Switch to": {
value: mode,
min:0, max:2, wrap:true,
format: v => modeNames[v],
onchange: function(v) {
if (v<0) {v = 2;}
if (v>2) {v = 0;}
mode = v;
this.value = v;
}, // no arrow fn -> preserve 'this'
onchange: v => {mode = v;},
},
};
function getSched() {