Author: aschnell
Date: Fri May 6 12:02:04 2011
New Revision: 63920
URL: http://svn.opensuse.org/viewcvs/yast?rev=63920&view=rev
Log:
- backported some modules and functions need by storage
Added:
branches/SuSE-Code-11-SP2-Branch/yast2/library/modules/ContextMenu.ycp
branches/SuSE-Code-11-SP2-Branch/yast2/library/modules/Event.ycp
Modified:
branches/SuSE-Code-11-SP2-Branch/yast2/VERSION
branches/SuSE-Code-11-SP2-Branch/yast2/library/control/src/ProductFeatures.ycp
branches/SuSE-Code-11-SP2-Branch/yast2/library/types/src/String.ycp
branches/SuSE-Code-11-SP2-Branch/yast2/package/yast2.changes
Modified: branches/SuSE-Code-11-SP2-Branch/yast2/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/yast2/VERSION?rev=63920&r1=63919&r2=63920&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/yast2/VERSION (original)
+++ branches/SuSE-Code-11-SP2-Branch/yast2/VERSION Fri May 6 12:02:04 2011
@@ -1 +1 @@
-2.17.92
+2.17.93
Modified: branches/SuSE-Code-11-SP2-Branch/yast2/library/control/src/ProductFeatures.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/yast2/library/control/src/ProductFeatures.ycp?rev=63920&r1=63919&r2=63920&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/yast2/library/control/src/ProductFeatures.ycp (original)
+++ branches/SuSE-Code-11-SP2-Branch/yast2/library/control/src/ProductFeatures.ycp Fri May 6 12:02:04 2011
@@ -218,6 +218,25 @@
}
/**
+ * Get value of a feature
+ * @stable
+ * @param section string section of the feature
+ * @param features string feature name
+ * @return integer the feature value
+ */
+global integer GetIntegerFeature (string section, string feature) {
+ any value = GetFeature (section, feature);
+ if (value == nil)
+ return nil;
+ else if (is (value, integer))
+ return (integer) value;
+ else if (is (value, string))
+ return tointeger((string) value);
+ else
+ return nil;
+}
+
+/**
* Set value of a feature
* @stable
* @param section string section of the feature
Added: branches/SuSE-Code-11-SP2-Branch/yast2/library/modules/ContextMenu.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/yast2/library/modules/ContextMenu.ycp?rev=63920&view=auto
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/yast2/library/modules/ContextMenu.ycp (added)
+++ branches/SuSE-Code-11-SP2-Branch/yast2/library/modules/ContextMenu.ycp Fri May 6 12:02:04 2011
@@ -0,0 +1,17 @@
+/**
+ * File: ContextMenu.ycp
+ * Package: yast2
+ * Summary: UI ContextMenu Helper
+ * Authors: Arvin Schnell
+ */
+{
+ module "ContextMenu";
+
+
+ global symbol Simple(list<term> items)
+ {
+ UI::OpenContextMenu(`menu(items));
+
+ return (symbol) UI::UserInput();
+ }
+}
Added: branches/SuSE-Code-11-SP2-Branch/yast2/library/modules/Event.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/yast2/library/modules/Event.ycp?rev=63920&view=auto
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/yast2/library/modules/Event.ycp (added)
+++ branches/SuSE-Code-11-SP2-Branch/yast2/library/modules/Event.ycp Fri May 6 12:02:04 2011
@@ -0,0 +1,151 @@
+/**
+ * File: Event.ycp
+ * Package: yast2
+ * Summary: UI Event Helpers
+ * Authors: Arvin Schnell
+ */
+{
+ module "Event";
+
+
+ /**
+ * Returns id of widget causing the event.
+ */
+ global symbol GetWidgetId(map event)
+ {
+ return event["ID"]:(symbol)(nil);
+ }
+
+
+ /**
+ * Checks that the EventType is WidgetEvent and the EventReason is
+ * Activated.
+ *
+ * Returns id or nil.
+ */
+ global symbol IsWidgetActivated(map event)
+ {
+ if (event["EventType"]:"Unknown" != "WidgetEvent")
+ return nil;
+
+ if (event["EventReason"]:"Unknown" != "Activated")
+ return nil;
+
+ return event["ID"]:(symbol)(nil);
+ }
+
+
+ /**
+ * Checks that the EventType is WidgetEvent and the EventReason is
+ * SelectionChanged.
+ *
+ * Returns id or nil.
+ */
+ global symbol IsWidgetSelectionChanged(map event)
+ {
+ if (event["EventType"]:"Unknown" != "WidgetEvent")
+ return nil;
+
+ if (event["EventReason"]:"Unknown" != "SelectionChanged")
+ return nil;
+
+ return event["ID"]:(symbol)(nil);
+ }
+
+
+ /**
+ * Checks that the EventType is WidgetEvent and the EventReason is
+ * ValueChanged.
+ *
+ * Returns id or nil.
+ */
+ global symbol IsWidgetValueChanged(map event)
+ {
+ if (event["EventType"]:"Unknown" != "WidgetEvent")
+ return nil;
+
+ if (event["EventReason"]:"Unknown" != "ValueChanged")
+ return nil;
+
+ return event["ID"]:(symbol)(nil);
+ }
+
+
+ /**
+ * 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.
+ */
+ global symbol IsWidgetContextMenuActivated(map event)
+ {
+ if (event["EventType"]:"Unknown" != "WidgetEvent")
+ return nil;
+
+ if (event["EventReason"]:"Unknown" != "ContextMenuActivated")
+ return nil;
+
+ return event["ID"]:(symbol)(nil);
+ }
+
+
+ /**
+ * Checks that the EventType is MenuEvent.
+ *
+ * return id or nil.
+ */
+ global symbol IsMenu(map event)
+ {
+ if (event["EventType"]:"Unknown" != "MenuEvent")
+ return nil;
+
+ return event["ID"]:(symbol)(nil);
+ }
+
+
+ /**
+ * Checks that the EventType is TimeoutEvent.
+ *
+ * return id or nil.
+ */
+ global symbol IsTimeout(map event)
+ {
+ if (event["EventType"]:"Unknown" != "TimeoutEvent")
+ return nil;
+
+ return event["ID"]:(symbol)(nil);
+ }
+
+
+ /**
+ * Checks that the EventType is CancelEvent.
+ *
+ * return id or nil.
+ */
+ global symbol IsCancel(map event)
+ {
+ if (event["EventType"]:"Unknown" != "CancelEvent")
+ return nil;
+
+ return event["ID"]:(symbol)(nil);
+ }
+}
Modified: branches/SuSE-Code-11-SP2-Branch/yast2/library/types/src/String.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/yast2/library/types/src/String.ycp?rev=63920&r1=63919&r2=63920&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/yast2/library/types/src/String.ycp (original)
+++ branches/SuSE-Code-11-SP2-Branch/yast2/library/types/src/String.ycp Fri May 6 12:02:04 2011
@@ -1242,5 +1242,13 @@
return ret;
}
+/**
+ * Checks whether string str starts with test.
+ */
+global boolean StartsWith(string str, string test)
+{
+ return search(str, test) == 0;
+}
+
/* EOF */
}
Modified: branches/SuSE-Code-11-SP2-Branch/yast2/package/yast2.changes
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/yast2/package/yast2.changes?rev=63920&r1=63919&r2=63920&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/yast2/package/yast2.changes (original)
+++ branches/SuSE-Code-11-SP2-Branch/yast2/package/yast2.changes Fri May 6 12:02:04 2011
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Fri May 06 11:47:03 CEST 2011 - aschnell@suse.de
+
+- backported some modules and functions need by storage
+- 2.17.93
+
+-------------------------------------------------------------------
Wed Jan 19 13:49:48 CET 2011 - jsrain@suse.cz
- adaptations for unattended migration (fate#310481)
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org