Gnocl Simple Stock Item Viewer

WJG (25/03/11) Gnocl provides access to the full set of available stockitem widget icons for any particular Gnome Desktop theme. The following script provides simple browser to show what's currently available. But first, a screenshot:

https://lh4.googleusercontent.com/_yaFgKvuZ36o/TYxsuu_REoI/AAAAAAAAA5o/0tfeojHILvM/s800/Screenshot-stockItems.tcl.png

#!/bin/sh
# the next line restarts using tclsh \
exec tclsh "$0" "$@"

package require Gnocl

set stockItems [lsort [gnocl::info allStockItems] ]

set lst [gnocl::list \
    -titles {"icon" "Stock Item"} \
    -types {image string}]

foreach {item} $stockItems {
        # trap non-existing icons
        if { [catch { $lst add [list [list %#$item $item ]] }] } {
                $lst cellConfigure end 1 -value $item -visible 1
                }
        }

gnocl::window -child $lst -widthRequest 225 -heightRequest 400