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
137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'src/include/bootloader/routines/dialogs.rb', line 137 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 |
# 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
69 70 71 72 73 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 |
# File 'src/include/bootloader/routines/dialogs.rb', line 69 def MainDialog Builtins.y2milestone("Running Main Dialog") lt = Bootloader.getLoaderType if lt == "none" contents = VBox("loader_type") = ["loader_type"] else contents = VBox("tab") = ["tab"] end # 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 = 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 || "tab" @return_tab = "installation" if @return_tab.include? "tab" # workaround different tab set for grub2 end ret end |
- (Object) ReadDialog
Read settings dialog
49 50 51 52 53 54 |
# File 'src/include/bootloader/routines/dialogs.rb', line 49 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.
41 42 43 44 45 |
# File 'src/include/bootloader/routines/dialogs.rb', line 41 def testAbort return false if Mode.commandline UI.PollInput == :abort end |
- (Object) WriteDialog
Write settings dialog
58 59 60 61 62 63 64 65 |
# File 'src/include/bootloader/routines/dialogs.rb', line 58 def WriteDialog if !Stage.initial Bootloader.test_abort = fun_ref(method(:testAbort), "boolean ()") end Wizard.RestoreHelp(getSaveProgressHelp) ret = Bootloader.Write ret ? :next : :abort end |