Hello community,
here is the log from the commit of package yast2-country
checked in at Sun Apr 6 10:19:34 CEST 2008.
--------
--- yast2-country/yast2-country.changes 2008-03-30 21:08:31.000000000 +0200
+++ yast2-country/yast2-country.changes 2008-04-04 16:26:41.214197000 +0200
@@ -1,0 +2,16 @@
+Fri Apr 4 16:13:27 CEST 2008 - jsuchome@suse.cz
+
+- added support for Thai language (th_TH)
+- changed names of language images loaded in the first stage: they
+ are rpm's now (bnc#376870)
+- reworked NTP client usage for fate#302917: show current time
+ after ntpdate was called, check initial service status
+- 2.16.14
+
+-------------------------------------------------------------------
+Fri Apr 4 15:59:00 CEST 2008 - jsrain@suse.cz
+
+- avoid calling PackageCallbacksInit::InitPackageCallbacks () to
+ prevent testsuites of other packages from failing
+
+-------------------------------------------------------------------
Old:
----
yast2-country-2.16.13.tar.bz2
New:
----
yast2-country-2.16.14.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-country.spec ++++++
--- /var/tmp/diff_new_pack.X18594/_old 2008-04-06 09:52:04.000000000 +0200
+++ /var/tmp/diff_new_pack.X18594/_new 2008-04-06 09:52:04.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-country (Version 2.16.13)
+# spec file for package yast2-country (Version 2.16.14)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -12,12 +12,12 @@
Name: yast2-country
-Version: 2.16.13
+Version: 2.16.14
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-country-2.16.13.tar.bz2
+Source0: yast2-country-2.16.14.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
@@ -68,7 +68,7 @@
Jiri Suchomel
%prep
-%setup -n yast2-country-2.16.13
+%setup -n yast2-country-2.16.14
%build
%{prefix}/bin/y2tool y2autoconf
@@ -136,6 +136,16 @@
/usr/share/YaST2/data/languages/*.ycp
/usr/share/YaST2/modules/Language.y*
%changelog
+* Fri Apr 04 2008 jsuchome@suse.cz
+- added support for Thai language (th_TH)
+- changed names of language images loaded in the first stage: they
+ are rpm's now (bnc#376870)
+- reworked NTP client usage for fate#302917: show current time
+ after ntpdate was called, check initial service status
+- 2.16.14
+* Fri Apr 04 2008 jsrain@suse.cz
+- avoid calling PackageCallbacksInit::InitPackageCallbacks () to
+ prevent testsuites of other packages from failing
* Sun Mar 30 2008 jsuchome@suse.cz
- merged proofread texts
- 2.16.13
++++++ yast2-country-2.16.13.tar.bz2 -> yast2-country-2.16.14.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-country-2.16.13/language/data/language_th_TH.ycp new/yast2-country-2.16.14/language/data/language_th_TH.ycp
--- old/yast2-country-2.16.13/language/data/language_th_TH.ycp 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-country-2.16.14/language/data/language_th_TH.ycp 2008-04-02 13:25:46.000000000 +0200
@@ -0,0 +1,43 @@
+/**
+ * This file contains the description of the language needed by yast2-country
+ * module.
+ *
+ * Translation of the 'language name' to actual YaST language be must applied
+ * each time this file is invoked.
+ *
+ * If you want to add new language to YaST using a file of this type provided
+ * by some module different from yast2-country (e.g. in some Add-On Product),
+ * consider using special textdomain, so it is possible to provide also
+ * translations of the 'language name' string to all installed languages.
+ *
+ * Author: Jiří Suchomel
+ * $Id: language_ta_IN.ycp 35764 2007-02-01 09:24:38Z jsuchome $
+ */
+{
+ textdomain "languages_db";
+
+ return
+ $[
+ // 1. information for language selection:
+ // Format is
+ // <LANG-Code> : [
+ // <Language-to-display-UTF8-coded>,
+ // <Language-to-display-ASCII-coded-if-needed>,
+ // <LANG modifier used when UTF-8 enconding is selected>
+ // <LANG modifier used when no UTF-8 enconding is selected>
+ // <translated Language-to-display-UTF8-coded> ]
+ //
+ "th_TH" : [
+ "ภาษาไทย",
+ "phasa thai",
+ ".UTF-8",
+ "",
+ // language name
+ _("Thai")
+ ],
+ // 2. what time zone propose for this language
+ "timezone" : "Asia/Bangkok",
+ // 3. which keyboard layout propose for this language
+ "keyboard" : "english-us",
+ ];
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-country-2.16.13/language/src/modules/Language.ycp new/yast2-country-2.16.14/language/src/modules/Language.ycp
--- old/yast2-country-2.16.13/language/src/modules/Language.ycp 2008-03-30 21:06:16.000000000 +0200
+++ new/yast2-country-2.16.14/language/src/modules/Language.ycp 2008-04-04 16:04:36.000000000 +0200
@@ -6,7 +6,7 @@
* Thomas Roelz
* Maintainer: Jiri Suchomel
*
- * $Id: Language.ycp 45015 2008-02-26 11:51:14Z jsuchome $
+ * $Id: Language.ycp 46108 2008-04-04 14:00:44Z jsrain $
*/
{
@@ -23,7 +23,7 @@
import "Linuxrc";
import "Misc";
import "Mode";
-import "PackageCallbacksInit";
+import "PackageCallbacks";
import "PackageSystem";
import "Popup";
import "ProductFeatures";
@@ -325,11 +325,11 @@
}
// Default fallback
- string filename = "root.en_US";
+ string filename = "yast2-trans-en_US.rpm";
foreach (string one_language, check_for_languages, {
if (contains (available_lang_filenames, one_language)) {
- filename = sformat ("root.%1", one_language);
+ filename = sformat ("yast2-trans-%1.rpm", one_language);
break;
}
});
@@ -866,7 +866,7 @@
*/
global define boolean PackagesCommit () {
- PackageCallbacksInit::InitPackageCallbacks ();
+ PackageCallbacks::InitPackageCallbacks ();
Pkg::PkgCommit (0);
return true;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-country-2.16.13/timezone/src/dialogs.ycp new/yast2-country-2.16.14/timezone/src/dialogs.ycp
--- old/yast2-country-2.16.13/timezone/src/dialogs.ycp 2008-03-30 21:06:16.000000000 +0200
+++ new/yast2-country-2.16.14/timezone/src/dialogs.ycp 2008-04-04 15:44:17.000000000 +0200
@@ -11,7 +11,7 @@
* Summary:
* Dialogs for timeone and time configuration.
*
- * $Id: dialogs.ycp 45714 2008-03-26 08:30:55Z jsuchome $
+ * $Id: dialogs.ycp 45876 2008-03-30 19:08:46Z jsuchome $
*/
{
textdomain "country";
@@ -66,14 +66,44 @@
// help text, cont.
_("<p>Press <b>Accept</b> to save your changes. Synchronization with the NTP server can be done only when the network is configured.</p>");
- map val = Timezone::GetDateTimeMap();
+ boolean dt_widgets = false;
- string hour = val["hour"]:"";
- string minute = val["minute"]:"";
- string second = val["second"]:"";
- string day = val["day"]:"";
- string month = val["month"]:"";
- string year = val["year"]:"";
+ string hour = "";
+ string minute = "";
+ string second = "";
+ string day = "";
+ string month = "";
+ string year = "";
+
+ // check current time and show it in the time widgets
+ void show_current_time () {
+
+ map val = Timezone::GetDateTimeMap();
+ hour = val["hour"]:"";
+ minute = val["minute"]:"";
+ second = val["second"]:"";
+ day = val["day"]:"";
+ month = val["month"]:"";
+ year = val["year"]:"";
+
+ if (dt_widgets)
+ {
+ UI::ChangeWidget (`id (`date), `Value,
+ sformat ("%1-%2-%3", year, month, day));
+ UI::ChangeWidget (`id (`time), `Value,
+ sformat ("%1:%2:%3", hour, minute, second)
+ );
+ }
+ else
+ {
+ UI::ChangeWidget (`id(`hour), `Value, hour);
+ UI::ChangeWidget (`id(`minute), `Value, minute);
+ UI::ChangeWidget (`id(`second), `Value, second);
+ UI::ChangeWidget (`id(`day), `Value, day);
+ UI::ChangeWidget (`id(`month), `Value, month);
+ UI::ChangeWidget (`id(`year), `Value, year);
+ }
+ }
term dateterm = `VBox (
`HBox (
@@ -83,11 +113,11 @@
),
`HBox (
`HSpacing(10),
- `TextEntry( `id(`day), `opt(`shrinkable), "", day),
+ `TextEntry( `id(`day), `opt(`shrinkable), ""),
`HSpacing (),
- `TextEntry( `id(`month), `opt(`shrinkable), "", month),
+ `TextEntry( `id(`month), `opt(`shrinkable), ""),
`HSpacing (),
- `TextEntry( `id(`year), `opt(`shrinkable), "", year),
+ `TextEntry( `id(`year), `opt(`shrinkable), ""),
`HSpacing(30)
)
);
@@ -99,33 +129,32 @@
),
`HBox (
`HSpacing(10),
- `TextEntry (`id(`hour), `opt(`shrinkable), "", hour),
+ `TextEntry (`id(`hour), `opt(`shrinkable), ""),
`HSpacing (),
- `TextEntry (`id(`minute), `opt(`shrinkable), "", minute),
+ `TextEntry (`id(`minute), `opt(`shrinkable), ""),
`HSpacing (),
- `TextEntry (`id(`second), `opt(`shrinkable), "", second),
+ `TextEntry (`id(`second), `opt(`shrinkable), ""),
`HSpacing(30)
)
);
- boolean dt_widgets = false;
if (UI::HasSpecialWidget (`Date) && UI::HasSpecialWidget (`Time))
{
dateterm = `HBox (
// label text
- `Date (`id(`date), _("Current Date"),
- sformat ("%1-%2-%3", year, month, day)
- )
+ `Date (`id(`date), _("Current Date"), "")
);
timeterm = `HBox (
// label text
- `Time (`id(`time), _("Current Time"),
- sformat ("%1:%2:%3", hour, minute, second)
- )
+ `Time (`id(`time), _("Current Time"), "")
);
dt_widgets = true;
}
- void enable_disable_widgets ( boolean ntp_used) {
+ boolean ntp_used = false;
+ boolean ntp_was_used = false;
+
+ void enable_disable_widgets () {
+ /*
if (!dt_widgets)
{
foreach (symbol widget, [`hour, `minute, `second, `day, `month, `year],{
@@ -137,62 +166,73 @@
UI::ChangeWidget (`id (`date), `Enabled, !ntp_used);
UI::ChangeWidget (`id (`time), `Enabled, !ntp_used);
}
+ */
UI::ChangeWidget (`id (`ntp_address), `Enabled, ntp_used);
UI::ChangeWidget (`id (`ntp_configure), `Enabled, ntp_used);
+ UI::ChangeWidget (`id (`ntp_now), `Enabled, ntp_used);
+ UI::ChangeWidget (`id (`ntp_save), `Enabled, ntp_used);
}
void handle_invalid_hostname( string server ) {
Popup::Error( sformat("Invalid NTP server hostname %1", server) );
}
- boolean ntp_used = false;
-
- void CreateUI() {
+ // param: when asking for first time, we check if service is running
+ void CreateUI (boolean first_time) {
WFM::CallFunction("ntp-client_proposal", ["CreateUI"]);
- ntp_used = (boolean) WFM::CallFunction("ntp-client_proposal", ["GetUseNTP"]);
+ if (first_time && !Stage::initial ())
+ ntp_used = (boolean)
+ WFM::CallFunction("ntp-client_proposal", ["GetNTPEnabled"]);
+ else
+ ntp_used = (boolean)
+ WFM::CallFunction("ntp-client_proposal", ["GetUseNTP"]);
if ( UI::WidgetExists(`id(`ntp_content)) )
{
UI::ChangeWidget(`id(`rb), `CurrentButton, (ntp_used ? `ntp : `manual));
- enable_disable_widgets(ntp_used);
+ enable_disable_widgets ();
+ if (first_time)
+ // ntp_used with first_time means that ntp service is enabled
+ UI::ChangeWidget (`id(`ntp_save), `Value, ntp_used);
}
}
term cont = `HBox (
- `RadioButtonGroup (`id (`rb), `HCenter (`VBox (
- `Left (`VBox (
- // radio button label (= how to setup time)
- `Left (`RadioButton (`id (`manual), `opt (`notify), _("Manually"))),
- `VSpacing (0.5),
- `HBox (
- `HSpacing (3),
- `VBox (
- `Left (timeterm),
- `VSpacing(),
- `Left (dateterm)
- )
- ),
- `VSpacing (1),
- `Left (`VBox ( `id(`ntp_content),
- `Left (`RadioButton (`id (`ntp), `opt (`notify),
- // radio button label
- _("Synchronize with NTP Server"), false)),
- `ReplacePoint(`id(`rp), `Empty())
- )
+ `HWeight (1, `VBox ()),
+ `HWeight (4, `RadioButtonGroup (`id (`rb), `VBox (
+ // radio button label (= how to setup time)
+ `Left (`RadioButton (`id (`manual), `opt (`notify), _("Manually"))),
+ `VSpacing (0.5),
+ `HBox (
+ `HSpacing (3),
+ `VBox (
+ `Left (timeterm),
+ `VSpacing(),
+ `Left (dateterm)
)
- ))
- ))));
-
+ ),
+ `VSpacing (1),
+ `VBox (`id(`ntp_content),
+ `Left (`RadioButton (`id (`ntp), `opt (`notify),
+ // radio button label
+ _("Synchronize with NTP Server"), false)
+ ),
+ `ReplacePoint(`id(`rp), `Empty())
+ )
+ ))),
+ `HWeight (1, `VBox ())
+ );
Wizard::OpenAcceptDialog ();
Wizard::SetContents (_("Change Date and Time"), cont, htext, true, true);
Wizard::SetDesktopIcon("timezone");
+ show_current_time ();
boolean ntp_installed = (Stage::initial() || Package::Installed ("yast2-ntp-client"));
-
if (ntp_installed) {
- CreateUI();
+ CreateUI (true);
+ ntp_was_used = ntp_used;
if (ntp_used)
WFM::CallFunction ("ntp-client_proposal", [ "MakeProposal",
$[ "country" : Language::GetLanguageCountry() ] ]);
@@ -226,19 +266,18 @@
UI::ChangeWidget (`id (`ntp), `Value, false);
}
else
- CreateUI();
+ CreateUI (false);
}
if (ntp_used )
{
WFM::CallFunction("ntp-client_proposal", [ "MakeProposal",
$[ "country" : Language::GetLanguageCountry() ] ]);
}
- enable_disable_widgets (ntp_used);
+ enable_disable_widgets ();
}
if (ret == `ntp_configure)
{
symbol rv = (symbol) WFM::CallFunction ("ntp-client_proposal", ["AskUser"]);
-
if( rv == `invalid_hostname)
{
handle_invalid_hostname( (string) UI::QueryWidget(`id(`ntp_server), `Value) );
@@ -247,6 +286,31 @@
}
if (rv != `next)
continue;
+ else if (!Stage::initial ())
+ {
+ // show the 'save' status after configuration
+ boolean enabled = (boolean)
+ WFM::CallFunction("ntp-client_proposal", ["GetNTPEnabled"]);
+ UI::ChangeWidget (`id(`ntp_save), `Value, enabled);
+ }
+ }
+ if (ret == `ntp_now)
+ {
+ map argmap = $[
+ "ntpdate_only" : true
+ ];
+ symbol rv = (symbol) WFM::CallFunction ("ntp-client_proposal",
+ ["Write", argmap]);
+ if( rv == `invalid_hostname)
+ {
+ handle_invalid_hostname( (string) UI::QueryWidget(`id(`ntp_server), `Value) );
+ ret = `retry;
+ continue;
+ }
+ if (rv == `success)
+ {
+ show_current_time ();
+ }
}
if (ret == `accept && !ntp_used)
{
@@ -296,14 +360,19 @@
{
Timezone::SetTime( year, month, day, hour, minute, second );
}
+// if (ntp_was_used) FIXME remove NTP config now?
}
if (ret == `accept && ntp_used)
{
- symbol rv = (symbol) WFM::CallFunction("ntp-client_proposal", ["Write"]);
+ map argmap = $[];
+ if (UI::QueryWidget (`id (`ntp_save), `Value) == false)
+ argmap["ntpdate_only"] = true;
+ symbol rv = (symbol) WFM::CallFunction ("ntp-client_proposal",
+ ["Write", argmap]);
string server = (string) UI::QueryWidget(`id(`ntp_address), `Value);
- if (rv == `invalid_hostname)
+ if (rv == `invalid_hostname)
{
handle_invalid_hostname( server );
ret = `retry;
@@ -410,6 +479,7 @@
"America/Winnipeg",
"America/Argentina/Buenos_Aires",
"America/Sao_Paulo",
+ "America/Mexico_City",
"America/La_Paz",
"Asia/Novosibirsk",
"Asia/Calcutta",
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-country-2.16.13/VERSION new/yast2-country-2.16.14/VERSION
--- old/yast2-country-2.16.13/VERSION 2008-03-30 21:06:50.000000000 +0200
+++ new/yast2-country-2.16.14/VERSION 2008-04-04 16:22:08.000000000 +0200
@@ -1 +1 @@
-2.16.13
+2.16.14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org