summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2010-07-10Have the teletype mark calls to the terminal's output() routine as expected.Daniel_Burrows@alumni.brown.edu1-2/+2
This eliminates the "uninteresting call" noise in the output.
2010-07-10Give mocks::terminal_input::prompt_for_input a default return value.Daniel Burrows1-1/+4
Otherwise tests will abort if it's invoked unexpectedly, instead of registering a failure and continuing.
2010-07-10Split the "terminal" interface into several interfaces that each export one ↵Daniel_Burrows@alumni.brown.edu43-438/+552
piece of its functionality. This will make some of the tests easier to write, since often some of the code requires just the ability to read the screen width, or just the ability to read input from the terminal. Splitting the terminal interface means no need to mock out the parts that aren't used.
2010-07-09A translator message has to be directly infront of the gettext callJens Seidel1-2/+2
2010-07-09Moved a wrongly placed translator commentJens Seidel2-3/+3
There was probably a minor merge error related to the commits 8919406ce19f57ebf3f553542d2302cc6f2f7f30 5363ccdc30dc97b1112e3b1b76c9efb07ecc5173
2010-07-09Added a missing "\n" in a message for consistencyJens Seidel1-1/+1
2010-07-03Move the search input controller and view classes over to generic/.Daniel_Burrows@alumni.brown.edu22-89/+90
As a side effect, this creates a "controllers" directory in the generic tree, and removes the now-empty GTK+-specific controller and view directories. The README files are moved over to the generic locations and tweaked to be correct for their new home.
2010-07-03Move the throttle object to src/generic/util.Daniel_Burrows@alumni.brown.edu13-55/+77
2010-07-03Move the core command-line progress view interface to generic/views.Daniel_Burrows@alumni.brown.edu14-71/+147
2010-07-03Fix up the SConscript files.Daniel_Burrows@alumni.brown.edu2-0/+8
2010-07-02Remove the now-obsolete preserve_and_advance() routine.Daniel Burrows3-19/+0
Its only real purpose was to do what display_and_advance() does better -- i.e., display a durable progress notification and move to the next line.
2010-07-02Use display_and_advance() for the standard progress meters.Daniel Burrows1-8/+6
2010-07-02Add a routine on transient_message to display a non-wrapped message and move ↵Daniel Burrows4-0/+28
to the next line. This should be useful for things like printing a status message alongside some sort of progress indicator -- set_text() followed by advance() is not really ideal since it truncates the line.
2010-06-30Add a view interface for displaying the download progress and an ↵Daniel_Burrows@alumni.brown.edu13-2/+562
implementation for showing the download progress at the command line and a stub implementation. This is mostly just a streamlining of the apt interface, but putting the code behind a clean view will also make it much more testable.
2010-06-27Adapt patch from Ubuntu to fix a formatting problem in the progress code on ↵Daniel Burrows2-5/+10
large terminals. (Closes: #586470) This module needs a broader overhaul, but the patch is quick and easy to apply and will fix the immediate problem.
2010-06-18Add a Makefile for src/gtk/views/mocks, so that I can distribute the .h file ↵Daniel Burrows2-0/+2
it contains. Without this I can't build the unit tests.
2010-06-18Distribute enumerator_transform.Daniel Burrows2-0/+2
2010-06-18Include make_shared.hpp (why did this compile before?)Daniel Burrows1-0/+1
2010-06-18Add dynamic_list_impl.h to the list of distributed files.Daniel Burrows1-0/+1
2010-06-18Extract the declarations of the global pointers to apt structures into a ↵Daniel Burrows4-7/+51
separate file to reduce test dependencies. No reason for tests to pull in half of src/generic/apt just because a module linked into the test happens to reference a global pointer.
2010-06-18Use the new configure checks to support both the old and the new versions of ↵Daniel Burrows6-49/+291
libept.
2010-06-15Invoke the new done() routine when finished with searches and when finished ↵Daniel Burrows3-3/+3
with operations that use the OpProgress implementation.
2010-06-15Add support to the command-line progress display object for showing that the ↵Daniel Burrows4-15/+117
current task is done, and for displaying progress the way classic apt tools do. The new code supports both "[ 40%] Task" and "Task... 40%" display styles, and when a task is complete the code will either erase it (default) or advance to the next terminal line (like apt-get does). These behaviors are controlled by apt options.
2010-06-10Add support in the transient message for making a message permanent and ↵Daniel Burrows3-0/+19
advancing to the next line. i.e., for explicitly outputting a newline. The main advantage of this is that it lets me give the progress display a mode that emulates the old apt progress display (specifically, the behavior that completed steps remain visible).
2010-06-10Fix the teletype mock to only output set_last_line() when the last line has ↵Daniel Burrows1-31/+28
actually changed. In particular, this means that outputting "\n" after a flush won't redundantly update the last line.
2010-06-10Don't show any output from the transient message object if the output device ↵Daniel Burrows2-1/+18
isn't a terminal.
2010-06-10Add a doccomment for create_transient_message.Daniel Burrows1-0/+5
2010-06-10Mock out progress_throttle and progress_display.Daniel Burrows4-0/+97
2010-06-10Add routines to compare progress_info objects and to write them to an ↵Daniel Burrows4-0/+74
ostream for debugging.
2010-06-09Add a simple mock of the transient message class.Daniel Burrows3-1/+55
2010-06-09Round the progress of a progress bar to the nearest integer.Daniel Burrows1-1/+3
2010-06-09Display a "disabled" progress indicator ("[----]") for pulse() instead of ↵Daniel Burrows1-1/+1
just whitespace.
2010-06-09Correctly initialize pulse progress_info objects (they were getting set up ↵Daniel Burrows1-1/+8
as bar values).
2010-06-09Eliminate an unnecessary string copy.Daniel Burrows1-1/+1
2010-06-08Use cmdline::progress_display to display startup progress too.Daniel_Burrows@alumni.brown.edu2-18/+19
This means that all the progress messages will have the same format, which I hope is useful.
2010-06-08When updating a progress bar, update it if the percentage-complete has changed.Daniel_Burrows@alumni.brown.edu1-0/+4
2010-06-08Drop the "force" parameter to progress_display::set_progress; it doesn't ↵Daniel_Burrows@alumni.brown.edu5-31/+15
seem to be necessary and it clutters things up.
2010-06-08Reuse the progress_display interface for the search_progress code.Daniel_Burrows@alumni.brown.edu4-51/+100
2010-06-08Use the new mutator methods in progress_info to avoid copying the progress ↵Daniel_Burrows@alumni.brown.edu1-5/+10
status string.
2010-06-08Make progress_info objects mutable.Daniel_Burrows@alumni.brown.edu1-0/+22
Currently the type can't be changed, because that could introduce weirdness into the API and it's not really necessary. The reason for making them mutable is that it's common to want to update the current progress fraction in a tight loop. By using mutable objects, we can avoid having to constantly copy the status string. I clocked nearly a 10% speed increase with this change, and it makes the overhead from the progress display negligible in my tests.
2010-06-08Fix the progress-throttling code.Daniel_Burrows@alumni.brown.edu1-1/+1
It was saying to update only if *not enough* time had passed.
2010-06-08Factor the progress update throttling code into a separate class.Daniel_Burrows@alumni.brown.edu12-19/+213
2010-06-08Use the new progress stuff to get progress indicators from "search" and ↵Daniel_Burrows@alumni.brown.edu4-21/+113
"versions". Note that they currently display progress information even if stdout is not a tty, which really needs to be fixed.
2010-06-08Add a first draft of some wrapper code to display search progress events.Daniel_Burrows@alumni.brown.edu4-0/+124
The design needs to be improved, but it's a proof-of-concept. The wrapper takes care of displaying which pattern is being searched for as part of the displayed progress message. This has the side effect of causing the construction of progress messages to be a substantial fraction of the overall run-time. The API needs to be redesigned so that messages are only formatted when they'll actually be displayed.
2010-06-08dd some generic code to display a progress indicator on a single line.Daniel_Burrows@alumni.brown.edu4-0/+211
This is just a slightly higher-level wrapper around the transient message class. Preliminary work with this suggests that the progress_info API might need a redesign; I see a significant slowdown when using this to report progress. I don't think this is insurmountable; I just need to be sure that I actually handle it before I push the code that uses this into "master".
2010-06-08Allow client code to capture the progress of a pattern search.Daniel_Burrows@alumni.brown.edu2-17/+69
2010-06-08Add a method on progress_info that converts the current progress fraction to ↵Daniel_Burrows@alumni.brown.edu1-0/+11
an integral percentage.
2010-06-07Fix the transient message's screen width logic to behave properly when a ↵Daniel Burrows1-3/+10
wide character runs over the edge of the terminal.
2010-06-07Instead of using ON_CALL() to add the write-combining behavior to the fake ↵Daniel Burrows1-9/+10
terminal, just override the interface methods. This way, other code can connect to them via ON_CALL() without breaking the combining terminal. For instance, the teletype does this.
2010-06-07Ignore all the terminal output functions by default when using a teletype mock.Daniel Burrows1-2/+6