Author: locilka Date: Wed Feb 3 17:13:45 2010 New Revision: 60674 URL: http://svn.opensuse.org/viewcvs/yast?rev=60674&view=rev Log: Proper (new) congratulations dialog (BNC #576519). Modified: branches/SuSE-Code-11-SP1-Branch/wagon/package/yast2-wagon.changes branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_congratulate.ycp Modified: branches/SuSE-Code-11-SP1-Branch/wagon/package/yast2-wagon.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/wagon/package/yast2-wagon.changes?rev=60674&r1=60673&r2=60674&view=diff ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/wagon/package/yast2-wagon.changes (original) +++ branches/SuSE-Code-11-SP1-Branch/wagon/package/yast2-wagon.changes Wed Feb 3 17:13:45 2010 @@ -5,6 +5,7 @@ - Checking repositories after registration, offering to rerun the registration if no changes in the list of registered repositories were made (BNC #575102). +- Proper (new) congratulations dialog (BNC #576519). - 2.17.13 ------------------------------------------------------------------- Modified: branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_congratulate.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_congratulate.ycp?rev=60674&r1=60673&r2=60674&view=diff ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_congratulate.ycp (original) +++ branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_congratulate.ycp Wed Feb 3 17:13:45 2010 @@ -11,45 +11,82 @@ * Summary: * Online Migration Tool * - * $Id:$ + * $Id$ * */ { - // FIXME: add own congratulations dialog to the wagon control file - import "ProductControl"; - import "ProductFeatures"; - import "Report"; + import "Wizard"; + import "Popup"; + import "GetInstArgs"; + import "Label"; textdomain "wagon"; - // BNC #445974 - // Don't use custom control file, only the base-product one has - // a congratulations text defined - string custom_workflow_file = ""; - - if (ProductControl::custom_control_file != nil && ProductControl::custom_control_file != "") { - custom_workflow_file = ProductControl::custom_control_file; - ProductControl::custom_control_file = ""; - ProductControl::Init(); - // Disable AutoYaST Cloning check-box - ProductFeatures::SetBooleanFeature ("globals", "enable_clone", false); - ProductControl::clone_modules = []; - y2milestone ("X: %1", ProductFeatures::GetBooleanFeature("globals", "enable_clone")); - } + symbol ret = `auto; + + map display = UI::GetDisplayInfo(); + integer space = display["TextMode"]:true ? 1 : 3; - symbol ret = (symbol) WFM::CallFunction ("inst_congratulate", WFM::Args()); + string caption = _("Migration Completed"); - // Re-use the previous custom control file - if (custom_workflow_file != nil && custom_workflow_file != "") { - ProductControl::custom_control_file = custom_workflow_file; - ProductControl::Init(); + string text = ProductControl::GetTranslatedText ("migration_congratulate"); + + if (text == nil || text == "") { + y2warning ("Using fallback migration_congratulate text"); + text = + _("<p><b>Congratulations!</b><br> +You have just successfully finished the on-line migration.</p> +<p>The whole system has been upgraded. It should be rebooted +it as soon as possible.</p> +<p>Please visit us at http://www.novell.com/linux/.</p> +<p>Have a nice day!<br> +Your SUSE Linux Team</p>"); } - // BNC #575093: Report the need to reboot ASAP - Report::Message(_("Migration has just finished. -Reboot the system as soon as possible.")); + term contents = `VBox ( + `VSpacing (space), + `HBox ( + `HSpacing (2*space), + `VBox ( + `RichText (`id (`text), text) + ), + `HSpacing (2*space) + ), + `VSpacing (space), + `VSpacing (2) + ); + + string help = _("<p><b>Finish</b> will close the migration +and you should restart the system as soon as possible.</b>"); + + Wizard::SetContents (caption, contents, help, + GetInstArgs::enable_back(), GetInstArgs::enable_next()); + Wizard::SetTitleIcon ("yast-license"); + + Wizard::SetNextButton(`next, Label::FinishButton() ); + Wizard::RestoreAbortButton(); + Wizard::SetFocusToNextButton(); + + repeat { + ret = (symbol) Wizard::UserInput(); + + if (ret == `abort) { + if (Popup::ConfirmAbort (`incomplete)) + break; + } + } until (ret == `next || ret == `back); + + if (ret == `back) { + Wizard::RestoreNextButton(); + } else if (ret == `next) { + Wizard::SetContents (caption, `Label(_("Finishing the migration...")), help, + GetInstArgs::enable_back(), GetInstArgs::enable_next()); + + Pkg::SourceSaveAll(); + Pkg::TargetFinish(); + } return ret; } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org