69 Commits

Author SHA1 Message Date
Lukas Fleischer
987fa9d3e5 Allow to omit end date in repetitions
Addresses GitHub issue #213.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2019-06-03 18:43:42 -04:00
Lars Henriksen
e6099b2d59 Fix recurrent appointment end time when duration is zero
Fixes a regression introduced in 223810c (Major overhaul of
appointment/event input routines., 2017-11-06) and 16d3032 (Refactoring
update_duration/day_edit_duration., 2017-10-18).

Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2019-06-03 18:42:52 -04:00
Lars Henriksen
0edc2e8637 Mark selected day in the appointments panel in multiple days mode
Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2019-05-28 17:58:06 -04:00
Lars Henriksen
4db9677119 Make separation of days conspicuous
... by adding a horizontal line from border to border above the day
heading and turning the event separator into an empty line. The
horizontal line is left out for the first day loaded.

Also reduce the number of empty lines at the end of a day to at most
one.

A new configuration variable, header_line, turns the horizontal line on
and off.

Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2019-05-26 10:04:27 -04:00
Lars Henriksen
f9cf5fb0c1 Derive selected day from selected item
Previously, with only one day visible at a time, the appointments panel
displayed the details of the day selected in the calendar (slctd_day);
information required for operations on items (day_items) can often be
derived from the selected day. The items available are derived from the
selected day. In particular, the selected item is derived from the
selected day.

With multiple days in the APP panel, the relation between selected day
(in the calendar) and the selected item (in the APP panel) has, in a
way, been turned around. The selected item may now be moved between days
without explicitly changing the selected day. Implicitly it is changed
when the target day of a move is unavailable.

This commit draws the full consequence: the selected day in the calendar
is always (set to) the day of the selected item in the APP panel.

The static variable 'struct date slctd_day' lives in ui_calendar.c and
is accessible through various public functions. To these are added
ui_calendar_set_slctd_day() which sets slctd_day directly.

The selected day retains its significance for load of the day vector (in
day_store_items()): the range of loaded days begins with the selected
day.  Movements (up/down) in the APP panel will change the selected day
as the selected item moves among the already loaded days. Only when the
target of a movement is unreachable, will further days be loaded. On the
other hand, if the same range of days must be reloaded because of a
changed item, the selected item - and with it the selected day - must be
reset to the first day item (see do_storage()).

Movements in the calendar (generic-next-day, etc.) are not affected and
behave as previously, i.e. they will cause a range of days to be loaded
with the selected day as the first and the selected item as the first of
the selected day.

Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2019-05-22 01:56:59 -04:00
Lars Henriksen
80ce812eff Add configuration variables for multiple days
The number of days displayed in the APP panel has been made
configurable, maximum 21 days, default seven days.

With several days in the APP panel, it may be desirable to "squeeze" the
entries by leaving out the final empty line of each appointment and
lower the number of lines between consecutive days (0, 1, or 2). Both
are made general configuration options. To make a uniform display, an
empty line is added to a day without appointments, if appointments have
an empty line.

Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2019-05-22 01:56:59 -04:00
Lars Henriksen
4284ca91bc Implement scrolling in the appointments panel
With multiple days in the APP panel, up/down movements should change
behaviour at the top and bottom of the list displayed, and load the
previous/next lot of days.

This requires that the move function returns the result of the
operation.  Furthermore, the ability to move the selection to the
beginning of a day is needed when moving down (in order to move from the
first day to the last day).  For this reason a DAY_SEPARATOR has been
inserted also after the last day of a lot.

Appointments have a listbox height of three to separate them clearly
when there is more than one in a day.  This leaves a spurious empty line
at the end of a day with appointments.  The DAY_SEPARATOR height is
reduced from two to one, and a new EMPTY_SEPARATOR of height one is
inserted in any day with only events.

When scrolling up the DAY_HEADING becomes visible when the selection
reaches the first item of the day.

The length of the separator (between events and appointments) is
adjusted to leave a space to the window border at both ends, thereby
making it a part of the day, not a separation between days.

The dummy event must also be recognisable when not the selected item and
is only inserted in interactive mode.

The test for a saved selection must also recognise caption items which
have item pointer NULL.

