- Now uses "defaultwidth" configuration variable for when ncurses support is not available

- Added the new movie to the task.html page
This commit is contained in:
Paul Beckingham 2008-06-19 22:41:09 -04:00
parent 422ad576ea
commit 6673e408a2
4 changed files with 33 additions and 18 deletions

View file

@ -13,6 +13,8 @@ represents a feature release, and the z represents a patch.
1.4.0 (?)
+ Bug: "showage" configuration variable should apply to all reprts, not
just the ones based on "list"
+ New configuration variable, "defaultwidth" that determines the width
of tables when ncurses support is not available
------ reality -----------------------------------

View file

@ -713,6 +713,9 @@ Configuring Task
newest Determines how many tasks are shown on the "newest"
report. Defaults to 10.
defaultwidth The width of tables used when ncurses support is not
available. Defaults to 80.
color May be "on" or "off". Determines whether task uses
color.

View file

@ -48,7 +48,7 @@
void shortUsage (Config& conf)
{
Table table;
int width = 80;
int width = conf.get ("defaultwidth", 80);
#ifdef HAVE_LIBNCURSES
if (conf.get ("curses", true))
{
@ -470,7 +470,7 @@ void handleTags (const TDB& tdb, T& task, Config& conf)
void handleList (const TDB& tdb, T& task, Config& conf)
{
// Determine window size, and set table accordingly.
int width = 80;
int width = conf.get ("defaultwidth", 80);
#ifdef HAVE_LIBNCURSES
if (conf.get ("curses", true))
{
@ -606,7 +606,7 @@ void handleList (const TDB& tdb, T& task, Config& conf)
void handleSmallList (const TDB& tdb, T& task, Config& conf)
{
// Determine window size, and set table accordingly.
int width = 80;
int width = conf.get ("defaultwidth", 80);
#ifdef HAVE_LIBNCURSES
if (conf.get ("curses", true))
{
@ -725,7 +725,7 @@ void handleSmallList (const TDB& tdb, T& task, Config& conf)
void handleCompleted (const TDB& tdb, T& task, Config& conf)
{
// Determine window size, and set table accordingly.
int width = 80;
int width = conf.get ("defaultwidth", 80);
#ifdef HAVE_LIBNCURSES
if (conf.get ("curses", true))
{
@ -808,7 +808,7 @@ void handleCompleted (const TDB& tdb, T& task, Config& conf)
void handleInfo (const TDB& tdb, T& task, Config& conf)
{
// Determine window size, and set table accordingly.
int width = 80;
int width = conf.get ("defaultwidth", 80);
#ifdef HAVE_LIBNCURSES
if (conf.get ("curses", true))
{
@ -974,7 +974,7 @@ void handleInfo (const TDB& tdb, T& task, Config& conf)
void handleLongList (const TDB& tdb, T& task, Config& conf)
{
// Determine window size, and set table accordingly.
int width = 80;
int width = conf.get ("defaultwidth", 80);
#ifdef HAVE_LIBNCURSES
if (conf.get ("curses", true))
{
@ -1306,7 +1306,7 @@ void handleReportNext (const TDB& tdb, T& task, Config& conf)
gatherNextTasks (tdb, task, conf, pending, matching);
// Determine window size, and set table accordingly.
int width = 80;
int width = conf.get ("defaultwidth", 80);
#ifdef HAVE_LIBNCURSES
if (conf.get ("curses", true))
{
@ -1888,7 +1888,7 @@ void handleReportCalendar (const TDB& tdb, T& task, Config& conf)
void handleReportActive (const TDB& tdb, T& task, Config& conf)
{
// Determine window size, and set table accordingly.
int width = 80;
int width = conf.get ("defaultwidth", 80);
#ifdef HAVE_LIBNCURSES
if (conf.get ("curses", true))
{
@ -1996,7 +1996,7 @@ void handleReportActive (const TDB& tdb, T& task, Config& conf)
void handleReportOverdue (const TDB& tdb, T& task, Config& conf)
{
// Determine window size, and set table accordingly.
int width = 80;
int width = conf.get ("defaultwidth", 80);
#ifdef HAVE_LIBNCURSES
if (conf.get ("curses", true))
{
@ -2100,7 +2100,7 @@ void handleReportOverdue (const TDB& tdb, T& task, Config& conf)
void handleReportOldest (const TDB& tdb, T& task, Config& conf)
{
// Determine window size, and set table accordingly.
int width = 80;
int width = conf.get ("defaultwidth", 80);
#ifdef HAVE_LIBNCURSES
if (conf.get ("curses", true))
{
@ -2236,7 +2236,7 @@ void handleReportOldest (const TDB& tdb, T& task, Config& conf)
void handleReportNewest (const TDB& tdb, T& task, Config& conf)
{
// Determine window size, and set table accordingly.
int width = 80;
int width = conf.get ("defaultwidth", 80);
#ifdef HAVE_LIBNCURSES
if (conf.get ("curses", true))
{
@ -2453,7 +2453,7 @@ void handleReportStats (const TDB& tdb, T& task, Config& conf)
void handleVersion (Config& conf)
{
// Determine window size, and set table accordingly.
int width = 80;
int width = conf.get ("defaultwidth", 80);
#ifdef HAVE_LIBNCURSES
if (conf.get ("curses", true))
{
@ -2463,10 +2463,6 @@ void handleVersion (Config& conf)
}
#endif
// Handle case for zero width on mobile device.
if (width == 0)
width = 80;
// Create a table for output.
Table table;
table.setTableWidth (width);

View file

@ -178,6 +178,8 @@ a img { border: none; padding: 0; margin: 0; }
<ul>
<li>Fixed bug where "showage" configuration variable was not being
oberved by the "task long" report
<li>New configuration variable "defaultwidth" determines the width
of windows in the absense of ncurses support
</ul>
<p>
@ -206,7 +208,7 @@ a img { border: none; padding: 0; margin: 0; }
Source: <a href="http://www.beckingham.net/task-1.2.0.tar.gz">task-1.2.0.tar.gz</a>
<br />
Debian package: <a href="http://www.beckingham.net/task_1.2.0-1_i386.deb">task_1.2.0-1_i386.deb</a>
(Thanks to Richard Querin)
(Thanks to <a href="http://blog.rfquerin.org">Richard Querin</a>)
</p>
<ul>
@ -226,7 +228,7 @@ a img { border: none; padding: 0; margin: 0; }
Source: <a href="http://www.beckingham.net/task-1.1.0.tar.gz">task-1.1.0.tar.gz</a>
<br />
Debian package: <a href="http://www.beckingham.net/task_1.1.0-1_i386.deb">task_1.1.0-1_i386.deb</a>
(Thanks to Richard Querin)
(Thanks to <a href="http://blog.rfquerin.org">Richard Querin</a>)
</p>
<ul>
@ -268,6 +270,12 @@ a img { border: none; padding: 0; margin: 0; }
This guide shows how to quickly set up the task program, and become
proficient with it.
</p>
<p>
Alternatively, watch the
<a href="http://www.youtube.com/watch?v=D2Kn4DMOVSw">task movie</a>
which illustrates many of task's features.
</p>
</div>
<br />
@ -1118,6 +1126,12 @@ on_white on_bright_white</code></pre>
Defaults to 10.
</dd>
<dt>defaultwidth</dt>
<dd>
The width of tables used when ncurses support is not available.
Defaults to 80.
</dd>
<dt>color</dt>
<dd>
May be "on" or "off". Determines whether task uses color.