52 Commits

Author SHA1 Message Date
Lukas Fleischer
9f6678bc49 Update copyright ranges
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2017-01-12 08:40:30 +01:00
Lukas Fleischer
978d24a9d2 Update copyright ranges
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-01-30 11:21:53 +01:00
Lukas Fleischer
c58087d591 Add command line option to suppress dialogs
Implement a -q/--quiet command line option to disable system dialogs
temporarily.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-01-13 17:39:44 +01:00
Lukas Fleischer
767214e4f1 Add pre-save and post-save hooks
This adds support for hooks which are executed before/after saving
calcurse data. Hooks can be placed under hooks/pre-save and
hooks/post-save in the data directory and need to be executable.

Potential use cases include:

* Automatically commit any changes to the data files using a VCS.
* Automatically sync with some sever component on data file changes.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-01-07 19:09:46 +01:00
Lukas Fleischer
9ef427693b Update copyright ranges
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-07 11:42:20 +01:00
Tim Hentenaar
7f62fb185c 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>
2014-10-10 09:33:57 +02:00
Lukas Fleischer
5aec540895 Allow for merging data files when reloading
This allows for merging the (unsaved) items with the items from the data
files when invoking the reload operation. To this end, an external merge
tool (defaults to vimdiff) is used.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-07-16 23:31:31 +02:00
Lukas Fleischer
694d28eb78 Use tabs instead of spaces for indentation
This completes our switch to the Linux kernel coding style. Note that we
still use deeply nested constructs at some places which need to be fixed
up later.

Converted using the `Lindent` script from the Linux kernel code base,
along with some manual fixes.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-04-14 00:19:01 +02:00
Lukas Fleischer
806673dd9b calendar.c: Rename to "ui-calendar.c"
This unit belongs to the presentation layer -- rename the file
accordingly.

Also, rename calendar_*() to ui_calendar_*().

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-02-14 11:08:03 +01:00
Lukas Fleischer
a7944d335e Update copyright ranges
Add 2013 to the copyright range for all source and documentation files.

Reported-by: Frederic Culot <frederic@culot.org>
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-02-04 20:10:14 +01:00
Lukas Fleischer
4d0c095947 Add compact panels support
Add a configuration option that allows for switching to compact panel
mode. In this mode, all window labels are hidden, so that there's more
space for actual information.

This patch doesn't add a configuration menu entry and doesn't add any
documentation.

Implements FR#7.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2012-11-25 18:33:29 +01:00
Lukas Fleischer
660eef88e4 Add configuration option to set a default panel
This allows for customizing the panel that is selected by default when
calcurse is started.

Note that this patch doesn't add any documentation. Also, this
configuration option currently cannot be configured using the
configuration menu.

Implements FR#19.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2012-11-25 18:13:37 +01:00
Baptiste Jonglez
9adacec623 Provide an array of available date input formats
This will allow to fix the current hardcoding of strings describing
date input formats in multiple places.

Signed-off-by: Baptiste Jonglez <baptiste--git@jonglez.org>
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2012-05-31 20:42:23 +02:00
Lukas Fleischer
cfd8ede2b3 Switch to Linux kernel coding style
Convert our code base to adhere to Linux kernel coding style using
Lindent, with the following exceptions:

* Use spaces, instead of tabs, for indentation.
* Use 2-character indentations (instead of 8 characters).

Rationale: We currently have too much levels of indentation. Using
8-character tabs would make huge code parts unreadable. These need to be
cleaned up before we can switch to 8 characters.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2012-05-21 10:13:05 +02:00
Lukas Fleischer
6da787a5cc Declare several parameters/variables constant
Add the "const" keyword to parameters and variables that are never
modified. Most of these were spotted by "-Wwrite-strings".

We cast the second parameter to execvp() explicitly as it expects a
"char *const[]" where it should expect a "const char *const[]"
(according to the documentation, this is due to compatibility reasons).
This should be changed once we come up with a better solution.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2012-05-08 21:50:05 +02:00
Lukas Fleischer
c85c3cce55 Fix semantics of "general."{systemdialogs,progressbar}
These were renamed from "skip_"* to *. However, we only changed syntax
and didn't invert their semantic meaning. Fix this by negating the
semantics of those variables. Also, negate these in the configuration
file automatically when running `calcurse-upgrade`.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2012-03-29 17:06:56 +02:00
Lukas Fleischer
c9aff6d213 Update copyright ranges
Add 2012 to the copyright range for all source and documentation files.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2012-03-26 14:38:16 +02:00
Lukas Fleischer
3bc9497fc8 Add a read-only option
We don't save any configuration nor items if this is set. This should be
used with care, and hence there's no short option for this.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2012-02-24 22:48:26 +01:00
Lukas Fleischer
41c33eeb44 Use a global configuration variable
This is one of the few valid use cases for a global variable. No need to
make it pseudo-local and pass it from one function to another.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-11-14 11:08:14 +01:00
Lukas Fleischer
14b6ae79a2 Merge branch 'maint'
Conflicts:
	src/calcurse.h
	src/io.c
