From 1e3d8b47b53ea7a0aa85626eefa1c6cb5436b4ea Mon Sep 17 00:00:00 2001 From: Rene Rebe Date: Wed, 6 Aug 2003 13:48:16 +0000 Subject: [PATCH] Dimitar Zhekov This patch breaks the timezone selection on 2 screens: an area (Africa, America, ... - continent?) and a zone (Apia, Auckland, ... - capital?) inside the area. The while loop and tzset keep track if a zone has been selected, and exit to area screen (instead of main) if not. Hairy, but works. git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@1033 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- Documentation/Developers/CHANGELOG-RENE | 5 +++++ package/base/sysfiles/stone_mod_general.sh | 23 +++++++++++++++++----- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/Documentation/Developers/CHANGELOG-RENE b/Documentation/Developers/CHANGELOG-RENE index f61a28357..f0124298d 100644 --- a/Documentation/Developers/CHANGELOG-RENE +++ b/Documentation/Developers/CHANGELOG-RENE @@ -2,11 +2,16 @@ This is not only the CHANGELOG of the desktop target, but also of the whole rxr-tree. +*) 2003-08-06 (2.0.0-beta7 - 2.0.0-rc1) + + - Dimitar Zhekov: stone timezone breakup + *) 2003-08-05 (2.0.0-beta7 - 2.0.0-rc1) - Burkhard Linke: fixed kasc/clanlib, gtk-perl10, gtkhtml10 fixed tibit/pilot-link, tibit/jpilot-syncmal updated clifford/mysql and fixed clifford/mysqlcc + *) 2003-08-04 (2.0.0-beta7 - 2.0.0-rc1) - Burkhard Linke: fixed qtparte, spice and xplanet diff --git a/package/base/sysfiles/stone_mod_general.sh b/package/base/sysfiles/stone_mod_general.sh index 5744b8136..edf123137 100644 --- a/package/base/sysfiles/stone_mod_general.sh +++ b/package/base/sysfiles/stone_mod_general.sh @@ -126,17 +126,30 @@ set_con_blank() { } set_tmzone() { - tz="$( ls -l /etc/localtime | cut -f7- -d/ )" + tz="$( ls -l /etc/localtime | cut -f8 -d/ )" cmd="gui_menu 'general_tmzone' 'Select one of the" cmd="$cmd following time zones. (Current: $tz)'" - cmd="$cmd $( grep '^[^#]' /usr/share/zoneinfo/zone.tab | \ - cut -f3 | sort -u | tr '\n' ' ' | sed 's,[^ ]\+,& '` - `'"ln -sf ../usr/share/zoneinfo/& /etc/localtime",g' )" + cmd="$cmd $( grep "$1/" /usr/share/zoneinfo/zone.tab | cut -f3 | \ + cut -f2 -d/ | sort -u | tr '\n' ' ' | sed 's,[^ ]\+,& '` + `'"ln -sf ../usr/share/zoneinfo/$1/& /etc/localtime",g' )" eval "$cmd" } +set_tmarea() { + tz="$( ls -l /etc/localtime | cut -f7 -d/ )" + cmd="gui_menu 'general_tmarea' 'Select one of the" + cmd="$cmd following time areas. (Current: $tz)'" + + cmd="$cmd $( grep '^[^#]' /usr/share/zoneinfo/zone.tab | cut -f3 | \ + cut -f1 -d/ | sort -u | tr '\n' ' ' | sed 's,[^ ]\+,& '` + `'"if set_tmzone & ; then tzset=1 ; fi",g' )" + + tzset=0 + while eval "$cmd" && [ $tzset = 0 ] ; do : ; done +} + set_dtime() { dtime="`date '+%m-%d %H:%M %Y'`" ; newdtime="$dtime" gui_input "Set new date and time (MM-DD hh:mm YYYY, localtime)" \ @@ -189,7 +202,7 @@ main() { gui_menu general 'Various general system configurations' \ "Set console keyboard mapping ....... $keymap" "set_keymap" \ "Set console screen font ............ $vcfont" "set_vcfont" \ - "Set system-wide time zone .......... $tz" "set_tmzone" \ + "Set system-wide time zone .......... $tz" "set_tmarea" \ "Set date and time (localtime) ...... $dtime" "set_dtime" \ "Set system-wide locale (language) .. $locale" "set_locale" \ "Set console keyboard repeat rate ... $kbd_rate" "set_kbd_rate" \