Author: locilka
Date: Wed Jan 21 16:59:25 2009
New Revision: 54865
URL: http://svn.opensuse.org/viewcvs/yast?rev=54865&view=rev
Log:
- inst_finish script newly uses the SlideShow module.
Modified:
trunk/installation/package/yast2-installation.changes
trunk/installation/src/clients/inst_finish.ycp
trunk/installation/src/clients/inst_prepareprogress.ycp
Modified: trunk/installation/package/yast2-installation.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/package/yast2-installation.changes?rev=54865&r1=54864&r2=54865&view=diff
==============================================================================
--- trunk/installation/package/yast2-installation.changes (original)
+++ trunk/installation/package/yast2-installation.changes Wed Jan 21 16:59:25 2009
@@ -6,6 +6,7 @@
- Removing dependency on yast2-mouse by moving the mouse-related
scripts to yast2-mouse-2.18.0.
- Removing dependency on yast2-bootloader.
+- inst_finish script newly uses the SlideShow module.
-------------------------------------------------------------------
Tue Jan 20 13:37:03 CET 2009 - locilka@suse.cz
Modified: trunk/installation/src/clients/inst_finish.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/clients/inst_finish.ycp?rev=54865&r1=54864&r2=54865&view=diff
==============================================================================
--- trunk/installation/src/clients/inst_finish.ycp (original)
+++ trunk/installation/src/clients/inst_finish.ycp Wed Jan 21 16:59:25 2009
@@ -27,6 +27,7 @@
import "String";
import "GetInstArgs";
import "ProductFeatures";
+ import "SlideShow";
// added for fate# 303395
import "Directory";
@@ -268,41 +269,61 @@
return s["label"]:"";
});
-Progress::New (
- // Headline for last dialog of base installation: Install LILO etc.
- _("Finishing Basic Installation"),
- "", // Initial progress bar label - not empty (reserve space!)
- steps_count,
- stage_names,
- [],
- help_text
-);
-
Wizard::DisableBackButton ();
Wizard::DisableNextButton ();
+boolean aborted = false;
+
+map > get_setup = SlideShow::GetSetup();
+if (get_setup == nil || get_setup == $[]) {
+ y2milestone ("No SlideShow setup has been set, adjusting");
+ SlideShow::Setup([$[
+ "name" : "finish",
+ "description" : _("Finishing Basic Installation"),
+ // fixed value
+ "value" : 100,
+ "units" : `sec,
+ ]]);
+}
+get_setup = nil;
+
Wizard::SetTitleIcon ("yast-sysconfig");
-boolean aborted = false;
+// Do not open a new SlideShow widget, reuse the old one instead
+boolean required_to_open_sl_dialog = (! SlideShow::HaveSlideWidget());
+
+if (required_to_open_sl_dialog) {
+ y2milestone ("SlideShow dialog not yet created");
+ SlideShow::OpenDialog();
+}
+
+SlideShow::MoveToStage("finish");
+
+integer stages_nr = size (stages);
+integer current_stage = -1;
+integer current_stage_percent = 0;
foreach (map stage, stages, {
if (stage["icon"]:"" != "")
Wizard::SetTitleIcon (stage["icon"]:"");
- Progress::NextStage ();
- boolean first = true;
+ current_stage = current_stage + 1;
+
+ current_stage_percent = (100 * current_stage / stages_nr);
+ SlideShow::StageProgress (current_stage_percent, stage["label"]:"");
+ SlideShow::AppendMessageToInstLog (stage["label"]:"");
+
+ integer steps_nr = size (stage["steps"]:[]);
+ integer current_step = -1;
foreach (map step, stage["steps"]:[], {
- integer scount = step["steps"]:1;
- if (scount != 0)
- {
- if (first)
- first = false;
- else
- Progress::NextStep ();
+ current_step = current_step + 1;
+
+ SlideShow::StageProgress (current_stage_percent + (100 / stages_nr * current_step / steps_nr), nil);
+ if (haskey (step, "title")) {
+ // use as ' * %1' -> ' * One of the finish steps...' in the SlideShow log
+ SlideShow::AppendMessageToInstLog (sformat (_(" * %1"), step["title"]:""));
}
- if (haskey (step, "title"))
- Progress::Title (step["title"]:"");
boolean orig = Progress::set (false);
if (test_mode == true) {
@@ -323,14 +344,19 @@
break;
});
+SlideShow::StageProgress (100, _("Finished"));
+SlideShow::AppendMessageToInstLog (_("Finished"));
+
if (aborted)
{
y2milestone ("inst_finish aborted");
return `abort;
}
-Progress::Finish();
-Progress::Title (_("Finished."));
+if (required_to_open_sl_dialog) {
+ y2milestone ("Closing previously opened SlideShow dialog");
+ SlideShow::CloseDialog();
+}
// --------------------------------------------------------------
// Check if there is a message left to display
Modified: trunk/installation/src/clients/inst_prepareprogress.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/clients/inst_prepareprogress.ycp?rev=54865&r1=54864&r2=54865&view=diff
==============================================================================
--- trunk/installation/src/clients/inst_prepareprogress.ycp (original)
+++ trunk/installation/src/clients/inst_prepareprogress.ycp Wed Jan 21 16:59:25 2009
@@ -56,6 +56,13 @@
"value" : (PackageSlideShow::total_size_to_install - ImageInstallation::TotalSize()) / 1024 , // kilobytes
"units" : `kb,
],
+ $[
+ "name" : "finish",
+ "description" : _("Finishing Basic Installation"),
+ // fixed value
+ "value" : 100,
+ "units" : `sec,
+ ],
];
SlideShow::Setup( stages );
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org