2011-11-11 12:29:48 +01:00
Lukas Fleischer
7cc6305588 Do not cast unused return values to void
A small style fix that removes all remaining "(void)" casts. Using these
isn't encouraged in GNU coding guidelines and doesn't serve a certain
purpose, except for satisfying a few static code analysis tools. We
already nuked some of these in previous patches, but this semantic patch
should fix what's left:

    @@
    identifier func;
    @@

    - (void)func (
    + func (
    ...);

Long lines were re-formatted manually.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-11-02 18:32:17 +01:00
Lukas Fleischer
711d5dea20 Add configuration option to run the GC on exit
If "auto_gc" is enabled, the garbage collector for note files will be
run on every exit. As this is an experimental feature and may cause data
loss, this is disabled by default.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-10-05 12:25:48 +02:00
Lukas Fleischer
c41eda256d Do not hardcode paths to the default editor/pager
Use "vi" instead of "/usr/bin/vi" and "less" instead of "/usr/bin/less".
Hardcoding absolute paths is a bad idea:

    $ uname -rsv
    Linux 3.0-ARCH #1 SMP PREEMPT Tue Aug 30 07:32:23 UTC 2011
    $ which less
    /bin/less

The "$PATH" environment variable will almost always have a better idea
of where these binaries are located.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-10-04 11:05:43 +02:00
Lukas Fleischer
1355bad264 Declare foreground and background variables global
Removes the need to pass the terminal's default background color round.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-07-21 17:56:39 +02:00
Lukas Fleischer
fec37db06b Avoid redundant redraws on resize
Use a global flag to record whether the terminal was resized instead of
redrawing everything each time a KEY_RESIZE is read.

Add some additional checks to help_write_pad() as invalid actions may be
passed now due to using signals instead of virtual key presses.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-06-28 18:22:43 +02:00
Lukas Fleischer
38865b8e48 Update copyright notices in source files, documentation and "COPYING".
* Update copyright dates (use 2004-2011 as date range everywhere).

* Change copyright holder from "Frederic Culot" to "calcurse Development
  Team".

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-04-22 07:26:05 +02:00
Lukas Fleischer
9c9fd5da15 Overall indentation fixes.
Use spaces instead of tabs for source code indentation only, strip
trailing whitespaces from lines.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-03-14 19:03:53 +01:00
Lukas Fleischer
c22dcaf6be Update website links to match the new URL.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-03-04 11:07:49 +01:00
Lukas Fleischer
73e9649387 Update mail addresses to match the new mailing lists.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-03-04 11:07:40 +01:00
Lukas Fleischer
91c9cac898 Remove CVS "$Id" headers.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-03-03 16:19:45 +01:00
Lukas Fleischer
56b9cbcb84 Fixed file permissions. 2011-03-03 12:21:16 +01:00
Frederic Culot
a8cb1c92ef All headers gathered into a single one. Typedefs suppressed. 2010-03-20 10:54:41 +00:00
Frederic Culot
71d6cfda92 More work on implementing the daemon. 2009-08-01 13:31:20 +00:00
Frederic Culot
3d23af73c0 More work on implementing calcurse daemon. 2009-07-26 12:47:15 +00:00
Frederic Culot
ade0470197 Functions added to implement a logging mechanism for calcurse daemon. 2009-07-23 18:33:20 +00:00
Frederic Culot
5694955002 stdbool header removed, unsigned type used instead 2009-07-12 16:21:57 +00:00
Frederic Culot
27b25548a4 Switch to BSD license. 2009-07-05 20:33:13 +00:00
Frederic Culot
627fd8a8aa Basic lock mechanism implemented to avoid having two calcurse instances running at the same time. 2009-06-21 18:16:21 +00:00
Frederic Culot
bf3bce0ab2 code cleanup 2009-01-02 22:28:53 +00:00
Frederic Culot
8fdd1510c6 Automatic periodic saves implemented 2008-12-28 19:41:45 +00:00
Frederic Culot
5352496984 Added wrappers around libc's memory management functions, to easily debug memory usage 2008-12-28 13:13:58 +00:00
Frederic Culot
9d4899110a More work on implementing user-definable keybindings 2008-11-16 17:42:53 +00:00
Frederic Culot
e8f12c65ca Loading of user-configurable keys implemented 2008-11-09 20:10:18 +00:00
Frederic Culot
96b858b8bc More work on ical import. Macros to handle errors and to display messages in both command-line and curses mode added 2008-09-20 12:47:06 +00:00
Frederic Culot
efd782699b Yet another style for source code. GNU style now used (I am fed up with tabs...) 2008-04-12 21:14:03 +00:00
Frederic Culot
0c281d2c1e Tony's patch concerning date format configuration imported 2008-04-09 20:38:29 +00:00
Frederic Culot
478b2762e6 Ability to attach notes to todo items added 2007-12-30 16:27:58 +00:00
Frederic Culot
c9ba409a8b cwin, awin, twin, swin variables suppressed 2007-10-21 13:40:13 +00:00
Frederic Culot
8c8f3a56ff layout is not part of conf_t type anymore, and becomes a static variable in wins.c 2007-08-15 15:36:05 +00:00
Frederic Culot
9c24e12061 vars_init() added 2007-07-21 19:30:55 +00:00