add --bar to enable statusbar

ref: https://codeberg.org/nsxiv/nsxiv/issues/404
This commit is contained in:
NRK 2024-06-14 00:46:16 +00:00
parent 55d60319db
commit c61b84975d
2 changed files with 12 additions and 4 deletions

View file

@ -44,8 +44,14 @@ is set to 0 then animation playback is disabled.
.B "\-a, \-\-animate"
Play animations of multi-frame images.
.TP
.B "\-b, \-\-no\-bar"
Do not show statusbar at the bottom of the window.
.B "\-b"
Do not show statusbar.
.TP
.B "\-\-bar, \-\-no\-bar"
Enables or disables statusbar.
.B "\-\-no\-bar"
is equivalent to
.BR "\-b" .
.TP
.B "\-c, \-\-clean\-cache"
Remove all orphaned cache files from the thumbnail cache directory and exit.

View file

@ -77,6 +77,7 @@ void parse_options(int argc, char **argv)
OPT_AA,
OPT_AL,
OPT_THUMB,
OPT_BAR,
OPT_BG,
OPT_CA,
OPT_CD
@ -85,6 +86,7 @@ void parse_options(int argc, char **argv)
{ "framerate", 'A', OPTPARSE_REQUIRED },
{ "animate", 'a', OPTPARSE_NONE },
{ "no-bar", 'b', OPTPARSE_NONE },
{ "bar", OPT_BAR, OPTPARSE_NONE },
{ "clean-cache", 'c', OPTPARSE_NONE },
{ "embed", 'e', OPTPARSE_REQUIRED },
{ "fullscreen", 'f', OPTPARSE_NONE },
@ -179,8 +181,8 @@ void parse_options(int argc, char **argv)
case 'a':
_options.animate = true;
break;
case 'b':
_options.hide_bar = true;
case 'b': case OPT_BAR:
_options.hide_bar = (opt == 'b');
break;
case 'c':
_options.clean_cache = true;