summaryrefslogtreecommitdiff
path: root/src/progress.cc
AgeCommit message (Collapse)AuthorFilesLines
2009-04-24Work around bugginess in some terminals by forcing a refresh after the ↵Daniel Burrows1-0/+1
progress bar is painted. (Closes: #455220)
2008-10-29Massive refactoring and redesign to properly support background downloads in ↵Daniel Burrows1-10/+23
the GUI and running dpkg in a terminal. This should probably have been split into a lot of smaller commits, but it's too late now. The GUI now runs downloads in a background thread, just like the curses interface. In fact, it is *just* like the curses interface: the code of ui_download_manager and download_thread has been parameterized so that it can be used from either the curses frontend or the GUI frontend. These files should eventually migrate to the generic directory. Some of the parameterization left ugly stuff behind, like refcounted_progress and the wacky redesign of the curses progress class (which took place solely so that it could be unified with the GTK+ one). It may be worth taking some time to clean this code up. In addition, the code for download_install_manager has been refactored again. Instead of exposing the different parts of "finish", which would eliminate any hope of having a unified ui_download_manager harness, the "finish" method (for all download managers) is now explicitly continuation based, and the install manager uses this feature to break up the download. The function that runs dpkg in a terminal now takes a continuation to be invoked in the main thread, so it can fork dpkg in a subprocess, and then call the continuation when the subprocess terminates. This means we don't need to mess around with threads at all in the dpkg-terminal-creation process, a huge relief. It also fits in with the generally continuation-y feel of a lot of the aptitude code, and everyone loves continuations in their GUI programs anyway! Note: in this commit, I've adopted a policy of always returning right after I invoke the continuation, to make it clear in the code what's going on and to minimize the chances of a future edit screwing this up. (if I really wanted to get serious about that, of course, I would write an INVOKE_CONTINUATION macro...) A few other minor things were touched up here: for instance, the program no longer enters an infinite loop after running dpkg, and more download events are logged. There's still more work to do around the edges: changelog downloading from the GUI is broken, and the download status tab is all messed up. Also, I'd like to support the status pipe from dpkg (but I think that's a post-0.5 thing).
2007-11-15Fix progress. The tree now builds again.Daniel Burrows1-2/+9
2007-11-15Fix some duplicated type names that snuck in in a previous pass over the tree.Daniel Burrows1-1/+1
2007-11-15Uniformly replace widgets::X with cw::X in .cc files.Daniel Burrows1-1/+1
2007-11-15Consistently use cw::toplevel instead of toplevel::.Daniel Burrows1-6/+6
2007-11-15Pass over the source tree with sed to eliminate a lot of the mindless ↵Daniel Burrows1-3/+3
search-and-replace I was having to do. (namespace aliases and cleanup are still needed)
2007-11-14First pass over the code.Daniel Burrows1-0/+112
This tree version is still BROKEN. This commit changes a bunch of code mechanically, and completely fixes all the subdirectories and files through download_screen in the top-level directory. Some unfortunate namespace choices in cwidget showed up here. widgets and config should probably be merged into the cwidget namespace, and I've created namespace aliases that pretend this happened as I go through the .cc files. Luckily, that change can largely be accounted for automatically.