Author: locilka
Date: Wed Jan 28 15:20:01 2009
New Revision: 55119
URL: http://svn.opensuse.org/viewcvs/yast?rev=55119&view=rev
Log:
Some more tiny fixes
Modified:
trunk/installation/src/clients/inst_finish.ycp
trunk/installation/src/modules/InstError.ycp
Modified: trunk/installation/src/clients/inst_finish.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/clients/inst_finish.ycp?rev=55119&r1=55118&r2=55119&view=diff
==============================================================================
--- trunk/installation/src/clients/inst_finish.ycp (original)
+++ trunk/installation/src/clients/inst_finish.ycp Wed Jan 28 15:20:01 2009
@@ -29,6 +29,7 @@
import "ProductFeatures";
import "SlideShow";
import "InstError";
+ import "PackageCallbacks";
// added for fate# 303395
import "Directory";
@@ -36,11 +37,11 @@
if (GetInstArgs::going_back())
return `auto;
- boolean test_mode = false;
+ // --> Functions
void ReportClientError (string client_error_text) {
// get the latest errors
- map cmd = (map) WFM::Execute (.local.bash_output, "tail -n 200 /var/log/YaST2/y2log | grep ' <\(3\|5\)> '");
+ map cmd = (map) WFM::Execute (.local.bash_output, "tail -n 200 /var/log/YaST2/y2log | grep ' <\\(3\\|5\\)> '");
InstError::ShowErrorPopUp (
_("Installation Error"),
@@ -49,6 +50,10 @@
);
}
+ // <-- Functions
+
+ boolean test_mode = false;
+
if (size (WFM::Args()) > 0 && is (WFM::Args(0), string)) {
y2milestone ("Args: %1", WFM::Args());
if (WFM::Args(0) == "test")
@@ -57,21 +62,46 @@
if (test_mode) Wizard::CreateDialog();
-// Help text for last dialog of base installation
-string help_text = _("<p>
-Please wait while the base system is being installed.
-</p>");
-
- Wizard::SetContents (
- _("Finishing Basic Installation"),
- `Label (_("Preparing installation finish-scripts...")),
- help_text,
- false,
- false
- );
+ Wizard::DisableBackButton ();
+ Wizard::DisableNextButton ();
+
+ // Adjust a SlideShow dialog if not configured
+ 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");
+
+ // Do not open a new SlideShow widget, reuse the old one instead
+ // variable used later to close that dialog (if needed)
+ 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");
+
+ string log = _("Creating list of finish scripts to call...");
+ SlideShow::StageProgress (0, log);
+ SlideShow::AppendMessageToInstLog (log);
// Used later in 'stages' definition
- Pkg::TargetInit (Installation::destdir, true);
+ // Using empty callbacks that don't break the UI
+ PackageCallbacks::RegisterEmptyProgressCallbacks();
+ Pkg::TargetInitialize (Installation::destdir);
+ Pkg::TargetLoad();
+ PackageCallbacks::RestorePreviousProgressCallbacks();
list