Author: jsuchome Date: Mon Jun 16 15:39:14 2008 New Revision: 48336 URL: http://svn.opensuse.org/viewcvs/yast?rev=48336&view=rev Log: - delete products not only after immediate exit (bnc#399964) - show more info about GPG keys - 2.17.0 Modified: trunk/add-on-creator/VERSION trunk/add-on-creator/package/yast2-add-on-creator.changes trunk/add-on-creator/src/AddOnCreator.ycp trunk/add-on-creator/src/complex.ycp Modified: trunk/add-on-creator/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/add-on-creator/VERSION?rev=48336&r1=48335&r2=48336&view=diff ============================================================================== --- trunk/add-on-creator/VERSION (original) +++ trunk/add-on-creator/VERSION Mon Jun 16 15:39:14 2008 @@ -1 +1 @@ -2.16.12 +2.17.0 Modified: trunk/add-on-creator/package/yast2-add-on-creator.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/add-on-creator/package/yast2-add-on-creator.changes?rev=48336&r1=48335&r2=48336&view=diff ============================================================================== --- trunk/add-on-creator/package/yast2-add-on-creator.changes (original) +++ trunk/add-on-creator/package/yast2-add-on-creator.changes Mon Jun 16 15:39:14 2008 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Mon Jun 16 15:29:44 CEST 2008 - jsuchome@suse.cz + +- delete products not only after immediate exit (bnc#399964) +- show more info about GPG keys +- 2.17.0 + +------------------------------------------------------------------- Fri May 30 11:28:43 CEST 2008 - jsuchome@suse.cz - CLI: read current product data after it was cleared (bnc#395753) Modified: trunk/add-on-creator/src/AddOnCreator.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/add-on-creator/src/AddOnCreator.ycp?rev=48336&r1=48335&r2=48336&view=diff ============================================================================== --- trunk/add-on-creator/src/AddOnCreator.ycp (original) +++ trunk/add-on-creator/src/AddOnCreator.ycp Mon Jun 16 15:39:14 2008 @@ -859,17 +859,12 @@ list<map> all_products = (list<map>) SCR::Read (.target.ycp, add_on_products_file); if (all_products != nil) - { - add_on_products = maplist (map product, all_products, { - return product; - }); - } + add_on_products = all_products; } else { current_product["gpg_key"] = gpg_keys[0]:""; } - // fill uninitialized values in content descriptions integer i = 0; @@ -2451,6 +2446,15 @@ return SCR::Write (.target.ycp, add_on_products_file, add_on_products); } +/** + * read the user's ID for given GPG key + */ +global string GetKeyUID (string key) { + + map out = (map) SCR::Execute (.target.bash_output, sformat ("gpg --list-secret-keys %1 | grep uid | sed -e 's/^uid[ ]*//'", key)); + string name = deletechars (out["stdout"]:"", "\n"); + return name == nil ? "" : name; +} /** * prepare the data of current product for a build @@ -2467,9 +2471,11 @@ if (current_product["ask_for_passphrase"]:false && key != "" && passphrases[key]:"" == "" && !Mode::commandline ()) { - // ask for pw now + string name = GetKeyUID (key); + // ask for pw now %1 is key id, %2 user name passphrases[key] = AskForPassphrase ( - sformat (_("Passphrase for GPG key %1"), key), false); + sformat (_("Enter passphrase for GPG key %1 +(%2)"), key, name), false); } } Modified: trunk/add-on-creator/src/complex.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/add-on-creator/src/complex.ycp?rev=48336&r1=48335&r2=48336&view=diff ============================================================================== --- trunk/add-on-creator/src/complex.ycp (original) +++ trunk/add-on-creator/src/complex.ycp Mon Jun 16 15:39:14 2008 @@ -196,10 +196,13 @@ UI::SetFocus (`id (`new)); } - any ret = nil; + any ret = nil; + boolean deleted = false; while (true) { - ret = UI::UserInput(); + map event = UI::WaitForEvent (); + ret = event["ID"]:nil; + current = (integer) UI::QueryWidget(`id(`table), `CurrentItem ); if (ret == `abort || ret == `cancel || ret == `back) { @@ -210,7 +213,7 @@ } continue; } - if (ret == `new) + if (ret == `new || ret == `next) { break; } @@ -223,12 +226,20 @@ add_on_products = remove (add_on_products, current); summary_items = get_summary_items (); current_product = $[]; + deleted = true; UI::ChangeWidget (`id (`table), `Items, get_summary_items ()); foreach (symbol t, [`edit, `delete, `build], { UI::ChangeWidget (`id (t), `Enabled, summary_items != []); }); if (summary_items != []) - ret = `table; + { + ret = `table; + event = $[]; + } + else + { + UI::ChangeWidget (`id (`descr), `Value, ""); + } } } if (ret == `table) @@ -236,7 +247,8 @@ current_product = add_on_products[current]:$[]; UI::ChangeWidget (`id (`descr), `Value, get_description (current_product)); - + if (event["EventReason"]:"" == "Activated") + ret = `edit; } if (ret == `edit || ret == `build) { @@ -245,12 +257,14 @@ AddOnCreator::PrepareBuild (); break; } - if (ret == `next) { - AddOnCreator::add_on_products = add_on_products; - break; - } } AddOnCreator::selected_product = (ret == `new) ? -1 : current; + + // save the map without possible deleted products + if (ret != `abort && deleted) + { + AddOnCreator::add_on_products = add_on_products; + } Wizard::RestoreAbortButton(); return (symbol)ret; } @@ -1615,9 +1629,7 @@ // dialog caption string caption = _("Signing the Add-On Product"); list gpg_keys = maplist (string key, AddOnCreator::gpg_keys, { - map out = (map) SCR::Execute (.target.bash_output, - sformat ("gpg --list-secret-keys %1 | grep uid | sed -e 's/^uid[ ]*//'", key)); - string name = deletechars (out["stdout"]:"", "\n"); + string name = AddOnCreator::GetKeyUID (key); return `item (`id (key), name != "" ? sformat ("%1 (%2)", key, name) : key, key == gpg_key -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org