[Aptitude-svn-commit] r3783 - in branches/aptitude-0.3/aptitude: .
src
Daniel Burrows
dburrows at costa.debian.org
Tue Aug 9 04:59:37 UTC 2005
Author: dburrows
Date: Tue Aug 9 04:59:33 2005
New Revision: 3783
Modified:
branches/aptitude-0.3/aptitude/ChangeLog
branches/aptitude-0.3/aptitude/src/ui.cc
Log:
Fix the problems around when to destroy the preview screen.
Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog (original)
+++ branches/aptitude-0.3/aptitude/ChangeLog Tue Aug 9 04:59:33 2005
@@ -1,5 +1,13 @@
2005-08-08 Daniel Burrows <dburrows at debian.org>
+ * src/ui.cc:
+
+ Redesign how the active preview and tree are handled: use the
+ active preview for everything but actually building the tree; it
+ particular, show and destroy it instead of the tree. Fixes the
+ problem where the preview tree disappeared from the preview
+ screen, without crashing due to double-destroying the preview.
+
* src/download_list.cc:
*Do* destroy the download list when the download is complete, so
Modified: branches/aptitude-0.3/aptitude/src/ui.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/ui.cc (original)
+++ branches/aptitude-0.3/aptitude/src/ui.cc Tue Aug 9 04:59:33 2005
@@ -802,8 +802,8 @@
{
active_download=true;
- if(active_preview_tree.valid())
- active_preview_tree->destroy();
+ if(active_preview.valid())
+ active_preview->destroy();
vs_progress_ref p=gen_progress_bar();
@@ -882,6 +882,8 @@
{
if(!active_preview_tree.valid())
{
+ assert(!active_preview.valid());
+
pkg_grouppolicy_factory *grp=NULL;
std::string grpstr;
@@ -915,9 +917,9 @@
true);
active_preview->destroyed.connect(sigc::ptr_fun(reset_preview));
- active_preview_tree->connect_key("DoInstallRun",
- &global_bindings,
- sigc::ptr_fun(actually_do_package_run));
+ active_preview->connect_key("DoInstallRun",
+ &global_bindings,
+ sigc::ptr_fun(actually_do_package_run));
add_main_widget(active_preview, _("Preview of package installation"),
_("View and/or adjust the actions that will be performed"),
_("Preview"));
@@ -927,7 +929,10 @@
p->destroy();
}
else
- active_preview_tree->show();
+ {
+ assert(active_preview.valid());
+ active_preview->show();
+ }
}
static void fixer_dialog_done()
@@ -1065,7 +1070,7 @@
if(apt_cache_file)
{
- if(!active_preview_tree.valid())
+ if(!active_preview.valid() || !active_preview->get_visible())
{
if(aptcfg->FindB(PACKAGE "::Display-Planned-Action", true))
do_show_preview();
@@ -1077,7 +1082,7 @@
active_preview_tree->build_tree();
// We need to rebuild the tree since this is called after a
// broken-fixing operation. This feels like a hack, though..
- active_preview_tree->show();
+ active_preview->show();
}
}
}
More information about the Aptitude-svn-commit
mailing list