ls instead hwinfo; update UI even mutex is locked
This commit is contained in:
@ -112,8 +112,11 @@ void TUI::updateTUI(vector <Drive>* pvecDrives, uint8_t u8SelectedEntry)
|
||||
}
|
||||
break;
|
||||
case Drive::FROZEN:
|
||||
dialog=createFrozenWarning(70, 16, ((stdscrX)-(int)(stdscrX/2)-35),(int)(stdscrY/2)-8, it->getPath(), it->getModelFamily(), it->getModelName(), it->getSerial());
|
||||
#ifdef FROZEN_ALERT
|
||||
stream << fixed << setprecision(2) << (it->getTaskPercentage());
|
||||
dialog=createFrozenWarning(70, 16, ((stdscrX)-(int)(stdscrX/2)-35),(int)(stdscrY/2)-8, it->getPath(), it->getModelFamily(), it->getModelName(), it->getSerial(), stream.str() + "%");
|
||||
wrefresh(dialog);
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -399,7 +402,7 @@ WINDOW* TUI::createDialog(int iXSize, int iYSize, int iXStart, int iYStart, stri
|
||||
return newWindow;
|
||||
}
|
||||
|
||||
WINDOW* TUI::createFrozenWarning(int iXSize, int iYSize, int iXStart, int iYStart, string sPath, string sModelFamily, string sModelName, string sSerial)
|
||||
WINDOW* TUI::createFrozenWarning(int iXSize, int iYSize, int iXStart, int iYStart, string sPath, string sModelFamily, string sModelName, string sSerial, string sProgress)
|
||||
{
|
||||
WINDOW *newWindow;
|
||||
newWindow = newwin(iYSize, iXSize, iYStart, iXStart);
|
||||
@ -409,6 +412,7 @@ WINDOW* TUI::createFrozenWarning(int iXSize, int iYSize, int iXStart, int iYStar
|
||||
|
||||
string sHeader = "Drive " + sPath + " is frozen";
|
||||
string sLine01 = "Please detach this drive and check it manually:";
|
||||
string sShredState = "Shredding stopped after " + sProgress;
|
||||
string sLinePath = "Path: " +sPath;
|
||||
string sLineModelFamlily = "ModelFamily: " + sModelFamily;
|
||||
string sLineModelName = "ModelName: " + sModelName;
|
||||
@ -429,6 +433,7 @@ WINDOW* TUI::createFrozenWarning(int iXSize, int iYSize, int iXStart, int iYStar
|
||||
u16Line++;
|
||||
mvwaddstr(newWindow,u16Line++, 3, sLine02.c_str());
|
||||
mvwaddstr(newWindow,u16Line++, 3, sLine03.c_str());
|
||||
mvwaddstr(newWindow,u16Line++, 3, sShredState.c_str());
|
||||
|
||||
return newWindow;
|
||||
}
|
||||
|
Reference in New Issue
Block a user