mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 23:42:58 +02:00
*neutrino mtd update: use unified menu width
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1402 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -84,6 +84,7 @@ extern int allow_flash;
|
|||||||
CFlashUpdate::CFlashUpdate()
|
CFlashUpdate::CFlashUpdate()
|
||||||
:CProgressWindow()
|
:CProgressWindow()
|
||||||
{
|
{
|
||||||
|
width = w_max (40, 10);
|
||||||
setTitle(LOCALE_FLASHUPDATE_HEAD);
|
setTitle(LOCALE_FLASHUPDATE_HEAD);
|
||||||
sysfs = CMTDInfo::getInstance()->findMTDsystem();
|
sysfs = CMTDInfo::getInstance()->findMTDsystem();
|
||||||
printf("Mtd partition to update: %s\n", sysfs.c_str());
|
printf("Mtd partition to update: %s\n", sysfs.c_str());
|
||||||
@@ -518,6 +519,7 @@ CFlashExpert::CFlashExpert()
|
|||||||
:CProgressWindow()
|
:CProgressWindow()
|
||||||
{
|
{
|
||||||
selectedMTD = -1;
|
selectedMTD = -1;
|
||||||
|
width = w_max (40, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFlashExpert::readmtd(int preadmtd)
|
void CFlashExpert::readmtd(int preadmtd)
|
||||||
@@ -592,10 +594,9 @@ void CFlashExpert::writemtd(const std::string & filename, int mtdNumber)
|
|||||||
void CFlashExpert::showMTDSelector(const std::string & actionkey)
|
void CFlashExpert::showMTDSelector(const std::string & actionkey)
|
||||||
{
|
{
|
||||||
//mtd-selector erzeugen
|
//mtd-selector erzeugen
|
||||||
CMenuWidget* mtdselector = new CMenuWidget(LOCALE_FLASHUPDATE_MTDSELECTOR, NEUTRINO_ICON_UPDATE);
|
CMenuWidget* mtdselector = new CMenuWidget(LOCALE_SERVICEMENU_UPDATE, NEUTRINO_ICON_UPDATE, width);
|
||||||
mtdselector->addItem(GenericMenuSeparator);
|
mtdselector->addIntroItems(LOCALE_FLASHUPDATE_MTDSELECTOR, NONEXISTANT_LOCALE, CMenuWidget::BTN_TYPE_CANCEL);
|
||||||
mtdselector->addItem(new CMenuForwarder(LOCALE_MESSAGEBOX_CANCEL));
|
|
||||||
mtdselector->addItem(GenericMenuSeparatorLine);
|
|
||||||
CMTDInfo* mtdInfo =CMTDInfo::getInstance();
|
CMTDInfo* mtdInfo =CMTDInfo::getInstance();
|
||||||
for(int lx=0;lx<mtdInfo->getMTDCount();lx++) {
|
for(int lx=0;lx<mtdInfo->getMTDCount();lx++) {
|
||||||
char sActionKey[20];
|
char sActionKey[20];
|
||||||
@@ -608,10 +609,9 @@ void CFlashExpert::showMTDSelector(const std::string & actionkey)
|
|||||||
|
|
||||||
void CFlashExpert::showFileSelector(const std::string & actionkey)
|
void CFlashExpert::showFileSelector(const std::string & actionkey)
|
||||||
{
|
{
|
||||||
CMenuWidget* fileselector = new CMenuWidget(LOCALE_FLASHUPDATE_FILESELECTOR, NEUTRINO_ICON_UPDATE);
|
CMenuWidget* fileselector = new CMenuWidget(LOCALE_SERVICEMENU_UPDATE, NEUTRINO_ICON_UPDATE, width);
|
||||||
fileselector->addItem(GenericMenuSeparator);
|
fileselector->addIntroItems(LOCALE_FLASHUPDATE_FILESELECTOR, NONEXISTANT_LOCALE, CMenuWidget::BTN_TYPE_CANCEL);
|
||||||
fileselector->addItem(new CMenuForwarder(LOCALE_MESSAGEBOX_CANCEL));
|
|
||||||
fileselector->addItem(GenericMenuSeparatorLine);
|
|
||||||
struct dirent **namelist;
|
struct dirent **namelist;
|
||||||
int n = scandir("/tmp", &namelist, 0, alphasort);
|
int n = scandir("/tmp", &namelist, 0, alphasort);
|
||||||
if (n < 0)
|
if (n < 0)
|
||||||
|
@@ -48,6 +48,7 @@ class CFlashUpdate : public CProgressWindow
|
|||||||
std::string file_md5;
|
std::string file_md5;
|
||||||
std::string sysfs;
|
std::string sysfs;
|
||||||
char fileType;
|
char fileType;
|
||||||
|
int width;
|
||||||
|
|
||||||
std::string installedVersion;
|
std::string installedVersion;
|
||||||
std::string newVersion;
|
std::string newVersion;
|
||||||
@@ -66,6 +67,7 @@ class CFlashExpert : public CProgressWindow
|
|||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
int selectedMTD;
|
int selectedMTD;
|
||||||
|
int width;
|
||||||
|
|
||||||
void showMTDSelector(const std::string & actionkey);
|
void showMTDSelector(const std::string & actionkey);
|
||||||
void showFileSelector(const std::string & actionkey);
|
void showFileSelector(const std::string & actionkey);
|
||||||
|
Reference in New Issue
Block a user