Added the "Open Recent" menu.

The "recentlyEditedFolders" option in the configuration file contains a list of recently opened directories.
The procedures for working with this list have also been added.
This commit is contained in:
Калинин Сергей Валерьевич
2025-10-21 15:40:22 +03:00
parent 439993091f
commit b04e62434a
8 changed files with 73 additions and 30 deletions

View File

@@ -9,7 +9,7 @@
######################################################
proc GetFileMenu {m} {
global activeProject
global activeProject cfgVariables
$m add command -label [::msgcat::mc "New file"] -command Editor::New\
-accelerator "Ctrl+N"
$m add command -label [::msgcat::mc "Open file"] -accelerator "Ctrl+O" -command {
@@ -24,6 +24,13 @@ proc GetFileMenu {m} {
-accelerator "Ctrl+w"
$m add command -label [::msgcat::mc "Close all"] -command {FileOper::CloseAll}
$m add separator
menu $m.openRecent
$m add cascade -label [::msgcat::mc "Open recent"] -menu $m.openRecent
foreach item $cfgVariables(recentFolder) {
$m.openRecent add command -label $item -command [list FileOper::ReadFolder $item]
}
$m add separator
$m add command -label [::msgcat::mc "Open folder"] -accelerator "Ctrl+K" -command {