From e36032b3107bfcb74284116d21f58c6e1b9cfbee Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Wed, 29 Jan 2025 17:55:31 +0600 Subject: [PATCH] Fixed window size without config file --- source/libublsettings-gtk3-window-config.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/libublsettings-gtk3-window-config.c b/source/libublsettings-gtk3-window-config.c index ad2c611..536276e 100644 --- a/source/libublsettings-gtk3-window-config.c +++ b/source/libublsettings-gtk3-window-config.c @@ -181,8 +181,8 @@ } g_object_set_property(G_OBJECT(param->track_widget),param->property_name,val); } - if (__yon_main_window_config.width==0) __yon_main_window_config.width=800; - if (__yon_main_window_config.height==0) __yon_main_window_config.height=300; + if (__yon_main_window_config.width==0) gtk_window_get_size(GTK_WINDOW(__yon_window_config_target_window),&__yon_main_window_config.width,NULL); + if (__yon_main_window_config.height==0) gtk_window_get_size(GTK_WINDOW(__yon_window_config_target_window),NULL,&__yon_main_window_config.height); gtk_window_resize(__yon_window_config_target_window,__yon_main_window_config.width,__yon_main_window_config.height); gtk_window_move(__yon_window_config_target_window,__yon_main_window_config.x,__yon_main_window_config.y); pthread_t tid; @@ -279,6 +279,8 @@ if (err) return 0; else return 1; break; } + } else { + g_error("Window configuration were not set"); } return 0; }