From: dooglus Date: Tue, 25 Sep 2007 21:25:25 +0000 (+0000) Subject: Implement http://wiki.synfig.com/Wish_list : "Restore Default Layout". It's on the... X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=2609f3f9572f7beaeaf35c2bd4b021b0d96fce1d;p=synfig.git Implement wiki.synfig.com/Wish_list : "Restore Default Layout". It's on the toolbox's "Dialogs" menu. git-svn-id: http://svn.voria.com/code@757 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-studio/trunk/src/gtkmm/app.cpp b/synfig-studio/trunk/src/gtkmm/app.cpp index 075d440..e99a21d 100644 --- a/synfig-studio/trunk/src/gtkmm/app.cpp +++ b/synfig-studio/trunk/src/gtkmm/app.cpp @@ -1519,19 +1519,7 @@ App::load_settings() //if(!synfigapp::Main::settings().load_from_file(filename)) { gamma.set_gamma(1.0/2.2); - synfigapp::Main::settings().set_value("dock.dialog.1.comp_selector","1"); - synfigapp::Main::settings().set_value("dock.dialog.1.contents","navigator - info pal_edit pal_browse - tool_options history canvases - layers groups"); - synfigapp::Main::settings().set_value("dock.dialog.1.contents_size","225 167 207"); - synfigapp::Main::settings().set_value("dock.dialog.1.pos","1057 32"); - synfigapp::Main::settings().set_value("dock.dialog.1.size","208 1174"); - synfigapp::Main::settings().set_value("dock.dialog.2.comp_selector","0"); - synfigapp::Main::settings().set_value("dock.dialog.2.contents","params children keyframes | timetrack curves meta_data"); - synfigapp::Main::settings().set_value("dock.dialog.2.contents_size","263"); - synfigapp::Main::settings().set_value("dock.dialog.2.pos","0 973"); - synfigapp::Main::settings().set_value("dock.dialog.2.size","1045 235"); - synfigapp::Main::settings().set_value("pref.distance_system","pt"); - synfigapp::Main::settings().set_value("pref.use_colorspace_gamma","1"); - synfigapp::Main::settings().set_value("window.toolbox.pos","4 4"); + reset_initial_window_configuration(); } } setlocale(LC_NUMERIC,old_locale); @@ -1542,6 +1530,24 @@ App::load_settings() } } +void +App::reset_initial_window_configuration() +{ + synfigapp::Main::settings().set_value("dock.dialog.1.comp_selector","1"); + synfigapp::Main::settings().set_value("dock.dialog.1.contents","navigator - info pal_edit pal_browse - tool_options history canvases - layers groups"); + synfigapp::Main::settings().set_value("dock.dialog.1.contents_size","225 167 207"); + synfigapp::Main::settings().set_value("dock.dialog.1.pos","1057 32"); + synfigapp::Main::settings().set_value("dock.dialog.1.size","208 1174"); + synfigapp::Main::settings().set_value("dock.dialog.2.comp_selector","0"); + synfigapp::Main::settings().set_value("dock.dialog.2.contents","params children keyframes | timetrack curves meta_data"); + synfigapp::Main::settings().set_value("dock.dialog.2.contents_size","263"); + synfigapp::Main::settings().set_value("dock.dialog.2.pos","0 973"); + synfigapp::Main::settings().set_value("dock.dialog.2.size","1045 235"); + synfigapp::Main::settings().set_value("pref.distance_system","pt"); + synfigapp::Main::settings().set_value("pref.use_colorspace_gamma","1"); + synfigapp::Main::settings().set_value("window.toolbox.pos","4 4"); +} + bool App::shutdown_request(GdkEventAny*) { diff --git a/synfig-studio/trunk/src/gtkmm/app.h b/synfig-studio/trunk/src/gtkmm/app.h index 98c1da8..16f8568 100644 --- a/synfig-studio/trunk/src/gtkmm/app.h +++ b/synfig-studio/trunk/src/gtkmm/app.h @@ -262,6 +262,7 @@ public: static synfig::String get_base_path(); static void save_settings(); static void load_settings(); + static void reset_initial_window_configuration(); static const std::list& get_recent_files(); diff --git a/synfig-studio/trunk/src/gtkmm/toolbox.cpp b/synfig-studio/trunk/src/gtkmm/toolbox.cpp index 110fb46..9d2f31a 100644 --- a/synfig-studio/trunk/src/gtkmm/toolbox.cpp +++ b/synfig-studio/trunk/src/gtkmm/toolbox.cpp @@ -217,6 +217,8 @@ Toolbox::Toolbox(): dock_dialogs->items().push_back(Gtk::Menu_Helpers::MenuElem("Canvases, History",sigc::ptr_fun(_create_stock_dialog1))); dock_dialogs->items().push_back(Gtk::Menu_Helpers::MenuElem("Layers, Children, Params",sigc::ptr_fun(_create_stock_dialog2))); dock_dialogs->items().push_back(Gtk::Menu_Helpers::SeparatorElem()); + dock_dialogs->items().push_back(Gtk::Menu_Helpers::MenuElem("Reset Windows to Original Layout",sigc::ptr_fun(App::reset_initial_window_configuration))); + dock_dialogs->items().push_back(Gtk::Menu_Helpers::SeparatorElem()); filemenu->items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::Stock::NEW,