Class: Installation::Widgets::ConsoleButton

Inherits:
CWM::PushButton
  • Object
show all
Defined in:
src/lib/installation/widgets/console_button.rb

Overview

A CWM button for starting the installer configuration dialog

Instance Method Summary collapse

Constructor Details

#initialize(focused_widget = nil) ⇒ ConsoleButton

constructor the initial focus

Parameters:

  • focused_widget (CWM::Widget, nil) (defaults to: nil)

    widget which should have


26
27
28
29
30
# File 'src/lib/installation/widgets/console_button.rb', line 26

def initialize(focused_widget = nil)
  super()
  textdomain "installation"
  @focus = focused_widget
end

Instance Method Details

#handleObject


43
44
45
46
47
48
49
# File 'src/lib/installation/widgets/console_button.rb', line 43

def handle
  require "installation/console/menu"
  ::Installation::Console::Menu.new.run
  # ignore the console menu result, force refreshing the dialog
  # to activate possible changes
  :redraw
end

#initObject


32
33
34
35
36
# File 'src/lib/installation/widgets/console_button.rb', line 32

def init
  # set the focus (only in text mode, in GUI the focus does not change
  # after displaying the button)
  @focus.focus if @focus && Yast::UI.TextMode
end

#labelObject


38
39
40
41
# File 'src/lib/installation/widgets/console_button.rb', line 38

def label
  # use an hamburger icon to make the button as small as possible
  ""
end