diff options
author | Daniel Friesel <derf@finalrewind.org> | 2018-01-27 23:43:24 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2018-01-27 23:43:24 +0100 |
commit | e04c0720e35885ecff7a540ae76620c3477471d8 (patch) | |
tree | 661e587526cde135a12af58c7435b8bdbc04b0a6 /src/multiwindow.c | |
parent | 32653a52c15431e714358198b44d8bd6699c2367 (diff) | |
parent | 5dc0d6770bc46676b969b60cc81f8ee689aaf829 (diff) |
Merge branch 'ulteq-simplify-title-generation'
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; |