Merge branch 'dvbsi++' of coolstreamtech.de:cst-public-gui-neutrino into dvbsi++

Origin commit data
------------------
Commit: 7c27c08014
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2012-11-08 (Thu, 08 Nov 2012)
This commit is contained in:
[CST] Focus
2012-11-08 19:14:35 +04:00
15 changed files with 165 additions and 71 deletions

View File

@@ -436,6 +436,7 @@ filesystem.is.utf8 Dateisystem
filesystem.is.utf8.option.iso8859.1 ISO-8859-1 filesystem.is.utf8.option.iso8859.1 ISO-8859-1
filesystem.is.utf8.option.utf8 UTF-8 filesystem.is.utf8.option.utf8 UTF-8
flashupdate.actionreadflash lese Flash flashupdate.actionreadflash lese Flash
flashupdate.apply_settings Sollen die aktuellen Einstellungen in das neue Image übernommen werden?
flashupdate.cantopenfile kann Datei nicht öffnen flashupdate.cantopenfile kann Datei nicht öffnen
flashupdate.cantopenmtd kann MTD nicht öffnen flashupdate.cantopenmtd kann MTD nicht öffnen
flashupdate.checkupdate_internet Online nach Updates suchen flashupdate.checkupdate_internet Online nach Updates suchen
@@ -1318,6 +1319,8 @@ networkmenu.dhcp DHCP
networkmenu.error_no_address Keine %s-Adresse angegeben! networkmenu.error_no_address Keine %s-Adresse angegeben!
networkmenu.gateway Standard Gateway networkmenu.gateway Standard Gateway
networkmenu.hostname Hostname networkmenu.hostname Hostname
networkmenu.hostname_hint1 Geben sie den Hostnamen ein
networkmenu.hostname_hint2 Eine Änderung benötigt einen Neustart
networkmenu.inactive_network Netzwerk nicht aktiviert! networkmenu.inactive_network Netzwerk nicht aktiviert!
networkmenu.ipaddress IP networkmenu.ipaddress IP
networkmenu.mount Netzwerkfreigaben bearbeiten networkmenu.mount Netzwerkfreigaben bearbeiten

View File

@@ -436,6 +436,7 @@ filesystem.is.utf8 file system
filesystem.is.utf8.option.iso8859.1 ISO-8859-1 filesystem.is.utf8.option.iso8859.1 ISO-8859-1
filesystem.is.utf8.option.utf8 UTF-8 filesystem.is.utf8.option.utf8 UTF-8
flashupdate.actionreadflash reading flashupdate.actionreadflash reading
flashupdate.apply_settings Import current settings into new image?
flashupdate.cantopenfile can't open file flashupdate.cantopenfile can't open file
flashupdate.cantopenmtd can't open MTD flashupdate.cantopenmtd can't open MTD
flashupdate.checkupdate_internet Check for online updates flashupdate.checkupdate_internet Check for online updates
@@ -1318,6 +1319,8 @@ networkmenu.dhcp DHCP
networkmenu.error_no_address Missing %s-address! networkmenu.error_no_address Missing %s-address!
networkmenu.gateway default gateway networkmenu.gateway default gateway
networkmenu.hostname Hostname networkmenu.hostname Hostname
networkmenu.hostname_hint1 enter hostname
networkmenu.hostname_hint2 need reboot after change
networkmenu.inactive_network Network inactiv! networkmenu.inactive_network Network inactiv!
networkmenu.ipaddress IP address networkmenu.ipaddress IP address
networkmenu.mount Edit network shares networkmenu.mount Edit network shares

View File

