Hello community,
here is the log from the commit of package yast2-country
checked in at Fri Dec 21 20:34:30 CET 2007.
--------
--- yast2-country/yast2-country.changes 2007-12-07 23:45:10.000000000 +0100
+++ /mounts/work_src_done/STABLE/yast2-country/yast2-country.changes 2007-12-21 16:04:17.470012000 +0100
@@ -1,0 +2,8 @@
+Fri Dec 21 15:51:25 CET 2007 - jsuchome@suse.cz
+
+- added support for TimezoneSelector widget
+- updated list of timezones (added new ones, many old ones converted
+ to the format used by zone.tab)
+- 2.16.5
+
+-------------------------------------------------------------------
Old:
----
yast2-country-2.16.4.tar.bz2
New:
----
yast2-country-2.16.5.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-country.spec ++++++
--- /var/tmp/diff_new_pack.wR7259/_old 2007-12-21 20:34:09.000000000 +0100
+++ /var/tmp/diff_new_pack.wR7259/_new 2007-12-21 20:34:09.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-country (Version 2.16.4)
+# spec file for package yast2-country (Version 2.16.5)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,12 +11,12 @@
# norootforbuild
Name: yast2-country
-Version: 2.16.4
+Version: 2.16.5
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-country-2.16.4.tar.bz2
+Source0: yast2-country-2.16.5.tar.bz2
Prefix: /usr
BuildRequires: perl-XML-Writer update-desktop-files yast2 yast2-devtools yast2-perl-bindings yast2-testsuite
Requires: yast2-trans-stats yast2-perl-bindings timezone
@@ -65,7 +65,7 @@
Jiri Suchomel
%prep
-%setup -n yast2-country-2.16.4
+%setup -n yast2-country-2.16.5
%build
%{prefix}/bin/y2tool y2autoconf
@@ -132,8 +132,12 @@
%dir /usr/share/YaST2/data/languages
/usr/share/YaST2/data/languages/*.ycp
/usr/share/YaST2/modules/Language.y*
-
%changelog
+* Fri Dec 21 2007 - jsuchome@suse.cz
+- added support for TimezoneSelector widget
+- updated list of timezones (added new ones, many old ones converted
+ to the format used by zone.tab)
+- 2.16.5
* Fri Dec 07 2007 - jsuchome@suse.cz
- Storage is required only during installation -> usage moved to
the inst_timezone client
++++++ yast2-country-2.16.4.tar.bz2 -> yast2-country-2.16.5.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-country-2.16.4/timezone/data/lang2tz.ycp new/yast2-country-2.16.5/timezone/data/lang2tz.ycp
--- old/yast2-country-2.16.4/timezone/data/lang2tz.ycp 2006-09-08 11:27:46.000000000 +0200
+++ new/yast2-country-2.16.5/timezone/data/lang2tz.ycp 2007-12-21 14:14:46.000000000 +0100
@@ -56,7 +56,7 @@
"it_CH" : "Europe/Zurich",
"km" : "Asia/Phnom_Penh",
-
+// FIXME add chinese!!!!!!!!!
"nl_BE" : "Europe/Brussels",
"no_NO" : "Europe/Oslo",
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-country-2.16.4/timezone/data/timezone_raw.ycp new/yast2-country-2.16.5/timezone/data/timezone_raw.ycp
--- old/yast2-country-2.16.4/timezone/data/timezone_raw.ycp 2007-11-05 13:38:26.000000000 +0100
+++ new/yast2-country-2.16.5/timezone/data/timezone_raw.ycp 2007-12-21 15:50:03.000000000 +0100
@@ -12,7 +12,6 @@
* *****************************************************************
*
*/
-
{
textdomain "timezone_db";
@@ -22,9 +21,11 @@
$[ "name" : _("Europe"),
"entries" : $[
"Europe/Amsterdam" : _("Netherlands"),
+ // time zone
+ "Europe/Andorra" : _("Andorra"),
"Europe/Athens" : _("Greece"),
- "Europe/Belfast" : _("Northern Ireland"),
- "Europe/Belgrade" : _("Yugoslavia"),
+ // time zone
+ "Europe/Belgrade" : _("Serbia"),
"Europe/Berlin" : _("Germany"),
"Europe/Bratislava" : _("Slovakia"),
"Europe/Brussels" : _("Belgium"),
@@ -52,6 +53,8 @@
"Europe/Moscow" : _("Russia (Moscow)"),
"Europe/Oslo" : _("Norway"),
"Europe/Paris" : _("France"),
+ // time zone
+ "Europe/Podgorica" : _("Montenegro"),
"Europe/Prague" : _("Czech Republic"),
"Europe/Riga" : _("Latvia"),
"Europe/Rome" : _("Italy"),
@@ -71,75 +74,150 @@
"Europe/Vilnius" : _("Lithuania"),
"Europe/Warsaw" : _("Poland"),
"Europe/Zagreb" : _("Croatia"),
- "Iceland" : _("Iceland"),
+ // time zone
+ "Atlantic/Reykjavik" : _("Iceland"),
"Atlantic/Azores" : _("Azores"),
// time zone
"Atlantic/Canary" : _("Canary Islands"),
- "Europe/Zurich" : _("Switzerland") ] ],
+ "Europe/Zurich" : _("Switzerland"),
+ // time zone
+ "America/Godthab" : _("Greenland--Nuuk"),
+ ]
+],
$[ "name" : _("USA"),
"entries" : $[
- "US/Alaska" : _("Alaska"),
- "US/Aleutian" : _("Aleutian"),
- "US/Arizona" : _("Arizona"),
- "US/Central" : _("Central"),
- "US/East-Indiana" : _("East Indiana"),
- "US/Hawaii" : _("Hawaii"),
- "US/Indiana-Starke" : _("Indiana Starke"),
- "US/Michigan" : _("Michigan"),
- "US/Mountain" : _("Mountain"),
- "US/Pacific" : _("Pacific"),
- "US/Samoa" : _("Samoa"),
- "US/Eastern" : _("Eastern") ] ],
+ // time zone
+ "America/Anchorage" : _("Alaska"),
+ // time zone
+ "America/Adak" : _("Aleutian"),
+ // time zone
+ "America/Phoenix" : _("Arizona"),
+ // time zone
+ "America/Chicago" : _("Central"),
+ // time zone
+ "America/Indiana/Indianapolis" : _("East Indiana"),
+ // time zone
+ "Pacific/Honolulu" : _("Hawaii"),
+ // time zone
+ "America/Indiana/Knox" : _("Indiana Starke"),
+ // time zone
+ "America/Detroit" : _("Michigan"),
+ // time zone
+ "America/Denver" : _("Mountain"),
+ // time zone
+ "America/Los_Angeles" : _("Pacific"),
+ // time zone
+ "Pacific/Pago_Pago" : _("Samoa"),
+ // time zone
+ "America/New_York" : _("Eastern"),
+ // time zone
+ "America/St_Thomas" : _("Virgin Islands"),
+ // time zone
+ "America/Puerto_Rico" : _("Puerto Rico"),
+ ]
+],
-$[ "name" : _("Canada"),
- "entries" : $[
- "Canada/Atlantic" : _("Atlantic"),
- "Canada/Central" : _("Central"),
- "Canada/Eastern" : _("Eastern"),
- "Canada/Mountain" : _("Mountain"),
- "Canada/Newfoundland" : _("Newfoundland"),
- "Canada/Pacific" : _("Pacific"),
- "Canada/Saskatchewan" : _("Saskatchewan"),
- "Canada/East-Saskatchewan" : _("East Saskatchewan"),
- "Canada/Yukon" : _("Yukon") ] ],
+$[
+ // time zone region
+ "name" : _("Canada"),
+ "entries" : $[
+ // time zone
+ "America/Halifax" : _("Atlantic"),
+ // time zone
+ "America/Winnipeg" : _("Central"),
+ // time zone
+ "America/Toronto" : _("Eastern"),
+ // time zone
+ "America/Edmonton" : _("Mountain"),
+ // time zone
+ "America/St_Johns" : _("Newfoundland"),
+ // time zone
+ "America/Vancouver" : _("Pacific"),
+ // time zone
+ "America/Regina" : _("Saskatchewan"),
+ // time zone
+ "America/Whitehorse" : _("Yukon")
+ ]
+],
-$[ "name" : _("Central and South America"),
- "entries" : $[
+
+$[
+ // time zone region
+ "name" : _("Central and South America"),
+ "entries" : $[
+ // time zone
+ "America/Havana" : _("Havana"),
+ // time zone
+ "Pacific/Galapagos" : _("Galapagos"),
+ // time zone
+ "America/Guayaquil" : _("Guayaquil"),
+ // time zone
+ "America/Rio_Branco" : _("Brazil Acre"),
+ // time zone
+ "America/Sao_Paulo" : _("Brazil East"),
+ // time zone
+ "America/Manaus" : _("Brazil West"),
+ // time zone
+ "America/Noronha" : _("Brazil de Noronha"),
+ // time zone
+ "America/Santiago" : _("Chile Continental"),
+ // time zone
+ "Pacific/Easter" : _("Chile Easter Island"),
+ // time zone
+ "America/Jamaica" : _("Jamaica"),
+ // time zone
+ "Atlantic/Bermuda" : _("Bermuda"),
+ // time zone
+ "America/Tijuana" : _("Mexico Baja Norte"),
+ // time zone
+ "America/Mazatlan" : _("Mexico Baja Sur"),
+ // time zone
+ "America/Mexico_City" : _("Mexico General--Mexico City"),
// time zone
- "Brazil/Acre" : _("Brazil Acre"),
- "Brazil/East" : _("Brazil East"),
- "Brazil/West" : _("Brazil West"),
- "Chile/Continental" : _("Chile Continental"),
- "Chile/EasterIsland" : _("Chile EasterIsland"),
- "Jamaica" : _("Jamaica"),
- "Atlantic/Bermuda" : _("Bermuda"),
- "Mexico/BajaNorte" : _("Mexico BajaNorte"),
- "Mexico/BajaSur" : _("Mexico BajaSur"),
"America/Asuncion" : _("Asuncion"),
+ // time zone
"America/Barbados" : _("Barbados"),
+ // time zone
"America/Bogota" : _("Bogota"),
- "America/Buenos_Aires" : _("Buenos Aires"),
+ // time zone
+ "America/Argentina/Buenos_Aires" : _("Buenos Aires"),
// time zone
"America/Cayenne" : _("Cayenne"),
+ // time zone
"America/Caracas" : _("Caracas"),
+ // time zone
"America/Costa_Rica" : _("Costa Rica"),
+ // time zone
"America/Dominica" : _("Dominica"),
+ // time zone
"America/El_Salvador" : _("El Salvador"),
+ // time zone
"America/Grenada" : _("Grenada"),
+ // time zone
"America/Guadeloupe" : _("Guadeloupe"),
+ // time zone
"America/Guatemala" : _("Guatemala"),
// time zone
"America/Guyana" : _("Guyana"),
+ // time zone
"America/Lima" : _("Lima"),
+ // time zone
"America/Managua" : _("Managua"),
+ // time zone
"America/Martinique" : _("Martinique"),
+ // time zone
"America/Panama" : _("Panama"),
+ // time zone
"America/Puerto_Rico" : _("Puerto Rico"),
+ // time zone
"America/Montevideo" : _("Uruguay"),
// time zone
- "America/Virgin" : _("Virgin Islands"),
- "Mexico/General" : _("Mexico General") ] ],
+ "America/St_Thomas" : _("Virgin Islands"),
+ // time zone
+ "Atlantic/Stanley" : _("Stanley"),
+ ]
+],
$[
// name of region
@@ -176,18 +254,14 @@
]
],
-$[ "name" : _("Asia"),
- "entries" : $[
- // time zone
- "Japan" : _("Japan"),
- // time zone
- "PRC" : _("China"),
+$[
+ // name of region
+ "name" : _("Asia"),
+ "entries" : $[
// time zone
- "ROK" : _("Korea"),
+ "Asia/Almaty" : _("Almaty"),
// time zone
- "Hongkong" : _("Hongkong"),
- // time zone
- "Asia/Kabul" : _("Afghanistan"),
+ "Asia/Ashgabat" : _("Ashgabat"),
// time zone
"Asia/Anadyr" : _("Anadyr"),
// time zone
@@ -195,6 +269,8 @@
// time zone
"Asia/Bahrain" : _("Bahrain"),
// time zone
+ "Asia/Baku" : _("Baku"),
+ // time zone
"Asia/Bangkok" : _("Bangkok"),
// time zone
"Asia/Beirut" : _("Beirut"),
@@ -215,10 +291,18 @@
// time zone
"Asia/Gaza" : _("Gaza"),
// time zone
+ "Asia/Hong_Kong" : _("Hongkong"),
+ // time zone
"Asia/Irkutsk" : _("Irkutsk"),
// time zone
"Asia/Jakarta" : _("Jakarta"),
// time zone
+ "Asia/Jerusalem" : _("Israel"),
+ // time zone
+ "Asia/Kabul" : _("Afghanistan"),
+ // time zone
+ "Asia/Karachi" : _("Karachi"),
+ // time zone
"Asia/Kamchatka" : _("Kamchatka"),
// time zone
"Asia/Katmandu" : _("Katmandu"),
@@ -229,18 +313,22 @@
// time zone
"Asia/Kuwait" : _("Kuwait"),
// time zone
- "Asia/Macao" : _("Macao"),
+ "Asia/Macau" : _("Macao"),
// time zone
"Asia/Magadan" : _("Magadan"),
// time zone
"Asia/Manila" : _("Manila"),
// time zone
+ "Asia/Nicosia" : _("Nicosia"),
+ // time zone
"Asia/Novosibirsk" : _("Novosibirsk"),
// time zone
"Asia/Omsk" : _("Omsk"),
// time zone
"Asia/Phnom_Penh" : _("Phnom Penh"),
// time zone
+ "Asia/Pyongyang" : _("Pyongyang"),
+ // time zone
"Asia/Qatar" : _("Qatar"),
// time zone
"Asia/Rangoon" : _("Myanmar"),
@@ -255,8 +343,6 @@
// time zone
"Asia/Tehran" : _("Tehran"),
// time zone
- "Asia/Tel_Aviv" : _("Tel Aviv"),
- // time zone
"Asia/Thimphu" : _("Thimphu"),
// time zone
"Asia/Vladivostok" : _("Vladivostok"),
@@ -267,11 +353,13 @@
// time zone
"Asia/Shanghai" : _("Shanghai"),
// time zone
+ "Asia/Beijing" : _("Beijing"),
+ // time zone
"Asia/Taipei" : _("Taipei"),
// time zone
"Asia/Seoul" : _("Seoul"),
// time zone
- "Israel" : _("Israel"),
+ "Asia/Riyadh" : _("Riyadh"),
// time zone
"Mideast/Riyadh87" : _("Mideast Riyadh87"),
// time zone
@@ -281,25 +369,53 @@
// time zone
"Asia/Singapore" : _("Singapore"),
// time zone
+ "Asia/Tbilisi" : _("Tbilisi"),
+ // time zone
+ "Asia/Tokyo" : _("Japan"),
+ // time zone
+ "Asia/Ulaanbaatar" : _("Ulan Bator"),
+ // time zone
+ "Asia/Vientiane" : _("Vientiane"),
+ // time zone
"Asia/Yakutsk" : _("Yakutsk"),
+ // time zone
+ "Asia/Yerevan" : _("Yerevan"),
]
],
$[ "name" : _("Australia"),
"entries" : $[
- "Australia/North" : _("Northern Territory--Darwin"),
- "Australia/Queensland" : _("Queensland--Brisbane"),
- "Australia/South" : _("South Australia--Adelaide"),
- "Australia/NSW" : _("New South Wales--Sydney"),
- "Australia/ACT" : _("Australian Capital Territory--Canberra"),
- "Australia/Tasmania" : _("Tasmania--Hobart"),
- "Australia/Victoria" : _("Victoria--Melbourne"),
- "Australia/West" : _("Western Australia--Perth"),
+ // time zone
+ "Australia/Lord_Howe" : _("Lord Howe Island"),
+ // time zone
+ "Australia/Darwin" : _("Northern Territory--Darwin"),
+ // time zone
+ "Australia/Brisbane" : _("Queensland--Brisbane"),
+ // time zone
+ "Australia/Adelaide" : _("South Australia--Adelaide"),
+ // time zone
+ "Australia/Sydney" : _("New South Wales--Sydney"),
+ // time zone
+ "Australia/Broken_Hill" : _("New South Wales--Broken Hill"),
+ // time zone
+// "Australia/Canberra" : _("Australian Capital Territory--Canberra"),
+ // time zone
+ "Australia/Hobart" : _("Tasmania--Hobart"),
+ // time zone
+ "Australia/Currie" : _("Tasmania--Currie"),
+ // time zone
+ "Australia/Melbourne" : _("Victoria--Melbourne"),
+ // time zone
+ "Australia/Perth" : _("Western Australia--Perth"),
]
],
$[ "name" : _("Africa"),
"entries" : $[
+ // time zone
+ "Indian/Antananarivo" : _("Antananarivo"),
+ // time zone
+ "Africa/Addis_Ababa" : _("Addis Ababa"),
"Africa/Algiers" : _("Algiers"),
"Africa/Brazzaville" : _("Brazzaville"),
"Africa/Casablanca" : _("Casablanca"),
@@ -309,21 +425,35 @@
"Africa/Djibouti" : _("Djibouti"),
"Africa/Freetown" : _("Freetown"),
"Africa/Johannesburg" : _("Johannesburg"),
+ // time zone
+ "Africa/Kampala" : _("Kampala"),
+ // time zone
+ "Africa/Khartoum" : _("Khartoum"),
+ // time zone
+ "Africa/Kinshasa" : _("Kinshasa"),
+ // time zone
+ "Africa/Kigali" : _("Kigali"),
+ // time zone
+ "Africa/Lusaka" : _("Lusaka"),
"Africa/Libreville" : _("Libreville"),
+ // time zone
+ "Africa/Maputo" : _("Maputo"),
+ // time zone
+ "Africa/Mogadishu" : _("Mogadishu"),
"Africa/Monrovia" : _("Monrovia"),
"Africa/Nairobi" : _("Nairobi"),
- "Africa/Timbuktu" : _("Timbuktu"),
+ // time zone
+ "Africa/Bamako" : _("Bamako"),
"Africa/Tunis" : _("Tunis"),
"Africa/Windhoek" : _("Windhoek"),
"Africa/Cairo" : _("Cairo"),
- "Egypt" : _("Egypt"),
- "Africa/Tripoli" : _("Tripoli") ] ],
+ "Africa/Tripoli" : _("Tripoli") ]
+],
$[ "name" : _("Pacific"),
"entries" : $[
"Pacific/Auckland" : _("New Zealand"),
"Pacific/Fiji" : _("Fiji"),
- "Pacific/Galapagos" : _("Galapagos"),
"Pacific/Guadalcanal" : _("Guadalcanal"),
"Pacific/Guam" : _("Guam"),
"Pacific/Midway" : _("Midway"),
@@ -331,12 +461,22 @@
"Pacific/Palau" : _("Palau"),
"Pacific/Pitcairn" : _("Pitcairn"),
"Pacific/Tahiti" : _("Tahiti"),
- "Pacific/Samoa" : _("Samoa") ] ],
+ "Pacific/Pago_Pago" : _("Samoa"),
+ // time zone
+ "Pacific/Port_Moresby" : _("Port_Moresby"),
+ // time zone
+ "Pacific/Dili" : _("Dili"),
+ ]
+],
$[ "name" : _("Global"),
"entries" : $[
+ // time zone
"Antarctica/South_Pole" : _("South Pole"),
- "Arctic/Longyearbyen" : _("Arctic Longyearbyen"),
+ // time zone
+ "Arctic/Longyearbyen" : _("Arctic Longyearbyen"),
+ // time zone
+ "America/Godthab" : _("Greenland--Nuuk"),
"CET" : _("CET"),
"CST6CDT" : _("CST6CDT"),
"EET" : _("EET"),
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-country-2.16.4/timezone/src/dialogs.ycp new/yast2-country-2.16.5/timezone/src/dialogs.ycp
--- old/yast2-country-2.16.4/timezone/src/dialogs.ycp 2007-12-07 15:11:03.000000000 +0100
+++ new/yast2-country-2.16.5/timezone/src/dialogs.ycp 2007-12-21 15:54:35.000000000 +0100
@@ -9,14 +9,15 @@
* Jiri Suchomel
*
* Summary:
- * Dialogs for timezone and time configuration.
+ * Dialogs for timeone and time configuration.
*
- * $Id: dialogs.ycp 40975 2007-09-20 07:00:40Z jsuchome $
+ * $Id: dialogs.ycp 42833 2007-12-07 22:45:25Z jsuchome $
*/
{
textdomain "country";
import "Arch";
+ import "Directory";
import "Label";
import "Language";
import "Mode";
@@ -391,40 +392,80 @@
boolean textmode = Language::GetTextMode ();
- boolean ntp = false;
- term ntp_term = `Frame (_("NTP Synchronization"), `VBox (`HBox (
- `HSpacing (0.5),
- `Label (`id(`ntp), _("NTP is not configured")),
- // button label
- `Right (`PushButton (`id (`ntp_configure), _("Change..."))),
- `HSpacing (1)
- ), `VSpacing (0.2)));
- term contents = `MarginBox (
- `leftMargin (2), `rightMargin (2), `topMargin (0), `bottomMargin (0.2),
- `VBox (
+ term timezoneterm = `HBox (
+ region,
+ `HSpacing (),
+ timezonesel
+ );
+ boolean timezone_selector = false;
+
+ list<map> zonemap = Timezone::get_zonemap ();
+
+ // map of zones conversions
+ map yast2zonetab = Timezone::yast2zonetab;
+
+ // map of timezone -> translated label to be passed to TimezoneSelector
+ map zones = $[];
+
+ // cache the zonemap with the order sorted according to current locale
+ list sorted_zonemap = maplist (map region, zonemap, {
+ list trl = maplist (
+ string key, string name, (map)region["entries"]:$[],
+ {
+ zones[yast2zonetab[key]:key] = name;
+ return [ name, key ];
+ });
+ trl = sort (list a, list b, (list<list>) trl, {
+ list lsorted = lsort ([a[0]:"", b[0]:""]);
+ return (lsorted[0]:"" == a[0]:"" && a[0]:"" != b[0]:"");
+ });
+ return $[
+ "name" : region["name"]:"",
+ "entries" : trl,
+ ];
+ });
+
+ if (UI::HasSpecialWidget(`TimezoneSelector))
+ {
+ timezone_selector = true;
+ string worldmap = Directory::themedir + "/current/worldmap/GLOBALeb10colshade.jpg";
+ timezoneterm = `VBox (
+ `TimezoneSelector (`id(`timezonemap), `opt(`notify), worldmap,
+ zones),
`HBox (
- region,
+ `HWeight (1,
+ `ComboBox (`id(`region), `opt(`notify),
+ // label text
+ _("&Region"),Timezone::Region())
+ ),
`HSpacing (),
- timezonesel
- ),
+ `HWeight (1, `ReplacePoint (`id(`tzsel),
+ // title for combo box 'timezone'
+ `ComboBox (`id (`timezone), `opt(`notify), _("Time &Zone"))
+ ))
+ )
+ );
+ }
+ term hwclock_term = `VBox (
+ `ComboBox (`id (`hwclock), `opt(`hstretch, `notify),
+ // combo box label
+ _("&Hardware Clock Set To"), [
+ // ComboBox entry: clock set to local time
+ `item (`id (`hwclock_localtime), _("Local Time"),
+ (hwclock == "--localtime")),
+ // ComboBox entry: clock set UTC
+ `item (`id(`hwclock_utc ), _("UTC"), (hwclock == "-u")),
+ ]),
+ textmode ? `Label ("") : `Empty ()
+ );
+ term contents = `MarginBox (
+ `leftMargin (2), `rightMargin (2), `topMargin (0), `bottomMargin (0.2),
+ `VBox (
+ timezoneterm,
`VSpacing (0.2),
`VSquash (`HBox (
`HWeight (1,
- utc_only ? `Empty () : `VBox (
- `ComboBox (
- `id (`hwclock), `opt(`hstretch, `notify),
- // combo box label
- _("&Hardware Clock Set To"),
- [
- // ComboBox entry: clock set to local time
- `item (`id (`hwclock_localtime), _("Local Time"),
- (hwclock == "--localtime")),
-
- // ComboBox entry: clock set UTC
- `item (`id(`hwclock_utc ), _("UTC"),
- (hwclock == "-u"))
- ]
- ), textmode ? `Label ("") : `Empty ())
+ utc_only ? `Empty () : hwclock_term
),
`HSpacing (1),
// frame label
@@ -445,6 +486,59 @@
))
)
);
+ // cache for lists with timezone items
+ map timezones_for_region = $[];
+ list get_timezones_for_region (integer region, string zone) {
+
+ return maplist (list entry, sorted_zonemap[region,"entries"]:[],
+ {
+ return `item (`id(entry[1]:""), entry[0]:"", entry[1]:"" == zone);
+ });
+ }
+ // region was seleced: show the correct list of timezones
+ void show_selected_region (integer sel, string zone) {
+
+ if (timezone_selector)
+ UI::ChangeWidget (`id(`region), `Value, sel);
+ else
+ UI::ChangeWidget (`id(`region), `CurrentItem, sel);
+
+ UI::ReplaceWidget (`id(`tzsel), timezone_selector ?
+ `ComboBox (`id(`timezone), `opt(`notify),
+ // label text
+ _("Time &Zone"), get_timezones_for_region (sel, zone)
+ ) :
+ `SelectionBox ( `id(`timezone), `opt(`notify),
+ // label text
+ _("Time &Zone"), get_timezones_for_region (sel, zone)
+ )
+ );
+ }
+ // which region is selected?
+ integer selected_region () {
+ return timezone_selector ?
+ (integer)UI::QueryWidget (`id(`region), `Value) :
+ (integer)UI::QueryWidget (`id(`region), `CurrentItem);
+ }
+ // which timezone is selected?
+ string selected_timezone () {
+ return timezone_selector ?
+ (string) UI::QueryWidget(`id(`timezone), `Value) :
+ (string) UI::QueryWidget(`id(`timezone), `CurrentItem);
+ }
+
+ // for given timezone (selected in map), find out to which region it belongs
+ integer get_region_for_timezone (string zone) {
+ integer reg = 0;
+ foreach (map region, zonemap, {
+ if (haskey (region["entries"]:$[], zone))
+ {
+ break;
+ }
+ reg = reg + 1;
+ });
+ return reg;
+ }
// help for timezone screen
string help_text = _("
@@ -494,13 +588,12 @@
symbol hwclock_s_old = hwclock_s;
hwclock_s_initial = hwclock_s;
- UI::ChangeWidget (`id(`region), `CurrentItem, sel);
- UI::ReplaceWidget (`id(`tzsel),
- `SelectionBox ( `id(`timezone), `opt(`notify),
- // label text
- _("Time &Zone"), Timezone::Selection (sel))
- );
- UI::ChangeWidget (`id(`timezone), `CurrentItem, Timezone::timezone);
+ show_selected_region (sel, timezone);
+ if (timezone_selector)
+ {
+ UI::ChangeWidget (`id(`timezonemap), `CurrentItem,
+ yast2zonetab[timezone]:timezone);
+ }
UI::SetFocus (`id(`region));
@@ -518,17 +611,9 @@
}
if (ret == `region)
{
- integer num = (integer)UI::QueryWidget( `id(`region), `CurrentItem);
- y2milestone ("selected region %1", num);
- UI::ReplaceWidget (`id(`tzsel),
- `SelectionBox ( `id(`timezone), `opt(`notify),
- // label text
- _("Time &Zone"), Timezone::Selection (num))
- );
- if (num == sel)
- {
- UI::ChangeWidget (`id(`timezone), `CurrentItem, timezone);
- }
+ integer num = selected_region ();
+ show_selected_region (num, timezone);
+// FIXME zoom the map (select something in the center of region)
}
else if (ret == `settime)
{
@@ -540,7 +625,8 @@
changed_time = true;
}
}
- else if (ret == `next || ret == `timezone || ret == `hwclock)
+ else if (ret == `next || ret == `timezone || ret == `timezonemap ||
+ ret == `hwclock)
{
// Get current settings.
// UTC vs. localtime, only if needed
@@ -550,13 +636,29 @@
{
hwclock_s = (symbol)UI::QueryWidget( `id(`hwclock), `Value );
}
+ if (ret == `timezonemap)
+ {
+ timezone = (string) UI::QueryWidget(`id(`timezonemap),`Value);
+
+ integer reg = get_region_for_timezone (timezone);
+ if (reg == sel)
+ UI::ChangeWidget (`id(`timezone), `Value, timezone);
+ else
+ {
+ sel = reg;
+ show_selected_region (sel, timezone);
+ }
+ }
+ else
+ timezone = selected_timezone ();
if (ret == `timezone)
{
- sel = (integer)UI::QueryWidget( `id(`region), `CurrentItem );
+ sel = selected_region ();
+ if (timezone_selector)
+ UI::ChangeWidget (`id(`timezonemap), `Value,
+ yast2zonetab[timezone]:timezone);
}
- timezone = (string)UI::QueryWidget( `id(`timezone ), `CurrentItem );
-
if (timezone == nil || size(timezone) == 0)
{
// popup text
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-country-2.16.4/timezone/src/Timezone.ycp new/yast2-country-2.16.5/timezone/src/Timezone.ycp
--- old/yast2-country-2.16.4/timezone/src/Timezone.ycp 2007-09-20 09:00:41.000000000 +0200
+++ new/yast2-country-2.16.5/timezone/src/Timezone.ycp 2007-12-21 14:57:03.000000000 +0100
@@ -56,9 +56,73 @@
*/
global boolean windows_partition = false;
-// internal map used to store initial data
-map push = $[];
+// translation of correct timezone to the one that could be shown in map widget
+global map yast2zonetab = $[
+ "Mideast/Riyadh87" : "Asia/Riyadh",
+ "Mideast/Riyadh88" : "Asia/Riyadh",
+ "Mideast/Riyadh89" : "Asia/Riyadh",
+];
+
+// on init, translate these to correct ones
+global map obsoleted_zones = $[
+ "Iceland" : "Atlantic/Reykjavik",
+ "Europe/Belfast" : "Europe/London",
+
+ "Australia/South" : "Australia/Adelaide",
+ "Australia/North" : "Australia/Darwin",
+ "Australia/NSW" : "Australia/Sydney",
+ "Australia/ACT" : "Australia/Canberra",
+ "Australia/Queensland" : "Australia/Brisbane",
+ "Australia/Tasmania" : "Australia/Hobart",
+ "Australia/Victoria" : "Australia/Melbourne",
+ "Australia/West" : "Australia/Perth",
+
+ "US/Alaska" : "America/Anchorage",
+ "US/Aleutian" : "America/Adak",
+ "US/Arizona" : "America/Phoenix",
+ "US/Central" : "America/Chicago",
+ "US/East-Indiana" : "America/Indiana/Indianapolis",
+ "US/Hawaii" : "Pacific/Honolulu",
+ "US/Indiana-Starke" : "America/Indiana/Knox",
+ "US/Michigan" : "America/Detroit",
+ "US/Mountain" : "America/Denver",
+ "US/Pacific" : "America/Los_Angeles",
+ "US/Samoa" : "Pacific/Pago_Pago",
+ "US/Eastern" : "America/New_York",
+
+ "Canada/Atlantic" : "America/Halifax",
+ "Canada/Central" : "America/Winnipeg",
+ "Canada/Eastern" : "America/Toronto",
+ "Canada/Saskatchewan" : "America/Regina",
+ "Canada/East-Saskatchewan" : "America/Regina",
+ "Canada/Mountain" : "America/Edmonton",
+ "Canada/Newfoundland" : "America/St_Johns",
+ "Canada/Pacific" : "America/Vancouver",
+ "Canada/Yukon" : "America/Whitehorse",
+
+ "America/Buenos_Aires" : "America/Argentina/Buenos_Aires",
+ "America/Virgin" : "America/St_Thomas",
+ "Brazil/Acre" : "America/Rio_Branco",
+ "Brazil/East" : "America/Sao_Paulo",
+ "Brazil/West" : "America/Manaus",
+ "Chile/Continental" : "America/Santiago",
+ "Chile/EasterIsland" : "Pacific/Easter",
+ "Mexico/BajaNorte" : "America/Tijuana",
+ "Mexico/BajaSur" : "America/Mazatlan",
+ "Mexico/General" : "America/Mexico_City",
+ "Jamaica" : "America/Jamaica",
+
+ "Asia/Macao" : "Asia/Macau",
+ "Israel" : "Asia/Jerusalem",
+ "Asia/Tel_Aviv" : "Asia/Jerusalem",
+ "Hongkong" : "Asia/Hong_Kong",
+ "Japan" : "Asia/Tokyo",
+ "ROK" : "Asia/Seoul",
+
+ "Africa/Timbuktu" : "Africa/Bamako",
+ "Egypt" : "Africa/Cairo",
+];
// ------------------------------------------------------------------
// END: Globally defined data to be accessed via Timezone::<variable>
// ------------------------------------------------------------------
@@ -69,6 +133,10 @@
// START: Locally defined data
// ------------------------------------------------------------------
+// internal map used to store initial data
+map push = $[];
+
+
string name = "";
list < map < string, any> > zonemap = [];
@@ -163,8 +231,9 @@
//
if (!Mode::config () && really )
{
+ boolean inst = Stage::initial () || Stage::cont() || Stage::firstboot();
boolean textmode = Language::GetTextMode ();
- if ((Stage::initial () || Stage::cont ()) && !textmode)
+ if (inst && !textmode)
SCR::Execute ( .target.bash, "/usr/bin/xset -dpms");
string cmd = "/usr/sbin/zic -l " + timezone;
y2milestone( "Set cmd %1", cmd );
@@ -175,7 +244,7 @@
y2milestone( "Set cmd %1", cmd );
y2milestone( "Set ret %1", SCR::Execute(.target.bash_output, cmd ));
}
- if ((Stage::initial () || Stage::cont ()) && !textmode)
+ if (inst && !textmode)
SCR::Execute ( .target.bash, "/usr/bin/xset +dpms");
}
@@ -200,21 +269,9 @@
string updated_tmz = tmz;
- map tmz_duplicates = $[
- "Australia/Adelaide" : "Australia/South",
- "Australia/Darwin" : "Australia/North",
- "Australia/Sydney" : "Australia/NSW",
- "Australia/Canberra" : "Australia/ACT",
- "Australia/Brisbane" : "Australia/Queensland",
- "Australia/Hobart" : "Australia/Tasmania",
- "Australia/Perth" : "Australia/West",
- // etc.
- "America/Los_Angeles" : "US/Pacific",
- ];
-
- if (haskey (tmz_duplicates, tmz))
+ if (haskey (obsoleted_zones, tmz))
{
- updated_tmz = tmz_duplicates[tmz]:tmz;
+ updated_tmz = obsoleted_zones[tmz]:tmz;
y2milestone ("updating timezone from %1 to %2", tmz, updated_tmz);
// TODO if still not present, search file in /usr/share/zoneinfo
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-country-2.16.4/timezone/testsuite/tests/UpdateTimezone.out new/yast2-country-2.16.5/timezone/testsuite/tests/UpdateTimezone.out
--- old/yast2-country-2.16.4/timezone/testsuite/tests/UpdateTimezone.out 2005-09-08 10:34:46.000000000 +0200
+++ new/yast2-country-2.16.5/timezone/testsuite/tests/UpdateTimezone.out 2007-12-21 15:58:41.000000000 +0100
@@ -1,3 +1,3 @@
-Return US/Pacific
-Return Australia/South
-Return Australia/South
+Return America/Los_Angeles
+Return Australia/Adelaide
+Return Australia/Adelaide
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-country-2.16.4/VERSION new/yast2-country-2.16.5/VERSION
--- old/yast2-country-2.16.4/VERSION 2007-12-07 15:54:10.000000000 +0100
+++ new/yast2-country-2.16.5/VERSION 2007-12-21 15:54:31.000000000 +0100
@@ -1 +1 @@
-2.16.4
+2.16.5
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org