mirror of
https://gittea.dev/nova/th.git
synced 2025-10-22 02:40:15 -04:00
fixed image previews sticking around longer than expected
This commit is contained in:
@@ -129,4 +129,8 @@ void ueberzug_init(){
|
|||||||
ueberzug = popen("ueberzug layer -s --no-cache ", "w");
|
ueberzug = popen("ueberzug layer -s --no-cache ", "w");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
void ueberzug_close(){
|
||||||
|
images_clear();
|
||||||
|
pclose(ueberzug);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1,9 +1,13 @@
|
|||||||
#ifndef PREVIEW_GUARD
|
#ifndef PREVIEW_GUARD
|
||||||
#define PREVIEW_GUARD
|
#define PREVIEW_GUARD
|
||||||
#include "file_previews.c"
|
#include "file_previews.c"
|
||||||
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
char* preview_file(char *file_name, unsigned long file_size);
|
char* preview_file(char *file_name, unsigned long file_size);
|
||||||
char* get_mimetype(char *path);
|
char* get_mimetype(char *path);
|
||||||
void images_clear();
|
void images_clear();
|
||||||
void ueberzug_init();
|
void ueberzug_init();
|
||||||
|
#if SETTINGS_UEBERZUG_IMAGE_PREVIEW != 0
|
||||||
|
void ueberzug_close();
|
||||||
|
#endif
|
||||||
|
@@ -343,6 +343,10 @@ void open_with(){
|
|||||||
cmd = concat(cmd, mid_content[selected_file_current].file_name);
|
cmd = concat(cmd, mid_content[selected_file_current].file_name);
|
||||||
cmd = concat(cmd, "\"");
|
cmd = concat(cmd, "\"");
|
||||||
|
|
||||||
|
#if SETTINGS_UEBERZUG_IMAGE_PREVIEW != 0
|
||||||
|
images_clear();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (system(cmd) == -1) {
|
if (system(cmd) == -1) {
|
||||||
FAIL("open_with", "creating subcommand failed unhandled");
|
FAIL("open_with", "creating subcommand failed unhandled");
|
||||||
}
|
}
|
||||||
@@ -523,6 +527,9 @@ void update(){
|
|||||||
void enter_shell(int passes, int index){
|
void enter_shell(int passes, int index){
|
||||||
(void)passes;
|
(void)passes;
|
||||||
|
|
||||||
|
#if SETTINGS_UEBERZUG_IMAGE_PREVIEW != 0
|
||||||
|
images_clear();
|
||||||
|
#endif
|
||||||
endwin();
|
endwin();
|
||||||
if (system(key_binding[index].black_magic) != 0) {
|
if (system(key_binding[index].black_magic) != 0) {
|
||||||
/*do nothing*/
|
/*do nothing*/
|
||||||
|
Reference in New Issue
Block a user