change 'long long' tom int64_t'; change variable buf to new delete;

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@291 e54a6e83-5905-42d5-8d5c-058d10e6a962


Origin commit data
------------------
Commit: 8f59cc96ec
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2010-02-07 (Sun, 07 Feb 2010)
This commit is contained in:
Jacek Jendrzej
2010-02-07 14:32:21 +00:00
parent 780e67bbc1
commit 9819856e7d
43 changed files with 202 additions and 183 deletions

View File

@@ -118,7 +118,7 @@ int CColorChooser::exec(CMenuTarget* parent, const std::string &)
int selected = 0;
unsigned long long timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings
::TIMING_MENU]);
bool loop=true;

View File

@@ -230,7 +230,7 @@ int ShowHintUTF(const neutrino_locale_t Caption, const char * const Text, const
timeout = 5; /// default timeout 5 sec
//timeout = g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR];
unsigned long long timeoutEnd = CRCInput::calcTimeoutEnd( timeout );
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd( timeout );
int res = messages_return::none;

View File

@@ -108,7 +108,7 @@ int CKeyChooserItem::exec(CMenuTarget* parent, const std::string &)
neutrino_msg_t msg;
neutrino_msg_data_t data;
unsigned long long timeoutEnd;
uint64_t timeoutEnd;
int res = menu_return::RETURN_REPAINT;

View File

@@ -96,7 +96,7 @@ class CKeyChooserItemNoKey : public CMenuTarget
int exec(CMenuTarget* /*parent*/, const std::string & /*actionKey*/)
{
*key=CRCInput::RC_nokey;
*key=(int)CRCInput::RC_nokey;
return menu_return::RETURN_REPAINT;
}

View File

@@ -578,7 +578,7 @@ void CListFrame::scrollPageDown(const int pages)
}
//TRACE("[CListFrame] m_nCurrentLine: %d, m_nCurrentPage: %d \r\n",m_nCurrentLine,m_nCurrentPage);
refresh();
};
}
void CListFrame::scrollPageUp(const int pages)
{

View File

@@ -184,7 +184,7 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &)
paint();
int retval = menu_return::RETURN_REPAINT;
unsigned long long timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_MENU]);
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_MENU]);
if ( fadeIn )
fadeTimer = g_RCInput->addTimer( FADE_TIME, false );

View File

@@ -195,7 +195,7 @@ int CMessageBox::exec(int timeout)
if ( timeout == -1 )
timeout = g_settings.timing[SNeutrinoSettings::TIMING_EPG];
unsigned long long timeoutEnd = CRCInput::calcTimeoutEnd( timeout );
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd( timeout );
bool loop=true;
while (loop)
@@ -204,7 +204,7 @@ int CMessageBox::exec(int timeout)
g_RCInput->getMsgAbsoluteTimeout( &msg, &data, &timeoutEnd );
if (msg == CRCInput::RC_timeout && returnDefaultOnTimeout)
{
// return default
// return default
loop = false;
}
else if (((msg == CRCInput::RC_timeout) ||
@@ -270,7 +270,7 @@ int CMessageBox::exec(int timeout)
}
hide();
return res;
}
@@ -281,7 +281,7 @@ int ShowMsgUTF(const neutrino_locale_t Caption, const char * const Text, const C
messageBox->exec(timeout);
int res = messageBox->result;
delete messageBox;
return res;
}

View File

@@ -532,7 +532,7 @@ void CMsgBox::scrollPageDown(const int pages)
m_pcTextBox->scrollPageDown(pages);
}
};
}
//////////////////////////////////////////////////////////////////////
// Function Name: ScrollPageUp
@@ -549,7 +549,7 @@ void CMsgBox::scrollPageUp(const int pages)
{
m_pcTextBox->scrollPageUp(pages);
}
};
}
//////////////////////////////////////////////////////////////////////
// Function Name: Paint
@@ -646,7 +646,7 @@ int CMsgBox::exec( int timeout, int returnDefaultOnTimeout)
if ( timeout == -1 )
timeout = g_settings.timing[SNeutrinoSettings::TIMING_EPG];
unsigned long long timeoutEnd = CRCInput::calcTimeoutEnd( timeout );
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd( timeout );
bool loop=true;
while (loop)
@@ -761,7 +761,7 @@ bool CMsgBox::setText(const std::string* newText)
}
return(lresult);
};
}
//////////////////////////////////////////////////////////////////////

