diff options
author | Tim Hentenaar <tim@hentenaar.com> | 2014-10-10 01:55:14 +0200 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2014-10-10 09:33:57 +0200 |
commit | 7f62fb185c2617eb308f7ca5fe8b9e18828cb772 (patch) | |
tree | c20ac5e02a8767f0959507011b9886a971a31fd4 /src/calcurse.c | |
parent | 7f06c25230db49e6a7dcf00692cc2d1bae9ec6ea (diff) | |
download | calcurse-7f62fb185c2617eb308f7ca5fe8b9e18828cb772.zip |
Let SIGUSR1 trigger a reload
In an effort to better integrate the import process with external
applications, it's desirable to have a mechanism by which external
programs can trigger a reload of calcurse's data.
This patch adds that functionality via SIGUSR1. The reload request is
handled in the main loop. When the user is currently entering data, the
request is delayed until the main loop is re-entered.
Signed-off-by: Tim Hentenaar <tim@hentenaar.com>
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/calcurse.c')
-rw-r--r-- | src/calcurse.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/calcurse.c b/src/calcurse.c index dd5abf5..7b94b9b 100644 --- a/src/calcurse.c +++ b/src/calcurse.c @@ -625,6 +625,11 @@ int main(int argc, char **argv) wins_reset(); } + if (want_reload) { + want_reload = 0; + key_generic_reload(); + } + key = keys_getch(win[KEY].p, &count, ®); switch (key) { case KEY_GENERIC_REDRAW: |