Skip to content

Commit

Permalink
Merge pull request #461 from yast/fix_cwm_help
Browse files Browse the repository at this point in the history
Fix cwm help
  • Loading branch information
jreidinger committed Apr 19, 2016
2 parents 9aa9fc4 + 3de53d8 commit c637669
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
9 changes: 7 additions & 2 deletions library/cwm/src/lib/cwm/widget.rb
Expand Up @@ -60,6 +60,7 @@ module CWM
class AbstractWidget
include Yast::UIShortcuts
include Yast::I18n
include Yast::Logger

# By default, {#handle} has no argument and it is called
# only for events of its own widget.
Expand Down Expand Up @@ -675,8 +676,6 @@ def cwm_widgets
@cwm_widgets = Yast::CWM.CreateWidgets(names, definition)
end

protected

# help that is result of used widget helps.
# If overwritting, do not forget to use `super`, otherwise widget helps will
# be missing
Expand Down Expand Up @@ -734,6 +733,10 @@ def validate
Yast::CWM.validateWidgets(@current_tab.cwm_definition["widgets"], "ID" => @current_tab.widget_id)
end

def help
@current_tab ? @current_tab.help : ""
end

protected

# gets visual order of tabs
Expand All @@ -756,6 +759,8 @@ def switch_tab(tab_id)
Yast::UI.ReplaceWidget(Id(replace_point_id), tab.cwm_definition["custom_widget"])
Yast::CWM.initWidgets(tab.cwm_definition["widgets"])
@current_tab = tab

Yast::CWM.ReplaceWidgetHelp(widget_id, help)
end

# visually mark currently active tab
Expand Down
7 changes: 7 additions & 0 deletions package/yast2.changes
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Apr 19 12:02:28 UTC 2016 - jreidinger@suse.com

- CWM: fix showing help for tabs widgets
found during fixing bnc#952633)
- 3.1.185

-------------------------------------------------------------------
Mon Apr 11 07:55:44 UTC 2016 - lslezak@suse.cz

Expand Down
2 changes: 1 addition & 1 deletion package/yast2.spec
Expand Up @@ -17,7 +17,7 @@


Name: yast2
Version: 3.1.184
Version: 3.1.185
Release: 0
Url: https://github.com/yast/yast-yast2

Expand Down

0 comments on commit c637669

Please sign in to comment.