Unverified Commit 5c59089f authored by Birte Kristina Friesel's avatar Birte Kristina Friesel Committed by GitHub
Browse files

Merge pull request #500 from reiseb/master

add option 'a' to show play/paused information in slideshow mode
parents 9df1b5b0 f0361c5e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1200,6 +1200,10 @@ file
.
.Bl -tag -width indent
.
.It %a
.
Information about slideshow state (playing/paused)
.
.It %f
.
Image path/filename
+1 −0
Original line number Diff line number Diff line
@@ -124,6 +124,7 @@ INDEX MODE OPTIONS
                           font is specified, a title will not be printed

FORMAT SPECIFIERS
 %a     information about slideshow state (playing/paused)
 %f     image path/filename
 %F     image path/filename (shell-escaped)
 %g     window dimensions (\"width,height\") in pixels
+2 −0
Original line number Diff line number Diff line
@@ -710,6 +710,8 @@ void feh_event_handle_generic(winwidget winwid, unsigned int state, KeySym keysy
	}
	else if (feh_is_kp(EVENT_toggle_pause, state, keysym, button)) {
		slideshow_pause_toggle(winwid);
		/* We need to re-render the image to update the info string immediately. */
		winwidget_render_image(winwid, 0, 0);
	}
	else if (feh_is_kp(EVENT_save_image, state, keysym, button)) {
		slideshow_save_image(winwid);
+8 −0
Original line number Diff line number Diff line
@@ -397,6 +397,14 @@ char *feh_printf(char *str, feh_file * file, winwidget winwid)
		if ((*c == '%') && (*(c+1) != '\0')) {
			c++;
			switch (*c) {
			case 'a':
				if (opt.paused == 1) {
				   strncat(ret, "paused", sizeof(ret) - strlen(ret) - 1);
				}
				else {
				   strncat(ret, "playing", sizeof(ret) - strlen(ret) - 1);
				}
				break;
			case 'f':
				if (file)
					strncat(ret, file->filename, sizeof(ret) - strlen(ret) - 1);