images.viewer.prettyprint: don't default to prettyprinting images this way, make it configurable.

db4
John Benediktsson 2015-07-14 16:21:35 -07:00
parent 7fc906383c
commit c329631e25
1 changed files with 7 additions and 3 deletions

View File

@ -4,8 +4,7 @@ sequences ui.gadgets.panes ;
FROM: images => image ;
IN: images.viewer.prettyprint
TUPLE: image-section < section
image ;
TUPLE: image-section < section image ;
CONSTANT: approx-pixels-per-cell 8
@ -16,8 +15,13 @@ CONSTANT: approx-pixels-per-cell 8
M: image-section long-section
short-section ;
M: image-section short-section
image>> <image-gadget> output-stream get write-gadget ;
SYMBOL: prettyprint-images?
M: image pprint*
<image-section> add-section ;
prettyprint-images? get
[ <image-section> add-section ]
[ call-next-method ] if ;