From ca2e73703ede0f1cdf685e9ba49234dbb3096d55 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Fri, 28 Apr 2023 18:05:48 +0600 Subject: [PATCH] removed status box output --- source/CMakeLists.txt | 4 +++- source/ubl-settings-video.c | 28 ++++++++++++++-------------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 009e8d4..dc25088 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -8,6 +8,7 @@ include_directories(${GTK_INCLUDE_DIRS}) link_directories(${GTK_LIBRARY_DIRS}) add_definitions(${GTK_CFLAGS_OTHER}) + #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always -std=c++2a") #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always -lm") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always \ @@ -22,7 +23,8 @@ set(SOURCE_FILES set(LIBRARIES ${GTK_LIBRARIES} - pthread) + pthread + vte) add_executable(ubl-settings-video ${SOURCE_FILES}) diff --git a/source/ubl-settings-video.c b/source/ubl-settings-video.c index 2f0ea9b..944aff4 100644 --- a/source/ubl-settings-video.c +++ b/source/ubl-settings-video.c @@ -570,20 +570,20 @@ void yon_launch_with_output(char *command){ input.command=command; input.data=output_file; pthread_create(&tid,NULL,(void*)yon_popen,&input); - char **output_strings = NULL; - output_strings = malloc(sizeof(char)); - int i = 0; - char str[1000]; - memset(str, 0, 1000); - while (1){ - if (output){ - if (fgets(str, 1000, output)){ - videoconfig.status_render.text_to_render=str; - videoconfig.status_render.type=BACKGROUND_IMAGE_SUCCESS_TYPE; - _yon_ubl_status_box_render(&videoconfig.status_render); - } - } - } + // char **output_strings = NULL; + // output_strings = malloc(sizeof(char)); + // int i = 0; + // char str[1000]; + // memset(str, 0, 1000); + // while (1){ + // if (output){ + // if (fgets(str, 1000, output)){ + // videoconfig.status_render.text_to_render=str; + // videoconfig.status_render.type=BACKGROUND_IMAGE_SUCCESS_TYPE; + // _yon_ubl_status_box_render(&videoconfig.status_render); + // } + // } + // } } /**void yon_monitor_view_draw_all(GtkWidget *cnt)