From 690f227d9efcbd1bf4e232591faf8b3885fc3b76 Mon Sep 17 00:00:00 2001 From: Ciaran McCreesh Date: Sat, 6 Aug 2011 22:29:05 +0100 Subject: Better tracking of choice origins --- src/clients/cave/cmd_display_resolution.cc | 2 +- src/clients/cave/cmd_show.cc | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/clients/cave/cmd_display_resolution.cc b/src/clients/cave/cmd_display_resolution.cc index 2d8e51f4a..21f972f73 100755 --- a/src/clients/cave/cmd_display_resolution.cc +++ b/src/clients/cave/cmd_display_resolution.cc @@ -574,7 +574,7 @@ namespace for (Choice::ConstIterator i((*k)->begin()), i_end((*k)->end()) ; i != i_end ; ++i) { - if (! (*i)->explicitly_listed()) + if (co_implicit == (*i)->origin()) continue; Tribool changed_state(indeterminate); diff --git a/src/clients/cave/cmd_show.cc b/src/clients/cave/cmd_show.cc index 7cdd05427..22a2368f2 100644 --- a/src/clients/cave/cmd_show.cc +++ b/src/clients/cave/cmd_show.cc @@ -350,7 +350,7 @@ namespace if (maybe_old_value->enabled() != value->enabled()) return "*"; } - else if (maybe_old_id && value->explicitly_listed() && choice->consider_added_or_changed()) + else if (maybe_old_id && co_explicit == value->origin() && choice->consider_added_or_changed()) { if (old_id_is_installed) return "+"; @@ -797,16 +797,16 @@ namespace if ((*c)->begin() == (*c)->end()) continue; - bool any_explicit(false); + bool any_explicitish(false); for (Choice::ConstIterator v((*c)->begin()), v_end((*c)->end()) ; v != v_end ; ++v) - if ((*v)->explicitly_listed()) + if (co_implicit != (*v)->origin()) { - any_explicit = true; + any_explicitish = true; break; } - if (! any_explicit) + if (! any_explicitish) continue; } @@ -820,7 +820,7 @@ namespace v != v_end ; ++v) { if (! cmdline.a_internal_keys.specified()) - if (! (*v)->explicitly_listed()) + if (co_implicit == (*v)->origin()) continue; if ((*v)->enabled()) @@ -878,16 +878,16 @@ namespace if ((*c)->begin() == (*c)->end()) continue; - bool any_explicit(false); + bool any_explicitish(false); for (Choice::ConstIterator v((*c)->begin()), v_end((*c)->end()) ; v != v_end ; ++v) - if ((*v)->explicitly_listed()) + if (co_implicit != (*v)->origin()) { - any_explicit = true; + any_explicitish = true; break; } - if (! any_explicit) + if (! any_explicitish) continue; } @@ -904,7 +904,7 @@ namespace v != v_end ; ++v) { if (! cmdline.a_internal_keys.specified()) - if (! (*v)->explicitly_listed()) + if (co_implicit == (*v)->origin()) continue; if ((*v)->enabled()) -- cgit v1.2.3