From ded05cd76b9ad01e3f8a7136ae68ae194af2caa6 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Mon, 1 Apr 2024 12:12:19 +0600 Subject: [PATCH] If integer from window config equals 0, it replaces with -1 --- source/libublsettings-gtk3.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/libublsettings-gtk3.c b/source/libublsettings-gtk3.c index 0e69636..95c78dc 100644 --- a/source/libublsettings-gtk3.c +++ b/source/libublsettings-gtk3.c @@ -282,7 +282,9 @@ void yon_terminal_integrated_start(GtkWidget *terminal, char* command, void *end g_value_set_string(val,g_key_file_get_string(__yon_window_config_file,"window",param->parameter_name, NULL)); break; case YON_TYPE_INT: - g_value_set_int(val,g_key_file_get_integer(__yon_window_config_file,"window",param->parameter_name, NULL)); + int output = g_key_file_get_integer(__yon_window_config_file,"window",param->parameter_name, NULL); + if (!output) output=-1; + g_value_set_int(val,output); break; case YON_TYPE_BOOLEAN: gboolean res = g_key_file_get_boolean(__yon_window_config_file,"window",param->parameter_name, NULL);