comparison gui/skin/skin.c @ 32912:ca4d3fa55e43

Adjust the listItems structure. Add 'main' to members referring to the main window, switch bar with menu members and adjust the spelling of 'MenuItems' to the other 'Items'.
author ib
date Wed, 02 Mar 2011 16:05:37 +0000
parents e06fbdd8eb46
children 33b360b5adcf
comparison
equal deleted inserted replaced
32911:e06fbdd8eb46 32912:ca4d3fa55e43
184 184
185 av_strlcpy(window_name, strlower(in), sizeof(window_name)); 185 av_strlcpy(window_name, strlower(in), sizeof(window_name));
186 186
187 if (!strncmp(in, "main", 4)) { 187 if (!strncmp(in, "main", 4)) {
188 currSection = &appMPlayer.main; 188 currSection = &appMPlayer.main;
189 currSubItem = &appMPlayer.NumberOfItems; 189 currSubItem = &appMPlayer.NumberOfMainItems;
190 currSubItems = appMPlayer.Items; 190 currSubItems = appMPlayer.mainItems;
191 } else if (!strncmp(in, "sub", 3)) 191 } else if (!strncmp(in, "sub", 3))
192 currSection = &appMPlayer.sub; 192 currSection = &appMPlayer.sub;
193 else if (!strncmp(in, "playbar", 7)) { 193 else if (!strncmp(in, "playbar", 7)) {
194 currSection = &appMPlayer.bar; 194 currSection = &appMPlayer.bar;
195 currSubItem = &appMPlayer.NumberOfBarItems; 195 currSubItem = &appMPlayer.NumberOfBarItems;
196 currSubItems = appMPlayer.barItems; 196 currSubItems = appMPlayer.barItems;
197 } else if (!strncmp(in, "menu", 4)) { 197 } else if (!strncmp(in, "menu", 4)) {
198 currSection = &appMPlayer.menuBase; 198 currSection = &appMPlayer.menuBase;
199 currSubItem = &appMPlayer.NumberOfMenuItems; 199 currSubItem = &appMPlayer.NumberOfMenuItems;
200 currSubItems = appMPlayer.MenuItems; 200 currSubItems = appMPlayer.menuItems;
201 } else 201 } else
202 ERRORMESSAGE(MSGTR_UNKNOWNWINDOWTYPE); 202 ERRORMESSAGE(MSGTR_UNKNOWNWINDOWTYPE);
203 203
204 mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "\n[skin] window: %s\n", window_name); 204 mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "\n[skin] window: %s\n", window_name);
205 205
451 cutItem(in, tmp, ',', 4); 451 cutItem(in, tmp, ',', 4);
452 452
453 message = appFindMessage(tmp); 453 message = appFindMessage(tmp);
454 454
455 defList->NumberOfMenuItems++; 455 defList->NumberOfMenuItems++;
456 defList->MenuItems[defList->NumberOfMenuItems].x = x; 456 defList->menuItems[defList->NumberOfMenuItems].x = x;
457 defList->MenuItems[defList->NumberOfMenuItems].y = y; 457 defList->menuItems[defList->NumberOfMenuItems].y = y;
458 defList->MenuItems[defList->NumberOfMenuItems].width = sx; 458 defList->menuItems[defList->NumberOfMenuItems].width = sx;
459 defList->MenuItems[defList->NumberOfMenuItems].height = sy; 459 defList->menuItems[defList->NumberOfMenuItems].height = sy;
460 460
461 mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "\n[skin] menuitem: %d\n", defList->NumberOfMenuItems); 461 mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "\n[skin] menuitem: %d\n", defList->NumberOfMenuItems);
462 mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] x: %d y: %d sx: %d sy: %d\n", x, y, sx, sy); 462 mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] x: %d y: %d sx: %d sy: %d\n", x, y, sx, sy);
463 463
464 if ((defList->MenuItems[defList->NumberOfMenuItems].message = message) == -1) 464 if ((defList->menuItems[defList->NumberOfMenuItems].message = message) == -1)
465 ERRORMESSAGE(MSGTR_SKIN_BITMAP_UnknownMessage, tmp); 465 ERRORMESSAGE(MSGTR_SKIN_BITMAP_UnknownMessage, tmp);
466 466
467 mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] message: %d\n", defList->Items[defList->NumberOfItems].message); 467 mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] message: %d\n", defList->mainItems[defList->NumberOfMainItems].message);
468 468
469 defList->MenuItems[defList->NumberOfMenuItems].Bitmap.Image = NULL; 469 defList->menuItems[defList->NumberOfMenuItems].Bitmap.Image = NULL;
470 return 0; 470 return 0;
471 } 471 }
472 472
473 // hpotmeter=button,bwidth,bheight,phases,numphases,default,x,y,width,height,message 473 // hpotmeter=button,bwidth,bheight,phases,numphases,default,x,y,width,height,message
474 static int cmd_hpotmeter(char *in) 474 static int cmd_hpotmeter(char *in)