[Aptitude-devel] r3065 - in branches/aptitude-0.3/aptitude: . src

Daniel Burrows dburrows@costa.debian.org
Sat, 23 Apr 2005 02:23:44 +0000


Author: dburrows
Date: Sat Apr 23 02:23:41 2005
New Revision: 3065

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/broken_indicator.cc
Log:
Add the current and total solution counts to the display.

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Sat Apr 23 02:23:41 2005
@@ -1,5 +1,9 @@
 2005-04-22  Daniel Burrows  <dburrows@debian.org>
 
+	* src/broken_indicator.cc:
+
+	  Incorporate the solution counts into the suggestion bar.
+
 	* src/generic/aptcache.cc, src/generic/aptcache.h:
 
 	  Add routines to extract more information about cached solutions

Modified: branches/aptitude-0.3/aptitude/src/broken_indicator.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/broken_indicator.cc	(original)
+++ branches/aptitude-0.3/aptitude/src/broken_indicator.cc	Sat Apr 23 02:23:41 2005
@@ -146,13 +146,17 @@
 	      }
 
 	    vector<fragment *> fragments;
+	    char buf[512];
+
+	    snprintf(buf, 512, (*apt_cache_file)->solution_generation_complete()?"[%d/%d]":"[%d/%d...]",
+		     (*apt_cache_file)->get_selected_solution()+1,
+		     (*apt_cache_file)->generated_solution_count());
+	    fragments.push_back(fragf("%s ", buf));
 
 	    fragments.push_back(fragf(_("Suggest ")));
 
 	    vector<fragment *> suggestions;
 
-	    char buf[512];
-
 	    if(install_count>1)
 	      {
 		snprintf(buf, 512, _("%d installs"),