[yast-commit] r41245 - /trunk/ntp-client/src/NtpClient.ycp
Author: kmachalkova Date: Wed Oct 3 18:18:40 2007 New Revision: 41245 URL: http://svn.opensuse.org/viewcvs/yast?rev=41245&view=rev Log: Hide read/write progress in installation (#327066) Modified: trunk/ntp-client/src/NtpClient.ycp Modified: trunk/ntp-client/src/NtpClient.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/ntp-client/src/NtpClient.ycp?rev=41245&r1=41244&r2=41245&view=diff ============================================================================== --- trunk/ntp-client/src/NtpClient.ycp (original) +++ trunk/ntp-client/src/NtpClient.ycp Wed Oct 3 18:18:40 2007 @@ -405,26 +405,32 @@ integer steps = 2; integer sl = 500; + + boolean have_progress = (Mode::normal()); + // We do not set help text here, because it was set outside - Progress::New( caption, " ", steps, [ - // progress stage - _("Read network configuration"), - // progress stage - _("Read NTP settings"), - ], [ - // progress step - _("Reading network configuration..."), - // progress step - _("Reading NTP settings..."), - // progress step - _("Finished") - ], - "" - ); + if ( have_progress ) + { + Progress::New( caption, " ", steps, [ + // progress stage + _("Read network configuration"), + // progress stage + _("Read NTP settings"), + ], [ + // progress step + _("Reading network configuration..."), + // progress step + _("Reading NTP settings..."), + // progress step + _("Finished") + ], + "" + ); + } // read network configuration if(Abort()) return false; - Progress::NextStage(); + if (have_progress) Progress::NextStage(); boolean progress_orig = Progress::set (false); NetworkDevices::Read (); @@ -436,7 +442,7 @@ GetCountryNames (); // read current settings if(Abort()) return false; - Progress::NextStage(); + if (have_progress) Progress::NextStage(); boolean failed = false; @@ -521,8 +527,11 @@ } if(Abort()) return false; - Progress::NextStage (); - Progress::Title (_("Finished")); + if (have_progress) + { + Progress::NextStage (); + Progress::Title (_("Finished")); + } sleep(sl); if(Abort()) return false; @@ -658,26 +667,31 @@ integer sl = 0; sleep(sl); + boolean have_progress = (Mode::normal()); + // We do not set help text here, because it was set outside - Progress::New(caption, " ", steps, [ - // progress stage - _("Write NTP settings"), - // progress stage - _("Restart NTP daemon") - ], [ - // progress step - _("Writing the settings..."), - // progress step - _("Restarting NTP daemon..."), - // progress step - _("Finished") - ], - "" - ); + if ( have_progress ) + { + Progress::New(caption, " ", steps, [ + // progress stage + _("Write NTP settings"), + // progress stage + _("Restart NTP daemon") + ], [ + // progress step + _("Writing the settings..."), + // progress step + _("Restarting NTP daemon..."), + // progress step + _("Finished") + ], + "" + ); + } // write settings if(Abort()) return false; - Progress::NextStage(); + if ( have_progress ) Progress::NextStage(); if (update_dhcp) { @@ -799,7 +813,7 @@ // restart daemon if(Abort()) return false; - Progress::NextStage (); + if (have_progress) Progress::NextStage (); // if (change_firewall) // { @@ -829,8 +843,11 @@ sleep(sl); if(Abort()) return false; - Progress::NextStage (); - Progress::Title (_("Finished")); + if ( have_progress ) + { + Progress::NextStage (); + Progress::Title (_("Finished")); + } sleep(sl); if(Abort()) return false; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
kmachalkova@svn.opensuse.org