X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fautorecover.cpp;h=1b55eb4a23edd6e38648f0cfdc6128ea6eaa8b1a;hb=756c0d29ac1742f231e6615f9a577e574e35a4af;hp=ed304060be773c30274ff9c393ffc12f56974a37;hpb=8ef042c40521681cea99944097c4f90a5ac6cf74;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/autorecover.cpp b/synfig-studio/trunk/src/gtkmm/autorecover.cpp index ed30406..1b55eb4 100644 --- a/synfig-studio/trunk/src/gtkmm/autorecover.cpp +++ b/synfig-studio/trunk/src/gtkmm/autorecover.cpp @@ -6,6 +6,7 @@ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as @@ -178,8 +179,8 @@ AutoRecover::cleanup_pid(int pid) { synfig::error("Autobackup seems to have failed! (PID=%d)",pid); } - else - synfig::info("PID=%d has been cleaned up",pid); +// else +// synfig::info("PID=%d has been cleaned up",pid); #endif return false; } @@ -224,8 +225,8 @@ AutoRecover::auto_backup() savecount++; } - if(savecount) - synfig::info("AutoRecover::auto_backup(): %d Files backed up.",savecount); +// if(savecount) +// synfig::info("AutoRecover::auto_backup(): %d Files backed up.",savecount); } catch(...) { @@ -277,10 +278,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 +302,8 @@ AutoRecover::recover() // This file isn't saved! mark it as such App::instance_list.back()->inc_action_count(); + + number_recovered++; } else success=false;