Mailinglist Archive: yast-commit (1208 mails)

< Previous Next >
[yast-commit] r46111 - in /trunk/ntp-client: VERSION package/yast2-ntp-client.changes src/ntp-client_proposal.ycp
  • From: jsuchome@xxxxxxxxxxxxxxxx
  • Date: Fri, 04 Apr 2008 14:26:17 -0000
  • Message-id: <20080404142617.2E3EF341D7@xxxxxxxxxxxxxxxx>
Author: jsuchome
Date: Fri Apr 4 16:26:16 2008
New Revision: 46111

URL: http://svn.opensuse.org/viewcvs/yast?rev=46111&view=rev
Log:
- ntp-client_proposal: UI adapted for fate#302917 (distinguish
between one-time synchronization and saving the client config)
- 2.16.6


Modified:
trunk/ntp-client/VERSION
trunk/ntp-client/package/yast2-ntp-client.changes
trunk/ntp-client/src/ntp-client_proposal.ycp

Modified: trunk/ntp-client/VERSION
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/ntp-client/VERSION?rev=46111&r1=46110&r2=46111&view=diff
==============================================================================
--- trunk/ntp-client/VERSION (original)
+++ trunk/ntp-client/VERSION Fri Apr 4 16:26:16 2008
@@ -1 +1 @@
-2.16.5
+2.16.6

Modified: trunk/ntp-client/package/yast2-ntp-client.changes
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/ntp-client/package/yast2-ntp-client.changes?rev=46111&r1=46110&r2=46111&view=diff
==============================================================================
--- trunk/ntp-client/package/yast2-ntp-client.changes (original)
+++ trunk/ntp-client/package/yast2-ntp-client.changes Fri Apr 4 16:26:16 2008
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Fri Apr 4 16:17:14 CEST 2008 - jsuchome@xxxxxxx
+
+- ntp-client_proposal: UI adapted for fate#302917 (distinguish
+ between one-time synchronization and saving the client config)
+- 2.16.6
+
+-------------------------------------------------------------------
Thu Apr 3 17:30:40 CEST 2008 - kmachalkova@xxxxxxx

- Display popup with icon if NTP test succeeds (bnc#306018)

Modified: trunk/ntp-client/src/ntp-client_proposal.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/ntp-client/src/ntp-client_proposal.ycp?rev=46111&r1=46110&r2=46111&view=diff
==============================================================================
--- trunk/ntp-client/src/ntp-client_proposal.ycp (original)
+++ trunk/ntp-client/src/ntp-client_proposal.ycp Fri Apr 4 16:26:16 2008
@@ -8,16 +8,14 @@
{
textdomain "ntp-client";

+
import "Address";
import "NetworkService";
import "NtpClient";
import "Service";
import "String";
import "Stage";
-import "Package";
-import "Packages";
import "PackageSystem";
-import "Pkg";
import "Popup";
import "Report";

@@ -86,22 +84,30 @@

if (func == "CreateUI")
{
- term cont =
- `Left ( `VBox(
- `VSpacing (0.5),
- `HBox (
- `HSpacing (3),
- `ComboBox (`id (`ntp_address), `opt (`editable),
- // combo box label
- _("NTP Server Address")
- ),
- `VBox (
- `Label (""),
- // push button label
- `PushButton (`id (`ntp_configure), _("Configure..."))
- )
- )
- ));
+ term cont = `VBox (`VSpacing (0.5), `HBox (
+ `HSpacing (3),
+ `HWeight (1, `VBox (
+ `Left (`ComboBox (`id (`ntp_address), `opt (`editable, `hstretch),
+ // combo box label
+ _("NTP Server Address")
+ )),
+ `VSpacing (0.3),
+ `HBox (
+ `HSpacing (0.5),
+ // check box label
+ `Left (`CheckBox (`id (`ntp_save), _("Save NTP Configuration")))
+ )
+ )),
+ `HWeight (1, `VBox (
+ `Label (""),
+ `VSpacing (0.3), // try to line up the widgets horizontally
+ // push button label
+ `Left (`PushButton (`id (`ntp_now), _("Synchronize now"))),
+ `VSpacing (0.3),
+ // push button label
+ `Left (`PushButton (`id (`ntp_configure), _("Configure...")))
+ ))
+ ));

if (UI::WidgetExists(`id(`rp)))
{
@@ -112,24 +118,27 @@
y2warning("Network is not running, NTP synchronization will not be
available");
UI::ChangeWidget(`id(`ntp_content), `Enabled, false);
}
-
- //OK, let's remove this, ntp package is available even on 1CD media so
we don't need
- //to check if it is available to prevent repository scanning windows
from popping up
- //(#327336, c#21)
-
- //if ( ( Stage::initial() || !Package::Installed("ntp") ) &&
!Package::Available("ntp") )
- //{
- // y2warning("ntp package is not installable, NTP synchronization
will not be available");
- // UI::ChangeWidget(`id(`ntp_content), `Enabled, false);
- //}
}

ret = true;
}

+else if (func == "GetNTPEnabled")
+{
+ ret = Service::Enabled (NtpClient::service_name);
+}
+
+
else if (func == "GetUseNTP")
{
- ret = NtpClient::ntp_selected;
+ /*
+ if (param["first_time"]:false && !Stage::initial ())
+ {
+ ret = Service::Enabled (NtpClient::service_name);
+ }
+ else
+ */
+ ret = NtpClient::ntp_selected;
}

else if (func == "SetUseNTP")
@@ -147,7 +156,6 @@
else if (func == "Write")
{
string ntp_server = (string) UI::QueryWidget(`id(`ntp_address), `Value);
- boolean write_settings = param["write_settings"]:false;
boolean ntpdate_only = param["ntpdate_only"]:false;

if ( !ValidateSingleServer( ntp_server ) )
@@ -161,6 +169,8 @@
//(ntpdate is in inst-sys so we don't need the package)
if (Stage::initial() && !ntpdate_only)
{
+ import "Package";
+ import "Packages";
if (Package::Available(required_package))
{
Packages::addAdditionalPackage(required_package);
@@ -171,7 +181,7 @@
}
}
//Otherwise, prompt user for confirming pkg installation
- else
+ else if (!Stage::initial ())
{
if (!PackageSystem::CheckAndInstallPackages([ required_package ]))
{
@@ -181,7 +191,7 @@
}

integer status = -1;
- string service_name = "ntp";
+ string service_name = NtpClient::service_name;

//Stop NTP service on running system (during 1st stage, we don't care)
if( !Stage::initial())
@@ -209,9 +219,7 @@
{
ret = `success;

- //User wants more than running ntpdate
- //(I hate this, it's overly complicated, but some
- //things are just not explainable)
+ // User wants to more than running ntpdate (synchronize on boot)
if (!ntpdate_only)
{
NtpClient::modified = true;
@@ -221,8 +229,7 @@
//In inst-sys we don't need to care further
//ntp-client_finish will do the job
//In installed system we must write the settings
-
- if ( !Stage::initial() /*&& write_settings*/)
+ if (!Stage::initial())
NtpClient::Write();
}
}
@@ -242,7 +249,9 @@
{
string ntp_server = (string) UI::QueryWidget(`id(`ntp_address),
`Value);
AddSingleServer(ntp_server);
- ret = (symbol) WFM::CallFunction("ntp-client");
+ boolean retval = (boolean) WFM::CallFunction("ntp-client");
+ if (retval)
+ ret = `next;
ProposeSomething();
}
}

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages