From 86a6f00112576f3fc1ca565c2b5ad11d784cab8d Mon Sep 17 00:00:00 2001 From: Bert Date: Wed, 17 Aug 2011 00:56:18 +0200 Subject: Added support for multi-frame images --- main.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 44b3e69..eb00c67 100644 --- a/main.c +++ b/main.c @@ -154,10 +154,17 @@ void update_title() { } else { size = filesize; size_readable(&size, &unit); - n = snprintf(win_title, TITLE_LEN, - "sxiv: [%d/%d] <%d%%> <%dx%d> (%.2f%s) %s", - fileidx + 1, filecnt, (int) (img.zoom * 100.0), img.w, img.h, - size, unit, files[fileidx].name); + if (img.multi.cnt) + n = snprintf(win_title, TITLE_LEN, + "sxiv: [%d/%d] <%d%%> <%dx%d> (%.2f%s) {%d/%d} %s", + fileidx + 1, filecnt, (int) (img.zoom * 100.0), img.w, + img.h, size, unit, img.multi.cur + 1, img.multi.cnt, + files[fileidx].name); + else + n = snprintf(win_title, TITLE_LEN, + "sxiv: [%d/%d] <%d%%> <%dx%d> (%.2f%s) %s", + fileidx + 1, filecnt, (int) (img.zoom * 100.0), img.w, + img.h, size, unit, files[fileidx].name); } if (n >= TITLE_LEN) { -- cgit v1.2.3