--- a/src/gui_actions.cpp Tue Jul 16 01:33:11 2013 +0300 +++ b/src/gui_actions.cpp Tue Jul 16 02:06:30 2013 +0300 @@ -111,6 +111,38 @@ // ============================================================================= // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ============================================================================= +DEFINE_ACTION (SaveAll, CTRL (L)) { + for (LDOpenFile* file : g_loadedFiles) { + if (file->implicit()) + continue; + + g_win->save (file, false); + } +} + +// ============================================================================= +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +// ============================================================================= +DEFINE_ACTION (Close, CTRL (W)) { + if (!LDOpenFile::current()->safeToClose()) + return; + + delete LDOpenFile::current(); +} + +// ============================================================================= +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +// ============================================================================= +DEFINE_ACTION (CloseAll, 0) { + if (!safeToCloseAll()) + return; + + closeAll(); +} + +// ============================================================================= +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +// ============================================================================= DEFINE_ACTION (Settings, 0) { ConfigDialog::staticDialog(); }