# HG changeset patch # User ib # Date 1394542291 0 # Node ID 737e2a3b9a5d128c1f76083afbebb22552c1545e # Parent 5616bd62fa26e09d3eb660efb669a4fd9a406441 Change mapping of the deprecated potmeter in the Win32 GUI. Map it to a hpotmeter with button=NULL and (button)width=(button)height=0 (same as the X11/GTK GUI) now. (As mentioned in r36988, these hpotmeters will be remapped - see r36991.) diff -r 5616bd62fa26 -r 737e2a3b9a5d gui/win32/skinload.c --- a/gui/win32/skinload.c Tue Mar 11 12:48:59 2014 +0000 +++ b/gui/win32/skinload.c Tue Mar 11 12:51:31 2014 +0000 @@ -367,31 +367,32 @@ else if(!strncmp(desc, "hpotmeter", 9) || !strncmp(desc, "vpotmeter", 9) || /* legacy */ !strncmp(desc, "potmeter", 8)) { int base = counttonextchar(desc, '=') + 1; - int i = 0; + int i; /* hpotmeter = button, bwidth, bheight, phases, numphases, default, X, Y, width, height, message */ if(!strncmp(desc, "vpotmeter", 9)) mywidget->type = tyVpotmeter; else mywidget->type = tyHpotmeter; - if (*desc != 'p') + if (*desc == 'p') { - mywidget->bitmap[i++] = pngRead(skin, findnextstring(temp, desc, &base)); + mywidget->bitmap[0] = NULL; + mywidget->width = 0; + mywidget->height = 0; + + // legacy + skin_legacy("potmeter", "hpotmeter"); + } + else + { + mywidget->bitmap[0] = pngRead(skin, findnextstring(temp, desc, &base)); mywidget->width = atoi(findnextstring(temp, desc, &base)); mywidget->height = atoi(findnextstring(temp, desc, &base)); } - mywidget->bitmap[i] = pngRead(skin, findnextstring(temp, desc, &base)); + mywidget->bitmap[1] = pngRead(skin, findnextstring(temp, desc, &base)); mywidget->phases = atoi(findnextstring(temp, desc, &base)); mywidget->value = atof(findnextstring(temp, desc, &base)); mywidget->x = mywidget->wx = atoi(findnextstring(temp, desc, &base)); mywidget->y = mywidget->wy = atoi(findnextstring(temp, desc, &base)); mywidget->wwidth = atoi(findnextstring(temp, desc, &base)); mywidget->wheight = atoi(findnextstring(temp, desc, &base)); - if (*desc == 'p') - { - // legacy - skin_legacy("potmeter", "hpotmeter"); - - mywidget->width = mywidget->wwidth; - mywidget->height = mywidget->wheight; - } if (mywidget->bitmap[0] == NULL || mywidget->width == 0 || mywidget->height == 0) { mywidget->bitmap[0] = mywidget->bitmap[1];