Class: Installation::Console::Menu
- Inherits:
-
CWM::Dialog
- Object
- CWM::Dialog
- Installation::Console::Menu
- Defined in:
- src/lib/installation/console/menu.rb
Overview
the main dialog for configuring the installer
testing in a running system: Y2DIR=./src ruby -I src/lib -r installation/console/menu.rb -e \ 'Yast.ui_component="qt";Yast.import("Wizard");Yast::Wizard.CreateDialog; \ ::Installation::Console::Menu.run'
Instance Method Summary collapse
-
#abort_button ⇒ Object
hide abort button.
-
#back_button ⇒ Object
hide back button.
-
#can_start? ⇒ Boolean
Is the toplevel dialog a wizard dialog? We cannot display the dialog in Qt UI if a popup is currently displayed...
-
#contents ⇒ Object
the content of the dialog.
- #help ⇒ Object
-
#initialize ⇒ Menu
constructor
A new instance of Menu.
-
#next_button ⇒ Object
show [OK] button.
- #run ⇒ Object
-
#should_open_dialog? ⇒ Boolean
create a new Wizard dialog to hide the installation steps on the left side.
- #title ⇒ Object
Constructor Details
#initialize ⇒ Menu
Returns a new instance of Menu.
37 38 39 40 |
# File 'src/lib/installation/console/menu.rb', line 37 def initialize super textdomain "installation" end |
Instance Method Details
#abort_button ⇒ Object
hide abort button
79 80 81 |
# File 'src/lib/installation/console/menu.rb', line 79 def "" end |
#back_button ⇒ Object
hide back button
84 85 86 |
# File 'src/lib/installation/console/menu.rb', line 84 def "" end |
#can_start? ⇒ Boolean
Is the toplevel dialog a wizard dialog? We cannot display the dialog in Qt UI if a popup is currently displayed...
100 101 102 103 104 105 106 107 108 109 |
# File 'src/lib/installation/console/menu.rb', line 100 def can_start? return true if Yast::UI.TextMode || Yast::Wizard.IsWizardDialog # TRANSLATORS: error message Yast::Report.Error(_("The installer configuration dialog cannot be displayed"\ " when a popup window is visible.\nClose the popup first and then" \ " repeat the action.")) false end |
#contents ⇒ Object
the content of the dialog
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'src/lib/installation/console/menu.rb', line 57 def contents # load the plugins Plugins.load_plugins # collect the plugin widgets = MenuPlugin. # insert a small spacing between the widgets depending on the list size, # no spacing in ncurses if there are too many widgets # (the size is rounded down to 0) spacing = (.size > 10) ? 0.4 : 1 # this is a "join" for an Array... = .flat_map { |w| [w, VSpacing(spacing)] }.tap(&:pop) VBox(*) end |
#help ⇒ Object
93 94 95 96 |
# File 'src/lib/installation/console/menu.rb', line 93 def help _("<p>This is a special configuration menu which allows configuring " \ "the system during installation or tweak some installation options.</p>") end |
#next_button ⇒ Object
show [OK] button
74 75 76 |
# File 'src/lib/installation/console/menu.rb', line 74 def Yast::Label.OKButton end |
#run ⇒ Object
47 48 49 50 51 52 53 54 |
# File 'src/lib/installation/console/menu.rb', line 47 def run return nil unless can_start? loop do ret = super break if [:next, :back, :abort, :close].include?(ret) end end |
#should_open_dialog? ⇒ Boolean
create a new Wizard dialog to hide the installation steps on the left side
89 90 91 |
# File 'src/lib/installation/console/menu.rb', line 89 def should_open_dialog? true end |
#title ⇒ Object
42 43 44 45 |
# File 'src/lib/installation/console/menu.rb', line 42 def title # TRANSLATORS: dialog title _("Configuration") end |