Portability: Updated to make main re-entrant()
- New INSTALL instructions to emscripten, and AUTHORS for contribution.
This commit is contained in:
committed by
Paul Beckingham
parent
cae3f06b7d
commit
7af6db4c17
@@ -35,8 +35,6 @@
|
||||
#include <util.h>
|
||||
#include <main.h>
|
||||
|
||||
extern Context context;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
CmdProjects::CmdProjects ()
|
||||
{
|
||||
@@ -61,10 +59,10 @@ int CmdProjects::execute (std::string& output)
|
||||
// Get all the tasks.
|
||||
handleUntil ();
|
||||
handleRecurrence ();
|
||||
auto tasks = context.tdb2.pending.get_tasks ();
|
||||
auto tasks = Context::getContext ().tdb2.pending.get_tasks ();
|
||||
|
||||
if (context.config.getBoolean ("list.all.projects"))
|
||||
for (auto& task : context.tdb2.completed.get_tasks ())
|
||||
if (Context::getContext ().config.getBoolean ("list.all.projects"))
|
||||
for (auto& task : Context::getContext ().tdb2.completed.get_tasks ())
|
||||
tasks.push_back (task);
|
||||
|
||||
// Apply the filter.
|
||||
@@ -106,7 +104,7 @@ int CmdProjects::execute (std::string& output)
|
||||
{
|
||||
// Render a list of project names from the map.
|
||||
Table view;
|
||||
view.width (context.getWidth ());
|
||||
view.width (Context::getContext ().getWidth ());
|
||||
view.add ("Project");
|
||||
view.add ("Tasks", false);
|
||||
setHeaderUnderline (view);
|
||||
@@ -180,10 +178,10 @@ int CmdCompletionProjects::execute (std::string& output)
|
||||
// Get all the tasks.
|
||||
handleUntil ();
|
||||
handleRecurrence ();
|
||||
auto tasks = context.tdb2.pending.get_tasks ();
|
||||
auto tasks = Context::getContext ().tdb2.pending.get_tasks ();
|
||||
|
||||
if (context.config.getBoolean ("list.all.projects"))
|
||||
for (auto& task : context.tdb2.completed.get_tasks ())
|
||||
if (Context::getContext ().config.getBoolean ("list.all.projects"))
|
||||
for (auto& task : Context::getContext ().tdb2.completed.get_tasks ())
|
||||
tasks.push_back (task);
|
||||
|
||||
// Apply the filter.
|
||||
|
||||
Reference in New Issue
Block a user