aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Hanspeter Portner <dev@open-music-kontrollers.ch>2017-05-12 17:41:20 +0200
committerGravatar Hanspeter Portner <dev@open-music-kontrollers.ch>2017-05-12 17:41:20 +0200
commit75a8be2d3fcea6f2249878fb1e61b3a98e2e2725 (patch)
treee01f2f48178de7505c007eff3657547c0c0d1f7b
parente331953dd8738c0a3832a990bfaae3a5e43d4c59 (diff)
downloadmoony.lv2-75a8be2d3fcea6f2249878fb1e61b3a98e2e2725.zip
moony.lv2-75a8be2d3fcea6f2249878fb1e61b3a98e2e2725.tar.gz
moony.lv2-75a8be2d3fcea6f2249878fb1e61b3a98e2e2725.tar.bz2
moony.lv2-75a8be2d3fcea6f2249878fb1e61b3a98e2e2725.tar.xz
psets/nk: sate bank in rdfs:label.
* create whole 'urn:uuid:...' string instead of uuid only.
-rw-r--r--VERSION2
-rw-r--r--plugin/manifest.ttl.in12
-rw-r--r--plugin/nk_ui.c13
3 files changed, 13 insertions, 14 deletions
diff --git a/VERSION b/VERSION
index 6825c6c..7a794ed 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.21.381
+0.21.383
diff --git a/plugin/manifest.ttl.in b/plugin/manifest.ttl.in
index 85da3fe..cc68e31 100644
--- a/plugin/manifest.ttl.in
+++ b/plugin/manifest.ttl.in
@@ -198,7 +198,7 @@ moony:bank-midi_midi-responder
moony:c2a1xc2a1 ,
moony:c4a1xc4a1 ;
pset:bank moony:bank-midi ;
- rdfs:label "MIDI responder" ;
+ rdfs:label "MIDI: Responder" ;
rdfs:seeAlso <presets.ttl> .
# Bank time
@@ -211,7 +211,7 @@ moony:bank-time_midi-sequencer
moony:c2a1xc2a1 ,
moony:c4a1xc4a1 ;
pset:bank moony:bank-time ;
- rdfs:label "MIDI sequencer" ;
+ rdfs:label "Time: Sequencer" ;
rdfs:seeAlso <presets.ttl> .
# Bank OSC
@@ -224,7 +224,7 @@ moony:bank-osc_osc-responder
moony:c2a1xc2a1 ,
moony:c4a1xc4a1 ;
pset:bank moony:bank-osc ;
- rdfs:label "OSC responder" ;
+ rdfs:label "OSC: Responder" ;
rdfs:seeAlso <presets.ttl> .
# Bank state
@@ -240,7 +240,7 @@ moony:bank-state_state-responder
moony:c2xc2 ,
moony:c4xc4 ;
pset:bank moony:bank-state ;
- rdfs:label "State responder" ;
+ rdfs:label "State: Responder" ;
rdfs:seeAlso <presets.ttl> .
# Bank canvas
@@ -256,7 +256,7 @@ moony:bank-canvas_lv2-logo
moony:c2xc2 ,
moony:c4xc4 ;
pset:bank moony:bank-canvas ;
- rdfs:label "LV2 Logo" ;
+ rdfs:label "Canvas: LV2 Logo" ;
rdfs:seeAlso <presets.ttl> .
# Bank tutorials
@@ -396,5 +396,5 @@ moony:bank-template_part-5
moony:c2xc2 ,
moony:c4xc4 ;
pset:bank moony:bank-template;
- rdfs:label "Template 5: Code Injection" ;
+ rdfs:label "Template 5: Code Injector" ;
rdfs:seeAlso <presets.ttl> .
diff --git a/plugin/nk_ui.c b/plugin/nk_ui.c
index 2b122aa..781e078 100644
--- a/plugin/nk_ui.c
+++ b/plugin/nk_ui.c
@@ -302,9 +302,10 @@ static void
_patch_set_code(plughandle_t *handle, uint32_t size, const char *body, bool user);
+#define URN_UUID_SIZE 49
//tools.ietf.org/html/rfc4122 version 4
static void
-_uuid_random(plughandle_t *handle)
+_urn_uuid_random(plughandle_t *handle)
{
uint8_t bytes [0x10];
@@ -314,17 +315,15 @@ _uuid_random(plughandle_t *handle)
bytes[6] = (bytes[6] & 0b00001111) | 0b01000000; // set four most significant bits of 7th byte to 0b0100
bytes[8] = (bytes[8] & 0b00111111) | 0b10000000; // set two most significant bits of 9th byte to 0b10
-
- const size_t sz = 16*2 + 4 + 1;
- char uuid [sz];
- snprintf(uuid, sz, "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x",
+ char uuid [URN_UUID_SIZE];
+ snprintf(uuid, URN_UUID_SIZE, "'urn:uuid:%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x#'",
bytes[0x0], bytes[0x1], bytes[0x2], bytes[0x3],
bytes[0x4], bytes[0x5],
bytes[0x6], bytes[0x7],
bytes[0x8], bytes[0x9],
bytes[0xa], bytes[0xb], bytes[0xc], bytes[0xd], bytes[0xe], bytes[0xf]);
- nk_pugl_copy_to_clipboard(&handle->win, uuid, sz);
+ nk_pugl_copy_to_clipboard(&handle->win, uuid, URN_UUID_SIZE);
}
static uint8_t *
@@ -2077,7 +2076,7 @@ _expose(struct nk_context *ctx, struct nk_rect wbounds, void *data)
bool has_commited = false;
if(has_control_u)
- _uuid_random(handle); // copy UUIDv4 into clipboard
+ _urn_uuid_random(handle); // copy UUIDv4 into clipboard
nk_layout_row_begin(ctx, NK_DYNAMIC, dy, 3);
{