Added copyright lines for files I've edited this year.
[synfig.git] / synfig-studio / trunk / src / gtkmm / autorecover.cpp
index ed30406..1b55eb4 100644 (file)
@@ -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;