Mailinglist Archive: yast-commit (953 mails)

< Previous Next >
[yast-commit] r49767 - /branches/tmp/lslezak/product-creator-cross-arch/src/dialogs.ycp
  • From: lslezak@xxxxxxxxxxxxxxxx
  • Date: Wed, 06 Aug 2008 12:38:01 -0000
  • Message-id: <20080806123802.07DAF2741C@xxxxxxxxxxxxxxxx>
Author: lslezak
Date: Wed Aug 6 14:38:01 2008
New Revision: 49767

URL: http://svn.opensuse.org/viewcvs/yast?rev=49767&view=rev
Log:
- fixed [Abort] behavior in the config workflow

Modified:
branches/tmp/lslezak/product-creator-cross-arch/src/dialogs.ycp

Modified: branches/tmp/lslezak/product-creator-cross-arch/src/dialogs.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/lslezak/product-creator-cross-arch/src/dialogs.ycp?rev=49767&r1=49766&r2=49767&view=diff
==============================================================================
--- branches/tmp/lslezak/product-creator-cross-arch/src/dialogs.ycp (original)
+++ branches/tmp/lslezak/product-creator-cross-arch/src/dialogs.ycp Wed Aug 6
14:38:01 2008
@@ -1374,21 +1374,33 @@
*/
define symbol packageSelector()
{
- string base_pattern = ProductCreator::Config["base"]:"";
- list<string> patterns = ProductCreator::Config["addons"]:[];
- list<string> packages = ProductCreator::Config["packages"]:[];
- list<string> taboo = ProductCreator::Config["taboo"]:[];
-
- map<string,any> result = runPackageSelector(base_pattern, patterns,
packages, taboo, `patterns);
-
- y2debug("Package selector result: %1", result);
-
- ProductCreator::Config["base"] = result["base"]:"";
- ProductCreator::Config["addons"] = result["addons"]:[];
- ProductCreator::Config["packages"] = result["packages"]:[];
- ProductCreator::Config["taboo"] = result["taboo"]:[];
- ProductCreator::Config["code10"] = result["code10"]:true;
- ProductCreator::Config["type"] = result["type"]:`patterns;
+ map<string,any> result = $[];
+
+ do
+ {
+ string base_pattern = ProductCreator::Config["base"]:"";
+ list<string> patterns = ProductCreator::Config["addons"]:[];
+ list<string> packages = ProductCreator::Config["packages"]:[];
+ list<string> taboo = ProductCreator::Config["taboo"]:[];
+
+ result = runPackageSelector(base_pattern, patterns, packages,
taboo, `patterns);
+
+ y2debug("Package selector result: %1", result);
+
+ ProductCreator::Config["base"] = result["base"]:"";
+ ProductCreator::Config["addons"] = result["addons"]:[];
+ ProductCreator::Config["packages"] = result["packages"]:[];
+ ProductCreator::Config["taboo"] = result["taboo"]:[];
+ ProductCreator::Config["code10"] = result["code10"]:true;
+ ProductCreator::Config["type"] = result["type"]:`patterns;
+ }
+ while(result["ui"]:`next == `cancel && !ProductCreator::ReallyAbort());
+
+ // the package selector returns `cancel when pressing [Abort]
+ if (result["ui"]:`next == `cancel)
+ {
+ return `abort;
+ }

return result["ui"]:`next;
}
@@ -1475,15 +1487,21 @@

GPGWidgets::SetSelectedPrivateKey(ProductCreator::Config["gpg_key"]:"");
}

- symbol ret = CWM::ShowAndRun ($[
- "widget_names" : ["sign_checkbox", "select_private_key",
"create_new_key"],
- "widget_descr" : union(GPGWidgets::Widgets(),
sign_checkbox_widget()),
- "contents" : GpgDialogContent(),
- "caption" : caption,
- "back_button" : Label::BackButton (),
- "next_button" : Label::NextButton (),
- "fallback_functions" : $[]
- ]);
+ symbol ret = nil;
+
+ do
+ {
+ ret = CWM::ShowAndRun ($[
+ "widget_names" : ["sign_checkbox", "select_private_key",
"create_new_key"],
+ "widget_descr" : union(GPGWidgets::Widgets(),
sign_checkbox_widget()),
+ "contents" : GpgDialogContent(),
+ "caption" : caption,
+ "back_button" : Label::BackButton (),
+ "next_button" : Label::NextButton (),
+ "fallback_functions" : $[]
+ ]);
+ }
+ while(ret == `abort && !ProductCreator::ReallyAbort());

boolean sign = (boolean)UI::QueryWidget(`id("sign_checkbox"), `Value);
y2milestone("Sign the medium: %1", sign);
@@ -1612,6 +1630,12 @@
repeat
{
ret = UI::UserInput();
+
+ if (ret == `abort && !ProductCreator::ReallyAbort())
+ {
+ // abort canceled
+ ret = `dummy;
+ }
} until (ret == `next || ret == `back || ret == `abort);
Wizard::CloseDialog();


--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages