Project "Tuxbox-GIT: apps":

The branch, master has been updated
       via  0f0e7bf3f426d9beb188d921db1afa4b581fa4b9 (commit)
      from  269f491b571a837eb6efd6a2647a570878bc4ef3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 0f0e7bf3f426d9beb188d921db1afa4b581fa4b9
Author: GetAway <get-a...@t-online.de>
Date:   Sat May 23 17:37:19 2015 +0200

    neutrino: use more to_string()
    
    Signed-off-by: GetAway <get-a...@t-online.de>

diff --git a/tuxbox/neutrino/src/gui/alphasetup.cpp 
b/tuxbox/neutrino/src/gui/alphasetup.cpp
index 2fe47ab..0da2344 100644
--- a/tuxbox/neutrino/src/gui/alphasetup.cpp
+++ b/tuxbox/neutrino/src/gui/alphasetup.cpp
@@ -41,6 +41,7 @@
 
 #include <gui/color.h>
 #include <gui/widget/messagebox.h>
+#include <system/helper.h>
 
 #include <fcntl.h>
 #include <stdio.h>
@@ -253,7 +254,6 @@ void CAlphaSetup::paint()
 void CAlphaSetup::paintSlider(const int _x, const int _y, const unsigned char 
* const spos, const neutrino_locale_t text, const char * const iconname, const 
bool /*selected*/) // UTF-8
 {
        int startx = 170;
-       char wert[5];
 
        if (!spos)
                return;
@@ -266,7 +266,6 @@ void CAlphaSetup::paintSlider(const int _x, const int _y, 
const unsigned char *
 
        g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(_x, _y + 
mheight, width, g_Locale->getText(text), COL_MENUCONTENT, 0, true); // UTF-8
 
-       sprintf(wert, "%3d", (*spos)); // UTF-8 encoded
        frameBuffer->paintBoxRel(_x + startx + 120 + 10, _y, 50, mheight, 
COL_MENUCONTENT_PLUS_0);
-       g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(_x + startx + 
120 + 10, _y + mheight, width, wert, COL_MENUCONTENT, 0, true); // UTF-8
+       g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(_x + startx + 
120 + 10, _y + mheight, width, to_string(*spos), COL_MENUCONTENT, 0, true); // 
UTF-8
 }
diff --git a/tuxbox/neutrino/src/gui/audioplayer.cpp 
b/tuxbox/neutrino/src/gui/audioplayer.cpp
index cecf479..74027a8 100644
--- a/tuxbox/neutrino/src/gui/audioplayer.cpp
+++ b/tuxbox/neutrino/src/gui/audioplayer.cpp
@@ -655,7 +655,6 @@ int CAudioPlayerGui::show()
                        if (m_key_level == 0)
                        {
                                if (m_inetmode) {
-                                       char cnt[5];
                                        CMenuWidget 
InputSelector(LOCALE_AUDIOPLAYER_LOAD_RADIO_STATIONS, NEUTRINO_ICON_AUDIO, 400);
                                        int count = 0;
                                        int select = -1;
@@ -663,20 +662,17 @@ int CAudioPlayerGui::show()
                                        // -- setup menue for inetradio input
                                        
InputSelector.addIntroItems(NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, 
CMenuWidget::BTN_TYPE_CANCEL);
 
-                                       sprintf(cnt, "%d", count);
                                        InputSelector.addItem(new 
CMenuForwarder(
                                                LOCALE_AUDIOPLAYER_ADD_LOC, 
true, NULL, &InetRadioInputChanger,
-                                               cnt, 
CRCInput::convertDigitToKey(count + 1)), true);
+                                               to_string(count).c_str(), 
CRCInput::convertDigitToKey(count + 1)), true);
        
-                                       sprintf(cnt, "%d", ++count);
                                        InputSelector.addItem(new 
CMenuForwarder(
                                                LOCALE_AUDIOPLAYER_ADD_SC, 
true, NULL, &InetRadioInputChanger,
-                                               cnt, 
CRCInput::convertDigitToKey(count + 1)), false);
+                                               to_string(count).c_str(), 
CRCInput::convertDigitToKey(count + 1)), false);
 
-                                       sprintf(cnt, "%d", ++count);
                                        InputSelector.addItem(new 
CMenuForwarder(
                                                LOCALE_AUDIOPLAYER_ADD_IC, 
true, NULL, &InetRadioInputChanger,
-                                               cnt, 
CRCInput::convertDigitToKey(count + 1)), false);
+                                               to_string(count).c_str(), 
CRCInput::convertDigitToKey(count + 1)), false);
 
                                        hide();
                                        InputSelector.exec(NULL, "");
