[yast-commit] r42531 - /trunk/core/libyui/doc/examples/Image1.ycp
Author: coolo Date: Fri Nov 30 11:07:09 2007 New Revision: 42531 URL: http://svn.opensuse.org/viewcvs/yast?rev=42531&view=rev Log: test if disabling the widget does anything (from Lukas) Modified: trunk/core/libyui/doc/examples/Image1.ycp Modified: trunk/core/libyui/doc/examples/Image1.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/libyui/doc/examples/Image1.ycp?rev=42531&r1=42530&r2=42531&view=diff ============================================================================== --- trunk/core/libyui/doc/examples/Image1.ycp (original) +++ trunk/core/libyui/doc/examples/Image1.ycp Fri Nov 30 11:07:09 2007 @@ -1,12 +1,20 @@ // Simple image example { - UI::OpenDialog( - `VBox( - `Image( "/usr/share/YaST2/theme/current/wallpapers/welcome.jpg", "fallback text" ), - `PushButton(`opt(`default), "&OK") - ) - ); - UI::UserInput(); + UI::OpenDialog( + `VBox( + `Image (`id ("image"), "/usr/share/YaST2/theme/current/wallpapers/welcome.jpg", "fallback text"), + `PushButton(`opt(`default), "&OK") + ) + ); + UI::UserInput(); + if (UI::WidgetExists (`id ("image"))) { + UI::ChangeWidget (`id ("image"), `Enabled, false); + UI::UserInput(); + UI::ChangeWidget (`id ("image"), `Enabled, true); + UI::UserInput(); + } else { + y2error ("No such widget id"); + } UI::CloseDialog(); } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
coolo@svn.opensuse.org