The function day_get_nb() has been renamed day_get_days().

Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2019-05-22 01:56:59 -04:00
Lars Henriksen
1ccfe128cc Redesign selected-item implementation for the APP panel
The day vector, day_items, is displayed in the appointments panel; the
selected day_item object is highlighted (when the panel has the focus).
When items are inserted, edited, moved etc., and when the day is
changed, the day vector is rebuilt and displayed anew.

Problem: How shall the selection be set automatically in the context of
the new day vector?

In previous versions all of the above is mostly handled by the function
do_storage() in calcurse.c The function saves data about the selection
as needed, rebuilds the day vector, loads the listbox and sets the
selection from the saved selection data.  This works well in "single
day" calcurse in cases where the selected item is present in the day
vector both before and after the rebuild, or when the item ordering in
the listbox is unaffected by the changes.  But when a new item is added
the selection cannot be set to the new object by do_storage().  Instead
the necessary operations are performed by ui_day_item_add(), and
do_storage() is bypassed. In general, when an item cannot be found in
the new vector, the item which occupies the old place in the list gets
selected, e.g. when an item is deleted. When an item is turned into a
repeating one, the old item is deleted and a new is created. Here the
new selection is not always the affected item, but in any case not far
away.  Generally, with only one day in the panel an erronous selection
might not be noticed or be accurate by chance.

In "multiple day" calcurse the existing scheme works less well; in
addition the day vector may now contain more than one object that refer
to the same event or appointment (recurrent items or multi-day
appointments). The scheme has therefore been modified. The do_storage()
function is no longer bypassed, but handles day vector rebuild, load of
listbox and item selection exclusively. To make that possible, data
about the selected item is no longer saved in a local automatic
variable, private to do_storage(), but in an external static variable in
day.c, which may be set not only by do_storage(). The variable is
declared as

static struct day_item sel_data;

and used as follows:

1. On startup sel_data is initialized to empty (i.e. no selection).
2. In any operation involving the appointments panel:
   2.1 Do the work and if necessary set sel_data. This is the case when
       deleting, adding or pasting an item, and when turning an ordinary
       item into a recurrent one.
   2.2 Call do_storage().
3. In do_storage():
   3.1 If sel_data is empty, set it to the current selection.
   3.2 Rebuild the day vector.
   3.3 Set the selection from sel_data.
   3.4 Set sel_data to empty.

Further remarks
---------------

The selection is found in the new day vector by searching for the saved
(order, item.<pointer>) pair. Previously the item.<pointer> alone
sufficed and in some cases it still does. In case the item cannot be
found, the selection stays in the same day as before the rebuild.

An attempt at more consistently named APP-related functions has led to:
ui_day_sel_date() replaces ui_day_sel_day() ui_day_get_sel() replaces
ui_day_selitem()

Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2019-05-22 01:56:59 -04:00
Lars Henriksen
066df02cbf Introduce multiple days in the appointments panel
Overview of existing implementation
-----------------------------------

The APP panel displays the 'day_items' vector in the 'lb_apt' listbox. A
listbox consists of a scrollwin (structure) in which a number of items
is displayed. The listbox keeps track of:

    - the number of items
    - the selected item
    - the type of each item in an array type[]
    - the height of each item (ie. how many screen lines) in an array ch[]
    - how to display an item (on the screen)

The latter three are handled by functions fn_type(), fn_height(),
fn_draw(). The first two are used to fill in the corresponding array
entry, type[] or ch[], for item number i, the third draws item number i.

The items are taken from the global variables

    vector_t day_items
    int      day_items_nb

in day.c. Items include captions (DAY_HEADING, DAY_SEPARATOR).
Everything is sorted for display (DAY_HEADING, events, DAY_SEPARATOR,
appts).  These are filled in ("stored") [by day_store_items() for the
selected day in the calendar], before being "loaded" into the listbox.
See do_storage() in calcurse.c and ui_day_item_add() in ui-day.c.

New APP panel design
--------------------

Several days are displayed in the APP panel by loading them with
day_store_items().

With several days come several headings and separators. DAY_SEPARATOR is
reinterpreted to separate days, and a new separator, EVNT_SEPARATOR,
separates events from appointments. To sort everything, an 'order'
member of type time_t is added to the day_item structure. It is set for
headings and separators as well as for appointments and events as
follows:

    item            order
    ---------------------
    DAY_HEADING     BGNOFDAY (= midnight)
    EVNT_SEPARATOR  BGNOFDAY
    DAY_SEPARATOR   ENDOFDAY
    event           start time (midnight)
    appointment     start time (first day)
                    BGNOFDAY (following days, if any)

