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

Daniel Burrows dburrows@costa.debian.org
Wed, 27 Apr 2005 01:14:04 +0000


Author: dburrows
Date: Wed Apr 27 01:14:00 2005
New Revision: 3111

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/vscreen/testvscreen.cc
Log:
Test actual fragments in button labels.

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Wed Apr 27 01:14:00 2005
@@ -1,5 +1,9 @@
 2005-04-26  Daniel Burrows  <dburrows@debian.org>
 
+	* src/vscreen/testvscreen.cc:
+
+	  Test using actual fragments in button labels.
+
 	* src/vscreen/vs_togglebutton.cc:
 
 	  Make sure the right half of the toggle button's check gets

Modified: branches/aptitude-0.3/aptitude/src/vscreen/testvscreen.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/vscreen/testvscreen.cc	(original)
+++ branches/aptitude-0.3/aptitude/src/vscreen/testvscreen.cc	Wed Apr 27 01:14:00 2005
@@ -245,13 +245,14 @@
       for(int j=0; j<4; j++)
 	{
 	  char buf[256];
-	  snprintf(buf, 256, "Button %i", i*4+j);
+	  snprintf(buf, 256, "%i", i*4+j);
+	  fragment *f=fragf("Button %B%s%b", buf);
 
 	  if(i!=3)
-	    rval->add_widget(new vs_button(buf), i, j, 1, 1);
+	    rval->add_widget(new vs_button(f), i, j, 1, 1);
 	  else
 	    {
-	      vs_togglebutton *b=new vs_radiobutton(buf);
+	      vs_togglebutton *b=new vs_radiobutton(f);
 	      rval->add_widget(b, i, j, 1, 1, true);
 	      g->add_button(b, i*4+j);
 	    }