racket/gui gtk: drop initial selection of list-box item

Make behavior on Gtk more consistent with other platforms.

original commit: 2ea55efeec603d6b0a0c74a745ed39791f46c43a
This commit is contained in:
Matthew Flatt 2013-09-12 18:36:24 -06:00
parent efff874295
commit 9133d9cbc3

View File

@ -137,9 +137,12 @@
(maybe-init-select))
(define/private (maybe-init-select)
(when (and (= (get-selection) -1)
(pair? data))
(set-selection 0)))
;; For consistency with other platforms,
;; don't try to select an item initially.
(when #f
(when (and (= (get-selection) -1)
(pair? data))
(set-selection 0))))
(define gtk (as-gtk-allocation (gtk_scrolled_window_new #f #f)))
(gtk_scrolled_window_set_policy gtk GTK_POLICY_AUTOMATIC GTK_POLICY_ALWAYS)