mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 00:41:09 +02:00
CComponentsWindow/Header: fix add of header buttons
setHeaderButtons was without effect
Origin commit data
------------------
Branch: ni/coolstream
Commit: cc31a41f43
Author: Thilo Graf <dbt@novatux.de>
Date: 2013-03-22 (Fri, 22 Mar 2013)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -511,7 +511,7 @@ class CComponentsHeader : public CComponentsForm
|
|||||||
void setHeaderIcon(const char* icon_name);
|
void setHeaderIcon(const char* icon_name);
|
||||||
void addHeaderButton(const std::string& button_name);
|
void addHeaderButton(const std::string& button_name);
|
||||||
void removeHeaderButtons();
|
void removeHeaderButtons();
|
||||||
void setHeaderButtons(const int buttons){cch_buttons = buttons;};
|
void setHeaderDefaultButtons(const int buttons);
|
||||||
void initCCHeaderItems();
|
void initCCHeaderItems();
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -522,6 +522,7 @@ class CComponentsWindow : public CComponentsForm
|
|||||||
std::string ccw_caption;
|
std::string ccw_caption;
|
||||||
const char* ccw_icon_name;
|
const char* ccw_icon_name;
|
||||||
int ccw_start_y;
|
int ccw_start_y;
|
||||||
|
int ccw_buttons;
|
||||||
|
|
||||||
void initHeader();
|
void initHeader();
|
||||||
void initCCWItems();
|
void initCCWItems();
|
||||||
@@ -543,6 +544,7 @@ class CComponentsWindow : public CComponentsForm
|
|||||||
void setWindowCaption(const std::string& text){ccw_caption = text;};
|
void setWindowCaption(const std::string& text){ccw_caption = text;};
|
||||||
void setWindowCaption(neutrino_locale_t locale_text);
|
void setWindowCaption(neutrino_locale_t locale_text);
|
||||||
void setWindowIcon(const char* iconname){ccw_icon_name = iconname;};
|
void setWindowIcon(const char* iconname){ccw_icon_name = iconname;};
|
||||||
|
void setWindowHeaderButtons(const int& buttons){ccw_buttons = buttons;};
|
||||||
|
|
||||||
int getStartY(); //y value for start of the area below header
|
int getStartY(); //y value for start of the area below header
|
||||||
};
|
};
|
||||||
|
@@ -221,6 +221,13 @@ void CComponentsHeader::initCCHDefaultButtons()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CComponentsHeader::setHeaderDefaultButtons(const int buttons)
|
||||||
|
{
|
||||||
|
cch_buttons = buttons;
|
||||||
|
v_cch_btn.clear();
|
||||||
|
initCCHDefaultButtons();
|
||||||
|
}
|
||||||
|
|
||||||
// calculate minimal width of icon form
|
// calculate minimal width of icon form
|
||||||
void CComponentsHeader::initCCButtonFormSize()
|
void CComponentsHeader::initCCButtonFormSize()
|
||||||
{
|
{
|
||||||
|
@@ -82,6 +82,7 @@ void CComponentsWindow::initVarWindow()
|
|||||||
ccw_caption = "";
|
ccw_caption = "";
|
||||||
ccw_icon_name = NULL;
|
ccw_icon_name = NULL;
|
||||||
ccw_start_y = 0;
|
ccw_start_y = 0;
|
||||||
|
ccw_buttons = 0; //no header buttons
|
||||||
|
|
||||||
setShadowOnOff(true);
|
setShadowOnOff(true);
|
||||||
}
|
}
|
||||||
@@ -109,6 +110,7 @@ void CComponentsWindow::initHeader()
|
|||||||
ccw_head->setHeaderText(ccw_caption);
|
ccw_head->setHeaderText(ccw_caption);
|
||||||
ccw_head->initCCHeaderItems();
|
ccw_head->initCCHeaderItems();
|
||||||
ccw_start_y = ccw_head->getHeight();
|
ccw_start_y = ccw_head->getHeight();
|
||||||
|
ccw_head->setHeaderDefaultButtons(ccw_buttons);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user