Author: mkudlvasr Date: Thu Apr 2 18:36:28 2009 New Revision: 56598 URL: http://svn.opensuse.org/viewcvs/yast?rev=56598&view=rev Log: Changes to test case. Connected to bnc#479874 Modified: trunk/gtk/tests/ButtonOrder.ycp Modified: trunk/gtk/tests/ButtonOrder.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/tests/ButtonOrder.ycp?rev=56598&r1=56597&r2=56598&view=diff ============================================================================== --- trunk/gtk/tests/ButtonOrder.ycp (original) +++ trunk/gtk/tests/ButtonOrder.ycp Thu Apr 2 18:36:28 2009 @@ -1,24 +1,38 @@ +/* + +This example was made to test behaviour of button ordering (initially due to bnc#479874). + + */ + { import "Label"; UI::OpenDialog( `VBox( + `Label ("`PushButton (`id (`cancel), `opt(`cancelButton, `key_F9, `default), Label::BackButton()),"), + `Label ("`PushButton (`id (`ok), `opt (`okButton, `key_F10), Label::InstallButton ())"), `ButtonBox ( `PushButton (`id (`cancel), `opt(`cancelButton, `key_F9, `default), Label::BackButton()), `PushButton (`id (`ok), `opt (`okButton, `key_F10), Label::InstallButton ()) ) ) ); - UI::UserInput(); + any ret = UI::UserInput(); + if (ret == `cancel) y2milestone ("Cancel pressed"); + if (ret == `ok) y2milestone ("Ok pressed"); UI::CloseDialog(); UI::OpenDialog( `VBox( + `Label ("`PushButton (`id (`cancel), `opt(`cancelButton, `key_F10, `default), Label::BackButton()),"), + `Label ("`PushButton (`id (`ok), `opt (`okButton, `key_F9), Label::InstallButton ())"), `ButtonBox ( `PushButton (`id (`cancel), `opt(`cancelButton, `key_F10, `default), Label::BackButton()), `PushButton (`id (`ok), `opt (`okButton, `key_F9), Label::InstallButton ()) ) ) ); - UI::UserInput(); + ret = UI::UserInput(); + if (ret == `cancel) y2milestone ("Cancel pressed"); + if (ret == `ok) y2milestone ("Ok pressed"); UI::CloseDialog(); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org