The sort function day_cmp() (used by vector_sort) is extended to sort by
order first.

The order field always indicates the day to which an item belongs. This
comes in handy, because with several days in the APP panel it is
necessary to distinguish between the selected day in the calendar and
the selected day in the APP panel.  This raises the question which day
should actions (commands) operate on: the one selected in the calendar
or the one selected in the APP panel? Unquestionably the one on the APP
panel which is the one tacitly implied. In most cases it is not a
problem, though, because actions work on the selected item and the
selected day does not come into play. But in some cases it does:

    delete item     When deleting an occurrence of a repeated item, the
                    selected day is the exception day to add.

    view item       day_popup_item() needs the day of the selected item
                    for display of correct start/end times.

    cut/paste item  Paste needs the selected day in which to paste.

    add item        The day of the new item is taken from the calendar.
                    Instead a dummy event is inserted in an empty day.
                    This makes the day selectable, which is otherwise
                    impossible with only the DAY_HEADING displayed.  The
                    dummy event is selectable but cannot be edited or
                    deleted (but viewed or piped).

With more than one day in the day_items vecter, an appointment spanning
more than one day may occur more than once in the vector (with start/end
times suitably adjusted for display). A day_item is no longer (always)
identified by the aptev_ptr (item) value. Instead the combination
(order, item.<ptr>) is used; order is roughly the day.

Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2019-05-22 01:56:59 -04:00
Lars Henriksen
8dd694b569 Simplify day storage
The function day_process_storage() is a wrapper for day_store_items().
It has an unused second argument, and is only used twice to load the
selected day. It has been removed.

A new function, get_slctd_day(), is the equivalant of get_today() and
replaces the very awkwardly named ui_calendar_get_slctd_day_sec().

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2019-05-22 01:56:59 -04:00
Lars Henriksen
528368932c View or edit exception days of a recurrent item
The exception days are presented for viewing/editing as a string of
space-separated dates (in the user-preferred input format). After
editing the string is checked for valid dates, but there is no check
that a date is meaningful (an occurrence day of the item between start
day and until day). Although possible, it is best to add exception days
in the usual way by deletion of occurrences.

Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2019-02-28 08:03:53 +01:00
Lukas Fleischer
5657e19e17 Invalidate calendar cache when adding an exception
Removing an occurrence of a recurrent item can turn a busy day into a
free day.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2019-02-02 18:21:08 +01:00
Lars Henriksen
99c7493cd5 Fix deletion of a multi-day recurrent appointment
When the selected day in the calendar is a continuation day (not the first day)
of such an appointment, deleting the occurrence does not work. The reason is
that the selected day, and not the first day of the occurrence, is added as an
exception day.

Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2019-02-02 18:19:22 +01:00
Lukas Fleischer
03340db72e Use time_t for system time values
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2019-01-14 06:21:34 +01:00
Lars Henriksen
4263a28504 DST fix: adjusting time in appointments
Calcurse saves time and date information on disk as local time in readable text
file format. When loaded from disk or when entered by the user, local time is
converted to Unix time (seconds since 00:00:00, 1 January 1970). When
displayed, and later when saved to disk, the Unix time is converted back to
readable local time. Both conversions depend on DST.

Hence, if midnight for a day with DST in effect (i.e. local time) is converted,
increased with an amount and converted back, the amount has changed if DST is
_not_ in effect for the resulting time. In general, calculations on Unix time
variables should be used with caution because of the DST-dependent conversions.
Instead, the calculations should be performed on local time data with the help
of mktime().

The commit fixes start time for pasted appointments (ordinary and recurrent)
and the 'until'-date of recurrent appointments, pasted as well as new and
edited. The latter problem is slightly different in that the adjustment is a
number of days, as it is for exception dates.

Update of the date in parse_datetime() has been corrected to be similar to
update of the time, although no problem has been identified.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2018-11-10 12:19:28 +01:00
Lars Henriksen
0543df5f31 Fix memory leak in update_duration()
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2018-08-25 10:15:33 +02:00
Lars Henriksen
b6cdc29255 Fix seg fault in update_rept()
Memory pointers must be initialized at the start in case memory is
freed (cleanup) before it is allocated.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2018-08-25 10:15:33 +02:00
Lars Henriksen
fa353e5eb7 Buffer mixup
Use one (small) buffer long enough to hold a date.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2018-08-25 10:15:33 +02:00
Lars Henriksen
223810cf0e Major overhaul of appointment/event input routines.
When setting start time for a new appointment, a date is disallowed
(in all other cases both time and date are still allowed).

