mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-03 02:41:12 +02:00
Merge branch 'uncool/dvbsi++' commit 'd493b1155c4'
...needs buildfixing...
Conflicts:
data/icons/shutdown.jpg
data/icons/start.jpg
lib/libtuxtxt/tuxtxt.h
src/driver/Makefile.am
src/driver/audiodec/Makefile.am
src/driver/framebuffer.cpp
src/driver/record.cpp
src/driver/volume.cpp
src/gui/audio_setup.cpp
src/gui/audioplayer.cpp
src/gui/epgview.cpp
src/gui/eventlist.cpp
src/gui/filebrowser.cpp
src/gui/infoviewer.cpp
src/gui/keybind_setup.cpp
src/gui/miscsettings_menu.cpp
src/gui/movieplayer.cpp
src/gui/osd_setup.cpp
src/gui/scan.cpp
src/gui/scan_setup.cpp
src/gui/streaminfo2.cpp
src/gui/update.cpp
src/gui/videosettings.cpp
src/gui/widget/menue.cpp
src/neutrino.cpp
src/neutrino_menue.cpp
src/system/Makefile.am
src/system/configure_network.cpp
src/system/httptool.cpp
src/system/setting_helpers.cpp
src/timerd/timermanager.cpp
src/zapit/include/zapit/frontend_c.h
src/zapit/src/Makefile.am
src/zapit/src/capmt.cpp
src/zapit/src/frontend.cpp
src/zapit/src/zapit.cpp
Origin commit data
------------------
Branch: ni/coolstream
Commit: adb23b23ee
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2012-10-14 (Sun, 14 Oct 2012)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -48,18 +48,18 @@
|
||||
#include <global.h>
|
||||
#include <neutrino.h>
|
||||
#include <neutrino_menue.h>
|
||||
#include "hdd_menu.h"
|
||||
|
||||
#include <gui/widget/icons.h>
|
||||
#include "gui/widget/stringinput.h"
|
||||
#include "gui/widget/messagebox.h"
|
||||
#include "gui/widget/hintbox.h"
|
||||
#include "gui/widget/progresswindow.h"
|
||||
#include <gui/widget/stringinput.h>
|
||||
#include <gui/widget/messagebox.h>
|
||||
#include <gui/widget/hintbox.h>
|
||||
#include <gui/widget/progresswindow.h>
|
||||
|
||||
#include "system/setting_helpers.h"
|
||||
#include "system/settings.h"
|
||||
#include "system/debug.h"
|
||||
#include <system/helpers.h>
|
||||
#include <system/settings.h>
|
||||
#include <system/debug.h>
|
||||
|
||||
#include <gui/hdd_menu.h>
|
||||
#include <mymenu.h>
|
||||
#include <driver/screen_max.h>
|
||||
|
||||
@@ -145,12 +145,19 @@ int CHDDMenuHandler::doMenu ()
|
||||
CHDDChkExec chkexec;
|
||||
|
||||
CHDDDestExec hddexec;
|
||||
hddmenu->addItem(new CMenuForwarder(LOCALE_HDD_ACTIVATE, true, "", &hddexec, NULL, CRCInput::RC_red,NEUTRINO_ICON_BUTTON_RED));
|
||||
CMenuForwarder * mf = new CMenuForwarder(LOCALE_HDD_ACTIVATE, true, "", &hddexec, NULL, CRCInput::RC_red,NEUTRINO_ICON_BUTTON_RED);
|
||||
mf->setHint("", LOCALE_MENU_HINT_HDD_APPLY);
|
||||
hddmenu->addItem(mf);
|
||||
|
||||
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));
|
||||
CMenuOptionChooser * mc = new CMenuOptionChooser(LOCALE_HDD_SLEEP, &g_settings.hdd_sleep, HDD_SLEEP_OPTIONS, HDD_SLEEP_OPTION_COUNT, true);
|
||||
mc->setHint("", LOCALE_MENU_HINT_HDD_SLEEP);
|
||||
hddmenu->addItem(mc);
|
||||
|
||||
mc = new CMenuOptionChooser(LOCALE_HDD_NOISE, &g_settings.hdd_noise, HDD_NOISE_OPTIONS, HDD_NOISE_OPTION_COUNT, true);
|
||||
mc->setHint("", LOCALE_MENU_HINT_HDD_NOISE);
|
||||
hddmenu->addItem(mc);
|
||||
|
||||
//if(n > 0)
|
||||
hddmenu->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_HDD_MANAGE));
|
||||
@@ -233,11 +240,19 @@ int CHDDMenuHandler::doMenu ()
|
||||
tempMenu[i] = new CMenuWidget(str, NEUTRINO_ICON_SETTINGS);
|
||||
tempMenu[i]->addIntroItems();
|
||||
//tempMenu->addItem( new CMenuOptionChooser(LOCALE_HDD_FS, &g_settings.hdd_fs, HDD_FILESYS_OPTIONS, HDD_FILESYS_OPTION_COUNT, true));
|
||||
tempMenu[i]->addItem(new CMenuForwarder(LOCALE_HDD_FORMAT, true, "", &fmtexec, namelist[i]->d_name));
|
||||
tempMenu[i]->addItem(new CMenuForwarder(LOCALE_HDD_CHECK, true, "", &chkexec, namelist[i]->d_name));
|
||||
|
||||
mf = new CMenuForwarder(LOCALE_HDD_FORMAT, true, "", &fmtexec, namelist[i]->d_name);
|
||||
mf->setHint("", LOCALE_MENU_HINT_HDD_FORMAT);
|
||||
tempMenu[i]->addItem(mf);
|
||||
|
||||
mf = new CMenuForwarder(LOCALE_HDD_CHECK, true, "", &chkexec, namelist[i]->d_name);
|
||||
mf->setHint("", LOCALE_MENU_HINT_HDD_CHECK);
|
||||
tempMenu[i]->addItem(mf);
|
||||
|
||||
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), enabled /*(removable || isroot) ? false : true*/, tmp_str[i], tempMenu[i]));
|
||||
mf = new CMenuForwarderNonLocalized((removable ? sstr : namelist[i]->d_name), enabled, tmp_str[i], tempMenu[i]);
|
||||
mf->setHint("", LOCALE_MENU_HINT_HDD_TOOLS);
|
||||
hddmenu->addItem(mf);
|
||||
|
||||
hdd_found = 1;
|
||||
free(namelist[i]);
|
||||
@@ -261,21 +276,34 @@ int CHDDMenuHandler::doMenu ()
|
||||
|
||||
int CHDDDestExec::exec(CMenuTarget* /*parent*/, const std::string&)
|
||||
{
|
||||
char cmd[100];
|
||||
char M_opt[50],S_opt[50];
|
||||
char opt[100];
|
||||
struct dirent **namelist;
|
||||
int n = scandir("/sys/block", &namelist, my_filter, alphasort);
|
||||
|
||||
if (n < 0)
|
||||
return 0;
|
||||
|
||||
const char hdparm[] = "/sbin/hdparm";
|
||||
bool hdparm_link = false;
|
||||
struct stat stat_buf;
|
||||
if(::lstat(hdparm, &stat_buf) == 0)
|
||||
if( S_ISLNK(stat_buf.st_mode) )
|
||||
hdparm_link = true;
|
||||
|
||||
for (int i = 0; i < n; i++) {
|
||||
printf("CHDDDestExec: noise %d sleep %d /dev/%s\n",
|
||||
g_settings.hdd_noise, g_settings.hdd_sleep, namelist[i]->d_name);
|
||||
//hdparm -M is not included in busybox hdparm!
|
||||
//we need full version of hdparm or should remove -M parameter here
|
||||
snprintf(cmd, sizeof(cmd), "hdparm -M%d -S%d /dev/%s >/dev/null 2>/dev/null &",
|
||||
g_settings.hdd_noise, g_settings.hdd_sleep, namelist[i]->d_name);
|
||||
system(cmd);
|
||||
snprintf(S_opt, sizeof(S_opt),"-S%d", g_settings.hdd_sleep);
|
||||
snprintf(opt, sizeof(opt),"/dev/%s",namelist[i]->d_name);
|
||||
|
||||
if(hdparm_link){
|
||||
//hdparm -M is not included in busybox hdparm!
|
||||
my_system(hdparm, S_opt, opt);
|
||||
}else{
|
||||
snprintf(M_opt, sizeof(M_opt),"-M%d", g_settings.hdd_noise);
|
||||
my_system(hdparm, M_opt, S_opt, opt);
|
||||
}
|
||||
free(namelist[i]);
|
||||
}
|
||||
free(namelist);
|
||||
@@ -319,7 +347,7 @@ int CHDDFmtExec::exec(CMenuTarget* /*parent*/, const std::string& key)
|
||||
if(res != CMessageBox::mbrYes)
|
||||
return 0;
|
||||
|
||||
bool srun = system("killall -9 smbd");
|
||||
bool srun = my_system("killall", "-9", "smbd");
|
||||
|
||||
//res = check_and_umount(dst);
|
||||
res = check_and_umount(src, dst);
|
||||
@@ -454,9 +482,8 @@ int CHDDFmtExec::exec(CMenuTarget* /*parent*/, const std::string& key)
|
||||
progress->showGlobalStatus(100);
|
||||
sleep(2);
|
||||
|
||||
snprintf(cmd, sizeof(cmd), "/sbin/tune2fs -r 0 -c 0 -i 0 %s", src);
|
||||
printf("CHDDFmtExec: executing %s\n", cmd);
|
||||
system(cmd);
|
||||
printf("CHDDFmtExec: executing %s %s\n","/sbin/tune2fs -r 0 -c 0 -i 0", src);
|
||||
my_system("/sbin/tune2fs", "-r 0", "-c 0", "-i 0", src);
|
||||
|
||||
_remount:
|
||||
progress->hide();
|
||||
@@ -525,7 +552,7 @@ _remount:
|
||||
#endif
|
||||
}
|
||||
_return:
|
||||
if(!srun) system("smbd");
|
||||
if(!srun) my_system("smbd",NULL);
|
||||
return menu_return::RETURN_REPAINT;
|
||||
}
|
||||
|
||||
@@ -545,7 +572,7 @@ int CHDDChkExec::exec(CMenuTarget* /*parent*/, const std::string& key)
|
||||
|
||||
printf("CHDDChkExec: key %s\n", key.c_str());
|
||||
|
||||
bool srun = system("killall -9 smbd");
|
||||
bool srun = my_system("killall", "-9", "smbd");
|
||||
|
||||
//res = check_and_umount(dst);
|
||||
res = check_and_umount(src, dst);
|
||||
@@ -629,6 +656,6 @@ ret1:
|
||||
}
|
||||
printf("CHDDChkExec: mount res %d\n", res);
|
||||
|
||||
if(!srun) system("smbd");
|
||||
if(!srun) my_system("smbd",NULL);
|
||||
return menu_return::RETURN_REPAINT;
|
||||
}
|
||||
|
Reference in New Issue
Block a user