aboutsummaryrefslogtreecommitdiff
path: root/osc_inspector_nk.c
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2017-08-04 15:13:55 +0200
committerHanspeter Portner <dev@open-music-kontrollers.ch>2017-08-04 15:13:55 +0200
commit6b6a7d06ba18d8d2777797f2274b35bc576ef2a0 (patch)
tree085a354ed62c330970d337b3a8f85a8579d5b8a1 /osc_inspector_nk.c
parent88fdedc539bacb232652871d9beffa272fb94592 (diff)
downloadsherlock.lv2-6b6a7d06ba18d8d2777797f2274b35bc576ef2a0.tar.xz
various fixes.
* patch messages sent on wrong port, etc.
Diffstat (limited to 'osc_inspector_nk.c')
-rw-r--r--osc_inspector_nk.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/osc_inspector_nk.c b/osc_inspector_nk.c
index 5373e44..d6f1640 100644
--- a/osc_inspector_nk.c
+++ b/osc_inspector_nk.c
@@ -91,7 +91,7 @@ _osc_timetag(mem_t *mem, LV2_OSC_Timetag *tt)
const uint32_t us = floor(tt->fraction * 0x1p-32 * 1e6);
const time_t ttime = tt->integral - 0x83aa7e80;
const struct tm *ltime = localtime(&ttime);
-
+
char tmp [32];
if(strftime(tmp, 32, "%d-%b-%Y %T", ltime))
_mem_printf(mem, "t:%s.%06"PRIu32, tmp, us);
@@ -377,12 +377,26 @@ _osc_inspector_expose(struct nk_context *ctx, struct nk_rect wbounds, void *data
nk_layout_row_dynamic(ctx, widget_h, 3);
{
- if(nk_checkbox_label(ctx, "overwrite", &handle->state.overwrite))
+ const int32_t state_overwrite = nk_check_label(ctx, "overwrite", handle->state.overwrite);
+ if(state_overwrite != handle->state.overwrite)
+ {
+ handle->state.overwrite = state_overwrite;
_toggle(handle, handle->urid.overwrite, handle->state.overwrite, true);
- if(nk_checkbox_label(ctx, "block", &handle->state.block))
+ }
+
+ const int32_t state_block = nk_check_label(ctx, "block", handle->state.block);
+ if(state_block != handle->state.block)
+ {
+ handle->state.block = state_block;
_toggle(handle, handle->urid.block, handle->state.block, true);
- if(nk_checkbox_label(ctx, "follow", &handle->state.follow))
+ }
+
+ const int32_t state_follow = nk_check_label(ctx, "follow", handle->state.follow);
+ if(state_follow != handle->state.follow)
+ {
+ handle->state.follow = state_follow;
_toggle(handle, handle->urid.follow, handle->state.follow, true);
+ }
}
const bool max_reached = handle->n_item >= MAX_LINES;