Both date and time are displayed for the user to correct when an
appointment is changed or moved.

Built-in help in the status bar for display of input formats.

Several bug fixes that resulted in data inconsistencies (end time
before start time).

The routines use the enhanced parsing funtions to validate input:
ui_day_item_add(void)
	parse_datetime()
	parse_duration()
	parse_datetime()
ui_day_item_repeat(void)
	parse_date_duration()
	parse_date()
ui_day_item_edit(void)
	update_start_time()
		day_edit_time()
			parse_datetime()
	update_duration()
		parse_duration()
		parse_datetime()
	update_rept()
		parse_date_duration()
		parse_date()

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2018-08-25 10:15:33 +02:00
Lars Henriksen
16d30327ba Refactoring update_duration/day_edit_duration.
Incorporated day_edit_duraton() into update_duration().

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2018-08-25 10:03:28 +02:00
Lukas Fleischer
a5febe2e22 Make editing of punctual appointments more intuitive
When editing the start time, move the item instead of keeping the
previous start time as end time. When editing the end time, start with
an empty end time instead of the previous start time.

Fixes GitHub issue #89.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2018-08-25 09:28:56 +02:00
Lars Henriksen
163730cabf Fix end-before-start inconsistency
Due to deficient validation, it is possible to get an inconsistent
database with an appointment that ends before it begins. Edit an
existing one and specify an end time by a date that precedes the start
date, or create a new one and give a date as end time that precedes the
start. Then exit calcurse; on restart it will report a data error and
exit.

Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2018-06-05 05:52:39 +02:00
Lars Henriksen
40eb6f809e Fix appointment becoming event
You try to enter an appointment, but enter an invalid start time (by
mistake). Calcurse rejects the input. You enter the correct start time
and calcurse asks for the description, not the end time, i.e. you get an
event.

The check for an event must only be performed on valid input.

Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2018-06-05 05:52:30 +02:00
Lars Henriksen
bb7381765c Scrollbar and right window border (corrected)
When a scrollbar is on display in APP or TOD windows, the right
vertical border (outside the scrollbar) is not highlighted
when the window is selected.

The scrollbar is always highlighted:
- when APP or TOD is deselected
- in configuration windows where borders otherwise are not

