| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Disable signal handlers in wins_prepare_external() and reactivate them
in wins_unprepare_external().
Before, it was possible that resizing the window during editor/pager
mode resulted in the calcurse main screen appearing on top.
Addresses BUG#9.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| | |
Remove the huge layout switch block and use simple calculations instead.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| | |
We only call this once. Remove the wrapper and directly call the wrapped
function instead.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|\|
| |
| |
| |
| |
| | |
Conflicts:
src/day.c
src/recur.c
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We did not setup a thread cleanup procedure which resulted in calcurse
freezing if a thread tried to draw on the screen after another thread
was canceled while locking the screen.
Note that this kind of cleanup handlers should be added to other mutexes
as well. This patch just removes the most common case of triggering a
deadlock.
Also note that we cannot move pthread_cleanup_push() and
pthread_cleanup_pop() into the locking/unlocking functions since both
pthread_cleanup_push() and pthread_cleanup_pop() may be implemented as
macros that must be used in pairs within the same lexical scope.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Lock the screen if either the calendar panel or the notification bar is
updated to avoid race conditions.
Addresses BUG#6.
Note that we currently always use a screen-level lock, even if only one
window is affected. This is to be changed in the future.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We don't need floating point precision if results are casted back to
integer. Instead, rearrange operations and do the integer division after
the multiplication.
Version numbers are terminating decimals anyway and can be stored using
two integers without losing any information.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| |
| |
| |
| | |
Remove the cut function and merge it into the del-item command. This
allows for vim-style cutting/pasting.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|/
|
|
|
|
| |
This finally adds full copy-paste support. Implements FR#15.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
|
| |
In addition to generic key bindings for moving one day (week)
forward/backward, define similar bindings for moving a month or a year.
Of course, count prefixes are allowed here as well.
Also add status bar hints and help texts.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
|
| |
* Rename "LEFT" to "DAY_PREV", "RIGHT" to "DAY_NEXT", "UP" to
"WEEK_PREV" and "DOWN" to "WEEK_NEXT" to reflect the semantics of
these operations. Remove the unneeded "MOVES" element.
* Reorder code to improve consistency.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
This allows for specifying an editor or a pager with additional command
line parameters, such as "vim -e". Instead of interpreting "vim -e" as
an executable file, we leave it to the shell to tokenize and parse the
editor command now.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
Remove obsolete bits of code that weren't thrown away by b5c1981;
simplify some others areas of the code.
Signed-off-by: Baptiste Jonglez <baptiste--git@jonglez.org>
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
|
| |
Use percentage-based widths internally. This slightly impairs (user)
feedback but brings the sidebar configuration menu closer to the actual
configuration format (the user now configures percentage-based widths,
not absolute width values). As a bonus, the sidebar is now resized
automatically on each window resize (based on the percentage values).
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
| |
Add 2012 to the copyright range for all source and documentation files.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
| |
Translated strings returned by gettext() are statically allocated.
There's no need to copy them to a buffer, we can use the pointers
returned by gettext() instead.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Refactor the logic inside keys_display_bindings_bar() and remove the
need to place the "show next page" key binding at the right positions.
This used to be a pain to maintain, since we always had to move key
bindings around when introducing a new key. Fix this by passing the
actual key bindings in an array and using a separate parameter for the
"show next page" key binding (which is automatically inserted at the
right places from now on).
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
No reason to use "return (x);" here. Refer to the GNU coding guidelines
for details. Created using following semantic patch:
@@
expression expr;
@@
- return (expr);
+ return expr;
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use one of the following functions where appropriate:
* puts() (whenever we print hard coded strings to stdout)
* fputs() (whenever we print hard coded strings to a stream)
* putchar() (whenever we print a single character to stdout)
* fputc() (whenever we print a single character to a stream)
* strncpy() (whenever we copy hard coded strings to a buffer)
This removes the overhead introduced by the format string parser and
reduces the number of false positive C-format strings spotted by
xgettext(1)'s heuristics.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
| |
Add a window bitmask to wins_update() and only update windows that might
actually require an update in our main loop. This improves response
times of the user interface a bit.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
| |
This removes the need of reading the whole data file and find matching
entries if we want to parse appointments in external programs.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
| |
Invoke endwin() *after* calling any other curses functions, such as
refresh(). Calling refresh() after endwin() might restore curses mode
which is a bad thing for a terminal mode initialization routine.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
| |
* Do window preparation and restoring in separate functions
wins_prepare_external() and wins_unprepare_external().
* Use fork_exec() and child_wait() instead of system().
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
| |
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
| |
"bad_zero.cocci" spatch from http://coccinelle.lip6.fr/impact_linux.php.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
| |
Seen with "-Wunused-but-set-variable".
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
| |
Use spaces instead of tabs for source code indentation only, strip
trailing whitespaces from lines.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
| |
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
| |
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
| |
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
|
|
|
|
| |
configuration file.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|