cocoa, gtk: enable auto list-box% horizontal scrollbars

Closes PR 12149

Also adjust id on NSTableColumn to be a string, because a Cocoa
warning on Lion told me to.
This commit is contained in:
Matthew Flatt 2011-09-10 11:14:52 -06:00
parent 28afc4490e
commit ec25a74b97
2 changed files with 3 additions and 2 deletions

View File

@ -95,7 +95,7 @@
(define cols
(for/list ([title (in-list columns)])
(let ([col (as-objc-allocation
(tell (tell NSTableColumn alloc) initWithIdentifier: content-cocoa))])
(tell (tell NSTableColumn alloc) initWithIdentifier: #:type _NSString title))])
(tellv content-cocoa addTableColumn: col)
(tellv (tell col headerCell) setStringValue: #:type _NSString title)
col)))
@ -105,6 +105,7 @@
(tellv cocoa setDocumentView: content-cocoa)
(tellv cocoa setHasVerticalScroller: #:type _BOOL #t)
(tellv cocoa setHasHorizontalScroller: #:type _BOOL #t)
(unless (memq 'column-headers style)
(tellv content-cocoa setHeaderView: #f))
(define allow-multi? (not (eq? kind 'single)))

View File

@ -142,7 +142,7 @@
(set-selection 0)))
(define gtk (as-gtk-allocation (gtk_scrolled_window_new #f #f)))
(gtk_scrolled_window_set_policy gtk GTK_POLICY_NEVER GTK_POLICY_ALWAYS)
(gtk_scrolled_window_set_policy gtk GTK_POLICY_AUTOMATIC GTK_POLICY_ALWAYS)
(define headers? (memq 'column-headers style))
(define click-headers? (and headers?