aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorBert <ber.t@gmx.com>2011-08-17 00:56:18 +0200
committerBert <ber.t@gmx.com>2011-08-19 15:12:30 +0200
commit86a6f00112576f3fc1ca565c2b5ad11d784cab8d (patch)
tree24cf4ef553c20bf2934902d13319cf33f91fc77f /main.c
parenta85707ef63e6c441d91cd06d53af07ee58746681 (diff)
Added support for multi-frame images
Diffstat (limited to 'main.c')
-rw-r--r--main.c15
1 files changed, 11 insertions, 4 deletions
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) {