Age | Commit message (Collapse) | Author |
|
|
|
|
|
Previously imv used -std=gnu11 flag which activated GNU "extensions" of C11
standard. This masked a portability issue in imv: strduo(3) should not have
been visible in `src/loader.c` without inclusion of `<string.h>` header. This
have been fixed. To remidy GNU libc's stange choice to hide X/Open interfaces
in C99 code by default _XOPEN_SOURCE macro was also set. (This should have no
effect on most other platforms.)
|
|
In case of error return non-zero value instead of cleaning up navigator. This
way main loop may do some more cleanup, or maybe even act differently.
|
|
Implementation details should not leak to other parts of the code.
While at it, clean up initialization and destruction of navigator.
|
|
Set "last_time" to current time at declaration time, so that it holds at least
something by the time it is used.
|
|
|
|
This allows to drop extra printing steps and memory allocations.
|
|
This change effectively backs out f1737ddd06141afbe99f37af3b5c2d0f1df5fe7a,
implementing the same functionality in a simpler and more correct way.
Implementation details:
* imv_navigator.wrapped - a new field that has value "0" by default; once
navigator wraps around the list, this field recieves value "1".
* imv_navigator_wrapped(&nav) - a new function that returns non-zero value iff
navigator wrapped around the list. Currently just returns value of
imv_navigator.wrapped.
While at it, expanded "test_navigator_remove" and merged it with
"test_navigator_add". Resulting test is called "test_navigator_add_remove".
Fixes #94.
|
|
When non-cycling mode prevents navigator from wrapping to the other end of list,
undo change to nav->cur_path. Otherwise it will remain out-of-bounds, so that
subsequent calls to navigator functions may produce unexpected results, up to
segmentation violation.
Fixes #93
|
|
Apparently bg_next_frame() functions marked first frames of gifs old before
imv_loader_get_image() had a chance to report them to the main loop. Move
unsetting of ldr->out_is_new_image to imv_loader_get_image().
Fixes #81.
|
|
|
|
|
|
For the following actions:
* reset scaling ('s'),
* redraw ('r'),
* scale to actual size ('a'),
* center image ('c'),
* remove selection ('x'),
* toggle fullscreen ('f'),
* toggle playing (space),
* print selection ('p'),
* toggle overlay ('d')
repeating action when key is held does not make sense. After acting upon these
events ignore them until key is released or another key is pressed.
|
|
Key handling code obuses the fact that plus sign is shifted key for equals sign
on US keyboard. Add '+' as a control for layouts where this is not the case.
|
|
|
|
|
|
This reduces delay before initial draw in case of slow input, opening
possibilities for use cases like:
$ curl -Osw "%{filename_effective}\n" "http://www.example.com/[1-10].jpg"
which will download all images and start showing them once first arrives.
|
|
|
|
|
|
If the gif disposal method is unspecified, default to compositing
instead of full disposal.
|
|
|
|
|
|
* Add new switches: "-S" to force (default) "perfect fit" mode and "-s" to force
"best fit" mode.
* Add new control key: "s" to switch scaling mode.
|
|
|
|
|
|
This commit changes processing of arguments:
* When called without arguments (with or without flags), imv reads list of files
from standard input.
* When called with "-" among arguments, read image data from standard input.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Add 8-bit variable that is passed to imv_navigator_poll_changed(). Decrement it
on each run of main loop. When it gets to 0, call stat(2).
|
|
Accept slideshow timeout expressed as fractional numbers. It is intentionally
lax, so that arguments like ".1" or "5." are accepted and give no surprises.
|
|
|
|
|
|
Exit(3) if memory allocation fails.
|
|
Makes file monitoring in imv completely POSIX.
|
|
It may save some CPU cycles if there is enough space to grow the array without
copying memory chunks. Two side effects of the change: proper error checking
added and dangerous memcpy(3) call removed.
|
|
The default options block was getting quite ridiculous to try and read.
Let's improve the readability.
|
|
Use default font
|
|
|
|
"Monospace" is a font name reserved for default monospace font, which is
supposed to be set to particular font user prefers.
|
|
At least on OpenBSD stdin, stdout and stderr are macros, and thus they are
expanded before compilation.
|
|
fixes #40
|
|
fixes #37
|
|
Closes #8.
|
|
|