Author: juhliarik Date: Tue Mar 3 16:28:28 2009 New Revision: 55897 URL: http://svn.opensuse.org/viewcvs/yast?rev=55897&view=rev Log: updated UI for click on Add button Modified: branches/tmp/juhliarik/bootloader-UIrefactor/src/modules/BootCommon.ycp branches/tmp/juhliarik/bootloader-UIrefactor/src/modules/BootGRUB.ycp branches/tmp/juhliarik/bootloader-UIrefactor/src/routines/dialogs.ycp branches/tmp/juhliarik/bootloader-UIrefactor/src/routines/section_widgets.ycp branches/tmp/juhliarik/bootloader-UIrefactor/src/routines/switcher.ycp Modified: branches/tmp/juhliarik/bootloader-UIrefactor/src/modules/BootCommon.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/juhliarik/bootloader-UIref... ============================================================================== --- branches/tmp/juhliarik/bootloader-UIrefactor/src/modules/BootCommon.ycp (original) +++ branches/tmp/juhliarik/bootloader-UIrefactor/src/modules/BootCommon.ycp Tue Mar 3 16:28:28 2009 @@ -399,13 +399,17 @@ // = [ "linux", "failsafe", "initrd", "floppy" ]; /** + * Common section types + */ +global list<string> common_sections_types = ["image", "other"]; + +/** * List of all supported bootloaders */ global list<string> bootloaders = ["lilo", "grub", "elilo", "milo", "silo", "aboot", "zipl", "ppc", "mips"]; - /** * bnc #468922 - problem with longtime running the parsing a huge number of disks * map<string,map> the map of all partitions with info about it -> @@ -762,6 +766,16 @@ return exp; } +/** + * Function return common section types + * @return list string section types + */ + +global list<string> Common_sections_types() +{ + return common_sections_types; +} + /** * Import settings from a map Modified: branches/tmp/juhliarik/bootloader-UIrefactor/src/modules/BootGRUB.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/juhliarik/bootloader-UIref... ============================================================================== --- branches/tmp/juhliarik/bootloader-UIrefactor/src/modules/BootGRUB.ycp (original) +++ branches/tmp/juhliarik/bootloader-UIrefactor/src/modules/BootGRUB.ycp Tue Mar 3 16:28:28 2009 @@ -794,6 +794,11 @@ return (result["exit"]:-1 == 0); } +list <string> grub_section_types() +{ + return ["image", "xen", "configfile", "other"]; +} + /** * Return map of provided functions @@ -813,7 +818,7 @@ "widgets" : genericWidgets, "wizard_sequencer" : WizardSequenzer, "dialogs" : Dialogs, - "section_types" : section_types, + "section_types" : grub_section_types, "flagonetimeboot" : FlagOnetimeBoot, ]; } Modified: branches/tmp/juhliarik/bootloader-UIrefactor/src/routines/dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/juhliarik/bootloader-UIref... ============================================================================== --- branches/tmp/juhliarik/bootloader-UIrefactor/src/routines/dialogs.ycp (original) +++ branches/tmp/juhliarik/bootloader-UIrefactor/src/routines/dialogs.ycp Tue Mar 3 16:28:28 2009 @@ -262,8 +262,10 @@ ), `HStretch ()); list<string> widget_names = ["section_type"]; - map<string,map<string,any> > widget_descr = (map<string,map<string,any> >) - union (CommonSectionWidgets (), Bootloader::blWidgetMaps ()); + //map<string,map<string,any> > widget_descr = (map<string,map<string,any> >) + // union (CommonSectionWidgets (), Bootloader::blWidgetMaps ()); + map<string,map<string,any> > widget_descr = CommonSectionWidgets (); + // dialog caption string caption = _("Boot Loader Settings: Section Management"); return CWM::ShowAndRun ($[ @@ -272,8 +274,8 @@ "contents" : contents, "caption" : caption, "back_button" : Label::BackButton (), - "abort_button" : (!Mode::installation()) ? Label::AbortButton () : Label::CancelButton (), - "next_button" : (!Mode::installation()) ? Label::NextButton () : Label::OKButton (), + "abort_button" : Label::CancelButton (), + "next_button" : Label::NextButton (), ]); } Modified: branches/tmp/juhliarik/bootloader-UIrefactor/src/routines/section_widgets.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/juhliarik/bootloader-UIref... ============================================================================== --- branches/tmp/juhliarik/bootloader-UIrefactor/src/routines/section_widgets.ycp (original) +++ branches/tmp/juhliarik/bootloader-UIrefactor/src/routines/section_widgets.ycp Tue Mar 3 16:28:28 2009 @@ -318,14 +318,16 @@ _("Clone Selected Section"), true))); count = count + 1; } - list<string> section_types = ["image", "xen", "chainloader"]; + list<string> section_types = Bootloader::blsection_types(); map<string,string> section_types_descr = $[ // radio button - "image" : _("Kernel (Linux)"), + "image" : _("Image Section"), // radio button - "xen" : _("Kernel via XEN"), + "xen" : _("Xen Section"), // radio button (don't translate 'chainloader') - "chainloader" : _("Other System (Chainloader)"), + "other" : _("Other System (Chainloader)"), + // radio button + "configfile" : _("Menu Section"), ]; foreach (string t, section_types, { if (count > 0) Modified: branches/tmp/juhliarik/bootloader-UIrefactor/src/routines/switcher.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/juhliarik/bootloader-UIref... ============================================================================== --- branches/tmp/juhliarik/bootloader-UIrefactor/src/routines/switcher.ycp (original) +++ branches/tmp/juhliarik/bootloader-UIrefactor/src/routines/switcher.ycp Tue Mar 3 16:28:28 2009 @@ -105,6 +105,16 @@ void() toEval = functions["propose"]:BootCommon::Propose; toEval (); } +/** + * Get sections types + * @return list <string> section types + */ +global list <string> blsection_types () +{ + map functions = getFunctions (BootCommon::getLoaderType (false)); + list<string>() toEval = functions["section_types"]:BootCommon::Common_sections_types; + return toEval (); +} /** * Save bootloader cfg. files to the cache of the pluglib -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org