[yast-commit] r40390 - in /trunk/packager: package/yast2-packager.changes src/clients/inst_productsources.ycp
Author: locilka Date: Wed Aug 22 10:28:55 2007 New Revision: 40390 URL: http://svn.opensuse.org/viewcvs/yast?rev=40390&view=rev Log: - Make possible to abort in the the Read/Write dialog of Online Repositories (#298050). Modified: trunk/packager/package/yast2-packager.changes trunk/packager/src/clients/inst_productsources.ycp Modified: trunk/packager/package/yast2-packager.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/package/yast2-packager.changes?rev=40390&r1=40389&r2=40390&view=diff ============================================================================== --- trunk/packager/package/yast2-packager.changes (original) +++ trunk/packager/package/yast2-packager.changes Wed Aug 22 10:28:55 2007 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Wed Aug 22 10:27:15 CEST 2007 - locilka@suse.cz + +- Make possible to abort in the the Read/Write dialog of Online + Repositories (#298050). + +------------------------------------------------------------------- Thu Aug 16 13:01:06 CEST 2007 - jsuchome@suse.cz - inst_source.ycp renamed to repositories.ycp (#300923) Modified: trunk/packager/src/clients/inst_productsources.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/src/clients/inst_productsources.ycp?rev=40390&r1=40389&r2=40390&view=diff ============================================================================== --- trunk/packager/src/clients/inst_productsources.ycp (original) +++ trunk/packager/src/clients/inst_productsources.ycp Wed Aug 22 10:28:55 2007 @@ -109,6 +109,35 @@ return sformat ("(%1|%2)", s_url, s_path); } + // Function returns whether user wants to abort the installation / configuration + // true - abort + // false - do not abort + // + // Bugzilla #298049 + boolean UserWantsToAbort () { + any ret = UI::PollInput(); + + if (ret != `abort) + return false; + + boolean function_ret = false; + + // `abort pressed + if (Stage::initial()) { + function_ret = (Popup::ConfirmAbort (`painless)); + } else { + function_ret = (Popup::ContinueCancelHeadline ( + // TRANSLATORS: popup header + _("Aborting Configuration of Online Repository"), + // TRANSLATORS: popup question + _("Are you sure you want to abort the configuration?") + )); + } + + y2milestone ("User decided to abort: %1", function_ret); + return function_ret; + } + boolean NetworkRunning () { boolean ret = false; @@ -431,6 +460,8 @@ Progress::NextStage(); + if (UserWantsToAbort()) return `abort; + if (! NetworkRunning()) { y2warning ("Cannot proceed, no network configured..."); // TRANSLATORS: error report @@ -440,6 +471,8 @@ return `nosources; } + if (UserWantsToAbort()) return `abort; + // In the installation, recommended repositories will be preselected if (Stage::initial()) { // Set preselect_recommended to the correct state @@ -461,6 +494,8 @@ Progress::NextStage(); + if (UserWantsToAbort()) return `abort; + // language used for possible translations if (! Stage::initial()) language_long = GetCurrentLang (); @@ -472,6 +507,8 @@ language_short = substring (language_long, 0, 2); y2milestone ("Preferred language: %1 %2", language_long, language_short); + if (UserWantsToAbort()) return `abort; + if (! ReadControlFile()) { y2milestone ("Feature not supported by the product"); // TRANSLATORS: light-warning message @@ -480,6 +517,8 @@ return `nosources; } + + if (UserWantsToAbort()) return `abort; if (! DownloadAndParseSources()) { y2error ("Cannot download or parse repositories"); @@ -490,10 +529,14 @@ return `nosources; } + if (UserWantsToAbort()) return `abort; + if (! Stage::initial()) { Progress::NextStage(); InitializeSources(); } + + if (UserWantsToAbort()) return `abort; Progress::Finish(); sleep (600); @@ -1071,6 +1114,8 @@ ); Wizard::SetTitleIcon ("yast-sw_source"); + if (UserWantsToAbort()) return `abort; + if (repos_to_be_deleted != []) { Progress::NextStage(); foreach (integer src_id, repos_to_be_deleted, { @@ -1085,12 +1130,17 @@ }); } + if (UserWantsToAbort()) return `abort; + // One progress stage for all repositories if (at_once) Progress::NextStage(); foreach (string repo_id, repos_to_be_used, { // If not at once, call one stage per repository if (! at_once) Progress::NextStage(); + + if (UserWantsToAbort()) return `abort; + CreateSource ( list_of_repos[repo_id, "url"]:"", list_of_repos[repo_id, "path"]:"/", @@ -1098,6 +1148,8 @@ ); }); + if (UserWantsToAbort()) return `abort; + // Redraw installation wizard if (Stage::initial()) { UpdateWizardSteps(); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
locilka@svn.opensuse.org