Author: jreidinger
Date: Tue Feb 24 16:24:42 2009
New Revision: 55734
URL: http://svn.opensuse.org/viewcvs/yast?rev=55734&view=rev
Log:
implement checkbox for grub
Added:
branches/tmp/juhliarik/bootloader-UIrefactor/src/routines/grub_options.ycp
Modified:
branches/tmp/juhliarik/bootloader-UIrefactor/src/routines/common_options.ycp
Modified: branches/tmp/juhliarik/bootloader-UIrefactor/src/routines/common_options.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/juhliarik/bootloader-UIrefactor/src/routines/common_options.ycp?rev=55734&r1=55733&r2=55734&view=diff
==============================================================================
--- branches/tmp/juhliarik/bootloader-UIrefactor/src/routines/common_options.ycp (original)
+++ branches/tmp/juhliarik/bootloader-UIrefactor/src/routines/common_options.ycp Tue Feb 24 16:24:42 2009
@@ -19,8 +19,35 @@
textdomain "bootloader";
+void InitGlobalBool(string widget, map event){
+ boolean value = false;
+ if (BootCommon::globals[widget]:"false" == "true"){
+ value = true;
+ }
+ UI::ChangeWidget (`id (widget), `Value, value);
+}
+
+void StoreGlobalBool(string widget, map event){
+ boolean value = (boolean)UI::QueryWidget (`id (widget), `Value);
+ if (value){
+ BootCommon::globals[widget] = "true";
+ } else {
+ BootCommon::globals[widget] = "false";
+ }
+}
+
+void CommonCheckboxWidget(string label, string help){
+ return $[
+ "widget" : `checkbox,
+ "label" : label,
+ "init" : InitGlobalBool,
+ "store" : StoreGlobalBool,
+ "help" : help,
+ ];
+}
+
void InitGlobalInt(string widget){
- integer value = BootCommon::globals[widget]:0;
+ integer value = tointeger(BootCommon::globals[widget]:"0");
UI::ChangeWidget (`id (widget), `Value, value);
}
void StoreGlobalInt(string widget){
Added: branches/tmp/juhliarik/bootloader-UIrefactor/src/routines/grub_options.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/juhliarik/bootloader-UIrefactor/src/routines/grub_options.ycp?rev=55734&view=auto
==============================================================================
--- branches/tmp/juhliarik/bootloader-UIrefactor/src/routines/grub_options.ycp (added)
+++ branches/tmp/juhliarik/bootloader-UIrefactor/src/routines/grub_options.ycp Tue Feb 24 16:24:42 2009
@@ -0,0 +1,45 @@
+/**
+ * File:
+ * include/bootloader/routines/grub_options.ycp
+ *
+ * Module:
+ * Bootloader installation and configuration
+ *
+ * Summary:
+ * Grub widgets for bootloader options.
+ *
+ * Authors:
+ * Josef Reidinger