Author: jsuchome Date: Fri Apr 25 10:28:44 2008 New Revision: 47052 URL: http://svn.opensuse.org/viewcvs/yast?rev=47052&view=rev Log: - fixed some widget layouts - allow deleting keys from package descriptions - 2.16.9 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 trunk/add-on-creator/src/patterns.ycp Modified: trunk/add-on-creator/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/add-on-creator/VERSION?rev=47052&r1=47051&r2=47052&view=diff ============================================================================== --- trunk/add-on-creator/VERSION (original) +++ trunk/add-on-creator/VERSION Fri Apr 25 10:28:44 2008 @@ -1 +1 @@ -2.16.8 +2.16.9 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=47052&r1=47051&r2=47052&view=diff ============================================================================== --- trunk/add-on-creator/package/yast2-add-on-creator.changes (original) +++ trunk/add-on-creator/package/yast2-add-on-creator.changes Fri Apr 25 10:28:44 2008 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Fri Apr 25 10:06:08 CEST 2008 - jsuchome@suse.cz + +- fixed some widget layouts +- allow deleting keys from package descriptions +- 2.16.9 + +------------------------------------------------------------------- Mon Apr 21 13:08:17 CEST 2008 - jsuchome@suse.cz - default product is openSUSE11.0 Modified: trunk/add-on-creator/src/AddOnCreator.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/add-on-creator/src/AddOnCreator.ycp?rev=47052&r1=47051&r2=47052&view=diff ============================================================================== --- trunk/add-on-creator/src/AddOnCreator.ycp (original) +++ trunk/add-on-creator/src/AddOnCreator.ycp Fri Apr 25 10:28:44 2008 @@ -1222,6 +1222,7 @@ list<string> create_argument_lists (string stdout) { list<string> ret = []; + if (stdout == nil || stdout == "") return ret; // approximately maximum size of parameters list passed to rpm integer kbytes = 120; // looks like pre-sorting helps to fasten rpm call @@ -2021,7 +2022,7 @@ map out = (map) SCR::Execute (.target.bash_output, sformat ("cd '%1'; find -maxdepth 1 -type f | wc -l", dir)); integer count = tointeger(deletechars(out["stdout"]:"0","\n")); - return count > 0; + return (count != nil && count > 0); } /** @@ -2092,7 +2093,7 @@ term info_term = failure ? `VBox ( `HSpacing (70), // error label - `Label (_("Signing of the product failed.")), + `Left (`Label (_("Signing of the product failed."))), message == "" ? `VSpacing (0) : `RichText (mergestring (splitstring ( @@ -2100,9 +2101,9 @@ ) ) : `VSpacing (); term input_term = failure ? `HBox ( - `CheckBox (`id (`again), `opt (`notify), + `Left (`CheckBox (`id (`again), `opt (`notify), // checkbox label - _("Try again with different passphrase")), + _("Try again with different passphrase"))), `Password (`id (`pw1), "") ) : `VBox ( `Password (`id (`pw1), message) Modified: trunk/add-on-creator/src/complex.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/add-on-creator/src/complex.ycp?rev=47052&r1=47051&r2=47052&view=diff ============================================================================== --- trunk/add-on-creator/src/complex.ycp (original) +++ trunk/add-on-creator/src/complex.ycp Fri Apr 25 10:28:44 2008 @@ -255,7 +255,7 @@ term contents = `HVCenter (`HBox (`HSpacing (), `VBox ( `VSpacing (0.8), - `RadioButtonGroup (`id(`rd), `Left(`HVSquash(`VBox ( + `RadioButtonGroup (`id(`rd), `HVSquash (`VBox ( `Left (`RadioButton(`id(`new), `opt (`notify), // radio button label _("Create an Add-On &from the Beginning"), !AddOnCreator::clone) @@ -267,7 +267,7 @@ ), `HBox ( `HSpacing (2.5), - `TextEntry (`id(`path), + `InputField (`id(`path), `opt (`hstretch), // text entry label _("&Path to Directory of the Existing Add-On Product"), AddOnCreator::import_path @@ -285,7 +285,7 @@ // TODO move to next dialog? ) ) - )))), + ))), `VSpacing (0.9) ))); @@ -370,10 +370,12 @@ term contents = `HBox (`HSpacing (), `VBox ( `HBox ( + `InputField (`id (`product), `opt (`hstretch), + // textentry label + _("&Add-On Product Name"), product), // textentry label - `TextEntry (`id (`product), _("&Add-On Product Name"), product), - // textentry label - `TextEntry (`id (`version), _("&Version"), version) + `InputField (`id (`version), `opt (`hstretch), _("&Version"), + version) ), `VSpacing (0.7), `Frame (_("Required Product"), `HBox (`HSpacing (0.5), `VBox ( @@ -412,7 +414,7 @@ `Left(`RadioButton(`id(`other), `opt (`notify), // radio button label _("&Other"))), - `TextEntry (`id(`other_val), "") + `InputField (`id(`other_val), "") ) ))) ), @@ -420,7 +422,7 @@ ))), `VSpacing (0.7), `HBox ( - `TextEntry (`id(`rpm_path), + `InputField (`id(`rpm_path), `opt (`hstretch), // text entry label _("&Path to Directory with Add-On Packages"), current_product["rpm_path"]:""), @@ -430,7 +432,7 @@ ) ), `HBox ( - `TextEntry (`id(`required_rpm_path), + `InputField (`id(`required_rpm_path), `opt (`hstretch), // text entry label _("Path to Directory with Re&quired Product Packages"), current_product["required_rpm_path"]:""), @@ -1277,6 +1279,7 @@ `HBox ( `PushButton (`id(`add), `opt(`key_F6), Label::AddButton ()), `PushButton (`id(`edit), `opt(`key_F7), Label::EditButton ()), + `PushButton (`id(`delete), `opt(`key_F8), Label::DeleteButton ()), `HStretch () ), `VSpacing (0.4), @@ -1317,6 +1320,7 @@ UI::ChangeWidget (`id(`import_lang), `Enabled, descr[current_lang]:$[] != $[]); UI::ChangeWidget (`id(`edit), `Enabled, descr[current_lang]:$[] != $[]); + UI::ChangeWidget (`id(`delete), `Enabled, descr[current_lang]:$[] != $[]); replace_language_widgets (current_lang); @@ -1440,6 +1444,16 @@ } UI::SetFocus (`id(`description)); } + else if (ret == `delete) { + string key =(string)UI::QueryWidget(`id(`description),`CurrentItem); + if (descr[lang,sel,key]:nil != nil) + { + descr[lang,sel] = remove (descr[lang,sel]:$[], key); + UI::ChangeWidget (`id(`description), `Items, + get_descr_items (descr[lang, sel]:$[])); + } + UI::SetFocus (`id(`description)); + } else if (ret == `browse) { string file = UI::AskForExistingFile ( @@ -1518,7 +1532,7 @@ // textentry label `TextEntry (`id("Name-Email"), _("E-&Mail Address")), // password widget label - `Password (`id ("Passphrase"), _("&Passphrase")) + `Password (`id ("Passphrase"), `opt (`hstretch), _("&Passphrase")) ), `HSpacing(1) ); @@ -1607,10 +1621,10 @@ ) ), // password entry label - `Password (`id(`pw), _("&Passphrase"), + `Password (`id(`pw), `opt (`hstretch), _("&Passphrase"), AddOnCreator::passphrases[gpg_key]:""), // password entry label (verification) - `Password (`id(`pw2), _("&Passphrase Verification"), + `Password (`id(`pw2), `opt (`hstretch), _("&Passphrase Verification"), AddOnCreator::passphrases[gpg_key]:""), // checkbox label `Left (`CheckBox (`id (`resign), @@ -1697,8 +1711,9 @@ term contents = `HBox (`HSpacing (), `VBox ( `HBox ( - // text entry label - `TextEntry (`id(`output_path), _("P&ath to Output Directory"), + `InputField (`id(`output_path), `opt (`hstretch), + // text entry label + _("P&ath to Output Directory"), current_product["base_output_path"]:""), `VBox ( `Label (""), @@ -1714,7 +1729,8 @@ `HBox ( `HSpacing (2), // text entry label - `TextEntry (`id(`iso_name), _("Image File Name"), iso_name) + `InputField (`id(`iso_name), `opt (`hstretch), _("Image File Name"), + iso_name) ), `VSpacing (0.4), // check box label Modified: trunk/add-on-creator/src/patterns.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/add-on-creator/src/patterns.ycp?rev=47052&r1=47051&r2=47052&view=diff ============================================================================== --- trunk/add-on-creator/src/patterns.ycp (original) +++ trunk/add-on-creator/src/patterns.ycp Fri Apr 25 10:28:44 2008 @@ -261,9 +261,9 @@ UI::ChangeWidget (`id(`required), `Value, issubstring (requires, "pattern:" + current_pattern)); } - UI::ChangeWidget (`id(`delete_pt), `Enabled, patterns != $[]); - UI::ChangeWidget (`id(`edit), `Enabled, patterns != $[]); - UI::ChangeWidget (`id(`add), `Enabled, patterns != $[]); + foreach (symbol w, [ `delete_pt, `edit, `add, `delete, `required ], { + UI::ChangeWidget (`id (w), `Enabled, patterns != $[]); + }); symbol ret = nil; while(true) { @@ -314,7 +314,7 @@ } if (contains ([`new_pt, `import_pt, `delete_pt], ret)) { - foreach (symbol s, [`delete_pt, `edit, `add], { + foreach (symbol s, [`delete_pt, `edit, `add, `delete, `required], { UI::ChangeWidget (`id(s), `Enabled, patterns != $[]); }); ret = `patterns; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org