Skip to content

Commit

Permalink
Using an actual layout for the role dialog.
Browse files Browse the repository at this point in the history
  • Loading branch information
mvidner committed Mar 1, 2016
1 parent b04de91 commit 3e83917
Showing 1 changed file with 41 additions and 11 deletions.
52 changes: 41 additions & 11 deletions src/lib/installation/select_system_role.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# encoding: utf-8
# TODO a cpyright header
# TODO: a cpyright header

require "yast"
module Installation
Expand All @@ -12,7 +12,6 @@ def initialize
textdomain "installation"
Yast.import "UI"
Yast.import "Wizard"

end

def run
Expand All @@ -23,25 +22,31 @@ def run
run_dialog
end

private

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"))
* roles.map do |r|
VBox(
Left(RadioButton(Id(r[:id]), r[:label])),
Left(Label(r[:description])),
VSpacing(2)
)
end
)
)
Wizard.SetContents(
_("Systoem Role"),
radios,
"help is overrated",
true, # wtf
true # wtf
)
_("System Role"),
radios,
"FIXME help is overrated",
true, # wtf
true # wtf
)
end

def run_dialog
Expand All @@ -58,5 +63,30 @@ def run_dialog

ui
end

def roles
# a prototype. this will be read from the control file
# FIXME: translation mechanism??
[
{
id: "role1",
label: "Name of First Role",
description: "This rolem will ipsum the XYZ pattern of packages\n" \
"and partition the hard disk in an ZYX configuration"
},
{
id: "role2",
label: "Name of Second Role",
description: "This rolem will ipsum the XYZ pattern of packages\n" \
"and partition the hard disk in an ZYX configuration"
},
{
id: "role3",
label: "Name of Third Role",
description: "This rolem will ipsum the XYZ pattern of packages\n" \
"and partition the hard disk in an ZYX configuration"
}
]
end
end
end

0 comments on commit 3e83917

Please sign in to comment.