1563 Commits

Author SHA1 Message Date
Lukas Fleischer
2a62351d25 Reintroduce heading and separator in appointments
This re-introduces the heading (showing the POM and the current date) as
well as the separating line between events and appointments.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-05-18 11:10:56 +02:00
Lukas Fleischer
2a15531bb9 Add support for caption rows in list boxes
This adds support for rows that cannot be selected. Such rows can be
used for section headings and the like.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-05-18 11:07:27 +02:00
Lukas Fleischer
a5f3e53ce3 Remove unused functions border_{,no}color()
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-05-18 11:07:27 +02:00
Lukas Fleischer
35314dfdeb ui-day: Large-scale refactoring
Use the generic list box implementation for the appointments panel. This
results in some major changes to how the items are printed.

Note that this temporarily removes the heading showing the POM and the
date as well as the separating line between events and appointments.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-05-18 11:06:43 +02:00
Lukas Fleischer
f513fa4627 Store appointments for the current day in a vector
This allows for more efficient access to items at specific positions.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-05-18 11:03:16 +02:00
Lukas Fleischer
45af8c5880 Add a vector implementation
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-05-18 11:03:15 +02:00
Lukas Fleischer
cf1565648b ui-calendar: Use scroll window implementation
Make use of the generic scroll window implementation for the calendar
view. Note that this is useful despite the panel not needing a scroll
bar, since the scroll window functions can be used to draw the panel
border and take care of relative positions.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-05-18 11:03:13 +02:00
Lukas Fleischer
655218b7df ui-todo: Large-scale refactoring
This is a complete overhaul of the TODO list user interface. The new
implementation uses the generic list box panel.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-05-18 11:03:10 +02:00
Lukas Fleischer
4210fdd38a Add support for drawing highlighted decoration
This allows for drawing selected scroll windows and list boxes with a
highlighted border.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-05-18 11:03:03 +02:00
Lukas Fleischer
fbd0651615 custom.c: Simplify code
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-05-18 11:03:01 +02:00
Lukas Fleischer
7cf42c1083 Remove numbers and whitespace from option menus
These are no longer needed since items are no longer accessed via
numeric keys.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-05-18 11:02:59 +02:00
Lukas Fleischer
05ba450c3b Reduce flicker when resizing in option menus
Do not update the main windows when resizing the terminal in the general
options menu or in the notification options menu.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-05-18 11:02:56 +02:00
Lukas Fleischer
5eea05a203 Use generic list box for notification options
This changes the notification options menu to use the new generic list
box implementation. The only user-visible change is that items are now
accessed via the arrow and edit key bindings instead of digits.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-05-18 11:02:52 +02:00
Lukas Fleischer
bd182fbb5e Use generic list box for general options
This changes the general options menu to use the new generic list box
implementation. The only user-visible change is that items are now
accessed via the arrow and edit key bindings instead of digits. This
also allows for easily adding more than 10 options to the menu.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-05-18 11:02:47 +02:00
Lukas Fleischer
27b39a56ef Add a generic list box implementation
This adds a very generic list box implementation. List boxes with items
of different heights are supported. Two callback functions to determine
the height of every single item and to draw a specific item are used.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-05-18 11:02:42 +02:00
Lukas Fleischer
7184da0fa3 Rework scroll window implementation
This complete rewrite of the scroll window implementation decouples
scroll windows from every other window abstraction layer we use. Note
that this leads to some code duplication. The long-term purpose of this
rewrite, however, is to eventually make every panel use scroll windows.
This makes for a huge cleanup of the UI code.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-05-18 11:02:32 +02:00
Lukas Fleischer
ca83e65696 Pass date parameter to ui_day_update_panel()
This allows for drawing appointment panels for days other than the
current day.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-05-13 15:10:47 +02:00
Lukas Fleischer
bd4f4a136f Display translated help pages
Use an algorithm similar to gettext's locale resolution to find an
appropriate translation to display. Fall back to the English version.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-08-27 19:33:28 +02:00
Lukas Fleischer
ef0f9e6411 Install translated documentation
Add rules so that translated documentation is installed to
/usr/local/share/doc/calcurse/<lang>/.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-08-27 18:08:47 +02:00
Lukas Fleischer
47804c9d20 doc/: Add translated documentation
Created using `po2txt` from translate-toolkit.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-08-27 17:44:21 +02:00
Lukas Fleischer
b74a9462de po/: Translation updates from Transifex
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-08-27 17:42:45 +02:00
Lukas Fleischer
9c1d50eee2 Redraw screen if command prompt is canceled
When pressing escape or entering an empty command, we returned from
key_generic_cmd() without updating the screen. Fix this by creating a
cleanup section at the bottom of key_generic_cmd() and jump to that
section when the command prompt is cancelled.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-08-13 12:58:23 +02:00
Lukas Fleischer
9eadc19a52 .tx/config: Add file filters for all resources
This allows for naming translations "<foo>-<lang>.po", where <foo> is a
document name (e.g. "add") and <lang> is a language (e.g. "de"), and
simply using `tx push -t` to submit them to Transifex.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-07-24 09:16:06 +02:00
Lukas Fleischer
85b9a8e31a po/doc/: Update message catalogs
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-07-24 08:51:30 +02:00
Lukas Fleischer
d4e9bd9ca8 Drop doc/main.txt
This is no longer needed since we don't use the internal online help
system anymore.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-07-24 08:45:58 +02:00
Lukas Fleischer
72637ad10d doc/Makefile.am: Fix "copy-paste.txt" file name
Regression introduced in 6ef890b434e7ab65abdd0e6bb13cb86e583d85ae.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-07-24 08:44:12 +02:00
Lukas Fleischer
5e64d6aff2 doc/edit.txt: Mention the move feature
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-07-24 08:43:27 +02:00
Lukas Fleischer
df07b93839 doc/: Mention punctual appointments
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-07-24 08:42:01 +02:00
Lukas Fleischer
fec6b8dc23 doc/: Spelling and grammar fixes
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-07-24 08:39:41 +02:00
Lukas Fleischer
1aa43ff966 Add POT files for online help texts
Use translate-toolkit to generate message catalogs for all online help
texts. Add Transifex resources for each of the message catalogs.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-07-23 11:17:49 +02:00
Lukas Fleischer
ae0133d4f1 .tx/config: Rename main resource to "calcurse"
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-07-23 10:51:45 +02:00
Lukas Fleischer
53c40642bc .tx/config: Set global translation type
We only deal with PO files in calcurse -- set the global translation
format accordingly.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-07-23 10:51:23 +02:00
Lukas Fleischer
411c64aaf9 .tx/config: Update host URI
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-07-23 10:51:23 +02:00
Lukas Fleischer
5736f4cd9c calcurse.pot: Update message catalog
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-07-23 10:40:41 +02:00
Lukas Fleischer
fd349d9356 po/POTFILES.in: Sync with source tree
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-07-23 10:39:13 +02:00
Lukas Fleischer
6ef890b434 doc/: Rename copy_paste.txt to copy-paste.txt
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-07-23 10:27:12 +02:00
Lukas Fleischer
0980f848db doc/: Do not mention explicit key bindings
Since we exported help texts into text files, we are no longer able to
refer to the user's key bindings. Drop key binding references from the
online help texts.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-07-22 16:42:04 +02:00
Lukas Fleischer
eb0ae4b924 doc/: Fix several typos in online help texts
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-07-22 16:34:58 +02:00
Lukas Fleischer
5aa2f0de3c doc/: Formatting fixes
* Use an AsciiDoc-compatible layout.
* Use a maximum line width of 79 characters everywhere.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-07-22 16:29:02 +02:00
Lukas Fleischer
3f621c69fc manual.txt: Update "Online help" section
Add information on recent changes to the online help system.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-07-22 12:23:00 +02:00
Lukas Fleischer
e55a09b8d9 manual.txt: Update "Creation History" section
Remove some non-relevant information. Add information on myself to the
creation history.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-07-22 12:18:13 +02:00
William Pettersson
c2d324be51 Document for -l/--limit and %(remaing)/%(duration)
Update man-page and manual to describe limit option, and new formatting options
for %(remaining) and %(duration).

