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

Daniel Burrows dburrows@costa.debian.org
Tue, 07 Jun 2005 18:34:16 +0000


Author: dburrows
Date: Tue Jun  7 18:34:14 2005
New Revision: 3379

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/vs_progress.cc
   branches/aptitude-0.3/aptitude/src/vs_progress.h
Log:
Update vs_progress for styles.

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Tue Jun  7 18:34:14 2005
@@ -1,5 +1,9 @@
 2005-06-07  Daniel Burrows  <dburrows@debian.org>
 
+	* src/vs_progress.cc, src/vs_progress.h:
+
+	Update the vs_progress code for styles.
+
 	* src/ui.cc, src/ui.h:
 
 	Update the core UI code for styles.

Modified: branches/aptitude-0.3/aptitude/src/vs_progress.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/vs_progress.cc	(original)
+++ branches/aptitude-0.3/aptitude/src/vs_progress.cc	Tue Jun  7 18:34:14 2005
@@ -1,16 +1,16 @@
 // vs_progress.cc
 //
-//  Copyright 2000 Daniel Burrows
+//  Copyright 2000, 2004-2005 Daniel Burrows
 //
-//  This program is free software; you can redistribute it and/or modify
-//  it under the terms of the GNU General Public License as published by
-//  the Free Software Foundation; either version 2 of the License, or
-//  (at your option) any later version.
+//  This program is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU General Public License as
+//  published by the Free Software Foundation; either version 2 of the
+//  License, or (at your option) any later version.
 //
 //  This program is distributed in the hope that it will be useful,
 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//  GNU General Public License for more details.
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  General Public License for more details.
 //
 //  You should have received a copy of the GNU General Public License
 //  along with this program; see the file COPYING.  If not, write to
@@ -23,7 +23,7 @@
 
 #include "vs_progress.h"
 
-void vs_progress::paint()
+void vs_progress::paint(const style &st)
 {
   int barsize;
   char percent_string[50];
@@ -39,16 +39,13 @@
       show_string_as_progbar(0,
 			     0,
 			     Op+percent_string,
-			     get_color("Progress"),
-			     get_color("ScreenStatusColor"),
+			     (st+get_style("Progress")).get_attrs(),
+			     st.get_attrs(),
 			     barsize,
 			     width);
     }
   else
-    {
-      bkgd(get_color("ScreenStatusColor"));
-      erase();
-    }
+    erase();
 }
 
 bool vs_progress::get_cursorvisible()

Modified: branches/aptitude-0.3/aptitude/src/vs_progress.h
==============================================================================
--- branches/aptitude-0.3/aptitude/src/vs_progress.h	(original)
+++ branches/aptitude-0.3/aptitude/src/vs_progress.h	Tue Jun  7 18:34:14 2005
@@ -1,6 +1,6 @@
 // vs_progress.h   -*-c++-*-
 //
-//  Copyright 2000 Daniel Burrows
+//  Copyright 2000, 2004-2005 Daniel Burrows
 //
 //  This program is free software; you can redistribute it and/or modify
 //  it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@
 class vs_progress:public vscreen_widget, public OpProgress
 {
 public:
-  virtual void paint();
+  virtual void paint(const style &st);
   virtual void Update();
   virtual void Done();