mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 00:41:09 +02:00
CComponentsInfoBox: Add removeLineBreaks()
Origin commit data
------------------
Branch: ni/coolstream
Commit: af8c8f2c10
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2012-08-20 (Mon, 20 Aug 2012)
Origin message was:
------------------
* CComponentsInfoBox: Add removeLineBreaks()
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -221,7 +221,8 @@ class CComponentsInfoBox : public CComponentsContainer
|
||||
void setTextColor(fb_pixel_t color_text){ col_text = color_text;};
|
||||
void setSpaceOffset(const int offset){x_offset = offset;};
|
||||
void setPicture(const std::string& picture_name){pic_name = picture_name;};
|
||||
|
||||
void removeLineBreaks(std::string& str);
|
||||
|
||||
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
||||
};
|
||||
|
||||
|
@@ -390,6 +390,15 @@ void CComponentsInfoBox::paint(bool do_save_bg)
|
||||
text = NULL;
|
||||
}
|
||||
|
||||
void CComponentsInfoBox::removeLineBreaks(std::string& str)
|
||||
{
|
||||
std::string::size_type spos = str.find_first_of("\r\n");
|
||||
while (spos != std::string::npos) {
|
||||
str.replace(spos, 1, " ");
|
||||
spos = str.find_first_of("\r\n");
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------
|
||||
//sub class CComponentsShapeSquare from CComponentsContainer
|
||||
CComponentsShapeSquare::CComponentsShapeSquare(const int x_pos, const int y_pos, const int w, const int h, bool has_shadow, fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow)
|
||||
|
Reference in New Issue
Block a user