CComponents: add more debug output and fix typo in enum CC_ITEMTYPES

This commit is contained in:
2013-02-17 16:49:33 +01:00
parent ec0a91813a
commit 2940c4e5f6
2 changed files with 11 additions and 4 deletions

View File

@@ -189,7 +189,7 @@ class CComponentsItem : public CComponents
CC_ITEMTYPE_SHAPE_CIRCLE, CC_ITEMTYPE_SHAPE_CIRCLE,
CC_ITEMTYPE_PIP, CC_ITEMTYPE_PIP,
CC_ITEMTYPE_FRM, CC_ITEMTYPE_FRM,
CC_ITEMTYPE_FRM_HERADER, CC_ITEMTYPE_FRM_HEADER,
CC_ITEMTYPE_FRM_ICONFORM, CC_ITEMTYPE_FRM_ICONFORM,
CC_ITEMTYPE_FRM_WINDOW, CC_ITEMTYPE_FRM_WINDOW,

View File

@@ -92,13 +92,18 @@ void CComponents::paintFbItems(bool do_save_bg)
if (firstPaint && do_save_bg) { if (firstPaint && do_save_bg) {
for(size_t i=0; i<v_fbdata.size(); i++){ for(size_t i=0; i<v_fbdata.size(); i++){
if (v_fbdata[i].fbdata_type == CC_FBDATA_TYPE_BGSCREEN){ if (v_fbdata[i].fbdata_type == CC_FBDATA_TYPE_BGSCREEN){
//printf("\n#####[%s - %d] firstPaint: %d, fbdata_type: %d\n \n", __FUNCTION__, __LINE__, firstPaint, fbdata[i].fbdata_type); #ifdef DEBUG_CC
printf("[CComponents]\n#####[%s - %d] firstPaint: %d, fbdata_type: %d\n \n", __FUNCTION__, __LINE__, firstPaint, v_fbdata[i].fbdata_type);
#endif
saved_screen.x = v_fbdata[i].x; saved_screen.x = v_fbdata[i].x;
saved_screen.y = v_fbdata[i].y; saved_screen.y = v_fbdata[i].y;
saved_screen.dx = v_fbdata[i].dx; saved_screen.dx = v_fbdata[i].dx;
saved_screen.dy = v_fbdata[i].dy; saved_screen.dy = v_fbdata[i].dy;
clearSavedScreen(); clearSavedScreen();
saved_screen.pixbuf = getScreen(saved_screen.x, saved_screen.y, saved_screen.dx, saved_screen.dy); saved_screen.pixbuf = getScreen(saved_screen.x, saved_screen.y, saved_screen.dx, saved_screen.dy);
#ifdef DEBUG_CC
printf("[CComponents]\n#####[%s - %d], fbdata_[%d] \nx = %d\ny = %d\ndx = %d\n dy = %d\n\n", __FUNCTION__, __LINE__, i, v_fbdata[i].x, v_fbdata[i].y, v_fbdata[i].dx, v_fbdata[i].dy);
#endif
firstPaint = false; firstPaint = false;
break; break;
@@ -210,7 +215,9 @@ void CComponentsItem::paintInit(bool do_save_bg)
for(size_t i =0; i< (sizeof(fbdata) / sizeof(fbdata[0])) ;i++) for(size_t i =0; i< (sizeof(fbdata) / sizeof(fbdata[0])) ;i++)
v_fbdata.push_back(fbdata[i]); v_fbdata.push_back(fbdata[i]);
#ifdef DEBUG_CC
printf("[CComponentsItem] %s: init paint cc_item_type: %d\n", __FUNCTION__, cc_item_type);
#endif
paintFbItems(do_save_bg); paintFbItems(do_save_bg);
} }
@@ -1822,7 +1829,7 @@ void CComponentsHeader::initVarHeader()
//CComponentsForm //CComponentsForm
initVarForm(); initVarForm();
cc_item_type = CC_ITEMTYPE_FRM_HERADER; cc_item_type = CC_ITEMTYPE_FRM_HEADER;
height = cch_font->getHeight(); height = cch_font->getHeight();
col_body = COL_MENUHEAD_PLUS_0; col_body = COL_MENUHEAD_PLUS_0;
corner_rad = RADIUS_LARGE, corner_rad = RADIUS_LARGE,