1481 Commits

Author SHA1 Message Date
Lukas Fleischer
490e5a4e1d po/: Translation updates from Transifex
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-07-08 15:52:41 +02:00
Lukas Fleischer
63141268e0 test/: Remove temporary errors file in tests
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-07-08 15:47:09 +02:00
Lukas Fleischer
e97c32563f test/Makefile.am: Add missing test data
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-07-08 15:28:54 +02:00
Lukas Fleischer
7904af5d9d Implement test initialization properly
Make test-init.sh work even if tests are executed from another
directory.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-07-08 15:12:37 +02:00
Lukas Fleischer
8aaaf18268 src/Makefile.am: Add vector.h to source files
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-07-08 13:53:45 +02:00
Lukas Fleischer
f338302d86 .tx/config: Remove trailing slash from URI
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-07-08 13:53:37 +02:00
Lukas Fleischer
a32f6b008a Make sure that tmppath is always NULL-terminated
Fixes GitHub issue #5.

Reported-by: dcb314
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-07-08 13:24:25 +02:00
Lukas Fleischer
936d5f139f ical.c: Remove newlines from item summaries
Newline characters are not allowed in calcurse item descriptions.
Replace any newlines in iCal summary lines with spaces.

Fixes GitHub issue #6.

Reported-by: Jonathan McCrohan <jmccrohan@gmail.com>
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-07-08 13:14:08 +02:00
Jack Nagel
82aa3e3f43 Define _DARWIN_C_SOURCE to get SIGWINCH on OS X
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-07-08 13:01:01 +02:00
Lukas Fleischer
9dc36589ae Fix SHA1 calculation of long notes
sha1_update() modifies the input data, so we need to duplicate the input
before calculating the hash. Otherwise, input data longer than 64 bytes
will be garbled.

Reported-by: Hakan Jerning <jerning@home.se>
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-07-08 12:54:03 +02:00
Lukas Fleischer
0529b864b0 Fix segmentation fault
This adds some more accurate checks to avoid a segmentation fault that
occurred when accessing a nonexistent item.

Fixes GitHub issue #7.

Reported-by: Bromind <martin.vassor@hotmail.fr>
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-06-25 12:35:43 +02:00
Lukas Fleischer
0b46ad4faa Avoid blank space after the last list box item
Automatically scroll down the list box when resizing creates some blank
space below the list of items.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-05-19 21:43:27 +02:00
Lukas Fleischer
990897b2f0 Resize panels properly
Rewrite the panel resize code and remove the code that reinitializes the
caption and the selected item when the window is resized.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-05-19 10:54:50 +02:00
Lukas Fleischer
e026481f11 listbox_resize(): Avoid segmentation fault
Only try to fix the visible region if an item is selected.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-05-19 10:37:21 +02:00
Lukas Fleischer
d971d7aa35 Fix calendar centering
Adjust the positions of the weekly and monthly views inside the calendar
panel.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-05-19 10:25:58 +02:00
Lukas Fleischer
7e76d617ab Use an enum for the type field of day_item
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-05-18 11:24:04 +02:00
Lukas Fleischer
4cd2fd36d5 Add default cases to some switch statements
This squelches several compiler warnings.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-05-18 11:22:22 +02:00
Lukas Fleischer
411b8078b9 day_item_add_exc(): Fix unwanted fall-through
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-05-18 11:13:57 +02:00
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