racket/gui gtk: drop initial selection of list-box item
Make behavior on Gtk more consistent with other platforms.
This commit is contained in:
parent
9035e5d1ed
commit
2ea55efeec
|
@ -137,9 +137,12 @@
|
||||||
(maybe-init-select))
|
(maybe-init-select))
|
||||||
|
|
||||||
(define/private (maybe-init-select)
|
(define/private (maybe-init-select)
|
||||||
(when (and (= (get-selection) -1)
|
;; For consistency with other platforms,
|
||||||
(pair? data))
|
;; don't try to select an item initially.
|
||||||
(set-selection 0)))
|
(when #f
|
||||||
|
(when (and (= (get-selection) -1)
|
||||||
|
(pair? data))
|
||||||
|
(set-selection 0))))
|
||||||
|
|
||||||
(define gtk (as-gtk-allocation (gtk_scrolled_window_new #f #f)))
|
(define gtk (as-gtk-allocation (gtk_scrolled_window_new #f #f)))
|
||||||
(gtk_scrolled_window_set_policy gtk GTK_POLICY_AUTOMATIC GTK_POLICY_ALWAYS)
|
(gtk_scrolled_window_set_policy gtk GTK_POLICY_AUTOMATIC GTK_POLICY_ALWAYS)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user