View File

@@ -92,7 +92,7 @@ int CRGBCSyncControler::exec(CMenuTarget* parent, const std::string &)
setCSync();
paint();
unsigned long long timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU]);
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU]);
bool loop=true;
while (loop)

View File

@@ -304,7 +304,14 @@ int CStringInput::exec( CMenuTarget* parent, const std::string & )
neutrino_msg_data_t data;
int res = menu_return::RETURN_REPAINT;
char oldval[size+1], dispval[size+1];
char *oldval = new char[size+1];
if(oldval == NULL)
return res;
char *dispval = new char[size+1];
if(dispval == NULL){
delete[] oldval;
return res;
}
oldval[size] = 0;
dispval[size] = 0;
@@ -317,7 +324,7 @@ int CStringInput::exec( CMenuTarget* parent, const std::string & )
paint();
unsigned long long timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings
::TIMING_MENU]);
bool loop=true;
@@ -446,7 +453,8 @@ int CStringInput::exec( CMenuTarget* parent, const std::string & )
{
observ->changeNotify(name, value);
}
delete[] oldval;
delete[] oldval;
return res;
}

View File

@@ -136,7 +136,15 @@ int CExtendedInput::exec( CMenuTarget* parent, const std::string & )
onBeforeExec();
int res = menu_return::RETURN_REPAINT;
char oldval[inputFields.size()+10], dispval[inputFields.size()+10];
char *oldval = new char[inputFields.size()+10];
if(oldval == NULL)
return res;
char *dispval = new char[inputFields.size()+10];
if(dispval == NULL){
delete[] oldval;
return res;
}
if (parent)
{
@@ -146,7 +154,7 @@ int CExtendedInput::exec( CMenuTarget* parent, const std::string & )
strcpy(oldval, value);
paint();
unsigned long long timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings
::TIMING_MENU]);
bool loop=true;
@@ -196,7 +204,7 @@ int CExtendedInput::exec( CMenuTarget* parent, const std::string & )
break;
}
}
}
}
if(!found) {
for(int i = 0; i < (int) inputFields.size(); i++) {
//printf("old %d sel %d size %d i %d\n", oldSelectedChar, selectedChar, inputFields.size(), i);
@@ -268,6 +276,9 @@ int CExtendedInput::exec( CMenuTarget* parent, const std::string & )
observ->changeNotify(name, value);
}
delete[] oldval;
delete[] oldval;
return res;
}
@@ -329,7 +340,7 @@ void CExtendedInput_Item_Char::paint(int x, int y, bool focusGained )
uint8_t color;
fb_pixel_t bgcolor;
if (focusGained)
{
color = COL_MENUCONTENTSELECTED;
@@ -463,7 +474,7 @@ CDateInput::CDateInput(const neutrino_locale_t Name, time_t* Time, const neutrin
sprintf( value, "%02d.%02d.%04d %02d:%02d", tmTime->tm_mday, tmTime->tm_mon+1,
tmTime->tm_year+1900,
tmTime->tm_hour, tmTime->tm_min);
frameBuffer = CFrameBuffer::getInstance();
addInputField( new CExtendedInput_Item_Char("0123") );
addInputField( new CExtendedInput_Item_Char("0123456789") );

View File

@@ -514,7 +514,7 @@ bool CTextBox::setText(const std::string* newText, int _max_width)
result = true;
}
return(result);
};
}
void CTextBox::paint (void)
{

View File

@@ -93,7 +93,7 @@ int CVfdControler::exec(CMenuTarget* parent, const std::string &)
setVfd();
paint();
unsigned long long timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings
::TIMING_MENU]);
bool loop=true;