summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-05-25Truncate floating-point percentages when displaying a progress message.Daniel Burrows1-1/+7
2010-05-25Change the progress_info object so that pulsing progress bars can carry a ↵Daniel Burrows1-3/+8
status message.
2010-05-25Replace direct uses of OpTextProgress with calls to make_text_progress().Daniel Burrows7-21/+48
2010-05-25Add a private version of OpTextProgress.Daniel Burrows4-1/+224
This gives us the freedom to modify its behavior. For instance, this first cut eliminates the annoying clutter in aptitude's output by deleting the progress indicator when it's finished, instead of leaving it up. When output is not a tty (e.g., it's a pipe or a file), the old behavior should be followed (progress lines are written one after another).
2010-05-25Refine the existing test of the search input controller so it passes.Daniel Burrows1-1/+15
This modifies the expected behavior to match what I really expect. Specifically: * The controller is allowed to set the error message to "". * After the search text is set to "?installed", the view will return "?installed' from get_search_text(). Regarding that second point: maybe I should make this "save values and return them" the default behavior? Although that starts to open up cans of worms...
2010-05-25Add some glue code to make mock errors generate Boost.Test failures instead ↵Daniel Burrows1-7/+26
of killing the test forcefully.
2010-05-25Redesign the logging interface so that test logging systems can be created.Daniel Burrows2-22/+97
Since some test code registers itself with the global logging system, I want to be able to create local instances of the logging system in order to verify that it behaves as expected.
2010-05-25Give Logger a virtual destructor.Daniel Burrows2-0/+6
2010-05-25Remove an unnecessary friend declaration (member classes are always friends).Daniel Burrows1-1/+0
2010-05-24Add a first draft of a logging library to replace liblog4cxx.Daniel Burrows4-0/+538
Currently unused. Needs test code. The reason for replacing log4cxx is that on the one hand, it provides much more functionality than aptitude needs in any conceivable universe, and on the other hand, it seems to be buggy and fragile. Just initializing it takes a fairly careful dance, and it seems to be behind at least some of the sporadic crashes users are seeing in aptitude. This new code does exactly what aptitude needs, in a simple and hopefully much more robust way (possibly a bit slower -- but the fast path should still be fast; any slowdown *should* be limited to the situation where we're logging a ton of data).
2010-05-24Add a missing copyright notice to tests/test_enumerator.cc.Daniel Burrows1-0/+20
2010-05-24Start using google-mock to test the search input controller logic.Daniel Burrows7-1/+276
I use google-mock to create a mock implementation of the view, then test that the logic interacts with it as expected. Right now, it doesn't. The ability to do this was part of why I wanted to separate the logic from the view. I haven't added google-mock to configure.ac yet; need to do that later.
2010-05-22Make the variant-build code specially recognize "-pg" and put it into LINKFLAGS.Daniel Burrows1-0/+2
Apparently the flag parsing in scons doesn't recognize that "-pg" has to be passed to *both* the compiler and the linker to be effective.
2010-05-20Modify the SCons build scripts to check both names of the Boost unit testing ↵Daniel Burrows2-4/+12
library.
2010-05-20Move the SCons configure check for boost::fusion::fold into the main build ↵Daniel Burrows1-8/+9
environment instead of the tests build environment. This is a definite "oops"; it should have been there all along, but I saw "Boost" and zeroed in on the wrong part of the program.
2010-05-20Write a configure check that tries to locate the Boost unit test libraries.Daniel Burrows2-1/+44
I didn't just use the Autoconf find-a-library macro because that one changes $LIBS instead of storing the library in a variable.
2010-05-18Ignore .deps directories (generated by automake builds).Daniel Burrows1-0/+2
2010-05-18Experimentally start refactoring code into view/controller pairs for more ↵Daniel Burrows18-2/+697
modularity. I'm particularly intrigued by the idea of using this to support partial testing of the GUI components. Even if that doesn't work, I think that explicitly separating the code that twiddles the GUI from the underlying program logic makes things a bit readable, although I am a bit worried about the proliferation of tiny little classes that this could lead to. The new scheme includes three new directories: gtk/views/ -- holds interfaces that provide abstracted access to parts of the GUI. gtk/view-impls/ -- holds implementations of interfaces from gtk/views/. gtk/controllers/ -- holds logic to drive views for various purposes. The first view/impl/controller set is a refactoring of the search-entry code. Another thing that concerns me: it's not clear that there are actually very many places in the existing code-base that can be cleanly refactored to fit this mold. The new search controller/view classes drop support for incremental searches. This is deliberate; I see two major problems with the existing code. First, it requires an extra button in the UI to enable or disable it. That bothers me; if incremental search is worthwhile, it should be enabled all the time, at least by default (IMO). Second, the existing code was really ugly, partly because of the way the code used to be designed (before searches ran in the background). It should be reimplemented from scratch anyway.
2010-05-18Clean up an overly chatty comment.Daniel Burrows1-2/+1
2010-05-17Add scaffolding to the tab_info structure to make it easy to create siblings ↵Daniel Burrows2-1/+51
of the current tab. I envision some tabs being created in multiple areas; their sub-tabs should be siblings. Having this code centralized avoids any need to store backlinks manually from other parts of the program. (I hope)
2010-05-17Expose the contents of an area as writable sets.Daniel Burrows1-2/+2
This was always the intention -- I just wrote the wrong type into the function signatures.
2010-05-17Add an object to store the standard areas of the program, and make it ↵Daniel Burrows7-24/+271
available along with the main window. This commit also adds a wrapper interface for the main window; the idea is to use it to provide information that's "scoped" to a single main window, but that may or may not be physically stored in it. The first piece of window-scoped information is the model that backs the window, providing a list of the areas in the window and the tabs in each area.
2010-05-17Fix the declaration of create_area_info() to match the type of its ↵Daniel Burrows1-1/+1
implementation. Now we can actually invoke it without getting errors back.
2010-05-16Add the build products and other common things that should be ignored to ↵Daniel Burrows1-0/+229
.gitignore.
2010-05-14Work around a bug in boost/lambda/construct.hpp.Daniel Burrows1-1/+3
It doesn't #include enough stuff, so trying to compile it fails.
2010-05-14Fix the set of Boost headers checked by configure.Daniel Burrows1-0/+3
2010-05-14Modify the Boost check script to ignore includes in the configure script ↵Daniel Burrows1-2/+4
other than the ones for the Boost check. The test I wrote is crude; it would be better to put explicit marker lines in and use awk or somesuch. OTOH, I hope configure.ac will die a horrible death soon, so maybe not worth putting a lot of effort into this.
2010-05-14Merge the autogen patch with other recent changes.Daniel Burrows1-3/+3
2010-05-14Move the scons-generated config.h file into build/config so it doesn't ↵Daniel Burrows2-2/+2
interfere with Makefile builds in the same source tree.
2010-05-14Add gtk/toplevel/libgtk-toplevel.a to the Makefile linkage of aptitude.Daniel Burrows1-1/+1
2010-05-14Version update from 1.9 to 1.11 for automake, autoconf, aclocallsavino@localhost.localdomain1-3/+3
2010-05-14Don't assign to use_new_gui if HAVE_GTK isn't set.Daniel Burrows1-0/+2
2010-05-14Change area.{cc,h} to model.{cc,h} in src/gtk/toplevel/Makefile.am.Daniel Burrows1-2/+2
2010-05-14Write configure checks for the order of arguments that boost::fusion::fold ↵Daniel Burrows4-1/+133
uses when invoking the function it's passed. With this change, aptitude should no longer require boost >= 1.42 to build.
2010-05-13Write a fully functional alternate initialization path.Daniel Burrows15-6/+1174
This will be the foundation for the new top-level harness code. Eventually the old code will go away, but I don't want to disrupt it while I'm working on the new stuff. To activate the new code, pass --new-gui on the command-line.
2010-05-12Move the model code from namespace gui to namespace gui::toplevel.Daniel Burrows2-569/+575
2010-05-12Add code to do on-the-fly transforms of dynamic sets and enumerations.Daniel Burrows4-0/+229
I used boost::function<> because it's flexible and doesn't require awkward syntax or metaprogramming. It's slightly less efficient than it could be, but this isn't supposed to be time-critical code anyway.
2010-05-12Add missing #includes from dynamic_set_union.h.Daniel Burrows1-0/+3
2010-05-12Add a skeletal main-window class that bases its content off a toplevel view ↵Daniel Burrows6-0/+130
implementation. The idea is to eventually transfer all the AptiutdeWindow code over here, or possibly refactor it to be better organized.
2010-05-12Ensure that tabs are removed from their areas when they're closed.Daniel Burrows1-1/+21
2010-05-12Make the interface members of tab_info public (oops).Daniel Burrows1-0/+1
2010-05-12Rename area.{cc,h} to model.{cc,h}.Daniel Burrows5-7/+18
2010-05-11Add an interface that abstracts over a view displaying exactly one tab at a ↵Daniel Burrows5-13/+117
time. This will be needed by the main window, so it can update menu items appropriately and so on.
2010-05-11Remove an unnecessary boost:: prefix.Daniel Burrows1-1/+1
2010-05-11Weaken the #includes in area.h, since it only needs slots.Daniel Burrows1-1/+1
2010-05-11Add an initial implementation of a view for a tab set.Daniel Burrows6-9/+313
The idea here is to (eventually) replicate the behavior of the current TabManager, and to support a "classic" set of flat tabs, along with some more experimental UI designs. Currently missing some (relatively) easy features like changing tab titles, tab tooltips, etc.
2010-05-11Move connect_closed to the tab_info interface, to indicate that only ↵Daniel Burrows1-13/+12
infrastructural code should connect to this.
2010-05-11Overhaul once again how tabs are closed.Daniel Burrows2-7/+32
Now you can tell by inspection whether a tab has been destroyed, and the destruction is triggered when it's removed from a set rather than when the closed signal is emitted.
2010-05-11Add a shared_ptr<tab_info> parameter to signals that entities other than the ↵Daniel Burrows2-18/+35
tab probably want to catch. Without this, they would probably end up building weak_ptrs and binding those into the signal connection; this is a bit cleaner.
2010-05-10Document the routine that creates a tab_info structure.Daniel Burrows1-0/+6