The patch moves the scrollbar parameters (except highlight)
from arguments of draw_scrollbar() to the function itself.
The highlight argument was 1; instead it is set higher in
the call hierarchy (wins_update_panels()) and passed on down.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2018-05-26 11:31:43 +02:00
Lukas Fleischer
760c297027 Add parse_date_interactive()
Add a wrapper around parse_date() which picks the current input date
format as well as the currently selected day and passes both values to
parse_date(), alongside with the parameters passed to
parse_date_interactive() itself.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2017-10-26 20:49:30 +02:00
Lars Henriksen
c0644d5aaf Fix spelling of "frequency"
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2017-10-23 21:18:07 +02:00
Lars Henriksen
d20f9a5d2e Make the day heading position configurable
The date at the top of the appointments list may be positioned either to
the left, in the middle or to the right. Default is to the right. Can be
configured from the general options menu.

Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2017-09-08 21:08:53 +02:00
Lars Henriksen
172efd7179 Remove phase of moon feature
The computation never really worked before and it seems like the feature
is not very helpful, sometimes even confusing (see GitHub issue #21).

The macro ISLEAP is moved to calcurse.h.

Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2017-09-08 21:08:53 +02:00
Lars Henriksen
3095bf4214 Add missing string initialization
When introducing the fmt_day_heading() function in commit d56cc7a (Make
heading in appointments panel configurable, 2017-08-19), we forgot to
initialize the dynamic string. This resulted in calling mem_free() with
a garbage pointer, potentially resulting in a segmentation fault. Fix
this by calling string_init() before using the string.

Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2017-09-04 16:34:19 +02:00
Lukas Fleischer
53f0f1d2e3 Add a function to wait for any key press
Introduce a new function keys_wait_for_any_key() and use it instead of
wgetch() whenever the return value is discarded.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2017-09-03 16:37:35 +02:00
Lars Henriksen
d56cc7acfe Make heading in appointments panel configurable
Add a new configuration variable format.dayheading to set the format of
the date displayed at the top of the event and appointment list.

Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2017-08-28 07:30:38 +02:00
Lukas Fleischer
9f6678bc49 Update copyright ranges
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2017-01-12 08:40:30 +01:00
Vlad Glagolev
da6334cf38 Prevent free-before-init of timstr
Fixes a crash when editing the repetition of an appointment and passing
an empty repetition value.

Signed-off-by: Vlad Glagolev <scm@vaygr.net>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-10-13 06:44:26 +02:00
Lukas Fleischer
007a73f7a2 Replace parse_datetime() constants by named flags
Remove the magic constants used in the return value of parse_datetime()
and use named flags instead.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-10-10 09:02:42 +02:00
Lukas Fleischer
48bd82a003 Refactor duration/end time parsing
Replace all remaining invocations of parse_time() by parse_datetime()
which now indicates whether a date was supplied or not.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-10-10 09:02:42 +02:00
Lukas Fleischer
adf29c8ee9 Support dates when specifying start/end times
Add support for combined date/time or date-only strings when specifying
the start or end time of a new item.

This is a follow-up to 1f39b5c (Add support for moving items to another
day, 2016-09-30).

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-10-09 20:21:04 +02:00
Lukas Fleischer
343d68596d Factor out parse_datetime()
Create a new function that takes a time stamp and updates the date or
time components of that time stamp according to a given date/time
string. Use that function for updating the start time of an item.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-10-09 18:12:45 +02:00
Lukas Fleischer
1f39b5c668 Add support for moving items to another day
When moving an item (or when changing the start time of an item), allow
for optionally specifying a date. If both date and time are entered, the
item is updated to start on the given date and time. If only a date is
entered, the item is modified to start on the given date, keeping the
current start time. If only a time is entered, the item is modified to
start on the current date and the new start time.

Fixes GitHub issue #12.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-10-08 14:42:51 +02:00
Lukas Fleischer
1003be18df Refactor day_edit_time()
Make the function more flexible by returning the updated time instead of
single hour and minute components.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-10-01 09:00:23 +02:00
Lukas Fleischer
1af9ccccd7 Automatically select new appointments/events
This is a follow-up to commit 65b699f (Make automatic selection of
appointments/events smarter, 2016-02-16). Newly created appointments and
events are now selected automatically.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-09-28 19:03:20 +02:00
Lukas Fleischer
ab9256adf0 Fix out-of-bounds memory access
Do not try to access freed day items. This also fixes unexpected
selection changes after modifying appointments or events.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-09-28 19:02:04 +02:00
Lukas Fleischer
1531425005 Support relative dates when adding recurrences
In commit f5d8b5e (Support durations in recurrence ending dates,
2016-02-25), we added support for the `+xxwxxd` syntax when specifying
recurrence end dates. However, this only worked when *editing* the
recurrence, not when converting a regular item to a recurrent one. Fix
this and support the new syntax in both cases.

Also, mention the new syntax in the prompt.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-04-01 08:51:26 +02:00
Lukas Fleischer
f5d8b5e021 Support durations in recurrence ending dates
When spending the end date of recurring items, allow date duration
specifiers such as "+5d" or "+3w2d".

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-02-26 09:14:40 +01:00
Lukas Fleischer
c34f9aba29 Refactor UTF-8 chopping
Add a function that makes sure a string does not exceed a given display
size. If the string is too long, dots ("...") are appended.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-02-26 09:14:40 +01:00
Lukas Fleischer
8c32812fe1 ui-day.c: Simplify code using ui_day_selitem()
Use the new ui_day_selitem() utility function to retrieve the currently
selected item.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-02-16 07:55:19 +01:00
Lukas Fleischer
65b699f770 Make automatic selection of appointments/events smarter
Keep item selection when an item is moved (e.g. by changing the start
time or description).

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-02-16 07:53:12 +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
0145ba12ec Use time_t instead of long in several places
Start converting some variables and return values to store times from
long to time_t.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-24 13:57:47 +01:00
Lukas Fleischer
9ef427693b Update copyright ranges
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-07 11:42:20 +01:00
Lukas Fleischer
132cf86a6f ui-day.c: Reorganize some free() operations
Fixes regressions introduced in 21fc7a4 (Replace several uses of
snprintf() by asprintf(), 2014-07-21).

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-07-27 11:05:12 +02:00