@@ -2302,15 +2298,14 @@ bool CAudioPlayerGui::getNumericInput(neutrino_msg_t& 
msg, int& val) {
        int y1 = getScreenStartY(0);
        int w = 0;
        int h = 
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->getHeight();
-       char str[11];
        do
        {
                val = val * 10 + CRCInput::getNumericValue(msg);
-               sprintf(str, "%d", val);
-               w = 
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->getRenderWidth(str);
+               std::string value = to_string(val);
+               w = 
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->getRenderWidth(value);
                m_frameBuffer->paintBoxRel(x1 - 7, y1 - h - 5, w + 14, h + 10, 
COL_MENUCONTENT_PLUS_6);
                m_frameBuffer->paintBoxRel(x1 - 4, y1 - h - 3, w +  8, h +  6, 
COL_MENUCONTENTSELECTED_PLUS_0);
-               
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->RenderString(x1, y1, w + 
1, str, COL_MENUCONTENTSELECTED, 0);
+               
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->RenderString(x1, y1, w + 
1, value, COL_MENUCONTENTSELECTED, 0);
                while (true)
                {
                        g_RCInput->getMsg(&msg, &data, 100); 
diff --git a/tuxbox/neutrino/src/gui/bouquetlist.cpp 
b/tuxbox/neutrino/src/gui/bouquetlist.cpp
index edef77f..40ffd4d 100644
--- a/tuxbox/neutrino/src/gui/bouquetlist.cpp
+++ b/tuxbox/neutrino/src/gui/bouquetlist.cpp
@@ -48,6 +48,7 @@
 #include <driver/rcinput.h>
 #include <daemonc/remotecontrol.h>
 #include <system/settings.h>
+#include <system/helper.h>
 
 #include <global.h>
 #include <neutrino.h>
@@ -333,8 +334,7 @@ void CBouquetList::paintItem(int pos)
        {
                CBouquet* bouq = Bouquets[liststart+pos];
                //number - for direct jump
-               char tmp[10];
-               sprintf((char*) tmp, "%d", liststart+pos+ 1);
+               std::string tmp = to_string(liststart+pos+ 1);
 
                if (liststart + pos == selected)
                        CLCD::getInstance()->showMenuText(0, 
bouq->channelList->getName(), -1, true); // UTF-8
diff --git a/tuxbox/neutrino/src/gui/eventlist.cpp 
b/tuxbox/neutrino/src/gui/eventlist.cpp
index 8b8f4a0..24bca77 100644
--- a/tuxbox/neutrino/src/gui/eventlist.cpp
+++ b/tuxbox/neutrino/src/gui/eventlist.cpp
@@ -44,7 +44,7 @@
 #include <gui/widget/messagebox.h>
 #include <gui/widget/mountchooser.h>
 #include <gui/widget/dirchooser.h>
-
+#include <system/helper.h>
 
 #include <global.h>
 #include <neutrino.h>
@@ -691,8 +691,7 @@ void EventList::paintItem(unsigned int pos)
                                datetime2_str += "           " + 
g_Zapit->getChannelName(channel);
                        }
 
-                       sprintf(tmpstr, "[%d min]", evtlist[curpos].duration / 
60 );
-                       duration_str = tmpstr;
+                       duration_str = "[" + to_string(evtlist[curpos].duration 
/ 60) + " min]";
                }
 
                // 1st line
@@ -702,8 +701,7 @@ void EventList::paintItem(unsigned int pos)
                int seit = (evtlist[curpos].startTime - time(NULL)) / 60;
                if ((seit > 0) && (seit < 100) && !duration_str.empty())
                {
-                       char beginnt[100];
-                       sprintf((char*) &beginnt, "in %d min", seit);
+                       std::string beginnt = "in " + to_string(seit)  + " min";
                        int w = 
g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMSMALL]->getRenderWidth(beginnt)
 + 10;
 
                        
g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMSMALL]->RenderString(x+width-fwidth2-5-
 20- w, ypos+ fheight2+3, w, beginnt, color);
diff --git a/tuxbox/neutrino/src/gui/infoviewer.cpp 
b/tuxbox/neutrino/src/gui/infoviewer.cpp
index 0c8fe07..5227eef 100644
--- a/tuxbox/neutrino/src/gui/infoviewer.cpp
+++ b/tuxbox/neutrino/src/gui/infoviewer.cpp
@@ -55,6 +55,7 @@ extern CRemoteControl * g_RemoteControl; /* neutrino.cpp */
 #include <algorithm>
 #include <string>
 #include <system/settings.h>
+#include <system/helper.h>
 
 #include <time.h>
 #include <sys/param.h>
@@ -157,8 +158,8 @@ void CInfoViewer::showSatfind()
        signal.ber = (s.ber < 0x3FFFF) ? s.ber : 0x3FFFF;
 
        char freq[20];
-       char percent[10];
        char pos[6];
+       std::string percent;
        int percent_width;
        int sig;
        int snr;
@@ -186,17 +187,17 @@ void CInfoViewer::showSatfind()
 
                frameBuffer->paintBoxRel(ChanInfoX, BoxEndY, BoxEndX-ChanInfoX, 
30, COL_INFOBAR_PLUS_0);
 
-               sprintf (percent, "sig %d%%", sig);
+               percent = "sig " + to_string(sig) + "%";
                
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(ChanInfoX+ 10, 
BoxEndY+ 25, BoxEndX- ChanInfoX- 10, percent, COL_INFOBAR_PLUS_0);
                percent_width = 
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(percent);
                pbsig.paintProgressBar(ChanInfoX+ 10+ percent_width+ 5, 
BoxEndY+ 7, 60, 15, sig, 100, 0, 0, COL_INFOBAR_PLUS_0, 0, "", COL_INFOBAR);
 
-               sprintf (percent, "snr %d%%", snr);
+               percent = "snr " + to_string(snr) + "%";
                
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(ChanInfoX+ 
140, BoxEndY+ 25, BoxEndX- ChanInfoX- 140, percent, COL_INFOBAR_PLUS_0);
                percent_width = 
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(percent);
                pbsnr.paintProgressBar(ChanInfoX+ 140+ percent_width+ 5, 
BoxEndY+ 7, 60, 15, snr, 100, 0, 0, COL_INFOBAR_PLUS_0, 0, "", COL_INFOBAR);
 
-               sprintf (percent, "ber %d%%", ber);
+               percent = "ber " + to_string(ber); // no unit
                
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(ChanInfoX+ 
270, BoxEndY+ 25, BoxEndX- ChanInfoX- 270, percent, COL_INFOBAR_PLUS_0);
 
                
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(ChanInfoX+ 
345, BoxEndY+ 25, BoxEndX- ChanInfoX- 345, freq, COL_INFOBAR_PLUS_0);
@@ -431,9 +432,8 @@ void CInfoViewer::showMovieTitle(const int _playstate, 
const std::string &title,
        showIcon_VTXT(vtxtpid);
        showIcon_SubT(subpid);
 
-       char runningRest[32]; // %d can be 10 digits max...
-       sprintf(runningRest, "%ld / %ld min", (time_elapsed + 30) / 60, 
(time_remaining + 30) / 60);
-       display_Info(title.c_str(), sub_title.c_str(), true, false, (percent * 
112) / 100, NULL, runningRest);
+       std::string runningRest = to_string((time_elapsed + 30) / 60) + " / " + 
to_string((time_remaining + 30) / 60) + " min";
+       display_Info(title.c_str(), sub_title.c_str(), true, false, (percent * 
112) / 100, NULL, runningRest.c_str());
 
        infobarLoop(false, fadeIn);
 }
@@ -1260,12 +1260,10 @@ void CInfoViewer::showFailure()
 void CInfoViewer::showMotorMoving(int duration)
 {
        char text[256];
-       char buffer[10];
-       
-       sprintf(buffer, "%d", duration);
+
        strcpy(text, g_Locale->getText(LOCALE_INFOVIEWER_MOTOR_MOVING));
        strcat(text, " (");
-       strcat(text, buffer);
+       strcat(text, to_string(duration).c_str());
        strcat(text, " s)");
        
        ShowHintUTF(LOCALE_MESSAGEBOX_INFO, text, 
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(text, true) + 10, 
duration); // UTF-8
diff --git a/tuxbox/neutrino/src/gui/moviebrowser.cpp 
b/tuxbox/neutrino/src/gui/moviebrowser.cpp
index 96d7a95..1d40283 100644
--- a/tuxbox/neutrino/src/gui/moviebrowser.cpp
+++ b/tuxbox/neutrino/src/gui/moviebrowser.cpp
@@ -66,6 +66,8 @@
 #include <gui/widget/mountchooser.h>
 #include <gui/widget/dirchooser.h>
 #include <gui/widget/stringinput.h>
+#include <system/helper.h>
+
 #include <dirent.h>
 #include <sys/stat.h>
 #ifdef ENABLE_GUI_MOUNT
@@ -733,11 +735,10 @@ bool CMovieBrowser::loadSettings(MB_SETTINGS* settings)
                settings->parentalLockAge = 
(MI_PARENTAL_LOCKAGE)configfile.getInt32("mb_parentalLockAge", 
MI_PARENTAL_OVER18);
                settings->parentalLock = 
(MB_PARENTAL_LOCK)configfile.getInt32("mb_parentalLock", 
MB_PARENTAL_LOCK_ACTIVE);
        
-               char cfg_key[81];
+//             char cfg_key[81];
                for(int i = 0; i < MAX_RECORDING_DIR ; i++)
                {
-                       sprintf(cfg_key, "mb_storageDir_rec_%d", i);
-                       settings->storageDirRecUsed[i] = 
(bool)configfile.getInt32(cfg_key, true );
+                       settings->storageDirRecUsed[i] = 
(bool)configfile.getInt32("mb_storageDir_rec_" + to_string(i), true );
                }
                settings->storageDirMovieUsed = 
(bool)configfile.getInt32("mb_storageDir_movie", true );
                
@@ -746,20 +747,16 @@ bool CMovieBrowser::loadSettings(MB_SETTINGS* settings)
 
                for(int i = 0; i < MB_MAX_DIRS; i++)
                {
-                       sprintf(cfg_key, "mb_dir_%d", i);
-                       settings->storageDir[i] = configfile.getString( 
cfg_key, "" );
-                       sprintf(cfg_key, "mb_dir_used%d", i);
-                       settings->storageDirUsed[i] = configfile.getInt32( 
cfg_key,false );
+                       settings->storageDir[i] = 
configfile.getString("mb_dir_" + to_string(i), "" );
+                       settings->storageDirUsed[i] = 
configfile.getInt32("mb_dir_used" + to_string(i), false );
                }
                /* these variables are used for the listframes */       
                settings->browserFrameHeight  = 
configfile.getInt32("mb_browserFrameHeight", 250);
                settings->browserRowNr  = 
configfile.getInt32("mb_browserRowNr", 0);
                for(int i = 0; i < MB_MAX_ROWS && i < settings->browserRowNr; 
i++)
                {
-                       sprintf(cfg_key, "mb_browserRowItem_%d", i);
-                       settings->browserRowItem[i] = 
(MB_INFO_ITEM)configfile.getInt32(cfg_key, MB_INFO_MAX_NUMBER);
-                       sprintf(cfg_key, "mb_browserRowWidth_%d", i);
-                       settings->browserRowWidth[i] = 
configfile.getInt32(cfg_key, 50);
+                       settings->browserRowItem[i] = 
(MB_INFO_ITEM)configfile.getInt32("mb_browserRowItem_" + to_string(i), 
MB_INFO_MAX_NUMBER);
+                       settings->browserRowWidth[i] = 
configfile.getInt32("mb_browserRowWidth_" + to_string(i), 50);
                }
        }
        else
@@ -793,11 +790,9 @@ bool CMovieBrowser::saveSettings(MB_SETTINGS* settings)
        configfile.setString("mb_filter_optionString", 
settings->filter.optionString);
        configfile.setInt32("mb_filter_optionVar", settings->filter.optionVar);
        
-       char cfg_key[81];
        for(int i = 0; i < MAX_RECORDING_DIR ; i++)
        {
-               sprintf(cfg_key, "mb_storageDir_rec_%d", i);
-               configfile.setInt32(cfg_key, settings->storageDirRecUsed[i] );
+               configfile.setInt32("mb_storageDir_rec_" + to_string(i), 
settings->storageDirRecUsed[i] );
        }
        configfile.setInt32("mb_storageDir_movie", 
settings->storageDirMovieUsed );
        
@@ -809,20 +804,16 @@ bool CMovieBrowser::saveSettings(MB_SETTINGS* settings)
 
        for(int i = 0; i < MB_MAX_DIRS; i++)
        {
-               sprintf(cfg_key, "mb_dir_%d", i);
-               configfile.setString( cfg_key, settings->storageDir[i] );
-               sprintf(cfg_key, "mb_dir_used%d", i);
-               configfile.setInt32( cfg_key, settings->storageDirUsed[i] ); // 
do not save this so far
+               configfile.setString("mb_dir_" + to_string(i)  , 
settings->storageDir[i] );
+               configfile.setInt32("mb_dir_used" + to_string(i), 
settings->storageDirUsed[i] ); // do not save this so far
        }
        /* these variables are used for the listframes */       
        configfile.setInt32("mb_browserFrameHeight", 
settings->browserFrameHeight);
        configfile.setInt32("mb_browserRowNr",settings->browserRowNr);
        for(int i = 0; i < MB_MAX_ROWS && i < settings->browserRowNr; i++)
        {
-               sprintf(cfg_key, "mb_browserRowItem_%d", i);
-               configfile.setInt32(cfg_key, settings->browserRowItem[i]);
-               sprintf(cfg_key, "mb_browserRowWidth_%d", i);
-               configfile.setInt32(cfg_key, settings->browserRowWidth[i]);
+               configfile.setInt32("mb_browserRowItem_" + to_string(i) , 
settings->browserRowItem[i]);
+               configfile.setInt32("mb_browserRowWidth_" + to_string(i), 
settings->browserRowWidth[i]);
        }
 
        if (configfile.getModifiedFlag())
@@ -3398,7 +3389,6 @@ bool CMovieBrowser::getMovieInfoItem(MI_MOVIE_INFO& 
movie_info, MB_INFO_ITEM ite
        *item_string="";
        struct tm tm_tmp;
        
-       char text[20];
        int i=0;
        int counter=0;
 
@@ -3449,9 +3439,7 @@ bool CMovieBrowser::getMovieInfoItem(MI_MOVIE_INFO& 
movie_info, MB_INFO_ITEM ite
                                if(movie_info.bookmarks.user[i].pos != 0) 
                                        counter++;
                        }
-                       snprintf(text, 8,"%d",counter);
-                       text[9] = 0; // just to make sure string is terminated
-                       *item_string = text;
+                       *item_string = to_string(counter);
                        break;
                case MB_INFO_QUALITY:                           //              
= 11,
                        snprintf(str_tmp,MAX_STR_TMP,"%d",movie_info.quality);
@@ -3480,10 +3468,7 @@ bool CMovieBrowser::getMovieInfoItem(MI_MOVIE_INFO& 
movie_info, MB_INFO_ITEM ite
                case MB_INFO_AUDIO:                             //              
= 17,
 #if 1  // MB_INFO_AUDIO test
                        // we just return the number of audiopids
-                       char text2[10];
-                       snprintf(text2, 8,"%d",movie_info.audioPids.size());
-                       text2[9] = 0; // just to make sure string is terminated
-                       *item_string = text2;
+                       *item_string = to_string(movie_info.audioPids.size());
 #else // MB_INFO_AUDIO test
                        for(i=0; i < movie_info.audioPids.size() && i < 10; i++)
                        {
@@ -3662,11 +3647,7 @@ const char * CSelectedMenu::getTargetValue()
        {
                if (*value > 0)
                {
-                       char tmp[16];
-                       sprintf(tmp, "%d", *value / 60);
-                       value_string = tmp;
-                       value_string += " ";
-                       value_string += 
g_Locale->getText(LOCALE_WORD_MINUTES_SHORT);
+                       value_string = to_string(*value/60) + " " + 
g_Locale->getText(LOCALE_WORD_MINUTES_SHORT);
                }
                else
                        value_string = "---";
diff --git a/tuxbox/neutrino/src/gui/movieinfo.cpp 
b/tuxbox/neutrino/src/gui/movieinfo.cpp
index 42537f4..2404d57 100644
--- a/tuxbox/neutrino/src/gui/movieinfo.cpp
+++ b/tuxbox/neutrino/src/gui/movieinfo.cpp
@@ -161,7 +161,6 @@ bool CMovieInfo::convertTs2XmlName(std::string* filename)
 bool CMovieInfo::encodeMovieInfoXml(std::string* extMessage,MI_MOVIE_INFO 
&movie_info)
 {
        //TRACE("[mi]->encodeMovieInfoXml\r\n");
-       char tmp[40];
 
        *extMessage =   "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n";
        *extMessage +=  "<"MI_XML_TAG_NEUTRINO" commandversion=\"1\">\n";
@@ -179,15 +178,13 @@ bool CMovieInfo::encodeMovieInfoXml(std::string* 
extMessage,MI_MOVIE_INFO &movie
        if (!movie_info.audioPids.empty())
        {
                *extMessage +=  "\t\t<"MI_XML_TAG_AUDIOPIDS" selected=\"";
-               sprintf(tmp, "%u", movie_info.audioPids[0].epgAudioPid); 
//pids.APIDs[i].pid);
-               *extMessage += tmp;
+               *extMessage += to_string(movie_info.audioPids[0].epgAudioPid); 
//pids.APIDs[i].pid);
                *extMessage     +=      "\">\n";
 
                for(unsigned int i = 0; i < movie_info.audioPids.size(); i++) 
// pids.APIDs.size()
                {
                        *extMessage += "\t\t\t<"MI_XML_TAG_AUDIO" 
"MI_XML_TAG_PID"=\"";
-                       sprintf(tmp, "%u", 
movie_info.audioPids[i].epgAudioPid); //pids.APIDs[i].pid);
-                       *extMessage += tmp;
+                       *extMessage += 
to_string(movie_info.audioPids[i].epgAudioPid); //pids.APIDs[i].pid);
                        *extMessage += "\" "MI_XML_TAG_NAME"=\"";
                        *extMessage += 
ZapitTools::UTF8_to_UTF8XML(movie_info.audioPids[i].epgAudioPidName.c_str());
                        *extMessage += "\"/>\n";
@@ -201,11 +198,9 @@ bool CMovieInfo::encodeMovieInfoXml(std::string* 
extMessage,MI_MOVIE_INFO &movie
                for(unsigned int i = 0; i < movie_info.subPids.size(); i++)
                {
                        *extMessage += "\t\t\t<"MI_XML_TAG_SUB" 
"MI_XML_TAG_PID"=\"";
-                       sprintf(tmp, "%u", movie_info.subPids[i].subPid);
-                       *extMessage += tmp;
+                       *extMessage += to_string(movie_info.subPids[i].subPid);
                        *extMessage += "\" "MI_XML_TAG_PAGE"=\"";
-                       sprintf(tmp, "%u", movie_info.subPids[i].subPage);
-                       *extMessage += tmp;
+                       *extMessage += to_string(movie_info.subPids[i].subPage);
                        *extMessage += "\" "MI_XML_TAG_NAME"=\"";
                        *extMessage += 
ZapitTools::UTF8_to_UTF8XML(movie_info.subPids[i].subName.c_str());
                        *extMessage += "\"/>\n";
@@ -234,11 +229,9 @@ bool CMovieInfo::encodeMovieInfoXml(std::string* 
extMessage,MI_MOVIE_INFO &movie
                {
                        // encode any valid book, at least 1
                        *extMessage += "\t\t\t<"MI_XML_TAG_BOOKMARK_USER" 
"MI_XML_TAG_BOOKMARK_USER_POS"=\"";
-                       sprintf(tmp, "%d", movie_info.bookmarks.user[i].pos); 
//pids.APIDs[i].pid);
-                       *extMessage += tmp;
+                       *extMessage += 
to_string(movie_info.bookmarks.user[i].pos); //pids.APIDs[i].pid);
                        *extMessage += "\" "MI_XML_TAG_BOOKMARK_USER_TYPE"=\"";
-                       sprintf(tmp, "%d", 
movie_info.bookmarks.user[i].length); //pids.APIDs[i].pid);
-                       *extMessage += tmp;
+                       *extMessage += 
to_string(movie_info.bookmarks.user[i].length); //pids.APIDs[i].pid);
                        *extMessage += "\" "MI_XML_TAG_BOOKMARK_USER_NAME"=\"";
                        *extMessage += 
ZapitTools::UTF8_to_UTF8XML(movie_info.bookmarks.user[i].name.c_str());
                        *extMessage += "\"/>\n";
@@ -509,8 +502,7 @@ void CMovieInfo::showMovieInfo(MI_MOVIE_INFO& movie_info)
                print_buffer += "\n"; 
                print_buffer += movie_info.productionCountry; 
                print_buffer += " "; 
-               snprintf(date_char, 12,"%4d",movie_info.productionDate); 
-               print_buffer += date_char; 
+               print_buffer += to_string(movie_info.productionDate); 
      }
 
     if(!movie_info.serieName.empty())
@@ -532,16 +524,14 @@ void CMovieInfo::showMovieInfo(MI_MOVIE_INFO& movie_info)
        print_buffer += "\n"; 
        print_buffer += g_Locale->getText(LOCALE_MOVIEBROWSER_INFO_QUALITY);
        print_buffer += ": "; 
-               snprintf(date_char, 12,"%2d",movie_info.quality); 
-       print_buffer += date_char; 
+       print_buffer += to_string(movie_info.quality); 
     }
      if(movie_info.parentalLockAge != 0 )
     {
        print_buffer += "\n"; 
                print_buffer += 
g_Locale->getText(LOCALE_MOVIEBROWSER_INFO_PARENTAL_LOCKAGE);
        print_buffer += ": "; 
-               snprintf(date_char, 12,"%2d",movie_info.parentalLockAge); 
-       print_buffer += date_char; 
+       print_buffer += to_string(movie_info.parentalLockAge); 
                print_buffer += " Jahre"; 
     }
     if(movie_info.rec_length != 0 )
@@ -549,8 +539,8 @@ void CMovieInfo::showMovieInfo(MI_MOVIE_INFO& movie_info)
        print_buffer += "\n"; 
                print_buffer += 
g_Locale->getText(LOCALE_MOVIEBROWSER_INFO_LENGTH);
        print_buffer += ": "; 
-               snprintf(date_char, 12, "%3d:%02d", movie_info.rec_length / 60, 
movie_info.rec_length % 60);
-       print_buffer += date_char; 
+               snprintf(date_char, 12, "%3d:%02d", movie_info.rec_length / 60, 
movie_info.rec_length % 60);
+               print_buffer += date_char;
     }
     else if(movie_info.length != 0 )
     {
@@ -558,7 +548,7 @@ void CMovieInfo::showMovieInfo(MI_MOVIE_INFO& movie_info)
                print_buffer += 
g_Locale->getText(LOCALE_MOVIEBROWSER_INFO_LENGTH);
        print_buffer += ": "; 
                snprintf(date_char, 12, "%3d", movie_info.length);
-       print_buffer += date_char; 
+               print_buffer += date_char;
     }
     if (!movie_info.audioPids.empty())
      {
@@ -623,8 +613,7 @@ void CMovieInfo::showMovieInfo(MI_MOVIE_INFO& movie_info)
                print_buffer += "\n"; 
                print_buffer += 
g_Locale->getText(LOCALE_MOVIEBROWSER_INFO_SIZE);
        print_buffer += ": "; 
-               snprintf(date_char, 12,"%4llu",movie_info.file.Size>>20);
-               print_buffer += date_char; 
+               print_buffer += to_string(movie_info.file.Size>>20); 
    }
     print_buffer += "\n" ;
         print_buffer += g_Locale->getText(LOCALE_MOVIEBROWSER_INFO_PATH);
diff --git a/tuxbox/neutrino/src/gui/movieplayer.cpp 
b/tuxbox/neutrino/src/gui/movieplayer.cpp
index 5676b0b..ce75671 100644
--- a/tuxbox/neutrino/src/gui/movieplayer.cpp
+++ b/tuxbox/neutrino/src/gui/movieplayer.cpp
@@ -208,9 +208,7 @@ bool get_movie_info_apid_name(int apid,MI_MOVIE_INFO* 
movie_info,std::string* ap
        if( movie_info->audioPids[i].epgAudioPid == apid && 
           !movie_info->audioPids[i].epgAudioPidName.empty())
        {
-            char show_pid_number[5];
-            sprintf(show_pid_number, "%u", apid);
-            apidtitle->assign(show_pid_number);
+            apidtitle->assign(to_string(apid));
             apidtitle->append(" : ");
             apidtitle->append(movie_info->audioPids[i].epgAudioPidName);
             return true;
@@ -230,9 +228,7 @@ bool get_movie_info_subpid_name(int subpid, MI_MOVIE_INFO* 
movie_info, std::stri
        if( movie_info->subPids[i].subPid == subpid && 
           !movie_info->subPids[i].subName.empty())
        {
-            char show_pid_number[5];
-            sprintf(show_pid_number, "%u", subpid);
-            subpidtitle->assign(show_pid_number);
+            subpidtitle->assign(to_string(subpid));
             subpidtitle->append(" : ");
             subpidtitle->append(movie_info->subPids[i].subName);
             return true;
@@ -1152,9 +1148,7 @@ PlayStreamThread (void *mrl)
                        if(g_startposition > 0)
                        {
                                printf ("[movieplayer.cpp] Was Bookmark. 
Skipping to startposition\n");
-                               char tmpbuf[30];
-                               sprintf(tmpbuf,"%lld",g_startposition);
-                               skipvalue = tmpbuf;
+                               skipvalue = to_string(g_startposition);
                                g_startposition = 0;
                                g_playstate = CMoviePlayerGui::SKIP;
                        }
diff --git a/tuxbox/neutrino/src/gui/movieplayer2.cpp 
b/tuxbox/neutrino/src/gui/movieplayer2.cpp
index 5f54380..759fea4 100644
--- a/tuxbox/neutrino/src/gui/movieplayer2.cpp
+++ b/tuxbox/neutrino/src/gui/movieplayer2.cpp
@@ -3051,7 +3051,6 @@ CMoviePlayerGui::PlayStream(int streamtype)
                        g_apidchanged = false;
                        CAPIDSelectExec *APIDChanger = new CAPIDSelectExec;
                        unsigned int digit = 0;
-                       char show_pid_number[5];
                        std::string apidtitle = "";
                        bool sep_added = false;
 
@@ -3062,9 +3061,8 @@ CMoviePlayerGui::PlayStream(int streamtype)
                                        continue;
 
                                bool mi_found = false, current = false;
-                               sprintf(show_pid_number, "%u", g_apids[count]);
 
-                               apidtitle.assign(show_pid_number);
+                               apidtitle.assign(to_string(g_apids[count]));
                                apidtitle.append(" : ");
                                if (movieinfo_valid)
                                {
@@ -3107,9 +3105,8 @@ CMoviePlayerGui::PlayStream(int streamtype)
                                        continue;
 
                                bool mi_found = false, current = false;
-                               sprintf(show_pid_number, "%u", g_apids[count]);
 
-                               apidtitle.assign(show_pid_number);
+                               apidtitle.assign(to_string(g_apids[count]));
                                apidtitle.append(" : ");
                                if (movieinfo_valid)
                                {
@@ -3158,8 +3155,6 @@ CMoviePlayerGui::PlayStream(int streamtype)
                                if (!movieinfo_valid)
                                        break; // only one teletext pid possible
 
-                               sprintf(show_pid_number, "%d", vtxtpid);
-
                                for (unsigned int i = 0; i < 
movieinfo.subPids.size(); i++)
                                {
                                        if (movieinfo.subPids[i].subPid == 
vtxtpid)
@@ -3170,7 +3165,7 @@ CMoviePlayerGui::PlayStream(int streamtype)
                                                        sep_added = true;
                                                }
 
-                                               
apidtitle.assign(show_pid_number);
+                                               
apidtitle.assign(to_string(vtxtpid));
                                                apidtitle.append(" : ");
                                                
apidtitle.append(movieinfo.subPids[i].subName);
                                                apidtitle.append(" (TTX)");
@@ -3198,7 +3193,6 @@ CMoviePlayerGui::PlayStream(int streamtype)
 
                                bool mi_found = false;
                                subpid = g_apids[count];
-                               sprintf(show_pid_number, "%d", subpid);
 
                                if (!sep_added)
                                {
@@ -3206,7 +3200,7 @@ CMoviePlayerGui::PlayStream(int streamtype)
                                        sep_added = true;
                                }
 
-                               apidtitle.assign(show_pid_number);
+                               apidtitle.assign(to_string(subpid));
                                apidtitle.append(" : ");
                                if (movieinfo_valid)
                                {
diff --git a/tuxbox/neutrino/src/gui/movieplayer_setup.cpp 
b/tuxbox/neutrino/src/gui/movieplayer_setup.cpp
index 5ef9cdb..0d80597 100644
--- a/tuxbox/neutrino/src/gui/movieplayer_setup.cpp
+++ b/tuxbox/neutrino/src/gui/movieplayer_setup.cpp
@@ -43,6 +43,7 @@
 #include <gui/widget/stringinput.h>
 #include <gui/widget/stringinput_ext.h>
 #include <gui/widget/dirchooser.h>
+#include <system/helper.h>
 
 #include "gui/movieplayer.h"
 #include "gui/filebrowser.h"
@@ -260,7 +261,6 @@ int CMoviePlayerSetup::showMoviePlayerSelectPlugin()
        MoviePluginSelector->addIntroItems(LOCALE_MOVIEPLAYER_DEFPLUGIN, 
NONEXISTANT_LOCALE, CMenuWidget::BTN_TYPE_CANCEL);
 
        std::string pluginName;
-       char id[5];
        int enabled_count = 0;
        for(unsigned int count=0;count < (unsigned int) 
g_PluginList->getNumberOfPlugins();count++)
        {
@@ -268,11 +268,10 @@ int CMoviePlayerSetup::showMoviePlayerSelectPlugin()
                {
                        // zB vtxt-plugins
                        pluginName = g_PluginList->getName(count);
-                       sprintf(id, "%d", count);
                        enabled_count++;
 
                        CMenuForwarder* fw = new 
CMenuForwarder(pluginName.c_str(),
-                               true, NULL, this, id, 
CRCInput::convertDigitToKey(enabled_count));
+                               true, NULL, this, to_string(count).c_str(), 
CRCInput::convertDigitToKey(enabled_count));
                        fw->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, true);
 
                        MoviePluginSelector->addItem(fw, 
(g_settings.movieplayer_plugin.compare(pluginName) == 0));
diff --git a/tuxbox/neutrino/src/gui/neutrino_menu.cpp 
b/tuxbox/neutrino/src/gui/neutrino_menu.cpp
index 78aa91a..c16c948 100644
--- a/tuxbox/neutrino/src/gui/neutrino_menu.cpp
+++ b/tuxbox/neutrino/src/gui/neutrino_menu.cpp
@@ -41,6 +41,7 @@
 #include <neutrino.h>
 
 #include <system/debug.h>
+#include <system/helper.h>
 #include <unistd.h>
 
 #include <driver/encoding.h>
@@ -393,7 +394,6 @@ bool CNeutrinoApp::showUserMenu(int button)
        neutrino_msg_t key = CRCInput::RC_nokey;
        const char * icon = NULL; 
        
-       char id[5];
        int menu_items = 0;
        int menu_prev = -1;
        int cnt = 0;
@@ -466,13 +466,12 @@ bool CNeutrinoApp::showUserMenu(int button)
                                        std::string tmp = 
g_PluginList->getName(count);
                                        if (g_PluginList->getType(count)== 
CPlugins::P_TYPE_TOOL && !g_PluginList->isHidden(count) && tmp.find("Teletext") 
!= std::string::npos)
                                        {
-                                               sprintf(id, "%d", count);
                                                menu_items++;
                                                menu_prev = 
SNeutrinoSettings::ITEM_VTXT;
                                                if (StreamFeaturesChanger == 
NULL)
                                                        StreamFeaturesChanger = 
new CStreamFeaturesChangeExec();
                                                keyhelper.get(&key, &icon, cnt 
== 0 ? CRCInput::RC_blue : CRCInput::RC_nokey);
-                                               menu_item = new 
CMenuForwarder(g_PluginList->getName(count), true, NULL, StreamFeaturesChanger, 
id, key, icon);
+                                               menu_item = new 
CMenuForwarder(g_PluginList->getName(count), true, NULL, StreamFeaturesChanger, 
to_string(count).c_str(), key, icon);
                                                menu->addItem(menu_item, (cnt 
== 0));
                                                cnt++;
                                        }
@@ -485,13 +484,12 @@ bool CNeutrinoApp::showUserMenu(int button)
                                        std::string tmp = 
g_PluginList->getName(count);
                                        if (g_PluginList->getType(count)== 
CPlugins::P_TYPE_TOOL && !g_PluginList->isHidden(count) && tmp.find("Teletext") 
== std::string::npos)
                                        {
-                                               sprintf(id, "%d", count);
                                                menu_items++;
                                                menu_prev = 
SNeutrinoSettings::ITEM_PLUGIN;
                                                if (StreamFeaturesChanger == 
NULL)
                                                        StreamFeaturesChanger = 
new CStreamFeaturesChangeExec();
                                                keyhelper.get(&key, &icon, cnt 
== 0 ? CRCInput::RC_blue : CRCInput::RC_nokey);
-                                               menu_item = new 
CMenuForwarder(g_PluginList->getName(count), true, NULL, StreamFeaturesChanger, 
id, key, icon);
+                                               menu_item = new 
CMenuForwarder(g_PluginList->getName(count), true, NULL, StreamFeaturesChanger, 
to_string(count).c_str(), key, icon);
                                                menu->addItem(menu_item, (cnt 
== 0));
                                                cnt++;
                                        }
diff --git a/tuxbox/neutrino/src/gui/nfs.cpp b/tuxbox/neutrino/src/gui/nfs.cpp
index 17f277d..0f0cb61 100644
--- a/tuxbox/neutrino/src/gui/nfs.cpp
+++ b/tuxbox/neutrino/src/gui/nfs.cpp
@@ -41,6 +41,7 @@
 #include <gui/widget/hintbox.h>
 #include <gui/widget/stringinput.h>
 #include <gui/widget/stringinput_ext.h>
+#include <system/helper.h>
 
 #include <fstream>
 
@@ -156,13 +157,12 @@ int CNFSMountGui::menu()
 {
        CMenuWidget mountMenuW(LOCALE_NFS_MOUNT, NEUTRINO_ICON_STREAMING, 720);
        mountMenuW.addIntroItems();
-       char s2[12];
 
        for(int i=0 ; i < NETWORK_NFS_NR_OF_ENTRIES ; i++)
        {
-               sprintf(s2,"mountentry%d",i);
+               std::string s2 = "mountentry" + to_string(i);
                
sprintf(ISO_8859_1_entry[i],ZapitTools::UTF8_to_Latin1(m_entry[i]).c_str());
-               mountMenuEntry[i] = new CMenuForwarder("", true, 
ISO_8859_1_entry[i], this, s2);
+               mountMenuEntry[i] = new CMenuForwarder("", true, 
ISO_8859_1_entry[i], this, s2.c_str());
                if (CFSMounter::isMounted(g_settings.network_nfs_local_dir[i]))
                        mountMenuEntry[i]->iconName = NEUTRINO_ICON_MOUNTED;
                else
@@ -194,8 +194,8 @@ int CNFSMountGui::menuEntry(int nr)
        char *dir,*local_dir, *username, *password, *options1, *options2, *mac;
        int* automount;
        int* type;
-       char cmd[9];
-       char cmd2[9];
+       std::string cmd  = "domount" + to_string(nr);
+       std::string cmd2 = "dir"     + to_string(nr);
 
        dir = g_settings.network_nfs_dir[nr];
        local_dir = g_settings.network_nfs_local_dir[nr];
@@ -207,9 +207,6 @@ int CNFSMountGui::menuEntry(int nr)
        options2 = g_settings.network_nfs_mount_options2[nr];
        mac = g_settings.network_nfs_mac[nr];
 
-       sprintf(cmd,"domount%d",nr);
-       sprintf(cmd2,"dir%d",nr);
-
    /* rewrite fstype in new entries */
    if(strlen(local_dir)==0)
    {
@@ -243,7 +240,7 @@ int CNFSMountGui::menuEntry(int nr)
        CMenuForwarder *password_fwd = new CMenuForwarder(LOCALE_NFS_PASSWORD, 
(*type != (int)CFSMounter::NFS), NULL, &passInput);
        CMACInput macInput(LOCALE_RECORDINGMENU_SERVER_MAC, 
g_settings.network_nfs_mac[nr]);
        CMenuForwarder * macInput_fwd = new 
CMenuForwarder(LOCALE_RECORDINGMENU_SERVER_MAC, true, 
g_settings.network_nfs_mac[nr], &macInput);
-       CMenuForwarder *mountnow_fwd = new CMenuForwarder(LOCALE_NFS_MOUNTNOW, 
!(CFSMounter::isMounted(g_settings.network_nfs_local_dir[nr])), NULL, this, 
cmd);
+       CMenuForwarder *mountnow_fwd = new CMenuForwarder(LOCALE_NFS_MOUNTNOW, 
!(CFSMounter::isMounted(g_settings.network_nfs_local_dir[nr])), NULL, this, 
cmd.c_str());
        mountnow_fwd->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, true);
 
        COnOffNotifier notifier(CFSMounter::NFS);
@@ -253,7 +250,7 @@ int CNFSMountGui::menuEntry(int nr)
        mountMenuEntryW.addItem(new CMenuOptionChooser(LOCALE_NFS_TYPE, type, 
NFS_TYPE_OPTIONS, NFS_TYPE_OPTION_COUNT, typeEnabled, &notifier));
        mountMenuEntryW.addItem(new CMenuForwarder(LOCALE_NFS_IP      , true, 
g_settings.network_nfs_ip[nr], &ipInput       ));
        mountMenuEntryW.addItem(new CMenuForwarder(LOCALE_NFS_DIR     , true, 
dir                          , &dirInput      ));
-       mountMenuEntryW.addItem(new CMenuForwarder(LOCALE_NFS_LOCALDIR, true, 
local_dir                    , this     , cmd2));
+       mountMenuEntryW.addItem(new CMenuForwarder(LOCALE_NFS_LOCALDIR, true, 
local_dir                    , this     , cmd2.c_str()));
        mountMenuEntryW.addItem(automountInput);
        mountMenuEntryW.addItem(options1_fwd);
        mountMenuEntryW.addItem(options2_fwd);
diff --git a/tuxbox/neutrino/src/gui/plugins.cpp 
b/tuxbox/neutrino/src/gui/plugins.cpp
index 8ba4163..7b236d2 100644
--- a/tuxbox/neutrino/src/gui/plugins.cpp
+++ b/tuxbox/neutrino/src/gui/plugins.cpp
@@ -34,6 +34,7 @@
 #endif
 
 #include <gui/plugins.h>
+#include <system/helper.h>
 
 #include <sstream>
 #include <fstream>
@@ -280,11 +281,7 @@ PluginParam * CPlugins::makeParam(const char * const id, 
const char * const valu
 
 PluginParam * CPlugins::makeParam(const char * const id, const int value, 
PluginParam * const next)
 {
-       char aval[10];
-
-       sprintf(aval, "%d", value);
-
-       return makeParam(id, aval, next);
+       return makeParam(id, to_string(value).c_str(), next);
 }
 
 void CPlugins::start_plugin_by_name(const std::string & filename,int param)
diff --git a/tuxbox/neutrino/src/gui/sleeptimer.cpp 
b/tuxbox/neutrino/src/gui/sleeptimer.cpp
index d95a2d6..562a2f5 100644
--- a/tuxbox/neutrino/src/gui/sleeptimer.cpp
+++ b/tuxbox/neutrino/src/gui/sleeptimer.cpp
@@ -43,6 +43,7 @@
 #include <global.h>
 
 #include <gui/widget/stringinput.h>
+#include <system/helper.h>
 
 #include <stdlib.h>
 
@@ -120,10 +121,7 @@ const char * CSleepTimerWidget::getTargetValue()
 #endif
        if (shutdown_min > 0)
        {
-               sprintf(value, "%d", shutdown_min);
-               shutdown_min_string = value;
-               shutdown_min_string += " ";
-               shutdown_min_string += 
g_Locale->getText(LOCALE_WORD_MINUTES_SHORT);
+               shutdown_min_string = to_string(shutdown_min) + " " + 
g_Locale->getText(LOCALE_WORD_MINUTES_SHORT);
                return shutdown_min_string.c_str();
        }
        return NULL;
diff --git a/tuxbox/neutrino/src/gui/update.cpp 
b/tuxbox/neutrino/src/gui/update.cpp
index 38e1700..598384d 100644
--- a/tuxbox/neutrino/src/gui/update.cpp
+++ b/tuxbox/neutrino/src/gui/update.cpp
@@ -55,6 +55,7 @@
 #include <gui/widget/messagebox.h>
 #include <gui/widget/hintbox.h>
 
+#include <system/helper.h>
 #include <system/flashtool.h>
 #include <sectionsdclient/sectionsdclient.h>
 #ifndef DISABLE_INTERNET_UPDATE
@@ -550,11 +551,8 @@ CFlashExpert::CFlashExpert()
 
 void CFlashExpert::readmtd(int mtd)
 {
-       char tmp[10];
-       sprintf(tmp, "%d", mtd);
-       std::string filename = "/tmp/mtd";
-       filename += tmp;
-       filename += ".img"; // US-ASCII (subset of UTF-8 and ISO8859-1)
+
+       std::string filename = "/tmp/mtd" + to_string(mtd) + ".img"; // 
US-ASCII (subset of UTF-8 and ISO8859-1)
        if (mtd == -1)
        {
                filename = "/tmp/flashimage.img"; // US-ASCII (subset of UTF-8 
and ISO8859-1)
diff --git a/tuxbox/neutrino/src/gui/user_menue_setup.cpp 
b/tuxbox/neutrino/src/gui/user_menue_setup.cpp
index d772f9a..ee14e16 100644
--- a/tuxbox/neutrino/src/gui/user_menue_setup.cpp
+++ b/tuxbox/neutrino/src/gui/user_menue_setup.cpp
@@ -43,6 +43,7 @@
 #include <gui/widget/icons.h>
 #include <gui/widget/stringinput.h>
 #include <gui/widget/keychooser.h>
+#include <system/helper.h>
 
 #include <driver/screen_max.h>
 
@@ -107,13 +108,10 @@ int CUserMenuSetup::showSetup()
        //-------------------------------------
        ums->addItem(mf);
        ums->addItem(GenericMenuSeparatorLine);
-       //-------------------------------------
-       char text[10];
-       for(int item = 0; item < SNeutrinoSettings::ITEM_MAX && item <13; 
item++) // Do not show more than 13 items
+       //---------------------------
+       for(int item = 1; item < SNeutrinoSettings::ITEM_MAX && item <14; 
item++) // Do not show more than 13 items
        {
-               snprintf(text,10,"%d:",item+1);
-               text[9]=0;// terminate for sure
-               ums->addItem( new CMenuOptionChooser(text, 
&g_settings.usermenu[button][item], USERMENU_ITEM_OPTIONS, 
USERMENU_ITEM_OPTION_COUNT, true, NULL, CRCInput::RC_nokey, "", true, true));
+               ums->addItem( new 
CMenuOptionChooser((to_string(item)+":").c_str(), 
&g_settings.usermenu[button][item], USERMENU_ITEM_OPTIONS, 
USERMENU_ITEM_OPTION_COUNT, true, NULL, CRCInput::RC_nokey, "", true, true));
        }
 
        int res = ums->exec(NULL, "");
diff --git a/tuxbox/neutrino/src/gui/widget/menue.cpp 
b/tuxbox/neutrino/src/gui/widget/menue.cpp
index aad8b95..20e619d 100644
--- a/tuxbox/neutrino/src/gui/widget/menue.cpp
+++ b/tuxbox/neutrino/src/gui/widget/menue.cpp
@@ -48,6 +48,7 @@
 
 #include <gui/widget/stringinput.h>
 #include <gui/widget/stringinput_ext.h>
+#include <system/helper.h>
 
 #include <global.h>
 #include <neutrino.h>
@@ -935,7 +936,6 @@ int CMenuOptionChooser::exec(CMenuTarget* parent)
        if (pulldown)
        {
                int select = -1;
-               char cnt[5];
                CMenuWidget* menu = new CMenuWidget(optionNameString.c_str(), 
"", dx);
                menu->addIntroItems(NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, 
CMenuWidget::BTN_TYPE_CANCEL);
                CMenuSelectorTarget * selector = new 
CMenuSelectorTarget(&select);
@@ -944,8 +944,7 @@ int CMenuOptionChooser::exec(CMenuTarget* parent)
                        bool selected = false;
                        if (options[count]->key == (*optionValue))
                                selected = true;
-                       sprintf(cnt, "%d", count);
-                       CMenuForwarder *mn_option = new 
CMenuForwarder(options[count]->value, true, NULL, selector, cnt);
+                       CMenuForwarder *mn_option = new 
CMenuForwarder(options[count]->value, true, NULL, selector, 
to_string(count).c_str());
                        mn_option->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, 
true /*for selected item*/);
                        menu->addItem(mn_option, selected);
                }
@@ -1066,7 +1065,6 @@ int CMenuOptionStringChooser::exec(CMenuTarget* parent)
        if (pulldown)
        {
                int select = -1;
-               char cnt[5];
                CMenuWidget* menu = new CMenuWidget(optionName, "", dx);
                menu->addIntroItems(NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, 
CMenuWidget::BTN_TYPE_CANCEL);
                CMenuSelectorTarget * selector = new 
CMenuSelectorTarget(&select);
@@ -1075,8 +1073,7 @@ int CMenuOptionStringChooser::exec(CMenuTarget* parent)
                        bool selected = false;
                        if (strcmp(options[count].c_str(), optionValue) == 0)
                                selected = true;
-                       sprintf(cnt, "%d", count);
-                       CMenuForwarder *mn_option = new 
CMenuForwarder(options[count].c_str(), true, NULL, selector, cnt);
+                       CMenuForwarder *mn_option = new 
CMenuForwarder(options[count].c_str(), true, NULL, selector, 
to_string(count).c_str());
                        mn_option->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, 
true /*for selected item*/);
                        menu->addItem(mn_option, selected);
                }

-----------------------------------------------------------------------

Summary of changes:
 tuxbox/neutrino/src/gui/alphasetup.cpp        |    5 +-
 tuxbox/neutrino/src/gui/audioplayer.cpp       |   17 +++-----
 tuxbox/neutrino/src/gui/bouquetlist.cpp       |    4 +-
 tuxbox/neutrino/src/gui/eventlist.cpp         |    8 +--
 tuxbox/neutrino/src/gui/infoviewer.cpp        |   20 ++++-----
 tuxbox/neutrino/src/gui/moviebrowser.cpp      |   51 ++++++++-----------------
 tuxbox/neutrino/src/gui/movieinfo.cpp         |   37 ++++++------------
 tuxbox/neutrino/src/gui/movieplayer.cpp       |   12 +----
 tuxbox/neutrino/src/gui/movieplayer2.cpp      |   14 ++-----
 tuxbox/neutrino/src/gui/movieplayer_setup.cpp |    5 +-
 tuxbox/neutrino/src/gui/neutrino_menu.cpp     |    8 +--
 tuxbox/neutrino/src/gui/nfs.cpp               |   17 +++-----
 tuxbox/neutrino/src/gui/plugins.cpp           |    7 +--
 tuxbox/neutrino/src/gui/sleeptimer.cpp        |    6 +--
 tuxbox/neutrino/src/gui/update.cpp            |    8 +--
 tuxbox/neutrino/src/gui/user_menue_setup.cpp  |   10 ++---
 tuxbox/neutrino/src/gui/widget/menue.cpp      |    9 +---
 17 files changed, 84 insertions(+), 154 deletions(-)


-- 
Tuxbox-GIT: apps

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Tuxbox-cvs-commits mailing list
Tuxbox-cvs-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tuxbox-cvs-commits

Reply via email to