@@ -65,6 +65,8 @@
#include <gui/widget/stringinput.h> #include <gui/widget/stringinput.h>
#include <gui/widget/stringinput_ext.h> #include <gui/widget/stringinput_ext.h>
#include "gui/pictureviewer.h"
#include <system/settings.h> #include <system/settings.h>
#include <system/helpers.h> #include <system/helpers.h>
#include <driver/screen_max.h> #include <driver/screen_max.h>
@@ -198,6 +200,8 @@ void CAudioPlayerGui::Init(void)
m_selected = 0; m_selected = 0;
m_metainfo.clear(); m_metainfo.clear();
pictureviewer = false;
m_select_title_by_name = g_settings.audioplayer_select_title_by_name==1; m_select_title_by_name = g_settings.audioplayer_select_title_by_name==1;
if (strlen(g_settings.network_nfs_audioplayerdir)!=0) if (strlen(g_settings.network_nfs_audioplayerdir)!=0)
@@ -753,6 +757,22 @@ int CAudioPlayerGui::show()
} }
} }
} }
else if ( (msg == CRCInput::RC_info) && (!m_playlist.empty()) )
{
pictureviewer = true;
m_frameBuffer->Clear();
videoDecoder->StopPicture();
CPictureViewerGui * picture = new CPictureViewerGui();
picture->m_audioPlayer = this;
picture->exec(this, "audio");
delete picture;
pictureviewer = false;
videoDecoder->setBlank(true);
videoDecoder->ShowPicture(DATADIR "/neutrino/icons/mp3.jpg");
CVFD::getInstance()->setMode(CVFD::MODE_AUDIO);
paintLCD();
screensaver(false);
}
else if (msg == CRCInput::RC_help) else if (msg == CRCInput::RC_help)
{ {
if (m_key_level == 2) if (m_key_level == 2)
@@ -904,6 +924,17 @@ bool CAudioPlayerGui::playNext(bool allow_rotate)
return(result); return(result);
} }
void CAudioPlayerGui::wantNextPlay()
{
if ((m_state != CAudioPlayerGui::STOP) &&
(CAudioPlayer::getInstance()->getState() == CBaseDec::STOP) &&
(!m_playlist.empty()))
{
if (m_curr_audiofile.FileType != CFile::STREAM_AUDIO)
playNext();
}
}
bool CAudioPlayerGui::playPrev(bool allow_rotate) bool CAudioPlayerGui::playPrev(bool allow_rotate)
{ {
bool result = false; bool result = false;
@@ -1698,10 +1729,11 @@ const struct button_label AudioPlayerButtons[][4] =
void CAudioPlayerGui::paintFoot() void CAudioPlayerGui::paintFoot()
{ {
// printf("paintFoot{\n"); // printf("paintFoot{\n");
const struct button_label ScondLineButtons[2] = const struct button_label ScondLineButtons[3] =
{ {
{ NEUTRINO_ICON_BUTTON_OKAY , LOCALE_AUDIOPLAYER_PLAY }, { NEUTRINO_ICON_BUTTON_OKAY , LOCALE_AUDIOPLAYER_PLAY },
{ NEUTRINO_ICON_BUTTON_HELP , LOCALE_AUDIOPLAYER_KEYLEVEL }, { NEUTRINO_ICON_BUTTON_HELP , LOCALE_AUDIOPLAYER_KEYLEVEL },
{ NEUTRINO_ICON_BUTTON_INFO , LOCALE_PICTUREVIEWER_HEAD},
}; };
int top; int top;
@@ -1717,8 +1749,7 @@ const struct button_label ScondLineButtons[2] =
m_frameBuffer->paintHLine(m_x, m_x + m_width, top, COL_INFOBAR_SHADOW_PLUS_1); m_frameBuffer->paintHLine(m_x, m_x + m_width, top, COL_INFOBAR_SHADOW_PLUS_1);
if (!m_playlist.empty()) if (!m_playlist.empty())
::paintButtons(m_x, top+m_buttonHeight, m_width, 2, ScondLineButtons, m_buttonHeight, ButtonWidth); ::paintButtons(m_x, top+m_buttonHeight, m_width, 3, ScondLineButtons, m_buttonHeight, ButtonWidth);
if (m_key_level == 0) if (m_key_level == 0)
{ {
@@ -1943,12 +1974,16 @@ void CAudioPlayerGui::stop()
{ {
m_state = CAudioPlayerGui::STOP; m_state = CAudioPlayerGui::STOP;
m_current = 0; m_current = 0;
//LCD
paintLCD(); if (!pictureviewer)
//Display {
paintInfo(); //LCD
m_key_level = 0; paintLCD();
paintFoot(); //Display
paintInfo();
m_key_level = 0;
paintFoot();
}
if (CAudioPlayer::getInstance()->getState() != CBaseDec::STOP) if (CAudioPlayer::getInstance()->getState() != CBaseDec::STOP)
CAudioPlayer::getInstance()->stop(); CAudioPlayer::getInstance()->stop();
@@ -2022,31 +2057,31 @@ void CAudioPlayerGui::play(unsigned int pos)
if (m_selected - m_liststart >= m_listmaxshow && g_settings.audioplayer_follow) if (m_selected - m_liststart >= m_listmaxshow && g_settings.audioplayer_follow)
{ {
m_liststart = m_selected; m_liststart = m_selected;
if (!m_screensaver) if (!m_screensaver && !pictureviewer)
paint(); paint();
} }
else if (m_liststart < m_selected && g_settings.audioplayer_follow) else if (m_liststart < m_selected && g_settings.audioplayer_follow)
{ {
m_liststart = m_selected - m_listmaxshow + 1; m_liststart = m_selected - m_listmaxshow + 1;
if (!m_screensaver) if (!m_screensaver && !pictureviewer)
paint(); paint();
} }
else else
{ {
if (old_current >= m_liststart && old_current - m_liststart < m_listmaxshow) if (old_current >= m_liststart && old_current - m_liststart < m_listmaxshow)
{ {
if (!m_screensaver) if (!m_screensaver && !pictureviewer)
paintItem(old_current - m_liststart); paintItem(old_current - m_liststart);
} }
if (pos >= m_liststart && pos - m_liststart < m_listmaxshow) if (pos >= m_liststart && pos - m_liststart < m_listmaxshow)
{ {
if (!m_screensaver) if (!m_screensaver && !pictureviewer)
paintItem(pos - m_liststart); paintItem(pos - m_liststart);
} }
if (g_settings.audioplayer_follow) if (g_settings.audioplayer_follow)
{ {
if (old_selected >= m_liststart && old_selected - m_liststart < m_listmaxshow) if (old_selected >= m_liststart && old_selected - m_liststart < m_listmaxshow)
if (!m_screensaver) if (!m_screensaver && !pictureviewer)
paintItem(old_selected - m_liststart); paintItem(old_selected - m_liststart);
} }
} }
@@ -2065,14 +2100,18 @@ void CAudioPlayerGui::play(unsigned int pos)
m_curr_audiofile = m_playlist[m_current]; m_curr_audiofile = m_playlist[m_current];
// Play // Play
CAudioPlayer::getInstance()->play(&m_curr_audiofile, g_settings.audioplayer_highprio == 1); CAudioPlayer::getInstance()->play(&m_curr_audiofile, g_settings.audioplayer_highprio == 1);
//LCD
paintLCD(); if (!pictureviewer)
// Display {
if (!m_screensaver) //LCD
paintInfo(); paintLCD();
m_key_level = 1; // Display
if (!m_screensaver) if (!m_screensaver)
paintFoot(); paintInfo();
m_key_level = 1;
if (!m_screensaver)
paintFoot();
}
} }
//------------------------------------------------------------------------ //------------------------------------------------------------------------

View File

@@ -251,11 +251,15 @@ class CAudioPlayerGui : public CMenuTarget
bool playNext(bool allow_rotate = false); bool playNext(bool allow_rotate = false);
bool playPrev(bool allow_rotate = false); bool playPrev(bool allow_rotate = false);
bool pictureviewer;
public: public:
CAudioPlayerGui(bool inetmode = false); CAudioPlayerGui(bool inetmode = false);
~CAudioPlayerGui(); ~CAudioPlayerGui();
int show(); int show();
int exec(CMenuTarget* parent, const std::string & actionKey); int exec(CMenuTarget* parent, const std::string & actionKey);
void wantNextPlay();
}; };

View File

@@ -121,30 +121,38 @@ bool CExtUpdate::ErrorReset(bool modus, const std::string & msg1, const std::str
return false; return false;
} }
bool CExtUpdate::writemtdExt(const std::string & filename) bool CExtUpdate::applySettings(const std::string & filename, int mode)
{ {
if(!FileHelpers) if(!FileHelpers)
FileHelpers = new CFileHelpers(); FileHelpers = new CFileHelpers();
imgFilename = (std::string)g_settings.update_dir + "/" + FILESYSTEM_ENCODING_TO_UTF8_STRING(filename);
if (mode == MODE_EXPERT)
imgFilename = (std::string)g_settings.update_dir + "/" + FILESYSTEM_ENCODING_TO_UTF8_STRING(filename);
else
imgFilename = FILESYSTEM_ENCODING_TO_UTF8_STRING(filename);
DBG_TIMER_START() DBG_TIMER_START()
bool ret = writemtdExt(); bool ret = applySettings();
DBG_TIMER_STOP("Image editing") DBG_TIMER_STOP("Image editing")
if (!ret) { if (!ret) {
if (mtdRamError != "") if (mtdRamError != "")
DisplayErrorMessage(mtdRamError.c_str()); DisplayErrorMessage(mtdRamError.c_str());
} }
else { else {
if ((mtdNumber < 3) || (mtdNumber > 4)) { if (mode == MODE_EXPERT) {
const char *err = "invalid mtdNumber\n"; if ((mtdNumber < 3) || (mtdNumber > 4)) {
printf(err); const char *err = "invalid mtdNumber\n";
DisplayErrorMessage(err); printf(err);
WRITE_UPDATE_LOG("ERROR: %s", err); DisplayErrorMessage(err);
return false; WRITE_UPDATE_LOG("ERROR: %s", err);
return false;
}
} }
ShowMsgUTF(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_FLASHUPDATE_UPDATE_WITH_SETTINGS_SUCCESSFULLY), CMessageBox::mbrOk, CMessageBox::mbOk, NEUTRINO_ICON_INFO); ShowMsgUTF(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_FLASHUPDATE_UPDATE_WITH_SETTINGS_SUCCESSFULLY), CMessageBox::mbrOk, CMessageBox::mbOk, NEUTRINO_ICON_INFO);
WRITE_UPDATE_LOG("\n"); WRITE_UPDATE_LOG("\n");
WRITE_UPDATE_LOG("##### Settings taken. #####\n"); WRITE_UPDATE_LOG("##### Settings taken. #####\n");
CFlashExpert::getInstance()->writemtd(filename, mtdNumber); if (mode == MODE_EXPERT)
CFlashExpert::getInstance()->writemtd(filename, mtdNumber);
} }
return ret; return ret;
} }
@@ -166,7 +174,7 @@ bool CExtUpdate::isMtdramLoad()
return ret; return ret;
} }
bool CExtUpdate::writemtdExt() bool CExtUpdate::applySettings()
{ {
if(!hintBox) if(!hintBox)
hintBox = new CHintBox(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_FLASHUPDATE_UPDATE_WITH_SETTINGS_PROCESSED)); hintBox = new CHintBox(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_FLASHUPDATE_UPDATE_WITH_SETTINGS_PROCESSED));

