summaryrefslogtreecommitdiffstats
path: root/gui/action.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/action.cpp')
-rw-r--r--gui/action.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/gui/action.cpp b/gui/action.cpp
index 5536c82b1..8539386a0 100644
--- a/gui/action.cpp
+++ b/gui/action.cpp
@@ -314,6 +314,7 @@ void* GUIAction::thread_start(void *cookie)
void GUIAction::operation_start(const string operation_name)
{
+ time(&Start);
DataManager::SetValue(TW_ACTION_BUSY, 1);
DataManager::SetValue("ui_progress", 0);
DataManager::SetValue("tw_operation", operation_name);
@@ -323,6 +324,7 @@ void GUIAction::operation_start(const string operation_name)
void GUIAction::operation_end(const int operation_status, const int simulate)
{
+ time_t Stop;
int simulate_fail;
DataManager::SetValue("ui_progress", 100);
if (simulate) {
@@ -344,6 +346,9 @@ void GUIAction::operation_end(const int operation_status, const int simulate)
#ifndef TW_NO_SCREEN_TIMEOUT
blankTimer.resetTimerAndUnblank();
#endif
+ time(&Stop);
+ if ((int) difftime(Stop, Start) > 10)
+ DataManager::Vibrate("tw_vibrate");
}
int GUIAction::doAction(Action action, int isThreaded /* = 0 */)
@@ -920,6 +925,7 @@ int GUIAction::doAction(Action action, int isThreaded /* = 0 */)
else {
operation_end(1, simulate);
return -1;
+
}
DataManager::SetValue(TW_BACKUP_NAME, "(Auto Generate)");
} else if (arg == "restore") {