X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fdialog_setup.cpp;h=2894dda7829c215420bae6e4c20e20b41d8e623b;hb=207785229d58cdebc3012076596fdc255dcf9879;hp=bb12d262a6ce0960e2885e0b9d100b37cd48f325;hpb=5f937f1d74ccc6dc54f876e62cdea574e7cb56bf;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/dialog_setup.cpp b/synfig-studio/trunk/src/gtkmm/dialog_setup.cpp index bb12d26..2894dda 100644 --- a/synfig-studio/trunk/src/gtkmm/dialog_setup.cpp +++ b/synfig-studio/trunk/src/gtkmm/dialog_setup.cpp @@ -6,7 +6,7 @@ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore +** Copyright (c) 2007, 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 @@ -38,9 +38,12 @@ #include #include #include "widget_enum.h" +#include "autorecover.h" #include #include +#include "general.h" + #endif /* === U S I N G =========================================================== */ @@ -66,7 +69,8 @@ Dialog_Setup::Dialog_Setup(): adj_recent_files(15,1,50,1,1,1), adj_undo_depth(100,10,5000,1,1,1), toggle_use_colorspace_gamma(_("Visually Linear Color Selection")), - toggle_single_threaded(_("Use Only a Single Thread")) + toggle_single_threaded(_("Use Only a Single Thread")), + toggle_restrict_radius_ducks(_("Restrict Real-Valued Ducks to Top Right Quadrant")) { // Setup the buttons @@ -184,6 +188,17 @@ 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); + + // Misc - restrict_radius_ducks + misc_table->attach(toggle_restrict_radius_ducks, 0, 2, 6, 7, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + + // Misc - browser_command + misc_table->attach(*manage(new Gtk::Label(_("Browser Command"))), 0, 1, 7, 8, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + misc_table->attach(textbox_browser_command, 1, 2, 7, 8, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + show_all_children(); } @@ -214,8 +229,17 @@ 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()); + // Set the restrict_radius_ducks flag + App::restrict_radius_ducks=toggle_restrict_radius_ducks.get_active(); + + // Set the browser_command textbox + App::browser_command=textbox_browser_command.get_text(); + App::save_settings(); } @@ -291,6 +315,15 @@ 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); + + // Refresh the status of the restrict_radius_ducks flag + toggle_restrict_radius_ducks.set_active(App::restrict_radius_ducks); + + // Refresh the browser_command textbox + textbox_browser_command.set_text(App::browser_command); } GammaPattern::GammaPattern(): @@ -499,7 +532,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)