diff options
author | Sven Willner <sven.willner@gmail.com> | 2018-09-13 15:47:18 +0200 |
---|---|---|
committer | Sven Willner <sven.willner@gmail.com> | 2018-09-13 15:47:18 +0200 |
commit | 4ca5b177bbaf656611dd253d7c8e37317b5b186f (patch) | |
tree | 5f66934df56dfcbe11364bda57899d078511c3c8 /src/multiwindow.c | |
parent | 3671b53046afbeced26162fc413fcfb7971116b9 (diff) | |
parent | 9241e8faa78cc02c08537ed0bd7b236d172c3ed7 (diff) |
Merge branch 'master' of github.com:derf/feh
Diffstat (limited to 'src/multiwindow.c')
-rw-r--r-- | src/multiwindow.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/src/multiwindow.c b/src/multiwindow.c index 13cff90..abbf6c9 100644 --- a/src/multiwindow.c +++ b/src/multiwindow.c @@ -34,25 +34,14 @@ void init_multiwindow_mode(void) { winwidget w = NULL; gib_list *l; - feh_file *file = NULL; + + if (!opt.title) + opt.title = PACKAGE " - %f"; mode = "multiwindow"; for (l = filelist; l; l = l->next) { - char *s = NULL; - int len = 0; - file = FEH_FILE(l->data); - current_file = l; - - if (!opt.title) { - len = strlen(PACKAGE " - ") + strlen(file->filename) + 1; - s = emalloc(len); - snprintf(s, len, PACKAGE " - %s", file->filename); - } else { - s = estrdup(feh_printf(opt.title, file, w)); - } - - if ((w = winwidget_create_from_file(l, s, WIN_TYPE_SINGLE)) != NULL) { + if ((w = winwidget_create_from_file(l, WIN_TYPE_SINGLE)) != NULL) { winwidget_show(w); if (opt.reload > 0) feh_add_unique_timer(cb_reload_timer, w, opt.reload); @@ -62,7 +51,6 @@ void init_multiwindow_mode(void) D(("EEEK. Couldn't load image in multiwindow mode. " "I 'm not sure if this is a problem\n")); } - free(s); } return; |