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

Daniel Burrows dburrows@costa.debian.org
Sun, 26 Jun 2005 11:03:34 +0000


Author: dburrows
Date: Sun Jun 26 11:03:32 2005
New Revision: 3451

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/vscreen/vs_label.cc
   branches/aptitude-0.3/aptitude/src/vscreen/vs_label.h
Log:
Overload set_text to accept wstrings.

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Sun Jun 26 11:03:32 2005
@@ -1,5 +1,9 @@
 2005-06-26  Daniel Burrows  <dburrows@debian.org>
 
+	* src/vscreen/vs_label.cc, src/vscreen/vs_label.h:
+
+	  Add an overloading of set_text that accepts wstrings.
+
 	* src/pkg_ver_item.cc:
 
 	  Store the output of the columnizer in a wstring.

Modified: branches/aptitude-0.3/aptitude/src/vscreen/vs_label.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/vscreen/vs_label.cc	(original)
+++ branches/aptitude-0.3/aptitude/src/vscreen/vs_label.cc	Sun Jun 26 11:03:32 2005
@@ -51,6 +51,17 @@
 void vs_label::set_text(const string &_txt)
 {
   set_text(text_fragment(_txt));
+
+}
+void vs_label::set_text(const wstring &_txt, const style &st)
+{
+  set_text(text_fragment(_txt));
+  set_bg_style(st);
+}
+
+void vs_label::set_text(const wstring &_txt)
+{
+  set_text(text_fragment(_txt));
 }
 
 void vs_label::set_text(fragment *f)

Modified: branches/aptitude-0.3/aptitude/src/vscreen/vs_label.h
==============================================================================
--- branches/aptitude-0.3/aptitude/src/vscreen/vs_label.h	(original)
+++ branches/aptitude-0.3/aptitude/src/vscreen/vs_label.h	Sun Jun 26 11:03:32 2005
@@ -29,6 +29,8 @@
   void paint(const style &st);
   void set_text(const std::string &_txt, const style &st);
   void set_text(const std::string &_txt);
+  void set_text(const std::wstring &_txt, const style &st);
+  void set_text(const std::wstring &_txt);
   void set_text(fragment *f);
 };