mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
CComponentsHeader/Icon: use inherited destructor
Inherited destructor contains identic code.
This commit is contained in:
@@ -394,6 +394,7 @@ class CComponentsForm : public CComponentsItem
|
|||||||
virtual int getCCItemId(CComponentsItem* cc_Item);
|
virtual int getCCItemId(CComponentsItem* cc_Item);
|
||||||
virtual CComponentsItem* getCCItem(const uint& cc_item_id);
|
virtual CComponentsItem* getCCItem(const uint& cc_item_id);
|
||||||
virtual void paintCCItems();
|
virtual void paintCCItems();
|
||||||
|
virtual void cleanCCForm();
|
||||||
};
|
};
|
||||||
|
|
||||||
class CComponentsIconForm : public CComponentsForm
|
class CComponentsIconForm : public CComponentsForm
|
||||||
@@ -410,6 +411,7 @@ class CComponentsIconForm : public CComponentsForm
|
|||||||
CComponentsIconForm();
|
CComponentsIconForm();
|
||||||
CComponentsIconForm(const int x_pos, const int y_pos, const int w, const int h, const std::vector<std::string> v_icon_names, bool has_shadow = CC_SHADOW_OFF,
|
CComponentsIconForm(const int x_pos, const int y_pos, const int w, const int h, const std::vector<std::string> v_icon_names, 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);
|
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);
|
||||||
|
// ~CComponentsIconForm(); //inherited from CComponentsForm
|
||||||
|
|
||||||
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
||||||
void initCCIcons();
|
void initCCIcons();
|
||||||
@@ -479,8 +481,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);
|
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,
|
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);
|
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 paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
||||||
void setHeaderText(const std::string& caption);
|
void setHeaderText(const std::string& caption);
|
||||||
|
@@ -61,6 +61,11 @@ CComponentsForm::CComponentsForm(const int x_pos, const int y_pos, const int w,
|
|||||||
}
|
}
|
||||||
|
|
||||||
CComponentsForm::~CComponentsForm()
|
CComponentsForm::~CComponentsForm()
|
||||||
|
{
|
||||||
|
cleanCCForm();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CComponentsForm::cleanCCForm()
|
||||||
{
|
{
|
||||||
#ifdef DEBUG_CC
|
#ifdef DEBUG_CC
|
||||||
printf("[CComponents] calling %s...\n", __FUNCTION__);
|
printf("[CComponents] calling %s...\n", __FUNCTION__);
|
||||||
|
@@ -86,15 +86,6 @@ CComponentsHeader::CComponentsHeader( const int x_pos, const int y_pos, const in
|
|||||||
initCCHItems();
|
initCCHItems();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
CComponentsHeader::~CComponentsHeader()
|
|
||||||
{
|
|
||||||
hide();
|
|
||||||
clearSavedScreen();
|
|
||||||
clearCCItems();
|
|
||||||
clear();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void CComponentsHeader::initVarHeader()
|
void CComponentsHeader::initVarHeader()
|
||||||
{
|
{
|
||||||
|
@@ -42,6 +42,13 @@ CComponentsWindow::CComponentsWindow()
|
|||||||
initVarWindow();
|
initVarWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CComponentsWindow::~CComponentsWindow()
|
||||||
|
{
|
||||||
|
if (ccw_head)
|
||||||
|
delete ccw_head;
|
||||||
|
cleanCCForm();
|
||||||
|
}
|
||||||
|
|
||||||
void CComponentsWindow::initVarWindow()
|
void CComponentsWindow::initVarWindow()
|
||||||
{
|
{
|
||||||
//CComponentsForm
|
//CComponentsForm
|
||||||
@@ -61,12 +68,6 @@ void CComponentsWindow::initVarWindow()
|
|||||||
setShadowOnOff(true);
|
setShadowOnOff(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
CComponentsWindow::~CComponentsWindow()
|
|
||||||
{
|
|
||||||
if (ccw_head)
|
|
||||||
delete ccw_head;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CComponentsWindow::setWindowCaption(neutrino_locale_t locale_text)
|
void CComponentsWindow::setWindowCaption(neutrino_locale_t locale_text)
|
||||||
{
|
{
|
||||||
ccw_caption = g_Locale->getText(locale_text);
|
ccw_caption = g_Locale->getText(locale_text);
|
||||||
|
Reference in New Issue
Block a user