X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fdialog_setup.cpp;h=17c0ea455619d55f76a1611ef37d45fbac202041;hb=c9ad0cc10b6d9fd5fb15cb662308402a44509215;hp=88ca532645f90ec4c4234ad724e4ffa3cffbe4bd;hpb=1f59228ea073eb60029cddfb4ee1a70de7f40f3d;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/dialog_setup.cpp b/synfig-studio/trunk/src/gtkmm/dialog_setup.cpp index 88ca532..17c0ea4 100644 --- a/synfig-studio/trunk/src/gtkmm/dialog_setup.cpp +++ b/synfig-studio/trunk/src/gtkmm/dialog_setup.cpp @@ -38,9 +38,12 @@ #include #include #include "widget_enum.h" +#include "autorecover.h" #include #include +#include "general.h" + #endif /* === U S I N G =========================================================== */ @@ -184,6 +187,10 @@ Dialog_Setup::Dialog_Setup(): // Misc - single_threaded misc_table->attach(toggle_single_threaded, 0, 2, 4, 5, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + // Misc - auto backup interval + misc_table->attach(*manage(new Gtk::Label(_("Auto Backup Interval (0 to disable)"))), 0, 1, 5, 6, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + misc_table->attach(auto_backup_interval, 1, 2, 5, 6, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + show_all_children(); } @@ -214,6 +221,9 @@ Dialog_Setup::on_apply_pressed() // Set the single_threaded flag App::single_threaded=toggle_single_threaded.get_active(); + // Set the auto backup interval + App::auto_recover->set_timeout(auto_backup_interval.get_value() * 1000); + App::distance_system=Distance::System(widget_enum->get_value()); App::save_settings(); @@ -264,7 +274,7 @@ void Dialog_Setup::refresh() { // Refresh the temporary gamma; do this before adjusting the sliders, - // or variables will be used before their initialisation. + // or variables will be used before their initialization. gamma_pattern.set_gamma_r(App::gamma.get_gamma_r()); gamma_pattern.set_gamma_g(App::gamma.get_gamma_g()); gamma_pattern.set_gamma_b(App::gamma.get_gamma_b()); @@ -291,6 +301,9 @@ Dialog_Setup::refresh() // Refresh the status of the single_threaded flag toggle_single_threaded.set_active(App::single_threaded); + + // Refresh the value of the auto backup interval + auto_backup_interval.set_value(App::auto_recover->get_timeout() / 1000); } GammaPattern::GammaPattern(): @@ -499,7 +512,7 @@ BlackLevelSelector::on_event(GdkEvent *event) void -Dialog_Setup::set_time_format(Time::Format x) +Dialog_Setup::set_time_format(synfig::Time::Format x) { time_format=x; if(x<=Time::FORMAT_VIDEO)