Author: locilka Date: Thu Aug 28 11:56:14 2008 New Revision: 50431 URL: http://svn.opensuse.org/viewcvs/yast?rev=50431&view=rev Log: - Adapted Popup and Confirm libraries to use new YButtonBox widget (FATE #303446). - Adjusted RPM dependencies. - 2.17.15 Modified: trunk/yast2/library/modules/Popup.ycp trunk/yast2/library/wizard/src/Confirm.ycp trunk/yast2/package/yast2.changes trunk/yast2/yast2.spec.in Modified: trunk/yast2/library/modules/Popup.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/modules/Popup.ycp?rev=50431&r1=50430&r2=50431&view=diff ============================================================================== --- trunk/yast2/library/modules/Popup.ycp (original) +++ trunk/yast2/library/modules/Popup.ycp Thu Aug 28 11:56:14 2008 @@ -165,13 +165,11 @@ integer width, integer height ) { - term button_box = `HBox( - `HStretch(), - `HWeight(1, `PushButton( `id(`stop), Label::StopButton())), - `HSpacing(2), - `HWeight(1, `PushButton( `id(`ok_msg), `opt(`default, `key_F10), Label::OKButton())), - `HStretch() + term button_box = `ButtonBox ( + `PushButton (`id (`stop), `opt (`customButton), Label::StopButton()), + `PushButton (`id (`ok_msg), `opt (`default, `okButton), Label::OKButton()) ); + UI::OpenDialog( `opt(`decorated), popupLayoutInternalTypeWithLabel( headline, message, icon_name, @@ -189,7 +187,7 @@ if (button == `stop) { - while(UI::UserInput() != `ok_msg){}; + while (UI::UserInput() != `ok_msg){}; break; } @@ -266,29 +264,18 @@ if ( focus == `focus_no ) { - yes_button = `PushButton( `id(`yes), - `opt (`key_F10), - yes_button_message ); - no_button = `PushButton( `id(`no_button), - `opt(`default, `key_F9), - no_button_message ); + yes_button = `PushButton (`id (`yes), `opt (`okButton), yes_button_message); + no_button = `PushButton (`id (`no_button), `opt(`default, `cancelButton), no_button_message); } else { - yes_button = `PushButton( `id(`yes), - `opt(`default, `key_F10), - yes_button_message); - no_button = `PushButton( `id(`no_button), - `opt (`key_F9), - no_button_message ); + yes_button = `PushButton (`id (`yes), `opt (`default, `okButton), yes_button_message); + no_button = `PushButton (`id (`no_button), `opt (`cancelButton), no_button_message); } - term button_box = `HBox( - `HStretch (), - `HWeight( 1, yes_button), - `HSpacing(2), - `HWeight( 1, no_button ), - `HStretch () + term button_box = `ButtonBox ( + yes_button, + no_button ); return button_box; } @@ -362,10 +349,9 @@ `HCenter( `Label(`id(`remaining_time), "" + timeout_seconds) ), - `HBox( - `PushButton(`id(`timed_stop), Label::StopButton() ), - `HSpacing(2), - `PushButton(`id(`timed_ok), `opt(`default, `key_F10), Label::OKButton() ) + `ButtonBox ( + `PushButton (`id (`timed_stop), `opt (`customButton), Label::StopButton()), + `PushButton (`id (`timed_ok), `opt (`default, `key_F10, `okButton), Label::OKButton()) ), `VSpacing(0.2) ) @@ -551,16 +537,21 @@ global define void LongText( string headline, term richtext, integer hdim, integer vdim ) { - UI::OpenDialog( `opt( `decorated ), - `HBox( `VSpacing(vdim), - `VBox (`HSpacing(hdim), - `Left(`Heading( headline )), - `VSpacing(0.2), - richtext, // scrolled text - `PushButton( `id(`ok), `opt(`default, `key_F10), Label::OKButton() ) - ) - ) - ); + UI::OpenDialog ( + `opt (`decorated), + `HBox ( + `VSpacing(vdim), + `VBox ( + `HSpacing(hdim), + `Left (`Heading (headline)), + `VSpacing(0.2), + richtext, // scrolled text + `ButtonBox ( + `PushButton (`id (`ok), `opt (`default, `key_F10, `okButton), Label::OKButton()) + ) + ) + ) + ); UI::SetFocus(`id(`ok ) ); @@ -590,16 +581,20 @@ { term yes_button = `PushButton ( `id (`ok), - ( focus == `focus_yes ? - `opt (`default, `key_F10) : - `opt (`key_F10) ), + (focus == `focus_yes ? + `opt (`default, `key_F10, `okButton) + : + `opt (`key_F10, `okButton) + ), yes_button_message); term no_button = `PushButton ( `id (`cancel), - ( focus == `focus_no ? - `opt (`default, `key_F9) : - `opt (`key_F9) ), + (focus == `focus_no ? + `opt (`default, `key_F9) + : + `opt (`key_F9) + ), no_button_message); term d = `HBox ( @@ -609,12 +604,13 @@ size (headline) > 0 ? `Left(`Heading( headline )) : `Empty (), `VSpacing(0.2), `RichText (richtext), - `HBox ( + `ButtonBox ( yes_button, no_button ) ) ); + UI::OpenDialog (`opt (`decorated), d); any ui = UI::UserInput (); UI::CloseDialog (); @@ -765,11 +761,12 @@ */ define void anyMessageDetailsInternalType(string headline, string message, string details, string icon_name, boolean richtext, integer width, integer height ) { - term button_box = `HBox ( - `PushButton (`id(`ok_msg), `opt (`default, `key_F10), Label::OKButton()), + term button_box = `ButtonBox ( + `PushButton (`id(`ok_msg), `opt (`default, `okButton), Label::OKButton()), // button label - `PushButton (`id(`details), `opt (`key_F6), _("&Details...")) + `PushButton (`id(`details), `opt (`key_F6, `customButton), _("&Details...")) ); + UI::OpenDialog ( `opt(`decorated), richtext ? popupLayoutInternalRich(headline, message, icon_name, button_box, width, height) @@ -789,7 +786,9 @@ `VSpacing (0.5), `RichText (mergestring(splitstring(String::EscapeTags(details), "\n"), "<br>")), `VSpacing (), - `PushButton (`id(`ok), `opt(`default, `key_F10), Label::OKButton()) + `ButtonBox ( + `PushButton (`id (`ok), `opt (`default, `key_F10, `okButton), Label::OKButton()) + ) ) )); UI::UserInput(); @@ -811,7 +810,10 @@ */ define void anyMessageInternalType(string headline, string message, string icon_name, boolean richtext, integer width, integer height ) { - term button_box = `PushButton( `id(`ok_msg), `opt(`default, `key_F10), Label::OKButton() ); + term button_box = `ButtonBox ( + `PushButton (`id (`ok_msg), `opt (`default, `key_F10, `okButton), Label::OKButton()) + ); + UI::OpenDialog( `opt(`decorated), richtext ? popupLayoutInternalRich(headline, message, icon_name, button_box, width, height) : @@ -857,7 +859,10 @@ */ define void anyRichMessageInternal(string headline, string message, string icon_name, integer width, integer height ) { - term button_box = `PushButton( `id(`ok_msg), `opt(`default, `key_F10), Label::OKButton() ); + term button_box = `ButtonBox ( + `PushButton (`id(`ok_msg), `opt (`default, `key_F10), Label::OKButton()) + ); + UI::OpenDialog( `opt(`decorated), popupLayoutInternalRich( headline, message, icon_name, button_box, width, height ) @@ -1314,12 +1319,10 @@ `HCenter( `Label(`id(`remaining_time), "" + timeout_seconds) ), - `HBox( - `PushButton(`id(`timed_stop), Label::StopButton() ), - `HSpacing(2), - `PushButton(`id(`timed_ok), `opt(`default, `key_F10), Label::OKButton() ), - `HSpacing(2), - `PushButton(`id(`timed_cancel), `opt (`key_F9), Label::CancelButton() ) + `ButtonBox ( + `PushButton (`id (`timed_stop), `opt (`customButton), Label::StopButton()), + `PushButton (`id (`timed_ok), `opt (`default, `key_F10, `okButton), Label::OKButton()), + `PushButton (`id (`timed_cancel), `opt (`key_F9, `cancelButton), Label::CancelButton()) ), `VSpacing(0.2) ) @@ -1378,49 +1381,29 @@ term no_button = `Empty(); term retry_button = `Empty(); - if ( focus == `focus_no ) + if (focus == `focus_no) { - yes_button = `PushButton( `id(`yes), - `opt (`key_F10), - yes_button_message ); - no_button = `PushButton( `id(`no), - `opt(`default, `key_F9), - no_button_message ); - retry_button = `PushButton( `id(`retry), - `opt (`key_F6), - retry_button_message ); + yes_button = `PushButton (`id (`yes), `opt (`key_F10, `okButton), yes_button_message); + no_button = `PushButton (`id (`no), `opt(`default, `key_F9, `cancelButton), no_button_message); + retry_button = `PushButton (`id(`retry), `opt (`key_F6, `customButton), retry_button_message); } - else if ( focus == `focus_yes ) + else if (focus == `focus_yes) { - yes_button = `PushButton(`id(`yes), - `opt(`default, `key_F10), - yes_button_message); - no_button = `PushButton( `id(`no), - `opt (`key_F9), - no_button_message ); - retry_button = `PushButton( `id(`retry), - `opt (`key_F6), - retry_button_message ); + yes_button = `PushButton (`id(`yes), `opt(`default, `key_F10, `okButton), yes_button_message); + no_button = `PushButton (`id(`no), `opt (`key_F9, `cancelButton), no_button_message); + retry_button = `PushButton (`id(`retry), `opt (`key_F6, `customButton), retry_button_message); } else { - yes_button = `PushButton(`id(`yes), - `opt (`key_F10), - yes_button_message); - no_button = `PushButton( `id(`no), - `opt (`key_F9), - no_button_message ); - retry_button = `PushButton( `id(`retry), - `opt(`default, `key_F6), - retry_button_message ); + yes_button = `PushButton (`id (`yes), `opt (`key_F10, `okButton), yes_button_message); + no_button = `PushButton (`id (`no), `opt (`key_F9, `cancelButton), no_button_message); + retry_button = `PushButton (`id(`retry), `opt (`default, `key_F6, `customButton), retry_button_message); } - term button_box = `HBox( - `HWeight( 1, yes_button), - `HSpacing(2), - `HWeight( 1, no_button ), - `HSpacing(2), - `HWeight( 1, retry_button ) + term button_box = `ButtonBox ( + yes_button, + no_button, + retry_button ); UI::OpenDialog( @@ -1460,11 +1443,11 @@ `VBox( `VSpacing(0.2), `Heading(text), - `HBox( - `PushButton(`id(`back), `opt (`key_F8), Label::BackButton() ), - `PushButton(`id(`again), `opt (`key_F6), Label::RetryButton() ), - `PushButton(`id(`cancel), `opt (`key_F9), Label::QuitButton() ), - `PushButton(`id(`next), `opt (`key_F10), Label::NextButton() ) + `ButtonBox ( + `PushButton(`id(`back), `opt (`key_F8, `customButton), Label::BackButton()), + `PushButton(`id(`again), `opt (`key_F6, `customButton), Label::RetryButton()), + `PushButton(`id(`cancel), `opt (`key_F9, `cancelButton), Label::QuitButton()), + `PushButton(`id(`next), `opt (`key_F10, `okButton), Label::NextButton()) ), `VSpacing(0.2) ), @@ -1542,7 +1525,9 @@ `VSpacing( 0.3 ), `Label(`id(`label), sformat("%1", timeout)), `VSpacing(0.2), - `PushButton(`id(`ok_msg), `opt(`default, `key_F10), Label::OKButton() ), + `ButtonBox ( + `PushButton(`id (`ok_msg), `opt(`default, `key_F10, `okButton), Label::OKButton()) + ), `VSpacing( 0.3 ) ) ); @@ -1595,8 +1580,11 @@ ) ), `VSpacing( 0.3 ), - `PushButton( `opt(`default, `key_F10), Label::OKButton() ), `VSpacing( 0.3 ) - ) + `ButtonBox ( + `PushButton (`opt (`default, `key_F10, `okButton), Label::OKButton()) + ), + `VSpacing (0.3) + ) ); UI::UserInput(); Modified: trunk/yast2/library/wizard/src/Confirm.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/wizard/src/Confirm.ycp?rev=50431&r1=50430&r2=50431&view=diff ============================================================================== --- trunk/yast2/library/wizard/src/Confirm.ycp (original) +++ trunk/yast2/library/wizard/src/Confirm.ycp Thu Aug 28 11:56:14 2008 @@ -65,12 +65,11 @@ `HVCenter(`Heading(class)), `VSpacing(0.5) ))), - `HSquash(`HBox( - `HWeight(1, `PushButton(`id(`continue), `opt(`default), Label::ContinueButton())), - `HSpacing(2), + `ButtonBox ( + `HWeight (1, `PushButton (`id(`continue), `opt(`default, `okButton), Label::ContinueButton())), /* PushButton label */ - `HWeight(1, `PushButton(`id(`skip), _("&Skip"))) - )), + `HWeight (1, `PushButton (`id(`skip, `cancelButton), _("&Skip"))) + ), `VSpacing(0.2) ))), `HSpacing(1) Modified: trunk/yast2/package/yast2.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/package/yast2.changes?rev=50431&r1=50430&r2=50431&view=diff ============================================================================== --- trunk/yast2/package/yast2.changes (original) +++ trunk/yast2/package/yast2.changes Thu Aug 28 11:56:14 2008 @@ -1,4 +1,12 @@ ------------------------------------------------------------------- +Thu Aug 28 11:55:05 CEST 2008 - locilka@suse.cz + +- Adapted Popup and Confirm libraries to use new YButtonBox widget + (FATE #303446). +- Adjusted RPM dependencies. +- 2.17.15 + +------------------------------------------------------------------- Wed Aug 27 10:03:54 CEST 2008 - jsrain@suse.cz - added configuration files changes tracking in SNV as preview Modified: trunk/yast2/yast2.spec.in URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/yast2.spec.in?rev=50431&r1=50430&r2=50431&view=diff ============================================================================== --- trunk/yast2/yast2.spec.in (original) +++ trunk/yast2/yast2.spec.in Thu Aug 28 11:56:14 2008 @@ -13,7 +13,8 @@ # y2base foo -S (hello) UI, list:: namespace Requires: yast2-core >= 2.17.1 # Mod_UI -Requires: yast2-ycp-ui-bindings >= 2.16.44 +# new YButtonBox widget (fate #303446) +Requires: yast2-ycp-ui-bindings >= 2.17.3 # changed patch/message callbacks Requires: yast2-pkg-bindings >= 2.17.1 -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org