From 710a81621f051744509074362e59811eb3d1f9d2 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Mon, 16 Jun 2008 14:22:24 +0000 Subject: [PATCH] Move the "show recent files in a dialog" to the bottom, since it's much less frequently used than the actual files. (Even for people who do use it -- since they'd usually use it once, and then use the dialog.) svn: r10285 original commit: 86cdf405eeeb8038361770150d9ce0ff3a21ac95 --- collects/framework/private/handler.ss | 38 +++++++++++---------------- 1 file changed, 15 insertions(+), 23 deletions(-) diff --git a/collects/framework/private/handler.ss b/collects/framework/private/handler.ss index 3b2c8688..493678e5 100644 --- a/collects/framework/private/handler.ss +++ b/collects/framework/private/handler.ss @@ -218,29 +218,21 @@ (let ([recently-opened-files (preferences:get 'framework:recently-opened-files/pos)]) - (for-each (λ (item) (send item delete)) - (send menu get-items)) - - (instantiate menu-item% () - (parent menu) - (label (string-constant show-recent-items-window-menu-item)) - (callback (λ (x y) (show-recent-items-window)))) - - (instantiate separator-menu-item% () - (parent menu)) - - (for-each (λ (recent-list-item) - (let ([filename (car recent-list-item)]) - (instantiate menu-item% () - (parent menu) - (label (gui-utils:trim-string - (regexp-replace* - "&" - (path->string filename) - "&&") - 200)) - (callback (λ (x y) (open-recent-list-item recent-list-item)))))) - recently-opened-files) + (for ([item (send menu get-items)]) (send item delete)) + + (for ([recent-list-item recently-opened-files]) + (let ([filename (car recent-list-item)]) + (new menu-item% + [parent menu] + [label (gui-utils:trim-string + (regexp-replace* #rx"&" (path->string filename) "\\&\\&") + 200)] + [callback (λ (x y) (open-recent-list-item recent-list-item))]))) + (new separator-menu-item% [parent menu]) + (new menu-item% + [parent menu] + [label (string-constant show-recent-items-window-menu-item)] + [callback (λ (x y) (show-recent-items-window))]) (void))) ;; open-recent-list-item : recent-list-item -> void