View File

@@ -55,7 +55,7 @@ class CExtUpdate
std::string mountPkt; std::string mountPkt;
CFileHelpers* FileHelpers; CFileHelpers* FileHelpers;
bool writemtdExt(void); bool applySettings(void);
bool readBackupList(const std::string & dstPath); bool readBackupList(const std::string & dstPath);
bool copyFileList(const std::string & fileList, const std::string & dstPath); bool copyFileList(const std::string & fileList, const std::string & dstPath);
bool readConfig(const std::string & Config); bool readConfig(const std::string & Config);
@@ -69,11 +69,16 @@ class CExtUpdate
void updateLog(const char *buf); void updateLog(const char *buf);
public: public:
enum
{
MODE_EXPERT = 0,
MODE_SOFTUPDATE = 1
};
CExtUpdate(); CExtUpdate();
~CExtUpdate(); ~CExtUpdate();
static CExtUpdate* getInstance(); static CExtUpdate* getInstance();
bool writemtdExt(const std::string & filename); bool applySettings(const std::string & filename, int mode);
bool ErrorReset(bool modus, const std::string & msg1="", const std::string & msg2=""); bool ErrorReset(bool modus, const std::string & msg1="", const std::string & msg2="");
}; };

View File

@@ -87,6 +87,7 @@ CInfoViewerBB::CInfoViewerBB()
pthread_detach(scrambledT); pthread_detach(scrambledT);
} }
#endif #endif
hddpercent = 0;
hddperT = 0; hddperT = 0;
hddperTflag = false; hddperTflag = false;
bbIconInfo[0].x = 0; bbIconInfo[0].x = 0;
@@ -612,20 +613,17 @@ void CInfoViewerBB::showSysfsHdd()
percent = (u * 100ULL) / t; percent = (u * 100ULL) / t;
showBarSys(percent); showBarSys(percent);
#if 0
//HDD info in a seperate thread //HDD info in a seperate thread
if(!hddperTflag) { if(!hddperTflag) {
hddperTflag=true; hddperTflag=true;
pthread_create(&hddperT, NULL, hddperThread, (void*) this); pthread_create(&hddperT, NULL, hddperThread, (void*) this);
pthread_detach(hddperT); pthread_detach(hddperT);
} }
#else
if (!check_dir(g_settings.network_nfs_recordingdir)) { if (check_dir(g_settings.network_nfs_recordingdir) == 0)
if (get_fs_usage(g_settings.network_nfs_recordingdir, t, u)) showBarHdd(hddpercent);
percent = (u * 100ULL) / t; else
showBarHdd(percent); showBarHdd(-1);
}
#endif
} }
} }
@@ -633,11 +631,10 @@ void* CInfoViewerBB::hddperThread(void *arg)
{ {
CInfoViewerBB *infoViewerBB = (CInfoViewerBB*) arg; CInfoViewerBB *infoViewerBB = (CInfoViewerBB*) arg;
int percent = 0; infoViewerBB->hddpercent = 0;
long t, u; long t, u;
if (get_fs_usage(g_settings.network_nfs_recordingdir, t, u)) if (get_fs_usage(g_settings.network_nfs_recordingdir, t, u))
percent = (u * 100ULL) / t; infoViewerBB->hddpercent = (u * 100ULL) / t;
infoViewerBB->showBarHdd(percent);
infoViewerBB->hddperTflag=false; infoViewerBB->hddperTflag=false;
pthread_exit(NULL); pthread_exit(NULL);
@@ -651,8 +648,14 @@ void CInfoViewerBB::showBarSys(int percent)
void CInfoViewerBB::showBarHdd(int percent) void CInfoViewerBB::showBarHdd(int percent)
{ {
if (is_visible) if (is_visible) {
hddscale->paintProgressBar(bbIconMinX, BBarY + InfoHeightY_Info / 2 + 2 + 0, hddwidth, 6, percent, 100); if (percent >= 0)
hddscale->paintProgressBar(bbIconMinX, BBarY + InfoHeightY_Info / 2 + 2 + 0, hddwidth, 6, percent, 100);
else {
frameBuffer->paintBoxRel(bbIconMinX, BBarY + InfoHeightY_Info / 2 + 2 + 0, hddwidth, 6, COL_INFOBAR_BUTTONS_BACKGROUND);
hddscale->reset();
}
}
} }
void CInfoViewerBB::paint_ca_icons(int caid, char * icon, int &icon_space_offset) void CInfoViewerBB::paint_ca_icons(int caid, char * icon, int &icon_space_offset)

View File

@@ -124,6 +124,7 @@ class CInfoViewerBB
void showBarSys(int percent = 0); void showBarSys(int percent = 0);
void showBarHdd(int percent = 0); void showBarHdd(int percent = 0);
int hddpercent;
pthread_t hddperT; pthread_t hddperT;
static void* hddperThread(void *arg); static void* hddperThread(void *arg);
bool hddperTflag; bool hddperTflag;

View File

@@ -238,7 +238,7 @@ int CNetworkSetup::showNetworkSetup()
CIPInput networkSettings_NameServer(LOCALE_NETWORKMENU_NAMESERVER, network_nameserver, LOCALE_IPSETUP_HINT_1, LOCALE_IPSETUP_HINT_2); CIPInput networkSettings_NameServer(LOCALE_NETWORKMENU_NAMESERVER, network_nameserver, LOCALE_IPSETUP_HINT_1, LOCALE_IPSETUP_HINT_2);
//hostname //hostname
CStringInputSMS networkSettings_Hostname(LOCALE_NETWORKMENU_HOSTNAME, &network_hostname, 30, LOCALE_NETWORKMENU_NTPSERVER_HINT1, LOCALE_NETWORKMENU_NTPSERVER_HINT2, "abcdefghijklmnopqrstuvwxyz0123456789-. "); CStringInputSMS networkSettings_Hostname(LOCALE_NETWORKMENU_HOSTNAME, &network_hostname, 30, LOCALE_NETWORKMENU_HOSTNAME_HINT1, LOCALE_NETWORKMENU_HOSTNAME_HINT2, "abcdefghijklmnopqrstuvwxyz0123456789-. ");
//auto start //auto start
CMenuOptionChooser* o1 = new CMenuOptionChooser(LOCALE_NETWORKMENU_SETUPONSTARTUP, &network_automatic_start, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); CMenuOptionChooser* o1 = new CMenuOptionChooser(LOCALE_NETWORKMENU_SETUPONSTARTUP, &network_automatic_start, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true);

View File

@@ -112,8 +112,12 @@ CPictureViewerGui::~CPictureViewerGui()
} }
//------------------------------------------------------------------------ //------------------------------------------------------------------------
int CPictureViewerGui::exec(CMenuTarget* parent, const std::string & /*actionKey*/) int CPictureViewerGui::exec(CMenuTarget* parent, const std::string & actionKey)
{ {
audioplayer = false;
if (actionKey == "audio")
audioplayer = true;
selected = 0; selected = 0;
width = w_max (710, 0); width = w_max (710, 0);
height = h_max (570, 0); height = h_max (570, 0);
@@ -159,14 +163,16 @@ int CPictureViewerGui::exec(CMenuTarget* parent, const std::string & /*actionKey
// remember last mode // remember last mode
m_LastMode=(CNeutrinoApp::getInstance()->getLastMode() | NeutrinoMessages::norezap); m_LastMode=(CNeutrinoApp::getInstance()->getLastMode() | NeutrinoMessages::norezap);
//g_Zapit->setStandby(true); if (!audioplayer) { // !!! why? !!!
g_Zapit->lockPlayBack(); //g_Zapit->setStandby(true);
g_Zapit->lockPlayBack();
// blank background screen // blank background screen
videoDecoder->setBlank(true); videoDecoder->setBlank(true);
// Stop Sectionsd // Stop Sectionsd
g_Sectionsd->setPauseScanning(true); g_Sectionsd->setPauseScanning(true);
}
// Save and Clear background // Save and Clear background
bool usedBackground = frameBuffer->getuseBackground(); bool usedBackground = frameBuffer->getuseBackground();
@@ -180,11 +186,13 @@ int CPictureViewerGui::exec(CMenuTarget* parent, const std::string & /*actionKey
// free picviewer mem // free picviewer mem
m_viewer->Cleanup(); m_viewer->Cleanup();
//g_Zapit->setStandby(false); if (!audioplayer) { // !!! why? !!!
g_Zapit->unlockPlayBack(); //g_Zapit->setStandby(false);
g_Zapit->unlockPlayBack();
// Start Sectionsd // Start Sectionsd
g_Sectionsd->setPauseScanning(false); g_Sectionsd->setPauseScanning(false);
}
// Restore previous background // Restore previous background
if (usedBackground) { if (usedBackground) {
@@ -226,6 +234,9 @@ int CPictureViewerGui::show()
paint(); paint();
} }
if (audioplayer)
m_audioPlayer->wantNextPlay();
if (m_state!=SLIDESHOW) if (m_state!=SLIDESHOW)
timeout=50; // egal timeout=50; // egal
else else

View File

@@ -37,6 +37,7 @@
#include <driver/pictureviewer/pictureviewer.h> #include <driver/pictureviewer/pictureviewer.h>
#include <gui/widget/menue.h> #include <gui/widget/menue.h>
#include <gui/filebrowser.h> #include <gui/filebrowser.h>
#include <gui/audioplayer.h>
#include <string> #include <string>
@@ -109,10 +110,14 @@ class CPictureViewerGui : public CMenuTarget
void showHelp(); void showHelp();
void deletePicFile(unsigned int index, bool mode); void deletePicFile(unsigned int index, bool mode);
bool audioplayer;
public: public:
CPictureViewerGui(); CPictureViewerGui();
~CPictureViewerGui(); ~CPictureViewerGui();
int exec(CMenuTarget* parent, const std::string & actionKey); int exec(CMenuTarget* parent, const std::string & actionKey);
CAudioPlayerGui *m_audioPlayer;
}; };

View File

@@ -451,16 +451,20 @@ int CFlashUpdate::exec(CMenuTarget* parent, const std::string &)
CNeutrinoApp::getInstance()->exec(NULL, "savesettings"); CNeutrinoApp::getInstance()->exec(NULL, "savesettings");
sleep(2); sleep(2);
//flash it... //flash it...
#ifdef DEBUG1
if(1) if (ShowMsgUTF(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_FLASHUPDATE_APPLY_SETTINGS), CMessageBox::mbrYes, CMessageBox::mbYes | CMessageBox::mbNo, NEUTRINO_ICON_UPDATE) == CMessageBox::mbrYes)
#else if (!CExtUpdate::getInstance()->applySettings(filename, CExtUpdate::MODE_SOFTUPDATE))
if(!ft.program(filename, 80, 100))
#endif
{
hide();
ShowHintUTF(LOCALE_MESSAGEBOX_ERROR, ft.getErrorMessage().c_str()); // UTF-8
return menu_return::RETURN_REPAINT; return menu_return::RETURN_REPAINT;
}
#ifdef DEBUG1
if(1) {
#else
if(!ft.program(filename, 80, 100)) {
#endif
hide();
ShowHintUTF(LOCALE_MESSAGEBOX_ERROR, ft.getErrorMessage().c_str()); // UTF-8
return menu_return::RETURN_REPAINT;
}
//status anzeigen //status anzeigen
showGlobalStatus(100); showGlobalStatus(100);
@@ -690,7 +694,7 @@ int CFlashExpert::exec(CMenuTarget* parent, const std::string & actionKey)
showFileSelector(""); showFileSelector("");
} else { } else {
if(selectedMTD == 10) { if(selectedMTD == 10) {
CExtUpdate::getInstance()->writemtdExt(actionKey); CExtUpdate::getInstance()->applySettings(actionKey, CExtUpdate::MODE_EXPERT);
} }
else if(selectedMTD==-1) { else if(selectedMTD==-1) {
writemtd(actionKey, MTD_OF_WHOLE_IMAGE); writemtd(actionKey, MTD_OF_WHOLE_IMAGE);

View File

@@ -755,7 +755,9 @@ void CStringInputSMS::paint(bool /*unused*/)
{ {
CStringInput::paint(true); CStringInput::paint(true);
frameBuffer->paintIcon(NEUTRINO_ICON_NUMERIC_PAD, x+20+140, y+ hheight+ mheight+ iheight* 3+ 30, 0, COL_MENUCONTENT); int w = 0, h = 0;
frameBuffer->getIconSize(NEUTRINO_ICON_NUMERIC_PAD, &w, &h);
frameBuffer->paintIcon(NEUTRINO_ICON_NUMERIC_PAD, x + (width/2) - (w/2), y+ hheight+ mheight+ iheight* 3+ 30, 0, COL_MENUCONTENT);
//buttonbar //buttonbar
::paintButtons(x, y + height, width, 2, CStringInputSMSButtons); ::paintButtons(x, y + height, width, 2, CStringInputSMSButtons);

View File

@@ -463,6 +463,7 @@ typedef enum
LOCALE_FILESYSTEM_IS_UTF8_OPTION_ISO8859_1, LOCALE_FILESYSTEM_IS_UTF8_OPTION_ISO8859_1,
LOCALE_FILESYSTEM_IS_UTF8_OPTION_UTF8, LOCALE_FILESYSTEM_IS_UTF8_OPTION_UTF8,
LOCALE_FLASHUPDATE_ACTIONREADFLASH, LOCALE_FLASHUPDATE_ACTIONREADFLASH,
LOCALE_FLASHUPDATE_APPLY_SETTINGS,
LOCALE_FLASHUPDATE_CANTOPENFILE, LOCALE_FLASHUPDATE_CANTOPENFILE,
LOCALE_FLASHUPDATE_CANTOPENMTD, LOCALE_FLASHUPDATE_CANTOPENMTD,
LOCALE_FLASHUPDATE_CHECKUPDATE_INTERNET, LOCALE_FLASHUPDATE_CHECKUPDATE_INTERNET,
@@ -1345,6 +1346,8 @@ typedef enum
LOCALE_NETWORKMENU_ERROR_NO_ADDRESS, LOCALE_NETWORKMENU_ERROR_NO_ADDRESS,
LOCALE_NETWORKMENU_GATEWAY, LOCALE_NETWORKMENU_GATEWAY,
LOCALE_NETWORKMENU_HOSTNAME, LOCALE_NETWORKMENU_HOSTNAME,
LOCALE_NETWORKMENU_HOSTNAME_HINT1,
LOCALE_NETWORKMENU_HOSTNAME_HINT2,
LOCALE_NETWORKMENU_INACTIVE_NETWORK, LOCALE_NETWORKMENU_INACTIVE_NETWORK,
LOCALE_NETWORKMENU_IPADDRESS, LOCALE_NETWORKMENU_IPADDRESS,
LOCALE_NETWORKMENU_MOUNT, LOCALE_NETWORKMENU_MOUNT,

View File

@@ -463,6 +463,7 @@ const char * locale_real_names[] =
"filesystem.is.utf8.option.iso8859.1", "filesystem.is.utf8.option.iso8859.1",
"filesystem.is.utf8.option.utf8", "filesystem.is.utf8.option.utf8",
"flashupdate.actionreadflash", "flashupdate.actionreadflash",
"flashupdate.apply_settings",
"flashupdate.cantopenfile", "flashupdate.cantopenfile",
"flashupdate.cantopenmtd", "flashupdate.cantopenmtd",
"flashupdate.checkupdate_internet", "flashupdate.checkupdate_internet",
@@ -1345,6 +1346,8 @@ const char * locale_real_names[] =
"networkmenu.error_no_address", "networkmenu.error_no_address",
"networkmenu.gateway", "networkmenu.gateway",
"networkmenu.hostname", "networkmenu.hostname",
"networkmenu.hostname_hint1",
"networkmenu.hostname_hint2",
"networkmenu.inactive_network", "networkmenu.inactive_network",
"networkmenu.ipaddress", "networkmenu.ipaddress",
"networkmenu.mount", "networkmenu.mount",