Author: jsuchome Date: Mon Aug 25 09:49:44 2008 New Revision: 50347 URL: http://svn.opensuse.org/viewcvs/yast?rev=50347&view=rev Log: - show NTP configuration status in installation summary (fate#303520) - 2.17.8 Modified: trunk/country/VERSION trunk/country/package/yast2-country.changes trunk/country/timezone/src/Timezone.ycp trunk/country/timezone/src/dialogs.ycp trunk/country/timezone/src/proposal/timezone_proposal.ycp trunk/country/timezone/testsuite/tests/MakeProposal.out Modified: trunk/country/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/country/VERSION?rev=50347&r1=50346&r2=50347&view=diff ============================================================================== --- trunk/country/VERSION (original) +++ trunk/country/VERSION Mon Aug 25 09:49:44 2008 @@ -1 +1 @@ -2.17.7 +2.17.8 Modified: trunk/country/package/yast2-country.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/country/package/yast2-country.changes?rev=50347&r1=50346&r2=50347&view=diff ============================================================================== --- trunk/country/package/yast2-country.changes (original) +++ trunk/country/package/yast2-country.changes Mon Aug 25 09:49:44 2008 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Mon Aug 25 09:40:03 CEST 2008 - jsuchome@suse.cz + +- show NTP configuration status in installation summary + (fate#303520) +- 2.17.8 + +------------------------------------------------------------------- Thu Aug 21 13:37:20 CEST 2008 - jsuchome@suse.cz - added CLI option to avoid package installation Modified: trunk/country/timezone/src/Timezone.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/country/timezone/src/Timezone.ycp?rev=50347&r1=50346&r2=50347&view=diff ============================================================================== --- trunk/country/timezone/src/Timezone.ycp (original) +++ trunk/country/timezone/src/Timezone.ycp Mon Aug 25 09:49:44 2008 @@ -44,6 +44,9 @@ global boolean user_decision = false; global boolean user_hwclock = false; +// If NTP is configured +global boolean ntp_used = false; + global integer diff = 0; /** @@ -545,19 +548,17 @@ } /** - * MakeProposal() - * - * Return proposal string and set system timezone. + * Return proposal list of strings. * * @param boolean force_reset * boolean language_changed * - * @return string user readable description. - * If force_reset is true reset the module to the timezone - * stored in default_timezone. + * @return list user readable description. + * + * If force_reset is true reset the module to the timezone + * stored in default_timezone. */ - -global define string MakeProposal (boolean force_reset, +global define list<string> MakeProposal (boolean force_reset, boolean language_changed ) { y2milestone ("force_reset: %1", force_reset); @@ -642,7 +643,11 @@ y2milestone( "MakeProposal hwclock %1", hwclock ); - return name + " - " + clock_setting + " " + date; + list<string> ret = [ name + " - " + clock_setting + " " + date ]; + if (ntp_used) + // summary label + ret = add (ret, _("NTP configured")); + return ret; } /** Modified: trunk/country/timezone/src/dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/country/timezone/src/dialogs.ycp?rev=50347&r1=50346&r2=50347&view=diff ============================================================================== --- trunk/country/timezone/src/dialogs.ycp (original) +++ trunk/country/timezone/src/dialogs.ycp Mon Aug 25 09:49:44 2008 @@ -391,7 +391,10 @@ continue; } else + { ntp_used = false; + UI::ChangeWidget (`id(`rb), `CurrentButton, `manual); + } } else { @@ -402,7 +405,10 @@ } until( ret==`accept || ret==`cancel ); - if (ntp_installed) { + if (ret == `accept && ntp_installed) + { + ntp_used = (UI::QueryWidget (`id(`rb), `Value) == `ntp) && + (UI::QueryWidget (`id(`ntp_save), `Value) == true); WFM::CallFunction("ntp-client_proposal", [ "SetUseNTP", $["ntp_used" : ntp_used] ]); } Wizard::CloseDialog (); @@ -480,8 +486,7 @@ // read NTP status - // FIXME without network, disable at all, or enable off-line configuration? - if (Stage::initial () && NetworkService::isNetworkRunning()) + if (first_run && NetworkService::isNetworkRunning()) { // true by default (fate#303520) ntp_used = true; @@ -512,6 +517,11 @@ [ "SetUseNTP", $["ntp_used" : ntp_used] ]); } } + else if (Stage::initial ()) + { + // from installation summaru + ntp_used = Timezone::ntp_used; + } else if (ntp_installed) ntp_used = (boolean) WFM::CallFunction ("ntp-client_proposal", ["GetNTPEnabled"]); @@ -581,9 +591,10 @@ ), `HSpacing (1), // frame label - `HWeight (1, `Frame (time_frame_label, `MarginBox ( - `leftMargin (1.2), `rightMargin (1), - `topMargin (0), `bottomMargin (0), + `HWeight (1, `Frame (`id (`time_fr), time_frame_label, + `MarginBox ( + `leftMargin (1.2), `rightMargin (1), + `topMargin (0), `bottomMargin (0), textmode ? `VBox ( `Label (`id(`date), `opt(`outputField,`hstretch), date), @@ -767,6 +778,13 @@ UI::ChangeWidget(`id(`date), `Value, Timezone::GetDateTime (false, false)); changed_time = true; + // adapt frame label, NTP status may be changed + time_frame_label = + // frame label + ntp_used ? _("Time and Date (NTP is configured)") : + // frame label + _("Time and Date"); + UI::ChangeWidget (`id (`time_fr), `Label, time_frame_label); } } else if (ret == `next || ret == `timezone || ret == `timezonemap || @@ -831,6 +849,7 @@ // Timezone::user_decision = true; Timezone::user_hwclock = true; + Timezone::ntp_used = ntp_used; } } } until ( ret == `next || ret == `back || ret == `cancel ); Modified: trunk/country/timezone/src/proposal/timezone_proposal.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/country/timezone/src/proposal/timezone_proposal.ycp?rev=50347&r1=50346&r2=50347&view=diff ============================================================================== --- trunk/country/timezone/src/proposal/timezone_proposal.ycp (original) +++ trunk/country/timezone/src/proposal/timezone_proposal.ycp Mon Aug 25 09:49:44 2008 @@ -50,8 +50,8 @@ // Fill return map ret = $[ - "raw_proposal" : [ - Timezone::MakeProposal (force_reset, language_changed) ], + "raw_proposal" : + Timezone::MakeProposal (force_reset, language_changed), "language_changed" : false ]; } Modified: trunk/country/timezone/testsuite/tests/MakeProposal.out URL: http://svn.opensuse.org/viewcvs/yast/trunk/country/timezone/testsuite/tests/MakeProposal.out?rev=50347&r1=50346&r2=50347&view=diff ============================================================================== --- trunk/country/timezone/testsuite/tests/MakeProposal.out (original) +++ trunk/country/timezone/testsuite/tests/MakeProposal.out Mon Aug 25 09:49:44 2008 @@ -2,4 +2,4 @@ Execute .target.bash_output "/usr/sbin/zic -l Europe/Prague" $[] Execute .target.bash_output "/sbin/hwclock --hctosys -u" $[] Execute .target.bash_output "/bin/date \"+%c\"" $[] -Return Europe / Czech Republic - Hardware Clock Set To UTC +Return ["Europe / Czech Republic - Hardware Clock Set To UTC "] -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org