diff --git a/astyle.sh b/astyle.sh new file mode 100644 index 0000000..dee3705 --- /dev/null +++ b/astyle.sh @@ -0,0 +1,24 @@ +#! /bin/bash + +echo starting astyle for $PWD + +astyle --style=gnu src/*.cpp +rm -f src/*.orig + +astyle --style=gnu src/shred/*.cpp +rm -f src/shred/*.orig + +astyle --style=gnu src/logger/*.cpp +rm -f src/logger/*.orig + + +astyle --style=gnu include/*.h +rm -f include//*.orig + +astyle --style=gnu include//shred/*.h +rm -f include//shred/*.orig + +astyle --style=gnu include//logger/*.h +rm -f include//logger/*.orig + +echo finished astyle for $PWD diff --git a/makefile b/makefile index 4e3c0b5..fe3ada5 100644 --- a/makefile +++ b/makefile @@ -167,6 +167,7 @@ clean: @echo "Deleting directories" @$(RM) -r build @$(RM) -r bin + @$(RM) -f reHDD.log # Main rule, checks the executable and symlinks to the output all: $(BIN_PATH)/$(BIN_NAME) @@ -199,6 +200,7 @@ $(BUILD_PATH)/%.o: $(SRC_PATH)/%.$(SRC_EXT) docs: @$(RM) -r $(DOCDIR)/html @doxygen $(DOCDIR)/doxyfile - - +.PHONY: style +style: + @bash astyle.sh diff --git a/src/tui.cpp b/src/tui.cpp index 902f252..4004e72 100644 --- a/src/tui.cpp +++ b/src/tui.cpp @@ -112,11 +112,15 @@ void TUI::updateTUI(vector * pvecDrives, uint8_t u8SelectedEntry) } break; case Drive::FROZEN: -#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); +#ifdef FROZEN_ALERT + if(bSelectedEntry) + { + dialog=createFrozenWarning(70, 16, ((stdscrX)-(int)(stdscrX/2)-20),(int)(stdscrY/2)-8, it->getPath(), it->getModelFamily(), it->getModelName(), it->getSerial(), stream.str() + "%"); + wrefresh(dialog); + } #endif + sState = "FROZEN " + stream.str() + "%"; //mark drive as frozen and reached progress break; default: break;