[Aptitude-svn-commit] r4180 - in branches/aptitude-0.3/aptitude: .
src
Daniel Burrows
dburrows at costa.debian.org
Thu Sep 22 19:39:52 UTC 2005
Author: dburrows
Date: Thu Sep 22 19:39:50 2005
New Revision: 4180
Modified:
branches/aptitude-0.3/aptitude/ChangeLog
branches/aptitude-0.3/aptitude/src/solution_screen.cc
Log:
Display unresolved soft dependencies in the info area in a form
consistent with other actions.
Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog (original)
+++ branches/aptitude-0.3/aptitude/ChangeLog Thu Sep 22 19:39:50 2005
@@ -1,5 +1,10 @@
2005-09-22 Daniel Burrows <dburrows at debian.org>
+ * src/solution_screen.cc:
+
+ Add more verbiage to unresolved soft deps when they show up as
+ possible alternatives to the selected action.
+
* doc/en/aptitude.xml, src/defaults.cc, src/solution_screen.cc:
Modify the SolutionActionAccepted style and the
Modified: branches/aptitude-0.3/aptitude/src/solution_screen.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/solution_screen.cc (original)
+++ branches/aptitude-0.3/aptitude/src/solution_screen.cc Thu Sep 22 19:39:50 2005
@@ -628,11 +628,18 @@
{
aptitude_universe::dep d;
+ /** If \b true, then a brief explanation about what this item is
+ * (suitable for inclusion in a list of alternatives) will be
+ * displayed.
+ */
+ bool fully_explained;
+
sigc::slot1<void, aptitude_resolver_dep> set_active_dep;
public:
solution_unresolved_item(const aptitude_universe::dep &_d,
+ bool _fully_explained,
const sigc::slot1<void, aptitude_resolver_dep> &_set_active_dep)
- :d(_d), set_active_dep(_set_active_dep)
+ :d(_d), fully_explained(_fully_explained), set_active_dep(_set_active_dep)
{
}
@@ -708,9 +715,16 @@
++x;
}
- wstring text = swsprintf(transcode(_("%s recommends %s")).c_str(),
- d.get_dep().ParentPkg().Name(),
- dep_targets(d.get_dep()).c_str());
+ wstring text;
+
+ if(!fully_explained)
+ text = swsprintf(transcode(_("%s recommends %s")).c_str(),
+ d.get_dep().ParentPkg().Name(),
+ dep_targets(d.get_dep()).c_str());
+ else
+ text = swsprintf(transcode(_("-> Leave the dependency \"%s recommends %s\" unresolved.")).c_str(),
+ d.get_dep().ParentPkg().Name(),
+ dep_targets(d.get_dep()).c_str());
wstring::const_iterator loc = text.begin();
@@ -765,7 +779,7 @@
}
if(d.get_dep()->Type == pkgCache::Dep::Recommends)
- resolvers->add_child(new solution_unresolved_item(d, sigc::slot1<void, aptitude_resolver_dep>()));
+ resolvers->add_child(new solution_unresolved_item(d, true, sigc::slot1<void, aptitude_resolver_dep>()));
return root;
}
@@ -886,7 +900,7 @@
for(imm::set<aptitude_universe::dep>::const_iterator i = unresolved.begin();
i != unresolved.end(); ++i)
- unresolved_tree->add_child(new solution_unresolved_item(*i, set_active_dep));
+ unresolved_tree->add_child(new solution_unresolved_item(*i, false, set_active_dep));
root->add_child(unresolved_tree);
}
More information about the Aptitude-svn-commit
mailing list