# HG changeset patch # User Aleksej Bobylev # Date 1340413800 0 # Node ID 01e1839f6450d0c4138048012b0fa82a3560381d # Parent e0142e90a498e461bfa3ed1916c40dca64188e68 Add some graphics from Tango project for helpers messages and arrows; libtazpanel: add msg() function for message boxes (tip|warn|err|up); add is_installed function to determine if we need show helper msg or not; index & settings: add a pair of helpers; installer: add arrows on buttons. diff -r e0142e90a498 -r 01e1839f6450 index.cgi --- a/index.cgi Mon Jun 11 07:19:03 2012 +0000 +++ b/index.cgi Sat Jun 23 01:10:00 2012 +0000 @@ -323,8 +323,8 @@

$(gettext 'View report') - $(gettext 'This report can be attached with a bug report on:') - bugs.slitaz.org

+ $(msg tip "$(gettext 'This report can be attached with a bug report on:') + bugs.slitaz.org

") EOT ;; diff -r e0142e90a498 -r 01e1839f6450 installer.cgi --- a/installer.cgi Mon Jun 11 07:19:03 2012 +0000 +++ b/installer.cgi Sat Jun 23 01:10:00 2012 +0000 @@ -164,7 +164,7 @@ graphically manage your partitions with Gparted")

$(gettext "Install \ -SliTaz") +SliTaz") EOT } @@ -181,7 +181,7 @@ system will be updated as long you have an active internet connection.")

$(gettext "Upgrade \ -SliTaz") +SliTaz") EOT } @@ -231,9 +231,9 @@
- $(gettext 'Back to Installer Start Page') + $(gettext 'Back to Installer Start Page') - $(gettext 'Continue Installation') + $(gettext 'Continue Installation') EOT } @@ -498,33 +498,32 @@ { case $1 in partitioning) - title1=$(gettext 'Back to partitioning') ;; + title1=" $(gettext 'Back to partitioning')" ;; *) page=home - title1=$(gettext 'Back to Installer Start Page') ;; + title1=" $(gettext 'Back to Installer Start Page')" ;; esac case $2 in write|run) - title2=$(gettext 'Proceed to SliTaz installation') ;; + title2="$(gettext 'Proceed to SliTaz installation') " ;; reboot) title2=$(gettext 'Installation complete. You can now restart (reboot)') ;; failed) title2=$(gettext 'Installation failed. See log') ;; *) page=home - title2=$(gettext 'Back to Installer Start Page') ;; + title2=" $(gettext 'Back to Installer Start Page')" ;; esac cat < - $title1 - +$title2 EOT } page_redirection() { - cat < @@ -548,7 +547,7 @@ local code code=0 # Check tazinst - if ! [ -x /usr/sbin/tazinst ] ; then + if ! [ -x /usr/sbin/tazinst2 ] ; then cat <$(gettext 'Tazinst Error')

$(gettext "tazinst, the lightweight SliTaz HDD installer \ diff -r e0142e90a498 -r 01e1839f6450 lib/libtazpanel --- a/lib/libtazpanel Mon Jun 11 07:19:03 2012 +0000 +++ b/lib/libtazpanel Sat Jun 23 01:10:00 2012 +0000 @@ -226,3 +226,24 @@ EOT } + +msg() { + msgtype="$1"; shift + case "$msgtype" in + tip) MSG_ICON="$IMAGES/msg-tip.png" ;; + warn|warning) MSG_ICON="$IMAGES/msg-warn.png" ;; + err|error) MSG_ICON="$IMAGES/msg-err.png" ;; + up) MSG_ICON="$IMAGES/msg-up.png" ;; + *) MSG_ICON="$IMAGES/msg.png" ;; + esac + cat << EOT +

+ $msgtype + $@ +
+EOT +} + +is_installed() { + [ -d "$INSTALLED/$1" ] +} diff -r e0142e90a498 -r 01e1839f6450 settings.cgi --- a/settings.cgi Mon Jun 11 07:19:03 2012 +0000 +++ b/settings.cgi Sat Jun 23 01:10:00 2012 +0000 @@ -184,7 +184,7 @@ LOADING_MSG="$(gettext 'Please wait...')" loading_msg cur_loc=$(locale | grep LANG | cut -d= -f2) - cat <$(gettext 'Choose locale')

$(gettext 'Current locale settings:')

@@ -194,7 +194,16 @@
$(locale -a)

$(gettext 'Available locales:')

+EOT + is_installed "glibc-locale" + [ $? = 1 ] && + msg tip $(gettext \ + "Don't see your language?
You can \ +install glibc-locale \ +to see huge list of available locales.") + + cat << EOT
@@ -284,8 +293,8 @@ # System configuration echo "LANG=$new_locale" > /etc/locale.conf echo "LC_ALL=$new_locale" >> /etc/locale.conf - eval_gettext "You must logout and login again to your current \ -session to use \$new_locale locale." + msg warn "$(eval_gettext \ + 'You must logout and login again to your current session to use $new_locale locale.')" else gettext 'Current system locale:'; echo -n " " locale | grep LANG | cut -d= -f2 diff -r e0142e90a498 -r 01e1839f6450 styles/default/images/go-first.png Binary file styles/default/images/go-first.png has changed diff -r e0142e90a498 -r 01e1839f6450 styles/default/images/go-next.png Binary file styles/default/images/go-next.png has changed diff -r e0142e90a498 -r 01e1839f6450 styles/default/images/go-previous.png Binary file styles/default/images/go-previous.png has changed diff -r e0142e90a498 -r 01e1839f6450 styles/default/images/msg-err.png Binary file styles/default/images/msg-err.png has changed diff -r e0142e90a498 -r 01e1839f6450 styles/default/images/msg-tip.png Binary file styles/default/images/msg-tip.png has changed diff -r e0142e90a498 -r 01e1839f6450 styles/default/images/msg-up.png Binary file styles/default/images/msg-up.png has changed diff -r e0142e90a498 -r 01e1839f6450 styles/default/images/msg-warn.png Binary file styles/default/images/msg-warn.png has changed diff -r e0142e90a498 -r 01e1839f6450 styles/default/images/msg.png Binary file styles/default/images/msg.png has changed