add select all/none, layout shortcuts from all guis, docs tweaks + cv->gg
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / mwindow.C
index 96016f5dfba07459d3b0596424019c543c3ad9e5..5a5c5f03f2485b29b74b160cf9ff2345c15ecbf4 100644 (file)
@@ -2901,6 +2901,27 @@ void MWindow::restore_windows()
        }
        else if( session->show_lwindow && lwindow->gui->is_hidden() )
                show_lwindow();
+
+       gui->focus();
+}
+
+void MWindow::save_layout(int no)
+{
+       char layout_path[BCTEXTLEN];
+       snprintf(layout_path, sizeof(layout_path), "%s/" LAYOUT_FILE,
+               File::get_config_path(), no);
+       session->save_file(layout_path);
+}
+
+void MWindow::load_layout(int no)
+{
+       char layout_path[BCTEXTLEN];
+       snprintf(layout_path, sizeof(layout_path), "%s/" LAYOUT_FILE,
+               File::get_config_path(), no);
+       session->load_file(layout_path);
+       restore_windows();
+       gui->default_positions();
+       save_defaults();
 }
 
 int MWindow::tile_windows(int window_config)