[Aptitude-svn-commit] r4075 - in branches/aptitude-0.3/aptitude: .
src
Daniel Burrows
dburrows at costa.debian.org
Tue Sep 13 16:36:05 UTC 2005
Author: dburrows
Date: Tue Sep 13 16:36:02 2005
New Revision: 4075
Modified:
branches/aptitude-0.3/aptitude/ChangeLog
branches/aptitude-0.3/aptitude/src/download_list.cc
Log:
Fix download cancellation.
Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog (original)
+++ branches/aptitude-0.3/aptitude/ChangeLog Tue Sep 13 16:36:02 2005
@@ -1,3 +1,12 @@
+2005-09-13 Daniel Burrows <dburrows at debian.org>
+
+ * src/download_list.cc:
+
+ Fix download cancellation: don't actually destroy the widget
+ managing the download until Complete is received (indicating
+ that the background task is finished); just store the
+ cancellation and report it on the next Pulse.
+
2005-09-12 Daniel Burrows <dburrows at debian.org>
* src/generic/aptcache.cc:
Modified: branches/aptitude-0.3/aptitude/src/download_list.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/download_list.cc (original)
+++ branches/aptitude-0.3/aptitude/src/download_list.cc Tue Sep 13 16:36:02 2005
@@ -39,13 +39,6 @@
{
}
-// FIXME: HACK
-static void download_summary_nasty_hack(sigc::slot0<void> cancel_slot)
-{
- if(cancel_slot)
- cancel_slot();
-}
-
// Unfortunately the cancel_slot is necessary so we know we've cancelled..
static vs_widget_ref download_summary(const download_list_ref &l,
bool failed,
@@ -74,8 +67,7 @@
rval=vs_dialog_yesno(fragment,
NULL,
transcode(_("Continue")),
- arg(sigc::bind(sigc::ptr_fun(download_summary_nasty_hack),
- *cancel_slot)),
+ arg(cancel_slot),
transcode(_("Cancel")),
style_attrs_flip(A_REVERSE));
@@ -125,8 +117,6 @@
void download_list::destroy()
{
cancel();
-
- vscreen_widget::destroy();
}
void download_list::paint(const style &st)
@@ -385,8 +375,8 @@
void download_list::Complete(download_manager &manager)
{
- // Destroy ourselves.
- destroy();
+ // Destroy ourselves for real.
+ vscreen_widget::destroy();
}
void download_list::Pulse(pkgAcquire *Owner, download_manager &manager,
More information about the Aptitude-svn-commit
mailing list