# $Id: theme.itcl,v 1.2 2005/08/03 06:02:46 davidlallen Exp $ # Updated to save to update the confguration file proc action_theme {chan path env} { global source_dir if {[string index $path 0] == "/"} { set path [string range $path 1 end] if { $path != "" } { set TWP::STYLE $path updateconfig "Theme" $path } } puts $chan [html_start "Theme Browser"] puts $chan [html_table_start "" "" ""] puts $chan [tr "" [th "" "THEMES"]] foreach filename $::theme_list { puts $chan [tr "" [td [html_link $filename $filename]]] } puts $chan [html_table_end] puts $chan [html_end] } global theme_list set theme_list "" foreach filename [glob -nocomplain $source_dir/themes/*css] { set filename [file rootname [file tail $filename]] lappend theme_list $filename } register_module "theme" "Theme" "Change the look of this site"