Mailinglist Archive: yast-commit (883 mails)

< Previous Next >
[yast-commit] r57925 - in /trunk/yast2: VERSION library/control/src/ProductFeatures.ycp library/control/testsuite/tests/restore.out library/control/testsuite/tests/restore.ycp package/yast2.changes
  • From: aschnell@xxxxxxxxxxxxxxxx
  • Date: Wed, 08 Jul 2009 10:00:42 -0000
  • Message-id: <E1MOTxC-0002yO-9x@xxxxxxxxxxxxxxxx>
Author: aschnell
Date: Wed Jul 8 12:00:41 2009
New Revision: 57925

URL: http://svn.opensuse.org/viewcvs/yast?rev=57925&view=rev
Log:
- added GetIntegerFeature() and SetIntegerFeature() to ProductFeatures module

Modified:
trunk/yast2/VERSION
trunk/yast2/library/control/src/ProductFeatures.ycp
trunk/yast2/library/control/testsuite/tests/restore.out
trunk/yast2/library/control/testsuite/tests/restore.ycp
trunk/yast2/package/yast2.changes

Modified: trunk/yast2/VERSION
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/yast2/VERSION?rev=57925&r1=57924&r2=57925&view=diff
==============================================================================
--- trunk/yast2/VERSION (original)
+++ trunk/yast2/VERSION Wed Jul 8 12:00:41 2009
@@ -1 +1 @@
-2.18.18
+2.18.19

Modified: trunk/yast2/library/control/src/ProductFeatures.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/control/src/ProductFeatures.ycp?rev=57925&r1=57924&r2=57925&view=diff
==============================================================================
--- trunk/yast2/library/control/src/ProductFeatures.ycp (original)
+++ trunk/yast2/library/control/src/ProductFeatures.ycp Wed Jul 8 12:00:41 2009
@@ -214,7 +214,25 @@
return true;
else
return false;
+}

+/**
+ * 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;
}

/**
@@ -254,6 +272,17 @@
}

/**
+ * Set value of a feature
+ * @stable
+ * @param section string section of the feature
+ * @param features string feature name
+ * @param value integer the feature value
+ */
+global void SetIntegerFeature (string section, string feature, integer value) {
+ SetFeature (section, feature, value);
+}
+
+/**
* Exports the current set of ProductFeatures
*
* @return map <string, map <string, any> > features

Modified: trunk/yast2/library/control/testsuite/tests/restore.out
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/control/testsuite/tests/restore.out?rev=57925&r1=57924&r2=57925&view=diff
==============================================================================
--- trunk/yast2/library/control/testsuite/tests/restore.out (original)
+++ trunk/yast2/library/control/testsuite/tests/restore.out Wed Jul 8 12:00:41
2009
@@ -2,3 +2,4 @@
Return expert
Return yes
Return true
+Return 95

Modified: trunk/yast2/library/control/testsuite/tests/restore.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/control/testsuite/tests/restore.ycp?rev=57925&r1=57924&r2=57925&view=diff
==============================================================================
--- trunk/yast2/library/control/testsuite/tests/restore.ycp (original)
+++ trunk/yast2/library/control/testsuite/tests/restore.ycp Wed Jul 8 12:00:41
2009
@@ -19,6 +19,6 @@
TEST (``(ProductFeatures::GetStringFeature ("globals", "ui_mode")), [READ], 0);
TEST (``(ProductFeatures::GetStringFeature ("globals", "enable_autologin")),
[READ], 0);
TEST (``(ProductFeatures::GetBooleanFeature ("globals", "enable_autologin")),
[READ], 0);
-
+TEST (``(ProductFeatures::GetIntegerFeature ("globals",
"incomplete_translation_treshold")), [READ], 95);

}

Modified: trunk/yast2/package/yast2.changes
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/yast2/package/yast2.changes?rev=57925&r1=57924&r2=57925&view=diff
==============================================================================
--- trunk/yast2/package/yast2.changes (original)
+++ trunk/yast2/package/yast2.changes Wed Jul 8 12:00:41 2009
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Wed Jul 08 11:29:44 CEST 2009 - aschnell@xxxxxxx
+
+- added GetIntegerFeature() and SetIntegerFeature() to
+ ProductFeatures module
+- 2.18.19
+
+-------------------------------------------------------------------
Fri Jun 19 13:01:19 CEST 2009 - jsrain@xxxxxxx

- removed cyclic dependency between YCP modules preventing from

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages