Merge pull request 'Fixed error while config loading. Added warnings at window config interactions with unset config and config path' (#22) from YanTheKaller/libublsettings-gtk3:master into master

Reviewed-on: #22
master v1.20
Dmitry Razumov 1 year ago
commit 15fbc46182

@ -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); 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{ check_window_config_setup{
yon_get_is_fullscreen(); yon_get_is_fullscreen();
yon_window_config_save(); 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_get_is_fullscreen();
yon_window_config_save(); yon_window_config_save();
} }
} else {
g_warning("config file were not loaded properly");
} }
gtk_main_quit(); 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){ int yon_window_config_load(char *path){
check_window_config_setup{ if(__yon_window_config_target_window){
if (!access(path,0)){ if (!access(path,0)){
__yon_window_config_file = g_key_file_new(); __yon_window_config_file = g_key_file_new();
__yon_window_config_path=yon_char_new(path); __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); pthread_create(&tid,NULL,(void *)_yon_maximize,NULL);
return 1; return 1;
} }
} else {
g_warning("config file were not loaded properly");
} }
return 0; 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); case YON_TYPE_STRING: g_key_file_set_string(__yon_window_config_file,section,param_name,(char*)tracked_value);
break; 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; if (err) return 0; else return 1;
break; break;
} }
} else {
g_warning("config file were not loaded properly");
} }
} }

Loading…
Cancel
Save