Author: aschnell Date: Fri Mar 13 15:32:47 2009 New Revision: 56119 URL: http://svn.opensuse.org/viewcvs/yast?rev=56119&view=rev Log: - added Event::IsWidgetActivatedOrSelectionChanged Modified: trunk/yast2/library/modules/Event.ycp Modified: trunk/yast2/library/modules/Event.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/modules/Event.ycp?rev=56119&r1=56118&r2=56119&view=diff ============================================================================== --- trunk/yast2/library/modules/Event.ycp (original) +++ trunk/yast2/library/modules/Event.ycp Fri Mar 13 15:32:47 2009 @@ -46,6 +46,25 @@ /** * Checks that the EventType is WidgetEvent and the EventReason is + * Activated or SelectionChanged. + * + * Returns id or nil. + */ + global symbol IsWidgetActivatedOrSelectionChanged(map event) + { + if (event["EventType"]:"Unknown" != "WidgetEvent") + return nil; + + if ((event["EventReason"]:"Unknown" != "Activated") && + (event["EventReason"]:"Unknown" != "SelectionChanged")) + return nil; + + return event["ID"]:(symbol)(nil); + } + + + /** + * Checks that the EventType is WidgetEvent and the EventReason is * ContextMenuActivated. * * Returns id or nil. -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org