CComponentsForm/Header/Icons/Window: try to fix multiple inits and paints

Some items had multiple inits and some calls of clearCCItems()
have caused segfaults, hope this fix this.
This commit is contained in:
2013-03-13 23:23:19 +01:00
parent da356d94da
commit 4a931af6ef
5 changed files with 164 additions and 111 deletions

View File

@@ -377,6 +377,7 @@ class CComponentsForm : public CComponentsItem
std::vector<CComponentsItem*> v_cc_items;
void initVarForm();
void clearCCItems();
void paintForm(bool do_save_bg);
public:
CComponentsForm();
@@ -481,7 +482,7 @@ class CComponentsHeader : public CComponentsForm
fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, fb_pixel_t color_body = COL_MENUHEAD_PLUS_0, fb_pixel_t color_shadow = COL_MENUCONTENTDARK_PLUS_0);
CComponentsHeader(const int x_pos, const int y_pos, const int w, const int h = 0, neutrino_locale_t caption_locale = NONEXISTANT_LOCALE, const char* icon_name = NULL, const int buttons = 0,bool has_shadow = CC_SHADOW_OFF,
fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, fb_pixel_t color_body = COL_MENUHEAD_PLUS_0, fb_pixel_t color_shadow = COL_MENUCONTENTDARK_PLUS_0);
// ~CComponentsHeader(); //inherited from CComponentsForm
~CComponentsHeader();
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
void setHeaderText(const std::string& caption);