X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fautorecover.cpp;h=f1e8567a5fa3446611490a139cef0a569c446715;hb=e8a065f2385c219c511b57dac52786120bfa097d;hp=06c1db38aec0dc08cca32b564501db224775fd3a;hpb=3a3c4bca3a17137bec5d7960560934b91ef4146e;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/autorecover.cpp b/synfig-studio/trunk/src/gtkmm/autorecover.cpp index 06c1db3..f1e8567 100644 --- a/synfig-studio/trunk/src/gtkmm/autorecover.cpp +++ b/synfig-studio/trunk/src/gtkmm/autorecover.cpp @@ -1,4 +1,4 @@ -/* === S I N F G =========================================================== */ +/* === S Y N F I G ========================================================= */ /*! \file autorecover.cpp ** \brief Template File ** @@ -32,8 +32,8 @@ //#include #include "app.h" -#include -#include +#include +#include #include #include #include "instance.h" @@ -64,7 +64,7 @@ using namespace std; using namespace etl; -using namespace sinfg; +using namespace synfig; using namespace studio; /* === M A C R O S ========================================================= */ @@ -87,11 +87,11 @@ AutoRecover::AutoRecover() if(mkdir(get_shadow_directory().c_str(),ACCESSPERMS)<0) { if(errno!=EEXIST) - sinfg::error("UNABLE TO CREATE \"%s\"",get_shadow_directory().c_str()); + synfig::error("UNABLE TO CREATE \"%s\"",get_shadow_directory().c_str()); } else { - sinfg::info("Created directory \"%s\"",get_shadow_directory().c_str()); + synfig::info("Created directory \"%s\"",get_shadow_directory().c_str()); } } @@ -99,7 +99,7 @@ AutoRecover::~AutoRecover() { } -sinfg::String +synfig::String AutoRecover::get_shadow_directory() { return Glib::build_filename(App::get_user_app_directory(),"tmp"); @@ -122,8 +122,8 @@ AutoRecover::set_timeout(int milliseconds) // auto_backup_connect=App::main.get_context()->signal_timeout().connect(sigc::mem_fun(&AutoRecover::auto_backup),timeout); } -sinfg::String -AutoRecover::get_shadow_file_name(const sinfg::String& filename) +synfig::String +AutoRecover::get_shadow_file_name(const synfig::String& filename) { unsigned int hash1(0xdeadbeef); unsigned int hash2(0x83502529); @@ -165,15 +165,15 @@ AutoRecover::cleanup_pid(int pid) int status=0; if(waitpid(pid,&status,WNOHANG)==-1) { - sinfg::info("PID %d isn't a zombie yet",pid); + synfig::info("PID %d isn't a zombie yet",pid); return true; } if(WEXITSTATUS(status)!=0) { - sinfg::error("Autobackup seems to have failed! (PID=%d)",pid); + synfig::error("Autobackup seems to have failed! (PID=%d)",pid); } else - sinfg::info("PID=%d has been cleaned up",pid); + synfig::info("PID=%d has been cleaned up",pid); #endif return false; } @@ -219,12 +219,12 @@ AutoRecover::auto_backup() } if(savecount) - sinfg::info("AutoRecover::auto_backup(): %d Files backed up.",savecount); + synfig::info("AutoRecover::auto_backup(): %d Files backed up.",savecount); } catch(...) { - sinfg::error("AutoRecover::auto_backup(): UNKNOWN EXCEPTION THROWN."); - sinfg::error("AutoRecover::auto_backup(): FILES NOT BACKED UP."); + synfig::error("AutoRecover::auto_backup(): UNKNOWN EXCEPTION THROWN."); + synfig::error("AutoRecover::auto_backup(): FILES NOT BACKED UP."); } #ifdef HAVE_FORK @@ -313,7 +313,7 @@ AutoRecover::normal_shutdown() } void -AutoRecover::clear_backup(sinfg::Canvas::Handle canvas) +AutoRecover::clear_backup(synfig::Canvas::Handle canvas) { if(canvas) remove(get_shadow_file_name(canvas->get_file_name()).c_str());