Mercurial > mplayer.hg
comparison gui/skin/skin.c @ 32931:03b1051bed5c
Rename the 'NumberOf' members of the listItems structure.
Since the NumberOfMainItems, NumberOfBarItems and NumberOfMenuItems members
actually hold the last index used rather than the number of items, rename
them 'IndexOf' to avoid further confusion. Besides, change their loop
conditions to meet the new name.
author | ib |
---|---|
date | Thu, 03 Mar 2011 14:37:47 +0000 |
parents | 7c205a5c2a9b |
children | e95ec1b2feea |
comparison
equal
deleted
inserted
replaced
32930:b52831437104 | 32931:03b1051bed5c |
---|---|
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.NumberOfMainItems; | 189 currSubItem = &appMPlayer.IndexOfMainItems; |
190 currSubItems = appMPlayer.mainItems; | 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.IndexOfBarItems; |
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.IndexOfMenuItems; |
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); |
450 sy = cutItemToInt(in, ',', 3); | 450 sy = cutItemToInt(in, ',', 3); |
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->IndexOfMenuItems++; |
456 defList->menuItems[defList->NumberOfMenuItems].x = x; | 456 defList->menuItems[defList->IndexOfMenuItems].x = x; |
457 defList->menuItems[defList->NumberOfMenuItems].y = y; | 457 defList->menuItems[defList->IndexOfMenuItems].y = y; |
458 defList->menuItems[defList->NumberOfMenuItems].width = sx; | 458 defList->menuItems[defList->IndexOfMenuItems].width = sx; |
459 defList->menuItems[defList->NumberOfMenuItems].height = sy; | 459 defList->menuItems[defList->IndexOfMenuItems].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->IndexOfMenuItems); |
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->IndexOfMenuItems].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->mainItems[defList->NumberOfMainItems].message); | 467 mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] message: %d\n", defList->mainItems[defList->IndexOfMainItems].message); |
468 | 468 |
469 defList->menuItems[defList->NumberOfMenuItems].Bitmap.Image = NULL; | 469 defList->menuItems[defList->IndexOfMenuItems].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) |