tazpanel rev 232

libtazpanel: Add some functions in settings.cgi to libtazpanel.
author Christopher Rogers <slaxemulator@gmail.com>
date Fri Feb 24 15:17:28 2012 -0500 (2012-02-24)
parents 0b69a546638a
children 904ff00b951d
files lib/libtazpanel
line diff
     1.1 --- a/lib/libtazpanel	Fri Feb 24 15:15:23 2012 -0500
     1.2 +++ b/lib/libtazpanel	Fri Feb 24 15:17:28 2012 -0500
     1.3 @@ -110,6 +110,31 @@
     1.4  	table_end
     1.5  }
     1.6  
     1.7 +# Get the list of panel styles
     1.8 +list_styles() {
     1.9 +	for style in $PANEL/styles/*
    1.10 +	do
    1.11 +		style=$(basename $style)
    1.12 +		echo "<option value='$style'>$style</option>"
    1.13 +	done
    1.14 +}
    1.15 +
    1.16 +# Get the list of system locales
    1.17 +list_locales() {
    1.18 +	for locale in $(find /usr/share/i18n/locales -type f -name "[a-z][a-z]_[A-Z][A-Z]")
    1.19 +	do
    1.20 +		echo "<option value='$locale'>$locale</option>"
    1.21 +	done
    1.22 +}
    1.23 +
    1.24 +# Get the list of console keymaps
    1.25 +list_keymaps() {
    1.26 +	for keymap in /usr/share/kmap/*.kmap
    1.27 +	do
    1.28 +		basename $keymap .kmap | sed "s|.*|<option value='&'>&</option>|"
    1.29 +	done
    1.30 +}
    1.31 +
    1.32  #
    1.33  # xHTML 5 (header and footer skel are from the style)
    1.34  #