Module: Yast::HwinfoSystemSettingsUiInclude
- Defined in:
- ../../src/include/hwinfo/system_settings_ui.rb
Instance Method Summary (collapse)
- - (Object) HandleElevatorSettings(key, event)
- - (Object) InitElevatorSettings(value)
- - (Object) initialize_hwinfo_system_settings_ui(include_target)
- - (Object) InitSysRqSettings(key)
- - (Object) ReadSystemSettingsDialog
- - (Object) StoreElevatorSettings(key, event)
- - (Object) StoreSysRqSettings(key, event)
- - (Object) WriteSystemSettingsDialog
Instance Method Details
- (Object) HandleElevatorSettings(key, event)
119 120 121 122 123 |
# File '../../src/include/hwinfo/system_settings_ui.rb', line 119 def HandleElevatorSettings(key, event) event = deep_copy(event) Builtins.y2milestone("Key: %1, Event: %2", key, event) nil end |
- (Object) InitElevatorSettings(value)
125 126 127 128 129 130 |
# File '../../src/include/hwinfo/system_settings_ui.rb', line 125 def InitElevatorSettings(value) Wizard.DisableBackButton UI.ChangeWidget(Id("elevator"), :Value, SystemSettings.GetIOScheduler) nil end |
- (Object) initialize_hwinfo_system_settings_ui(include_target)
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File '../../src/include/hwinfo/system_settings_ui.rb', line 13 def initialize_hwinfo_system_settings_ui(include_target) Yast.import "UI" Yast.import "Progress" Yast.import "SystemSettings" Yast.import "Wizard" # ReadSettings() Yast.include include_target, "hwinfo/newid.rb" textdomain "tune" # Short sleep between reads or writes @sl = 500 end |
- (Object) InitSysRqSettings(key)
142 143 144 145 146 147 |
# File '../../src/include/hwinfo/system_settings_ui.rb', line 142 def InitSysRqSettings(key) Wizard.DisableBackButton UI.ChangeWidget(Id("sysrq"), :Value, SystemSettings.GetSysRqKeysEnabled) nil end |
- (Object) ReadSystemSettingsDialog
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File '../../src/include/hwinfo/system_settings_ui.rb', line 28 def ReadSystemSettingsDialog caption = _("Reading the Configuration") # FIXME: s390: disable reading PCI IDs Progress.New( caption, " ", 2, [_("Read the PCI ID settings"), _("Read the system settings")], [ _("Reading the PCI ID settings..."), _("Reading the system settings..."), _("Finished") ], _( "<p><b><big>Reading the Configuration</big></b><br>\nPlease wait...</p>" ) ) progress_orig = nil Progress.NextStage progress_orig = Progress.set(false) # calling PCI ID Read() ReadSettings() Progress.set(progress_orig) Progress.NextStage progress_orig = Progress.set(false) # I have to admit that this is very ugly but it is here # to avoid of the very long starting time of the yast module # because the Storage module (which is imported by the Bootloader (imported by the SystemSettings module)) # has a Read() function call in its constructor. SystemSettings.Read Progress.set(progress_orig) Progress.NextStage Builtins.sleep(Ops.multiply(2, @sl)) :next end |
- (Object) StoreElevatorSettings(key, event)
132 133 134 135 136 137 138 139 140 |
# File '../../src/include/hwinfo/system_settings_ui.rb', line 132 def StoreElevatorSettings(key, event) event = deep_copy(event) Builtins.y2milestone("Key: %1, Event: %2", key, event) elevator_new = Convert.to_string(UI.QueryWidget(Id("elevator"), :Value)) SystemSettings.SetIOScheduler(elevator_new) nil end |
- (Object) StoreSysRqSettings(key, event)
149 150 151 152 153 154 155 156 157 158 159 |
# File '../../src/include/hwinfo/system_settings_ui.rb', line 149 def StoreSysRqSettings(key, event) event = deep_copy(event) Builtins.y2milestone("Key: %1, Event: %2", key, event) sysrq_new = Convert.to_boolean(UI.QueryWidget(Id("sysrq"), :Value)) if SystemSettings.GetSysRqKeysEnabled != sysrq_new SystemSettings.SetSysRqKeysEnabled(sysrq_new) end nil end |
- (Object) WriteSystemSettingsDialog
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 |
# File '../../src/include/hwinfo/system_settings_ui.rb', line 70 def WriteSystemSettingsDialog caption = _("Saving the Configuration") Progress.New( caption, " ", 2, [_("Save the PCI ID settings"), _("Save the system settings")], [ _("Saving the PCI ID settings..."), _("Saving the system settings..."), _("Finished") ], _( "<p><b><big>Saving the Configuration</big></b><br>\nPlease wait...</p>" ) ) progress_orig = nil Progress.NextStage progress_orig = Progress.set(false) # calling PCI ID Write() WriteSettings() Progress.set(progress_orig) Builtins.sleep(@sl) Progress.NextStage progress_orig = Progress.set(false) if SystemSettings.Modified # activate the current configuration SystemSettings.Activate # save the configuration SystemSettings.Write else Builtins.y2milestone("SystemSettings:: have not been modified") end Progress.set(progress_orig) Progress.NextStage Builtins.sleep(Ops.multiply(2, @sl)) :next end |