Merge pull request 'Fixed crash when can't find config path' (#20) from YanTheKaller/libublsettings-gtk3:master into master

Reviewed-on: #20
master v1.18
Dmitry Razumov 1 year ago
commit 08d66e25ca

@ -251,13 +251,16 @@ void yon_terminal_integrated_start_shell(GtkWidget *terminal, char* command, voi
*/
void yon_on_configured_window_destroy(GtkWidget* self,GdkEvent* event){
check_window_config_setup{
if (__yon_window_config_path){
yon_get_is_fullscreen();
yon_window_config_save();
}
}
gtk_main_quit();
}
void __yon_window_config_on_resize(){
if (__yon_window_config_path){
int max=0;
max=gtk_window_is_maximized(__yon_window_config_target_window);
if(max==0){
@ -265,6 +268,7 @@ void yon_terminal_integrated_start_shell(GtkWidget *terminal, char* command, voi
gtk_window_get_position(__yon_window_config_target_window,&__yon_main_window_config.x,&__yon_main_window_config.y);
}
}
}
void yon_window_config_setup(GtkWindow *window){
__yon_window_config_target_window = window;
@ -278,6 +282,7 @@ void yon_terminal_integrated_start_shell(GtkWidget *terminal, char* command, voi
}
int yon_window_config_load(char *path){
if (!access(path,0)){
__yon_window_config_file = g_key_file_new();
__yon_window_config_path=yon_char_new(path);
if (!g_key_file_load_from_file(__yon_window_config_file,__yon_window_config_path,G_KEY_FILE_NONE,NULL)){
@ -329,6 +334,9 @@ void yon_terminal_integrated_start_shell(GtkWidget *terminal, char* command, voi
pthread_t tid;
pthread_create(&tid,NULL,(void *)_yon_maximize,NULL);
return 1;
} else {
return 0;
}
}
void yon_window_config_apply(){

Loading…
Cancel
Save