Signed-off-by: William Pettersson <william.pettersson@gmail.com>
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-07-19 16:21:50 +02:00
Lukas Fleischer
aea877145e Add write and quit commands
This adds following vim-style commands to the command mode:

* write
* w
* quit
* q
* wq

Commands can be suffixed with a "!" to force execution.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-07-18 12:31:37 +02:00
Lukas Fleischer
ed9b22bd9b Add support for moving appointments
This adds an edit option to change an appointment's start time without
changing its duration.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-07-18 12:19:06 +02:00
Lukas Fleischer
30639ef6de update_start_time(): Allow for moving an item
Add a parameter that specifies whether the duration should be updated
when updating the start time of an item.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-07-18 12:13:54 +02:00
Lukas Fleischer
19290ca39a Allow for making an appointment punctual
This allows for setting an empty end time when editing an item,
converting it into a punctual appointment.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-07-18 12:10:25 +02:00
Lukas Fleischer
2b5f891ba3 key_generic_help(): Use display_help()
Now that we moved the online help code into a separate function, use
that to display the introduction help page when pressing the generic
help key binding.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-07-18 11:34:48 +02:00
Lukas Fleischer
f36484f404 Split online help code into a separate function
Reintroduce help.c and move the online help code into a new function
display_help().

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-07-18 11:29:10 +02:00
Lukas Fleischer
beac8bdd9b Rename io_file_exist{,s}()
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-07-17 14:03:54 +02:00
Lukas Fleischer
98fb747e6a Add several help topic aliases
Add aliases and choose the right help topic if the user requests help on
a key binding or a key binding label.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-07-17 14:03:54 +02:00