Module: Yast::BootloaderRoutinesDialogsInclude
- Defined in:
- src/include/bootloader/routines/dialogs.rb
Instance Method Summary (collapse)
-
- (Symbol) DetailsDialog(type)
Run dialog with detailed settings.
- - (Object) initialize_bootloader_routines_dialogs(include_target)
-
- (Symbol) MainDialog
Run dialog for kernel section editation.
-
- (Object) ReadDialog
Read settings dialog.
-
- (Object) testAbort
Test for abort.
-
- (Object) WriteDialog
Write settings dialog.
Instance Method Details
- (Symbol) DetailsDialog(type)
Run dialog with detailed settings
138 139 140 141 142 143 144 145 146 147 148 149 |
# File 'src/include/bootloader/routines/dialogs.rb', line 138 def DetailsDialog(type) dialogs = Bootloader.blDialogs if !Builtins.haskey(dialogs, type) Report.Message( # message _("There are no options to set for the current boot loader.") ) return :back end dialog = Ops.get(dialogs, type) dialog.call end |
- (Object) initialize_bootloader_routines_dialogs(include_target)
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'src/include/bootloader/routines/dialogs.rb', line 19 def initialize_bootloader_routines_dialogs(include_target) Yast.import "UI" textdomain "bootloader" Yast.import "BootCommon" Yast.import "CWM" Yast.import "Label" Yast.import "Mode" Yast.import "Popup" Yast.import "Wizard" Yast.import "Bootloader" Yast.import "Stage" Yast.include include_target, "bootloader/routines/popups.rb" Yast.include include_target, "bootloader/routines/global_widgets.rb" Yast.include include_target, "bootloader/grub2/dialogs.rb" @return_tab = "installation" end |
- (Symbol) MainDialog
Run dialog for kernel section editation
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'src/include/bootloader/routines/dialogs.rb', line 74 def MainDialog Builtins.y2milestone("Running Main Dialog") lt = Bootloader.getLoaderType contents = VBox("tab") # F#300779 - Install diskless client (NFS-root) # kokso: additional warning that root partition is nfs type -> bootloader will not be installed device = BootCommon.getBootDisk if device == "/dev/nfs" && Mode.installation Popup.Message( _( "The boot partition is of type NFS. Bootloader cannot be installed." ) ) Builtins.y2milestone( "dialogs::MainDialog() -> Boot partition is nfs type, bootloader will not be installed." ) return :next end # F#300779: end = ["tab"] = Builtins.union(CommonGlobalWidgets(), Bootloader.blWidgetMaps) Ops.set( , "tab", CWMTab.CreateWidget( { "tab_order" => ["boot_code_tab", "kernel_tab", "bootloader_tab"], "tabs" => Grub2TabDescr(), "widget_descr" => , "initial_tab" => "boot_code_tab" } ) ) Ops.set(, ["tab", "no_help"], "") # dialog caption caption = _("Boot Loader Settings") ret = CWM.ShowAndRun( { "widget_descr" => , "widget_names" => , "contents" => contents, "caption" => caption, "back_button" => "", "abort_button" => Label.CancelButton, "next_button" => Label.OKButton, "fallback_functions" => @global_handlers } ) if ret != :back && ret != :abort && ret != :cancel @return_tab = CWMTab.LastTab @return_tab = "installation" if @return_tab.include? "tab" #workaround different tab set for grub2 end ret end |
- (Object) ReadDialog
Read settings dialog
53 54 55 56 57 58 |
# File 'src/include/bootloader/routines/dialogs.rb', line 53 def ReadDialog Bootloader.test_abort = fun_ref(method(:testAbort), "boolean ()") Wizard.RestoreHelp(getInitProgressHelp) ret = Bootloader.Read ret ? :next : :abort end |
- (Object) testAbort
Test for abort.
42 43 44 45 46 47 48 49 |
# File 'src/include/bootloader/routines/dialogs.rb', line 42 def testAbort return false if Mode.commandline if :abort == UI.PollInput UI.CloseDialog if !Stage.initial return true end false end |
- (Object) WriteDialog
Write settings dialog
62 63 64 65 66 67 68 69 |
# File 'src/include/bootloader/routines/dialogs.rb', line 62 def WriteDialog if !Stage.initial Bootloader.test_abort = fun_ref(method(:testAbort), "boolean ()") end Wizard.RestoreHelp(getSaveProgressHelp) ret = Bootloader.Write ret ? :next : :abort end |