-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP insert a system_role step in the installation (FATE#317481)
- Loading branch information
Showing
3 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
require "installation/select_system_role" | ||
Installation::SelectSystemRole.new.run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# encoding: utf-8 | ||
# TODO a cpyright header | ||
|
||
require "yast" | ||
module Installation | ||
class SelectSystemRole # < Yast::Client ? | ||
include Yast | ||
include Yast::I18n | ||
include Yast::UIShortcuts | ||
|
||
def initialize | ||
textdomain "installation" | ||
Yast.import "UI" | ||
Yast.import "Wizard" | ||
|
||
end | ||
|
||
def run | ||
inst_workflow_navigation | ||
|
||
setup_dialog | ||
|
||
run_dialog | ||
end | ||
|
||
def inst_workflow_navigation | ||
end | ||
|
||
def setup_dialog | ||
radios = RadioButtonGroup( | ||
Id(:roles), | ||
VBox( | ||
RadioButton(Id(:hamlet), _("Hamlet")), | ||
RadioButton(Id(:odette), _("Odette")), | ||
RadioButton(Id(:gollum), _("Gollum")) | ||
) | ||
) | ||
Wizard.SetContents( | ||
_("Systoem Role"), | ||
radios, | ||
"help is overrated", | ||
true, # wtf | ||
true # wtf | ||
) | ||
end | ||
|
||
def run_dialog | ||
ui = nil | ||
loop do | ||
ui = UI.UserInput | ||
|
||
ui = :abort if ui == :cancel | ||
|
||
break if ui == :next || ui == :back || ui == :abort | ||
|
||
# handle other ui | ||
end | ||
|
||
ui | ||
end | ||
end | ||
end |