[Aptitude-svn-commit] r3361 - in branches/aptitude-0.3/aptitude: . src
Daniel Burrows
dburrows@costa.debian.org
Tue, 07 Jun 2005 06:16:45 +0000
Author: dburrows
Date: Tue Jun 7 06:16:43 2005
New Revision: 3361
Modified:
branches/aptitude-0.3/aptitude/ChangeLog
branches/aptitude-0.3/aptitude/src/download_bar.cc
branches/aptitude-0.3/aptitude/src/download_bar.h
Log:
Update the download bar to use styles.
Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog (original)
+++ branches/aptitude-0.3/aptitude/ChangeLog Tue Jun 7 06:16:43 2005
@@ -1,5 +1,9 @@
2005-06-06 Daniel Burrows <dburrows@debian.org>
+ * src/download_bar.cc:
+
+ Update to use styles.
+
* src/dep_item.cc:
Fix the signature of pkg_depitem::paint().
Modified: branches/aptitude-0.3/aptitude/src/download_bar.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/download_bar.cc (original)
+++ branches/aptitude-0.3/aptitude/src/download_bar.cc Tue Jun 7 06:16:43 2005
@@ -56,10 +56,8 @@
fragment *f=wrapbox(fragf(_("Please insert the disc labeled \"%s\" into the drive \"%s\""),
media.c_str(), drive.c_str()));
- f->set_attr(get_color("MediaChange"));
-
vscreen_widget *w=vs_dialog_ok(f, arg(sigc::ptr_fun(vscreen_exitmain)),
- get_color("MediaChange"));
+ get_style("MediaChange"));
w->show_all();
popup_widget(w);
@@ -183,7 +181,7 @@
return !cancelled;
}
-void download_status_bar::paint()
+void download_status_bar::paint(const style &st)
{
int width=getmaxx();
string todisp=last_msg,totalprogress;
@@ -216,8 +214,8 @@
show_string_as_progbar(0,
0,
todisp,
- get_color("Progress"),
- get_color("ScreenStatusColor"),
+ (st+get_style("Progress")).get_attrs(),
+ (st+get_style("Status")).get_attrs(),
barsize,
width);
}
Modified: branches/aptitude-0.3/aptitude/src/download_bar.h
==============================================================================
--- branches/aptitude-0.3/aptitude/src/download_bar.h (original)
+++ branches/aptitude-0.3/aptitude/src/download_bar.h Tue Jun 7 06:16:43 2005
@@ -1,6 +1,6 @@
// download_bar.h -*-c++-*-
//
-// Copyright 1999,2000 Daniel Burrows
+// Copyright 1999-2001, 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
@@ -54,7 +54,7 @@
void Start();
void Stop();
- void paint();
+ void paint(const style &st);
bool handle_char(chtype ch);
size size_request();