diff --git a/collects/framework/framework.ss b/collects/framework/framework.ss index c055247f..998827b2 100644 --- a/collects/framework/framework.ss +++ b/collects/framework/framework.ss @@ -576,6 +576,7 @@ (-> (is-a?/c group:%)) () "This returns the frame group.") + (handler:handler? (any? . -> . boolean?) (obj) @@ -683,6 +684,7 @@ "and" "@flink handler:edit-file %" ".") + (handler:install-recent-items ((is-a?/c menu%) . -> . void?) (menu) @@ -693,6 +695,13 @@ "with the filename of the recently opened file." "" "The menu's size is limited to 10.") + + (handler:set-recent-items-frame-superclass + ((implementation?/c frame:standard-menus<%>) . -> . void?) + "Sets the superclass for the recently opened files frame." + "It must be derived from" + "@ilink frame:standard-menus %" + ".") (handler:add-to-recent (string? . -> . void?) diff --git a/collects/framework/private/handler.ss b/collects/framework/private/handler.ss index 8f126069..24aa399e 100644 --- a/collects/framework/private/handler.ss +++ b/collects/framework/private/handler.ss @@ -228,7 +228,7 @@ ;; make-recent-items-window : -> frame (define (make-recent-items-window) - (make-object recent-items-window% + (make-object (get-recent-items-window%) (string-constant show-recent-items-window-label) #f (preferences:get 'framework:recent-items-window-w) @@ -243,8 +243,13 @@ (send item open-item)) (super-instantiate ()))) - (define recent-items-window% - (class (frame:standard-menus-mixin frame:basic%) + (define recent-items-super% (frame:standard-menus-mixin frame:basic%)) + + (define (set-recent-items-frame-superclass super%) + (set! recent-items-super% super%)) + + (define (get-recent-items-window%) + (class recent-items-super% ;; remove extraneous separators (define/override (file-menu:between-print-and-close menu) (void)) diff --git a/collects/framework/private/sig.ss b/collects/framework/private/sig.ss index 992b979a..7ea279d2 100644 --- a/collects/framework/private/sig.ss +++ b/collects/framework/private/sig.ss @@ -382,7 +382,8 @@ open-file install-recent-items add-to-recent - set-recent-position)) + set-recent-position + set-recent-items-frame-superclass)) (define-signature framework:handler^ ((open framework:handler-class^) (open framework:handler-fun^)))