From dfaf4ff4851d1b3b0e07097dc6ba1cf11cb72377 Mon Sep 17 00:00:00 2001 From: satbaby Date: Sat, 8 Jan 2011 19:04:09 +0000 Subject: [PATCH] -fix disk name git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1019 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- src/gui/hdd_menu.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/hdd_menu.cpp b/src/gui/hdd_menu.cpp index 09c6ef58b..4a6f2e50a 100644 --- a/src/gui/hdd_menu.cpp +++ b/src/gui/hdd_menu.cpp @@ -113,7 +113,7 @@ int CHDDMenuHandler::doMenu () if (ret != -1) root_dev = (s.st_dev & 0x0ffc0); /* hda = 0x0300, hdb = 0x0340 */ printf("HDD: root_dev: 0x%04x\n", root_dev); - + std::string tmp_str[n]; for(int i = 0; i < n;i++) { char str[256]; char sstr[256]; @@ -173,6 +173,7 @@ int CHDDMenuHandler::doMenu () snprintf(str, sizeof(str), "%s %s %lld %s", vendor, model, megabytes < 10000 ? megabytes : megabytes/1000, megabytes < 10000 ? "MB" : "GB"); printf("HDD: %s\n", str); + tmp_str[i]=str; CMenuWidget * tempMenu = new CMenuWidget(str, NEUTRINO_ICON_SETTINGS); tempMenu->addIntroItems(); //tempMenu->addItem( new CMenuOptionChooser(LOCALE_HDD_FS, &g_settings.hdd_fs, HDD_FILESYS_OPTIONS, HDD_FILESYS_OPTION_COUNT, true)); @@ -180,7 +181,7 @@ int CHDDMenuHandler::doMenu () tempMenu->addItem(new CMenuForwarder(LOCALE_HDD_CHECK, true, "", new CHDDChkExec, namelist[i]->d_name)); snprintf(sstr, sizeof(sstr), "%s (%s)", g_Locale->getText(LOCALE_HDD_REMOVABLE_DEVICE), namelist[i]->d_name); - hddmenu->addItem(new CMenuForwarderNonLocalized((removable ? sstr : namelist[i]->d_name), (removable || isroot) ? false : true, str, tempMenu)); + hddmenu->addItem(new CMenuForwarderNonLocalized((removable ? sstr : namelist[i]->d_name), (removable || isroot) ? false : true, tmp_str[i], tempMenu)); hdd_found = 1; free(namelist[i]);