From 1bc96d92a310ff7bc7fec7165f3acd9d3272c6a1 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Thu, 25 Jul 2024 11:34:58 +0600 Subject: [PATCH] Fixed error while config loading. Added warnings at window config interactions with unset config and config path --- source/libublsettings-gtk3.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/source/libublsettings-gtk3.c b/source/libublsettings-gtk3.c index 5ef99c3..eaec166 100644 --- a/source/libublsettings-gtk3.c +++ b/source/libublsettings-gtk3.c @@ -230,6 +230,8 @@ void yon_terminal_integrated_start_shell(GtkWidget *terminal, char* command, voi } g_key_file_save_to_file(__yon_window_config_file,__yon_window_config_path,NULL); + } else { + g_warning("config file were not loaded properly"); } } @@ -243,6 +245,8 @@ void yon_terminal_integrated_start_shell(GtkWidget *terminal, char* command, voi check_window_config_setup{ yon_get_is_fullscreen(); yon_window_config_save(); + } else { + g_warning("config file were not loaded properly"); } } @@ -258,6 +262,8 @@ void yon_terminal_integrated_start_shell(GtkWidget *terminal, char* command, voi yon_get_is_fullscreen(); yon_window_config_save(); } + } else { + g_warning("config file were not loaded properly"); } gtk_main_quit(); } @@ -285,7 +291,7 @@ void yon_terminal_integrated_start_shell(GtkWidget *terminal, char* command, voi } int yon_window_config_load(char *path){ - check_window_config_setup{ + if(__yon_window_config_target_window){ if (!access(path,0)){ __yon_window_config_file = g_key_file_new(); __yon_window_config_path=yon_char_new(path); @@ -339,6 +345,8 @@ void yon_terminal_integrated_start_shell(GtkWidget *terminal, char* command, voi pthread_create(&tid,NULL,(void *)_yon_maximize,NULL); return 1; } + } else { + g_warning("config file were not loaded properly"); } return 0; } @@ -390,6 +398,8 @@ void yon_terminal_integrated_start_shell(GtkWidget *terminal, char* command, voi case YON_TYPE_STRING: g_key_file_set_string(__yon_window_config_file,section,param_name,(char*)tracked_value); break; } + } else { + g_warning("config file were not loaded properly"); } } @@ -430,6 +440,8 @@ void yon_terminal_integrated_start_shell(GtkWidget *terminal, char* command, voi if (err) return 0; else return 1; break; } + } else { + g_warning("config file were not loaded properly"); } }