[Aptitude-svn-commit] r4250 - in branches/aptitude-0.3/aptitude: . src/vscreen

Daniel Burrows dburrows at costa.debian.org
Sun Sep 25 05:37:51 UTC 2005


Author: dburrows
Date: Sun Sep 25 05:37:48 2005
New Revision: 4250

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/vscreen/vs_menubar.cc
Log:
Display arrows to indicate when the menu bar is too wide for the terminal.

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Sun Sep 25 05:37:48 2005
@@ -1,5 +1,10 @@
 2005-09-24  Daniel Burrows  <dburrows at debian.org>
 
+	* src/vscreen/vs_menubar.cc:
+
+	  Display left and right arrows at the edge of the terminal if the
+	  menu bar is too large for it.
+
 	* src/***:
 
 	  Fix all the include file problems and other stuff arising from

Modified: branches/aptitude-0.3/aptitude/src/vscreen/vs_menubar.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/vscreen/vs_menubar.cc	(original)
+++ branches/aptitude-0.3/aptitude/src/vscreen/vs_menubar.cc	Sun Sep 25 05:37:48 2005
@@ -665,8 +665,9 @@
 	add_wch(L' ');
 
       move(0, 0);
-      for(itemlist::size_type
-	    i = startloc; i < items.size() && pos < maxx; ++i)
+
+      itemlist::size_type i;
+      for(i = startloc; i < items.size() && pos < maxx; ++i)
 	{
 	  if(active && i==curloc)
 	    apply_style(highlightedmenubar_style);
@@ -685,6 +686,13 @@
 	      ++titleloc;
 	    }
 	}
+
+      apply_style(menubar_style);
+
+      if(startloc > 0)
+	mvadd_wch(0, 0, WACS_LARROW);
+      if(i < items.size() || pos >= maxx)
+	mvadd_wch(0, maxx-1, WACS_RARROW);
     }
 }
 



More information about the Aptitude-svn-commit mailing list