Enhancements - Context::getWidth

- Added help function to reduce general code size.
This commit is contained in:
Paul Beckingham
2009-06-10 00:35:37 -04:00
parent 8dfe4bd30a
commit 2da4f8ba7a
4 changed files with 39 additions and 128 deletions

View File

@@ -271,18 +271,8 @@ std::string handleVersion ()
{
std::stringstream out;
// Determine window size, and set table accordingly.
int width = context.config.get ("defaultwidth", (int) 80);
#ifdef HAVE_LIBNCURSES
if (context.config.get ("curses", true))
{
WINDOW* w = initscr ();
width = w->_maxx + 1;
endwin ();
}
#endif
// Create a table for the disclaimer.
int width = context.getWidth ();
Table disclaimer;
disclaimer.setTableWidth (width);
disclaimer.addColumn (" ");