From 96e677ba1505a927411d2b6a7582c4fe570dac7c Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Mon, 26 Jan 2026 14:31:00 +0600 Subject: [PATCH] Fixed start without root --- source/ubinstall-gtk.c | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index ab48f19..2cd813d 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -891,6 +891,20 @@ void yon_main_window_create(main_window *widgets){ yon_window_config_setup(GTK_WINDOW(widgets->MainWindow)); + int fullscreen = 0; + char *path = yon_char_unite(yon_ubl_user_get_home_directory(),"/.config/",LocaleName,"/",LocaleName,".conf",NULL); + if (access(path,F_OK)){ + fullscreen = 1; + g_thread_new("fullscreen",(GThreadFunc)yon_maximize,widgets); + + } + yon_window_config_load(path); + yon_window_config_add_instant_parameter("fullscreen","window",&fullscreen,YON_TYPE_BOOLEAN); + + yon_startup_language_init(); + yon_locale_init(); + yon_main_window_update_locale(widgets); + yon_gtk_window_setup(GTK_WINDOW(widgets->MainWindow),NULL,TITLE_LABEL,icon_path,NULL); gtk_tree_model_filter_set_visible_func(GTK_TREE_MODEL_FILTER(widgets->InstallerCountryFilter),(GtkTreeModelFilterVisibleFunc)on_country_filter,widgets,NULL); @@ -1007,23 +1021,10 @@ main_window *yon_main_window_complete(){ memset(widgets,0,sizeof(main_window)); yon_main_window_create(widgets); - yon_startup_language_init(); - yon_locale_init(); // yon_set_locales_list(widgets); // yon_main_window_update_locale(widgets); // // yon_window_config_custom_window_setup(GTK_WINDOW(widgets->MainWindow),"MainWindow"); - - int fullscreen = 0; - char *path = yon_char_unite(yon_ubl_user_get_home_directory(),"/.config/",LocaleName,"/",LocaleName,".conf",NULL); - if (access(path,F_OK)){ - fullscreen = 1; - g_thread_new("fullscreen",(GThreadFunc)yon_maximize,widgets); - - } - yon_window_config_load(path); - yon_window_config_add_instant_parameter("fullscreen","window",&fullscreen,YON_TYPE_BOOLEAN); - yon_main_window_update_locale(widgets); return widgets; } @@ -1079,9 +1080,6 @@ int main(int argc, char *argv[]){ main_config.launch_arguments=yon_char_parsed_copy(argv,argc); main_config.launch_size=argc; - if (getuid()!=0){ - yon_ubl_status_box_render(yon_char_get_localised_from_lib(ROOT_WARNING_LABEL),BACKGROUND_IMAGE_FAIL_TYPE); - } gtk_main(); return 0; } \ No newline at end of file