mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
drive-setup: hdd settings menu adapted, it looks now a little bit more
like the original, but it's still not what I imagine e.g. : device settings should not be available for removable devices but should only be visible, if the user has selected a hdd device and also should be able to manage network shares on network drives ...a lot todo git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1016 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -96,16 +96,18 @@ int CHDDMenuHandler::doMenu ()
|
||||
}
|
||||
#endif
|
||||
|
||||
CMenuWidget* hddmenu = new CMenuWidget(LOCALE_HDD_SETTINGS, NEUTRINO_ICON_SETTINGS, 58);
|
||||
hddmenu->addIntroItems();
|
||||
CMenuWidget* hddmenu = new CMenuWidget(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, 58);
|
||||
hddmenu->addIntroItems(LOCALE_HDD_SETTINGS);
|
||||
|
||||
hddmenu->addItem(new CMenuForwarder(LOCALE_HDD_ACTIVATE, true, "", new CHDDDestExec(), NULL, CRCInput::RC_red,NEUTRINO_ICON_BUTTON_RED));
|
||||
|
||||
hddmenu->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_HDD_EXTENDED_SETTINGS));
|
||||
|
||||
hddmenu->addItem( new CMenuOptionChooser(LOCALE_HDD_SLEEP, &g_settings.hdd_sleep, HDD_SLEEP_OPTIONS, HDD_SLEEP_OPTION_COUNT, true));
|
||||
hddmenu->addItem( new CMenuOptionChooser(LOCALE_HDD_NOISE, &g_settings.hdd_noise, HDD_NOISE_OPTIONS, HDD_NOISE_OPTION_COUNT, true));
|
||||
|
||||
hddmenu->addItem(new CMenuForwarder(LOCALE_HDD_ACTIVATE, true, "", new CHDDDestExec()));
|
||||
|
||||
//if(n > 0)
|
||||
hddmenu->addItem( GenericMenuSeparatorLine );
|
||||
hddmenu->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_HDD_MANAGE));
|
||||
|
||||
ret = stat("/", &s);
|
||||
if (ret != -1)
|
||||
@@ -114,6 +116,7 @@ int CHDDMenuHandler::doMenu ()
|
||||
|
||||
for(int i = 0; i < n;i++) {
|
||||
char str[256];
|
||||
char sstr[256];
|
||||
char vendor[128], model[128];
|
||||
int64_t bytes;
|
||||
int64_t megabytes;
|
||||
@@ -168,15 +171,17 @@ int CHDDMenuHandler::doMenu ()
|
||||
fscanf(f, "%d", &removable);
|
||||
fclose(f);
|
||||
|
||||
snprintf(str, sizeof(str), "%s %s (%s-%s %lld %s)", g_Locale->getText(LOCALE_HDD_MANAGE), namelist[i]->d_name, vendor, model, megabytes < 10000 ? megabytes : megabytes/1000, megabytes < 10000 ? "MB" : "GB");
|
||||
snprintf(str, sizeof(str), "%s %s %lld %s", vendor, model, megabytes < 10000 ? megabytes : megabytes/1000, megabytes < 10000 ? "MB" : "GB");
|
||||
printf("HDD: %s\n", str);
|
||||
CMenuWidget * tempMenu = new CMenuWidget(str, NEUTRINO_ICON_SETTINGS);
|
||||
tempMenu->addItem( GenericMenuBack );
|
||||
tempMenu->addItem( GenericMenuSeparatorLine );
|
||||
tempMenu->addIntroItems();
|
||||
//tempMenu->addItem( new CMenuOptionChooser(LOCALE_HDD_FS, &g_settings.hdd_fs, HDD_FILESYS_OPTIONS, HDD_FILESYS_OPTION_COUNT, true));
|
||||
tempMenu->addItem(new CMenuForwarder(LOCALE_HDD_FORMAT, true, "", new CHDDFmtExec, namelist[i]->d_name));
|
||||
tempMenu->addItem(new CMenuForwarder(LOCALE_HDD_CHECK, true, "", new CHDDChkExec, namelist[i]->d_name));
|
||||
hddmenu->addItem(new CMenuForwarderNonLocalized(str, (removable || isroot) ? false : true, NULL, tempMenu));
|
||||
|
||||
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));
|
||||
|
||||
hdd_found = 1;
|
||||
free(namelist[i]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user