Mercurial > mplayer.hg
changeset 36896:737e2a3b9a5d
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.)
author | ib |
---|---|
date | Tue, 11 Mar 2014 12:51:31 +0000 |
parents | 5616bd62fa26 |
children | 38234a308fd3 |
files | gui/win32/skinload.c |
diffstat | 1 files changed, 13 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- 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];