From c87b4a3bdb14174132f753223c828dca93a1c801 Mon Sep 17 00:00:00 2001 From: dooglus Date: Thu, 7 Feb 2008 09:32:29 +0000 Subject: [PATCH] Count the number of files we were able to successfully recover. git-svn-id: http://svn.voria.com/code@1614 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-studio/trunk/src/gtkmm/autorecover.cpp | 5 ++++- synfig-studio/trunk/src/gtkmm/autorecover.h | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/autorecover.cpp b/synfig-studio/trunk/src/gtkmm/autorecover.cpp index ed30406..339fba7 100644 --- a/synfig-studio/trunk/src/gtkmm/autorecover.cpp +++ b/synfig-studio/trunk/src/gtkmm/autorecover.cpp @@ -277,10 +277,11 @@ AutoRecover::recovery_needed()const } bool -AutoRecover::recover() +AutoRecover::recover(int& number_recovered) { std::string filename=App::get_config_file("autorecovery"); std::ifstream file(filename.c_str()); + number_recovered = 0; if(!file) return false; bool success=true; @@ -300,6 +301,8 @@ AutoRecover::recover() // This file isn't saved! mark it as such App::instance_list.back()->inc_action_count(); + + number_recovered++; } else success=false; diff --git a/synfig-studio/trunk/src/gtkmm/autorecover.h b/synfig-studio/trunk/src/gtkmm/autorecover.h index 7375dd9..8d744bd 100644 --- a/synfig-studio/trunk/src/gtkmm/autorecover.h +++ b/synfig-studio/trunk/src/gtkmm/autorecover.h @@ -60,7 +60,7 @@ public: static synfig::String get_shadow_directory(); bool recovery_needed()const; - bool recover(); + bool recover(int& number_recovered); void normal_shutdown(); -- 2.7.4