Author: mvidner Date: Mon Aug 18 12:12:07 2008 New Revision: 50163 URL: http://svn.opensuse.org/viewcvs/yast?rev=50163&view=rev Log: fixed whitespace Modified: trunk/ntp-client/src/NtpClient.ycp trunk/ntp-client/src/misc.ycp trunk/ntp-client/src/widgets.ycp Modified: trunk/ntp-client/src/NtpClient.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/ntp-client/src/NtpClient.ycp?rev=50163&r1=50162&r2=50163&view=diff ============================================================================== --- trunk/ntp-client/src/NtpClient.ycp (original) +++ trunk/ntp-client/src/NtpClient.ycp Mon Aug 18 12:12:07 2008 @@ -445,7 +445,7 @@ //config_dhcp = tolower ((string)SCR::Read (.sysconfig.network.dhcp.DHCLIENT_MODIFY_NTP_CONF)) == "yes"; //original_config_dhcp = config_dhcp; - ntp_policy = (string)SCR::Read (.sysconfig.network.config.NETCONFIG_NTP_POLICY); + ntp_policy = (string)SCR::Read (.sysconfig.network.config.NETCONFIG_NTP_POLICY); GetNtpServers (); GetCountryNames (); @@ -747,7 +747,7 @@ if (failed) // error report - Report::Error (Message::CannotWriteSettingsTo ("/etc/ntp.conf")); + Report::Error (Message::CannotWriteSettingsTo ("/etc/ntp.conf")); //} // if configuration via DHCP was turned on, restart DHCP clients now @@ -755,15 +755,15 @@ if (update_dhcp && config_dhcp) { Service::RunInitScript ("network", "restart-all-dhcp-clients"); - } + } */ - // write policy and run netconfig command - SCR::Write(.sysconfig.network.config.NETCONFIG_NTP_POLICY, ntp_policy); - SCR::Write(.sysconfig.network.config, nil); - + // write policy and run netconfig command + SCR::Write(.sysconfig.network.config.NETCONFIG_NTP_POLICY, ntp_policy); + SCR::Write(.sysconfig.network.config, nil); + SCR::Execute(.target.bash, "/sbin/netconfig update"); - + if (! (SCR::Write (.sysconfig.ntp.NTPD_RUN_CHROOTED, run_chroot ? "yes" : "no") Modified: trunk/ntp-client/src/misc.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/ntp-client/src/misc.ycp?rev=50163&r1=50162&r2=50163&view=diff ============================================================================== --- trunk/ntp-client/src/misc.ycp (original) +++ trunk/ntp-client/src/misc.ycp Mon Aug 18 12:12:07 2008 @@ -48,18 +48,18 @@ boolean reallyExitComplex () { - string pol = ""; - if(UI::QueryWidget (`id ("policy_combo"), `Value) == `auto) - pol="auto"; - else if(UI::QueryWidget (`id ("policy_combo"), `Value) == `custom) - pol=(string)UI::QueryWidget (`id ("custom_policy"), `Value); - + string pol = ""; + if (UI::QueryWidget (`id ("policy_combo"), `Value) == `auto) + pol = "auto"; + else if(UI::QueryWidget (`id ("policy_combo"), `Value) == `custom) + pol = (string)UI::QueryWidget (`id ("custom_policy"), `Value); + if (NtpClient::run_service == (UI::QueryWidget (`id ("start"), `CurrentButton) == "boot") && NtpClient::run_chroot == UI::QueryWidget (`id ("run_chroot"), `Value) - && NtpClient::ntp_policy == pol + && NtpClient::ntp_policy == pol && (! CWMFirewallInterfaces::OpenFirewallModified ("firewall")) && (! sync_record_modified) ) Modified: trunk/ntp-client/src/widgets.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/ntp-client/src/widgets.ycp?rev=50163&r1=50162&r2=50163&view=diff ============================================================================== --- trunk/ntp-client/src/widgets.ycp (original) +++ trunk/ntp-client/src/widgets.ycp Mon Aug 18 12:12:07 2008 @@ -281,9 +281,9 @@ define void secureInit (string id) ``{ y2milestone("Restrict %1", NtpClient::restrict_map); if (NtpClient::ntp_policy == "STATIC" || NtpClient::ntp_policy == "" ) - UI::ChangeWidget(`id("secure"), `Enabled, false); + UI::ChangeWidget(`id("secure"), `Enabled, false); else - UI::ChangeWidget(`id("secure"), `Value, ( NtpClient::restrict_map != $[]) ); + UI::ChangeWidget(`id("secure"), `Value, ( NtpClient::restrict_map != $[]) ); } define void secureStore (string id, map event) ``{ @@ -345,39 +345,39 @@ define void PolicyInit(string id) ``{ if( NtpClient::ntp_policy == "" ) - { - UI::ChangeWidget(`id("policy_combo"), `Value, `id(`nomodify)); - UI::ChangeWidget(`id("custom_policy"), `Value, ""); - UI::ChangeWidget(`id("custom_policy"), `Enabled, false); - } + { + UI::ChangeWidget(`id("policy_combo"), `Value, `id(`nomodify)); + UI::ChangeWidget(`id("custom_policy"), `Value, ""); + UI::ChangeWidget(`id("custom_policy"), `Enabled, false); + } else if( NtpClient::ntp_policy == "auto" || NtpClient::ntp_policy == "STATIC *") - { - UI::ChangeWidget(`id("policy_combo"), `Value, `id(`auto)); - UI::ChangeWidget(`id("custom_policy"), `Value, ""); - UI::ChangeWidget(`id("custom_policy"), `Enabled, false); - } - else - { - UI::ChangeWidget(`id("policy_combo"), `Value, `id(`custom)); - UI::ChangeWidget(`id("custom_policy"), `Value, NtpClient::ntp_policy); - UI::ChangeWidget(`id("custom_policy"), `Enabled, true); - } + { + UI::ChangeWidget(`id("policy_combo"), `Value, `id(`auto)); + UI::ChangeWidget(`id("custom_policy"), `Value, ""); + UI::ChangeWidget(`id("custom_policy"), `Enabled, false); + } + else + { + UI::ChangeWidget(`id("policy_combo"), `Value, `id(`custom)); + UI::ChangeWidget(`id("custom_policy"), `Value, NtpClient::ntp_policy); + UI::ChangeWidget(`id("custom_policy"), `Enabled, true); + } } define void PolicyStore(string id, map event) ``{ - if( UI::QueryWidget (`id ("policy_combo"), `Value) == `nomodify ) - { - NtpClient::ntp_policy = ""; - } - else if( UI::QueryWidget (`id ("policy_combo"), `Value) == `auto ) - { - NtpClient::ntp_policy = "auto"; - } - else - { - NtpClient::ntp_policy = (string)UI::QueryWidget (`id ("custom_policy"), `Value); - } - NtpClient::modified = true; + if( UI::QueryWidget (`id ("policy_combo"), `Value) == `nomodify ) + { + NtpClient::ntp_policy = ""; + } + else if( UI::QueryWidget (`id ("policy_combo"), `Value) == `auto ) + { + NtpClient::ntp_policy = "auto"; + } + else + { + NtpClient::ntp_policy = (string)UI::QueryWidget (`id ("custom_policy"), `Value); + } + NtpClient::modified = true; } @@ -517,8 +517,8 @@ any ev_id = event["ID"]:nil; if (ev_id == "boot" || ev_id == "never" || ev_id == "policy_combo") { - symbol pol = (symbol)UI::QueryWidget (`id ("policy_combo"), `Value); - + symbol pol = (symbol)UI::QueryWidget (`id ("policy_combo"), `Value); + boolean enabled = UI::QueryWidget (`id ("start"), `CurrentButton) != "never"; // UI::ChangeWidget (`id (`advanced), `Enabled, enabled); @@ -528,15 +528,15 @@ UI::ChangeWidget (`id (`delete), `Enabled, enabled); UI::ChangeWidget (`id (`overview), `Enabled, enabled); - if(enabled && (pol == `custom)) + if (enabled && (pol == `custom)) { - UI::ChangeWidget (`id ("custom_policy"), `Enabled, true); - UI::ChangeWidget (`id ("custom_policy"), `Value, NtpClient::ntp_policy); + UI::ChangeWidget (`id ("custom_policy"), `Enabled, true); + UI::ChangeWidget (`id ("custom_policy"), `Value, NtpClient::ntp_policy); } else { - UI::ChangeWidget (`id ("custom_policy"), `Enabled, false); - UI::ChangeWidget (`id ("custom_policy"), `Value, ""); + UI::ChangeWidget (`id ("custom_policy"), `Enabled, false); + UI::ChangeWidget (`id ("custom_policy"), `Value, ""); } return nil; } @@ -1277,21 +1277,21 @@ ], */ "policy_combo" : $[ - "widget" : `combobox, - "opt" : [ `notify ], + "widget" : `combobox, + "opt" : [ `notify ], "items" : [ [`nomodify, "manual"], [`auto, "auto"], [`custom, "custom"] ], - "label" : "&Runtime Configuration Policy", - "init" : PolicyInit, - "store" : PolicyStore, - "handle" : ntpEnabledOrDisabled, + "label" : "&Runtime Configuration Policy", + "init" : PolicyInit, + "store" : PolicyStore, + "handle" : ntpEnabledOrDisabled, "help" : HELPS["policy_combo"]:"" - ], + ], "custom_policy" : $[ - "widget": `textentry, - "label" : "&Custom Policy", - "handle" : ntpEnabledOrDisabled, + "widget": `textentry, + "label" : "&Custom Policy", + "handle" : ntpEnabledOrDisabled, "help" : HELPS["custom_policy"]:"" - ], + ], "use_random_servers" : $[ "widget" : `checkbox, "opt" : [ `notify ], -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org