@@ -194,6 +194,7 @@ end setupWindowMenu
194194/*
195195Generates the menu for the recent files
196196*/
197+ constant kClearRecentFiles = "ClearTheRecentFileList"
197198function revMenuBarRecentFiles
198199 # Get the recent file data
199200 local tRecentFiles
@@ -208,7 +209,12 @@ function revMenuBarRecentFiles
208209 put return & tab & revMenubarEscapeStackNameForMenu(tRecentFiles [x]["label" ]) & "/|" & tRecentFiles [x]["filename" ] after tMenu
209210 end if
210211 end repeat
211-
212+
213+ if tMenu is not empty then
214+ put return & tab & "-" after tMenu
215+ put return & tab & "Clear Recent Files" & "/|" & kClearRecentFiles after tMenu
216+ end if
217+
212218 return tMenu
213219end revMenuBarRecentFiles
214220
@@ -1380,10 +1386,10 @@ private function revMenubarFileMenu pContext
13801386 put "&Open Stack.../O" & return after tFile
13811387
13821388 if revMenuBarRecentFiles() is not empty then
1383- put "Open Recent File" & return after tFile
1389+ put "Open Recent File" & return after tFile
13841390 put revMenuBarRecentFiles() & return after tFile
13851391 else
1386- put "(Open Recent File" & return after tFile
1392+ put "(Open Recent File" & return after tFile
13871393 end if
13881394
13891395 put enableMenuItem("&Close/W" , the mode of the topStack <= 3 and the short name of the topstack is not "revMenubar" ) & return after tFile
@@ -2758,7 +2764,14 @@ on revMenubarFileMenuPick pWhich
27582764 end if
27592765 break
27602766 case "Open Recent File"
2761- revIDEOpenStack item 2 of pWhich
2767+ local tRecentStack
2768+ put item 2 of pWhich into tRecentStack
2769+ if tRecentStack is kClearRecentFiles then
2770+ revIDESetPreference "cRecentStackPaths" , empty
2771+ ideMessageSend "ideRecentFilesChanged"
2772+ else
2773+ revIDEOpenStack tRecentStack
2774+ end if
27622775 break
27632776 case "Import As Control"
27642777 put item 2 of pWhich into tType
0 commit comments