diff --git a/src/gui/components/cc_base.cpp b/src/gui/components/cc_base.cpp index 2853b1211..6bd87d1c1 100644 --- a/src/gui/components/cc_base.cpp +++ b/src/gui/components/cc_base.cpp @@ -91,7 +91,7 @@ void CComponents::paintFbItems(bool do_save_bg) for(size_t i=0; isave screen: %d, fbdata_type: %d\n", __FUNCTION__, __LINE__, firstPaint, v_fbdata[i].fbdata_type); + printf(" [CComponents]\n [%s - %d] firstPaint->save screen: %d, fbdata_type: %d\n", __func__, __LINE__, firstPaint, v_fbdata[i].fbdata_type); #endif saved_screen.x = v_fbdata[i].x; saved_screen.y = v_fbdata[i].y; @@ -109,18 +109,18 @@ void CComponents::paintFbItems(bool do_save_bg) // Don't paint if dx or dy are 0 if ((v_fbdata[i].dx == 0) || (v_fbdata[i].dy == 0)){ #ifdef DEBUG_CC - printf(" [CComponents] WARNING: [%s - %d], dx = %d dy = %d\n", __FUNCTION__, __LINE__, v_fbdata[i].dx, v_fbdata[i].dy); + printf(" [CComponents] WARNING: [%s - %d], dx = %d dy = %d\n", __func__, __LINE__, v_fbdata[i].dx, v_fbdata[i].dy); #endif continue; } if ((v_fbdata[i].x == 0) || (v_fbdata[i].y == 0)){ - printf(" [CComponents] WARNING: [%s - %d], x = %d y = %d\n", __FUNCTION__, __LINE__, v_fbdata[i].x, v_fbdata[i].y); + printf(" [CComponents] WARNING: [%s - %d], x = %d y = %d\n", __func__, __LINE__, v_fbdata[i].x, v_fbdata[i].y); } int fbtype = v_fbdata[i].fbdata_type; #ifdef DEBUG_CC - printf(" [CComponents]\n [%s - %d], fbdata_[%d] \n x = %d\n y = %d\n dx = %d\n dy = %d\n", __FUNCTION__, __LINE__, i, v_fbdata[i].x, v_fbdata[i].y, v_fbdata[i].dx, v_fbdata[i].dy); + printf(" [CComponents]\n [%s - %d], fbdata_[%d] \n x = %d\n y = %d\n dx = %d\n dy = %d\n", __func__, __LINE__, i, v_fbdata[i].x, v_fbdata[i].y, v_fbdata[i].dx, v_fbdata[i].dy); #endif //some elements can be assembled from lines and must be handled as one unit (see details line), //so all individual backgrounds of boxes must be saved and painted in "firstpaint mode" diff --git a/src/gui/components/cc_frm.cpp b/src/gui/components/cc_frm.cpp index b1351cc25..6e68ddc07 100644 --- a/src/gui/components/cc_frm.cpp +++ b/src/gui/components/cc_frm.cpp @@ -72,7 +72,7 @@ CComponentsForm::~CComponentsForm() void CComponentsForm::cleanCCForm() { #ifdef DEBUG_CC - printf("[CComponentsForm] [%s - %d] clean up...\n", __FUNCTION__, __LINE__); + printf("[CComponentsForm] [%s - %d] clean up...\n", __func__, __LINE__); #endif clearCCItems(); @@ -85,13 +85,13 @@ void CComponentsForm::clearCCItems() if (v_cc_items.empty()) return; #ifdef DEBUG_CC - printf(" [CComponentsForm] %s... delete %d cc-item(s) \n", __FUNCTION__, v_cc_items.size()); + printf(" [CComponentsForm] %s... delete %d cc-item(s) \n", __func__, v_cc_items.size()); #endif for(size_t i=0; igetItemType()); + printf(" [CComponentsForm] %s... delete form cc-item %d of %d (type=%d)\n", __func__, i+1, v_cc_items.size(), v_cc_items[i]->getItemType()); #endif delete v_cc_items[i]; v_cc_items[i] = NULL; @@ -130,7 +130,7 @@ void CComponentsForm::addCCItem(CComponentsItem* cc_Item) { if (cc_Item){ #ifdef DEBUG_CC - printf(" [CComponentsForm] %s-%d try to add cc_Item [type %d] to form [current index=%d] \n", __FUNCTION__, __LINE__, cc_Item->getItemType(), cc_item_index); + printf(" [CComponentsForm] %s-%d try to add cc_Item [type %d] to form [current index=%d] \n", __func__, __LINE__, cc_Item->getItemType(), cc_item_index); #endif cc_Item->setParent(this); v_cc_items.push_back(cc_Item); @@ -142,12 +142,12 @@ void CComponentsForm::addCCItem(CComponentsItem* cc_Item) int new_index = genIndex(); cc_Item->setIndex(new_index); #ifdef DEBUG_CC - printf(" %s-%d parent index = %d, assigned index ======> %d\n", __FUNCTION__, __LINE__, cc_item_index, new_index); + printf(" %s-%d parent index = %d, assigned index ======> %d\n", __func__, __LINE__, cc_item_index, new_index); #endif } #ifdef DEBUG_CC else - printf(" [CComponentsForm] %s-%d tried to add an empty or invalide cc_item !!!\n", __FUNCTION__, __LINE__); + printf(" [CComponentsForm] %s-%d tried to add an empty or invalide cc_item !!!\n", __func__, __LINE__); #endif } @@ -193,7 +193,7 @@ void CComponentsForm::replaceCCItem(const uint& cc_item_id, CComponentsItem* new } #ifdef DEBUG_CC else - printf("[CComponentsForm] %s replace cc_Item not possible, v_cc_items is empty\n", __FUNCTION__); + printf("[CComponentsForm] %s replace cc_Item not possible, v_cc_items is empty\n", __func__); #endif } @@ -216,7 +216,7 @@ void CComponentsForm::insertCCItem(const uint& cc_item_id, CComponentsItem* cc_I if (v_cc_items.empty()){ addCCItem(cc_Item); #ifdef DEBUG_CC - printf("[CComponentsForm] %s insert cc_Item not possible, v_cc_items is empty, cc_Item added\n", __FUNCTION__); + printf("[CComponentsForm] %s insert cc_Item not possible, v_cc_items is empty, cc_Item added\n", __func__); #endif }else{ v_cc_items.insert(v_cc_items.begin()+cc_item_id, cc_Item); @@ -238,7 +238,7 @@ void CComponentsForm::removeCCItem(const uint& cc_item_id) } #ifdef DEBUG_CC else - printf("[CComponentsForm] %s removing cc_Item not possible, v_cc_items is empty...\n", __FUNCTION__); + printf("[CComponentsForm] %s removing cc_Item not possible, v_cc_items is empty...\n", __func__); #endif } @@ -342,7 +342,7 @@ void CComponentsForm::paintCCItems() int new_w = w_item - w_diff; if (right_item > right_frm){ printf("[CComponentsForm] %s: [form: %d] [item-index %d] [type=%d] width is too large, definied width=%d, possible width=%d \n", - __FUNCTION__, cc_item_index, cc_item->getIndex(), cc_item->getItemType(), w_item, new_w); + __func__, cc_item_index, cc_item->getIndex(), cc_item->getItemType(), w_item, new_w); cc_item->setWidth(new_w); } @@ -353,7 +353,7 @@ void CComponentsForm::paintCCItems() int new_h = h_item - h_diff; if (bottom_item > bottom_frm){ printf("[CComponentsForm] %s: [form: %d] [item-index %d] [type=%d] height is too large, definied height=%d, possible height=%d \n", - __FUNCTION__, cc_item_index, cc_item->getIndex(), cc_item->getItemType(), h_item, new_h); + __func__, cc_item_index, cc_item->getIndex(), cc_item->getItemType(), h_item, new_h); cc_item->setHeight(new_h); } diff --git a/src/gui/components/cc_frm_clock.cpp b/src/gui/components/cc_frm_clock.cpp index 4067a76d7..3f3b45c6d 100644 --- a/src/gui/components/cc_frm_clock.cpp +++ b/src/gui/components/cc_frm_clock.cpp @@ -300,7 +300,7 @@ bool CComponentsFrmClock::startThread() if(!cl_thread) { int res = pthread_create (&cl_thread, NULL, initClockThread, ptr) ; if (res != 0){ - printf("[CComponentsFrmClock] [%s] pthread_create %s\n", __FUNCTION__, strerror(errno)); + printf("[CComponentsFrmClock] [%s] pthread_create %s\n", __func__, strerror(errno)); return false; } } @@ -313,13 +313,13 @@ bool CComponentsFrmClock::stopThread() if(cl_thread) { int res = pthread_cancel(cl_thread); if (res != 0){ - printf("[CComponentsFrmClock] [%s] pthread_cancel %s\n", __FUNCTION__, strerror(errno)); + printf("[CComponentsFrmClock] [%s] pthread_cancel %s\n", __func__, strerror(errno)); return false; } res = pthread_join(cl_thread, NULL); if (res != 0){ - printf("[CComponentsFrmClock] [%s] pthread_join %s\n", __FUNCTION__, strerror(errno)); + printf("[CComponentsFrmClock] [%s] pthread_join %s\n", __func__, strerror(errno)); return false; } } diff --git a/src/gui/components/cc_frm_header.cpp b/src/gui/components/cc_frm_header.cpp index 9103553d2..ccefe59ac 100644 --- a/src/gui/components/cc_frm_header.cpp +++ b/src/gui/components/cc_frm_header.cpp @@ -130,7 +130,7 @@ void CComponentsHeader::initVarHeader() CComponentsHeader::~CComponentsHeader() { #ifdef DEBUG_CC - printf("[~CComponentsHeader] [%s - %d] delete...\n", __FUNCTION__, __LINE__); + printf("[~CComponentsHeader] [%s - %d] delete...\n", __func__, __LINE__); #endif v_cch_btn.clear(); } @@ -172,7 +172,7 @@ void CComponentsHeader::initIcon() //create instance for cch_icon_obj if (cch_icon_obj == NULL){ #ifdef DEBUG_CC - printf(" [CComponentsHeader]\n [%s - %d] init header icon: %s\n", __FUNCTION__, __LINE__, cch_icon_name); + printf(" [CComponentsHeader]\n [%s - %d] init header icon: %s\n", __func__, __LINE__, cch_icon_name); #endif cch_icon_obj = new CComponentsPicture(cch_icon_x, cch_items_y, 0, 0, cch_icon_name); } @@ -235,7 +235,7 @@ void CComponentsHeader::initDefaultButtons() if (cch_buttons & CC_BTN_MENU) v_cch_btn.push_back(NEUTRINO_ICON_BUTTON_MENU); #ifdef DEBUG_CC - printf("[CComponentsHeader] %s added %d default buttons...\n", __FUNCTION__, v_cch_btn.size()); + printf("[CComponentsHeader] %s added %d default buttons...\n", __func__, v_cch_btn.size()); #endif } @@ -279,7 +279,7 @@ void CComponentsHeader::initButtons() if (cch_btn_obj == NULL){ cch_btn_obj = new CComponentsIconForm(); #ifdef DEBUG_CC - printf(" [CComponentsHeader]\n [%s - %d] init header buttons...\n", __FUNCTION__, __LINE__); + printf(" [CComponentsHeader]\n [%s - %d] init header buttons...\n", __func__, __LINE__); #endif } @@ -332,7 +332,7 @@ void CComponentsHeader::initCaption() //create cch_text_obj and add to collection if (cch_text_obj == NULL){ #ifdef DEBUG_CC - printf(" [CComponentsHeader]\n [%s - %d] init header text: %s [ x %d w %d ]\n", __FUNCTION__, __LINE__, cch_text.c_str(), cch_text_x, cc_text_w); + printf(" [CComponentsHeader]\n [%s - %d] init header text: %s [ x %d w %d ]\n", __func__, __LINE__, cch_text.c_str(), cch_text_x, cc_text_w); #endif cch_text_obj = new CComponentsText(); } diff --git a/src/gui/components/cc_frm_window.cpp b/src/gui/components/cc_frm_window.cpp index 5fa98de8a..fd24999cf 100644 --- a/src/gui/components/cc_frm_window.cpp +++ b/src/gui/components/cc_frm_window.cpp @@ -117,7 +117,7 @@ CComponentsWindow::CComponentsWindow( const int x_pos, const int y_pos, const in CComponentsWindow::~CComponentsWindow() { #ifdef DEBUG_CC - printf("[~CComponentsWindow] [%s - %d] delete...\n", __FUNCTION__, __LINE__); + printf("[~CComponentsWindow] [%s - %d] delete...\n", __func__, __LINE__); #endif } @@ -218,7 +218,7 @@ void CComponentsWindow::addWindowItem(CComponentsItem* cc_Item) void CComponentsWindow::initCCWItems() { #ifdef DEBUG_CC - printf("[CComponentsWindow] [%s - %d] init items...\n", __FUNCTION__, __LINE__); + printf("[CComponentsWindow] [%s - %d] init items...\n", __func__, __LINE__); #endif //add header if required if (ccw_show_header){ diff --git a/src/gui/components/cc_item.cpp b/src/gui/components/cc_item.cpp index 30fccdfa4..9a3ecdb86 100644 --- a/src/gui/components/cc_item.cpp +++ b/src/gui/components/cc_item.cpp @@ -100,7 +100,7 @@ void CComponentsItem::paintInit(bool do_save_bg) v_fbdata.push_back(fbdata[i]); } #ifdef DEBUG_CC - printf("[CComponentsItem] %s:\ncc_item_type: %d\ncc_item_index = %d\nheight = %d\nwidth = %d\n", __FUNCTION__, cc_item_type, cc_item_index, height, width); + printf("[CComponentsItem] %s:\ncc_item_type: %d\ncc_item_index = %d\nheight = %d\nwidth = %d\n", __func__, cc_item_type, cc_item_index, height, width); #endif paintFbItems(do_save_bg); } @@ -150,7 +150,7 @@ int CComponentsItem::getItemType() return i; } #ifdef DEBUG_CC - printf("[CComponentsItem] %s: unknown item type requested...\n", __FUNCTION__); + printf("[CComponentsItem] %s: unknown item type requested...\n", __func__); #endif return -1; } diff --git a/src/gui/components/cc_item_picture.cpp b/src/gui/components/cc_item_picture.cpp index 8d66f43f8..ea9e661e3 100644 --- a/src/gui/components/cc_item_picture.cpp +++ b/src/gui/components/cc_item_picture.cpp @@ -138,7 +138,7 @@ void CComponentsPicture::initVarPicture() #ifdef DEBUG_CC if (pic_width == 0 || pic_height == 0) - printf("[CComponentsPicture] %s file: %s, no icon dimensions found! width = %d, height = %d\n", __FUNCTION__, pic_name.c_str(), pic_width, pic_height); + printf("[CComponentsPicture] %s file: %s, no icon dimensions found! width = %d, height = %d\n", __func__, pic_name.c_str(), pic_width, pic_height); #endif initPosition(); @@ -181,7 +181,7 @@ void CComponentsPicture::paintPicture() if (do_paint && cc_allow_paint){ #ifdef DEBUG_CC - printf(" [CComponentsPicture] %s: paint image: %s (do_paint=%d)\n", __FUNCTION__, pic_name.c_str(), do_paint); + printf(" [CComponentsPicture] %s: paint image: %s (do_paint=%d)\n", __func__, pic_name.c_str(), do_paint); #endif if (pic_paint_mode == CC_PIC_IMAGE_MODE_OFF) pic_painted = frameBuffer->paintIcon(pic_name, pic_x, pic_y, 0 /*pic_max_h*/, pic_offset, pic_paint, pic_paintBg, col_body); diff --git a/src/gui/components/cc_item_text.cpp b/src/gui/components/cc_item_text.cpp index 4e6db142c..e681dbca5 100644 --- a/src/gui/components/cc_item_text.cpp +++ b/src/gui/components/cc_item_text.cpp @@ -169,7 +169,7 @@ void CComponentsText::initCCText() ct_old_col_text = ct_col_text; } #ifdef DEBUG_CC - printf(" [CComponentsText] [%s - %d] init text: %s [x %d, y %d, w %d, h %d]\n", __FUNCTION__, __LINE__, ct_text.c_str(), this->iX, this->iY, this->iWidth, this->iHeight); + printf(" [CComponentsText] [%s - %d] init text: %s [x %d, y %d, w %d, h %d]\n", __func__, __LINE__, ct_text.c_str(), this->iX, this->iY, this->iWidth, this->iHeight); #endif } @@ -187,7 +187,7 @@ void CComponentsText::setText(const std::string& stext, const int mode, Font* fo ct_text_mode = mode; ct_font = font_text; #ifdef DEBUG_CC - printf(" [CComponentsText] [%s - %d] ct_text: %s \n", __FUNCTION__, __LINE__, ct_text.c_str()); + printf(" [CComponentsText] [%s - %d] ct_text: %s \n", __func__, __LINE__, ct_text.c_str()); #endif } @@ -215,7 +215,7 @@ string CComponentsText::getTextFromFile(const string& path_to_textfile) ifstream in (file.c_str(), ios::in); if (!in){ - printf("[CComponentsText] [%s - %d] error while open %s -> %s\n", __FUNCTION__, __LINE__, file.c_str(), strerror(errno)); + printf("[CComponentsText] [%s - %d] error while open %s -> %s\n", __func__, __LINE__, file.c_str(), strerror(errno)); return ""; } string line;