Skip to content

Commit

Permalink
Drop icons in Wizard as it do not provide additional value (proposed …
Browse files Browse the repository at this point in the history
…by designer Kenneth Wimer)
  • Loading branch information
jreidinger committed Jan 21, 2014
1 parent b53a410 commit 383b3d2
Showing 1 changed file with 2 additions and 28 deletions.
30 changes: 2 additions & 28 deletions library/wizard/src/modules/Wizard.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@ def main
Yast.import "Directory"
Yast.import "OSRelease"

# keep trailing "/" !!
@theme_path = Ops.add(Directory.themedir, "/current")
@icon_path = Ops.add(@theme_path, "/icons/22x22/apps")
@default_icon = Ops.add(@icon_path, "/yast.png")

@have_fancy_ui_cache = nil

# this variable is set from Product:: constructor
Expand Down Expand Up @@ -455,8 +450,6 @@ def OpenNextBackDialog
Label.NextButton
)
)

UI.WizardCommand(term(:SetDialogIcon, @default_icon))
else
OpenDialog(NextBackDialog())
UI.SetFocus(Id(:next))
Expand Down Expand Up @@ -484,7 +477,6 @@ def OpenAcceptDialog

# Don't let sloppy calls to Wizard::SetContents() disable this button by accident
UI.WizardCommand(term(:ProtectNextButton, true))
UI.WizardCommand(term(:SetDialogIcon, @default_icon))
else
OpenDialog(AcceptDialog())
UI.SetFocus(Id(:accept))
Expand Down Expand Up @@ -513,7 +505,6 @@ def OpenOKDialog

# Don't let sloppy calls to Wizard::SetContents() disable this button by accident
UI.WizardCommand(term(:ProtectNextButton, true))
UI.WizardCommand(term(:SetDialogIcon, @default_icon))
else
OpenDialog(OKDialog())
UI.SetFocus(Id(:ok))
Expand All @@ -539,8 +530,6 @@ def OpenAbortApplyFinishDialog
Label.FinishButton
)
)

UI.WizardCommand(term(:SetDialogIcon, @default_icon))
else
OpenDialog(GenericDialog(AbortApplyFinishButtonBox()))
UI.SetFocus(Id(:finish))
Expand Down Expand Up @@ -569,7 +558,6 @@ def OpenAcceptStepsDialog

# Don't let sloppy calls to Wizard::SetContents() disable this button by accident
UI.WizardCommand(term(:ProtectNextButton, true))
UI.WizardCommand(term(:SetDialogIcon, @default_icon))
else
OpenAcceptDialog()
end
Expand Down Expand Up @@ -597,7 +585,6 @@ def OpenAcceptAbortStepsDialog

# Don't let sloppy calls to Wizard::SetContents() disable this button by accident
UI.WizardCommand(term(:ProtectNextButton, true))
UI.WizardCommand(term(:SetDialogIcon, @default_icon))
else
OpenDialog(GenericDialog(AbortAcceptButtonBox()))
end
Expand All @@ -622,8 +609,6 @@ def OpenNextBackStepsDialog
Label.NextButton
)
)

UI.WizardCommand(term(:SetDialogIcon, @default_icon))
else
OpenNextBackDialog()
end
Expand Down Expand Up @@ -1039,7 +1024,6 @@ def OpenCancelOKDialog
)
)
HideBackButton()
UI.WizardCommand(term(:SetDialogIcon, @default_icon))
else
OpenDialog(NextBackDialog())
UI.SetFocus(Id(:next))
Expand Down Expand Up @@ -1168,7 +1152,7 @@ def SetDialogTitle(titleText)
# Sets the wizard 'title' icon to the specified icon from the standard icon
# directory.
#
# @note This is a stable API function
# @note Deprecated. Do nothing.
#
# @param [String] icon_name name (without path) of the new icon
# @see #ClearTitleIcon
Expand All @@ -1177,24 +1161,16 @@ def SetDialogTitle(titleText)
# SetTitleIcon ("yast-dns-server");
#
def SetTitleIcon(icon_name)
icon = icon_name == "" ?
"" :
Ops.add(Ops.add(Ops.add(@icon_path, "/"), icon_name), ".png")

UI.WizardCommand(term(:SetDialogIcon, icon))

nil
end


# Clear the wizard 'title' icon, i.e. replace it with nothing
#
# @note This is a stable API function
# @note Deprecated. Do nothing.
# @see #SetTitleIcon
#
def ClearTitleIcon
UI.WizardCommand(term(:SetDialogIcon, ""))

nil
end

Expand Down Expand Up @@ -1597,8 +1573,6 @@ def OpenTreeNextBackDialog
Label.NextButton
)
)

UI.WizardCommand(term(:SetDialogIcon, @default_icon))
else
OpenDialog(GenericTreeDialog(BackAbortNextButtonBox()))
UI.SetFocus(Id(:next))
Expand Down

0 comments on commit 383b3d2

Please sign in to comment.