Skip to content

Commit

Permalink
Simplified with show_addon (formerly reactivate_dependencies)
Browse files Browse the repository at this point in the history
Renamed since the widget needs to be updated more than before.
Removed from subclasses since it was the same after switching to
richtext.
  • Loading branch information
mvidner committed Jul 25, 2016
1 parent a6a7cb0 commit e8029b6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 21 deletions.
9 changes: 4 additions & 5 deletions src/lib/registration/ui/addon_selection_base_dialog.rb
Expand Up @@ -194,7 +194,7 @@ def handle_dialog
Addon.selected.replace(@old_selection) if ret == :abort
when :filter_beta
filter_beta_releases(Yast::UI.QueryWidget(Id(ret), :Value))
reactivate_dependencies
show_addons
else
handle_addon_selection(ret)
end
Expand All @@ -221,7 +221,7 @@ def handle_addon_selection(id)

addon.toggle_selected
show_addon_details(addon)
reactivate_dependencies
show_addons
end

# update addon details after changing the current addon in the UI
Expand All @@ -232,9 +232,8 @@ def show_addon_details(addon)
Yast::UI.ChangeWidget(Id(:details), :Enabled, true)
end

# update the enabled/disabled status in UI for dependent addons
# FIXME: is this always overriden?
def reactivate_dependencies
# show the addon list when some are filtered, enabled, selected
def show_addons
Yast::UI.ChangeWidget(Id(:items), :Value, addon_checkboxes)
end

Expand Down
Expand Up @@ -40,8 +40,6 @@ def run

@old_selection = Addon.selected.dup

reactivate_dependencies

handle_dialog
end

Expand All @@ -56,11 +54,6 @@ def heading
def addon_selected?(addon)
addon.selected? || addon.registered?
end

# update the enabled/disabled status in UI for dependent addons
def reactivate_dependencies
Yast::UI.ChangeWidget(Id(:items), :Value, addon_checkboxes)
end
end
end
end
Expand Up @@ -44,8 +44,6 @@ def run
true
)

reactivate_dependencies

handle_dialog
end

Expand All @@ -60,13 +58,6 @@ def heading
def addon_selected?(addon)
addon.selected?
end

# empty implementation, allow reregistration of a dependant addon
# without reregistering its parent
def reactivate_dependencies
# FIXME: how to test this?
Yast::UI.ChangeWidget(Id(:items), :Value, addon_checkboxes)
end
end
end
end

0 comments on commit e8029b6

Please sign in to comment.