diff options
author | Bert <ber.t@gmx.com> | 2011-08-17 00:56:18 +0200 |
---|---|---|
committer | Bert <ber.t@gmx.com> | 2011-08-19 15:12:30 +0200 |
commit | 86a6f00112576f3fc1ca565c2b5ad11d784cab8d (patch) | |
tree | 24cf4ef553c20bf2934902d13319cf33f91fc77f /main.c | |
parent | a85707ef63e6c441d91cd06d53af07ee58746681 (diff) |
Added support for multi-frame images
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -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) { |