Skip to content

Commit

Permalink
addon/mg: Rework the Update All action logic for genericity
Browse files Browse the repository at this point in the history
Instead of assuming that the currently visible options are all
upgradable (an assumption that proved true up to this day, but will not
in the next commit), go over them and make sure that their state truly
is ADDON_INSTALLED_UPGRADABLE.

This will allow Update All to work as intended on any view, and not just
those including upgradable add-ons only.
  • Loading branch information
irydacea committed Jul 6, 2014
1 parent 69a2457 commit 3d183db
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/addon/manager_ui.cpp
Expand Up @@ -850,7 +850,11 @@ void show_addons_manager_dialog(display& disp, addons_client& client, addons_lis
std::vector<std::string> failed_titles;

if(update_everything) {
ids_to_install = option_ids;
BOOST_FOREACH(const std::string& id, option_ids) {
if(tracking[id].state == ADDON_INSTALLED_UPGRADABLE) {
ids_to_install.push_back(id);
}
}
} else {
assert(result >= 0 && size_t(result) < option_ids.size());
last_addon_id = option_ids[result];
Expand Down

0 comments on commit 3d183db

Please sign in to comment.