diff --git a/icons/emblems/com.ublinux.ubinstall-gtk.configure-complete.svg b/icons/emblems/com.ublinux.ubinstall-gtk.configure-complete.svg index 0dfb650..d4f4353 100644 --- a/icons/emblems/com.ublinux.ubinstall-gtk.configure-complete.svg +++ b/icons/emblems/com.ublinux.ubinstall-gtk.configure-complete.svg @@ -1,27 +1,260 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icons/emblems/com.ublinux.ubinstall-gtk.install-complete.svg b/icons/emblems/com.ublinux.ubinstall-gtk.install-complete.svg index f7b2864..60198d5 100644 --- a/icons/emblems/com.ublinux.ubinstall-gtk.install-complete.svg +++ b/icons/emblems/com.ublinux.ubinstall-gtk.install-complete.svg @@ -1,20 +1,264 @@ - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icons/emblems/com.ublinux.ubinstall-gtk.install-error.svg b/icons/emblems/com.ublinux.ubinstall-gtk.install-error.svg index c676eeb..e330da2 100644 --- a/icons/emblems/com.ublinux.ubinstall-gtk.install-error.svg +++ b/icons/emblems/com.ublinux.ubinstall-gtk.install-error.svg @@ -1,18 +1,110 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/icons/emblems/com.ublinux.ubinstall-gtk.recovery-complete.svg b/icons/emblems/com.ublinux.ubinstall-gtk.recovery-complete.svg index 6931c68..151ba8f 100644 --- a/icons/emblems/com.ublinux.ubinstall-gtk.recovery-complete.svg +++ b/icons/emblems/com.ublinux.ubinstall-gtk.recovery-complete.svg @@ -1,18 +1,153 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icons/emblems/com.ublinux.ubinstall-gtk.settings-complete.svg b/icons/emblems/com.ublinux.ubinstall-gtk.settings-complete.svg index 47e38d9..13d9d27 100644 --- a/icons/emblems/com.ublinux.ubinstall-gtk.settings-complete.svg +++ b/icons/emblems/com.ublinux.ubinstall-gtk.settings-complete.svg @@ -1,37 +1,132 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/locale/ubinstall-gtk.pot b/locale/ubinstall-gtk.pot index f61f5b7..9fc7b1e 100644 --- a/locale/ubinstall-gtk.pot +++ b/locale/ubinstall-gtk.pot @@ -615,7 +615,7 @@ msgid "Installer configuration has been finished" msgstr "" #: source/ubl-strings.h:163 -msgid "Choose a save option on the header bar" +msgid "You can now proceed to saving the settings" msgstr "" #: source/ubl-strings.h:165 @@ -1621,7 +1621,7 @@ msgstr "" #: source/ubl-strings.h:441 msgid "" -"Selecting additional system kernel components from the repository. Internet " +"Selecting additional kernel components to install from the repository. Internet " "access required" msgstr "" @@ -5348,6 +5348,9 @@ msgstr "" #: source/libublsettingsui-gtk3.h:675 msgid "Uncheck all" + +#: source/libublsettingsui-gtk3.h:675 +msgid "Check all" msgstr "" msgid "Close installer" @@ -5369,4 +5372,10 @@ msgid "Authentication in the bootloader menu" msgstr "" msgid "Exit" +msgstr "" + +msgid "Model" +msgstr "" + +msgid "Vendor" msgstr "" \ No newline at end of file diff --git a/locale/ubinstall-gtk_ru.po b/locale/ubinstall-gtk_ru.po index ccab3e5..b6a01a6 100644 --- a/locale/ubinstall-gtk_ru.po +++ b/locale/ubinstall-gtk_ru.po @@ -634,8 +634,8 @@ msgid "Installer configuration has been finished" msgstr "Настройка конфигурации завершена" #: source/ubl-strings.h:163 -msgid "Choose a save option on the header bar" -msgstr "Выберите опцию сохранения на верхней панели" +msgid "You can now proceed to saving the settings" +msgstr "Можно приступить к сохранению настроек" #: source/ubl-strings.h:165 msgid "Configuration has been saved" @@ -1653,10 +1653,10 @@ msgstr "" #: source/ubl-strings.h:441 msgid "" -"Selecting additional system kernel components from the repository. Internet " +"Selecting additional kernel components to install from the repository. Internet " "access required" msgstr "" -"Выбор дополнительных модулей ядра из репозитория. Требуется доступ в Интернет" +"Выбор дополнительных компонентов ядра для установки из репозитория. Требуется доступ в Интернет" #: source/ubl-strings.h:443 msgid "Product ecosystem" @@ -5545,6 +5545,10 @@ msgstr "Режим отладки" msgid "Uncheck all" msgstr "Снять всё" +#: source/libublsettingsui-gtk3.h:675 +msgid "Check all" +msgstr "Отметить всё" + msgid "Close installer" msgstr "Закрыть установщик" @@ -5564,4 +5568,10 @@ msgid "Authentication in the bootloader menu" msgstr "Аутентификация в меню загрузчика" msgid "Exit" -msgstr "Выход" \ No newline at end of file +msgstr "Выход" + +msgid "Model" +msgstr "Модель" + +msgid "Vendor" +msgstr "Вендор" \ No newline at end of file diff --git a/source/ubinstall-gtk-advanced.c b/source/ubinstall-gtk-advanced.c index 242e4f3..e03bd32 100644 --- a/source/ubinstall-gtk-advanced.c +++ b/source/ubinstall-gtk-advanced.c @@ -230,20 +230,45 @@ gboolean yon_advanced_part_save(main_window *widgets){ } if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(part1->SystemSectionToggle))){ if (!yon_advanced_part_save_part(data1)&&!yon_advanced_part_save_part(data2)){ + yon_config_remove_by_args(device_parameter, + device_parameter, + part_parameter, + part_size_parameter, + part_label_parameter, + part_fs_type_parameter, + part_fs_label_parameter, + part_crypt_parameter, + part_format_parameter, + NULL); return 0; } } else { - yon_advanced_part_save_part(data2); - yon_advanced_part_save_part(data1); + if (!yon_advanced_part_save_part(data2)&&!yon_advanced_part_save_part(data1)) { + yon_config_remove_by_args(device_parameter, + device_parameter, + part_parameter, + part_size_parameter, + part_label_parameter, + part_fs_type_parameter, + part_fs_label_parameter, + part_crypt_parameter, + part_format_parameter, + NULL); + return 0; + } } - } return 1; + } + yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NOTHING_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); + return 0; } int yon_advanced_save(main_window *widgets){ yon_config_register(AUTOINSTALL_TYPE_INSTALL,AUTOINSTALL_TYPE_INSTALL_command,"custom"); yon_advanced_part_clean_config(); - yon_advanced_part_save(widgets); + if (!yon_advanced_part_save(widgets)){ + return 0; + } if (gtk_switch_get_active(GTK_SWITCH(widgets->AdvancedLoadTypeSwitch))){ char *boot = NULL; if (gtk_switch_get_active(GTK_SWITCH(widgets->AdvancedBiosSectorSwitch))){ diff --git a/source/ubinstall-gtk-bootloader.c b/source/ubinstall-gtk-bootloader.c index a9b074b..72e1a17 100644 --- a/source/ubinstall-gtk-bootloader.c +++ b/source/ubinstall-gtk-bootloader.c @@ -15,8 +15,10 @@ int yon_bootloader_save(main_window *widgets){ yon_config_remove_by_key(parameter); free(parameter); } + char *old_packages = config(GRUB_SUPERUSERS_parameter); yon_config_register(GRUB_SUPERUSERS_parameter,GRUB_SUPERUSERS_parameter_command,NULL); - yon_config_set_status(GRUB_SUPERUSERS_parameter,-1); + int status = yon_char_is_empty(old_packages); + yon_config_set_status(GRUB_SUPERUSERS_parameter,status-1); } if (!gtk_switch_get_active(GTK_SWITCH(widgets->BootloadNoPasswordSwitch))){ @@ -44,6 +46,7 @@ int yon_bootloader_save(main_window *widgets){ config_str users = yon_config_get_all_keys_by_key(GRUB_PASSWORD_parameter_search,&user_size); yon_char_parsed_add_or_create_if_exists(users,&user_size,GRUB_SUPERUSERS_parameter); yon_char_parsed_add_or_create_if_exists(users,&user_size,GRUB_TIMEOUT_parameter); + yon_char_parsed_add_or_create_if_exists(users,&user_size,GRUB_DEFAULT_parameter); yon_debug_output("%s\n",yon_config_save_list_simple(users, user_size,main_config.config_load_path)); } diff --git a/source/ubinstall-gtk-components.c b/source/ubinstall-gtk-components.c index 263e52f..ce6abea 100644 --- a/source/ubinstall-gtk-components.c +++ b/source/ubinstall-gtk-components.c @@ -1,105 +1,53 @@ #include "ubinstall-gtk.h" - -int yon_kernel_save(main_window *widgets){ - GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->KernelListBox)); - char *config_val = config(packages_parameter); - if (yon_char_is_empty(config_val)) { - yon_config_register(packages_parameter,packages_parameter_command,NULL); - yon_config_set_status(packages_parameter,-1); - } - char *enabled_module = NULL; - int overall_size = 0; - int active_size = 0; - for(GList *iter = list;iter;iter = iter->next){ - overall_size++; - kernel_row *row = g_object_get_data(G_OBJECT(iter->data),"kernel_row"); - if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(row->InstallCheck))){ - if (gtk_widget_get_sensitive(row->InstallCheck)){ - char *append_str = yon_char_replace(row->modules," ",","); - yon_config_append_elements(packages_parameter,append_str,","); - free(append_str); - active_size++; - } - if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(row->EnableRadio))){ - enabled_module = row->package; - } - } else { - char *append_str = yon_char_replace(row->modules," ",","); - yon_config_remove_elements(packages_parameter,append_str,","); - free(append_str); - } - } - - if (!yon_char_is_empty(enabled_module)){ - yon_config_register(KERNEL_BOOT_parameter,KERNEL_BOOT_parameter_command,enabled_module); - } else { - yon_config_remove_by_key(KERNEL_BOOT_parameter); - } - - if (!main_config.configure_mode){ - yon_debug_output("%s\n",yon_config_save_args_simple(main_config.config_load_path,packages_parameter, KERNEL_BOOT_parameter,NULL)); - } - return 1; -} - -int yon_kernel_addon_save(main_window *widgets){ - char *parameter = config(packages_parameter); - GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->KernelAddonListBox)); - if (yon_char_is_empty(parameter)){ - yon_config_register(packages_parameter,packages_parameter_command,NULL); - } - for(GList *iter = list;iter;iter = iter->next){ - kernel_addon_row *row = g_object_get_data(G_OBJECT(iter->data),"kernel_row"); - if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(row->InstallCheck))){ - if (gtk_widget_get_sensitive(row->InstallCheck)){ - yon_config_append_elements(packages_parameter,row->modules,","); - } - } else { - char *append_str = yon_char_replace(row->modules," ",","); - yon_config_remove_elements(packages_parameter,row->modules,","); - free(append_str); - } - } - - if (!main_config.configure_mode){ - int size; - config_str parameters = yon_config_get_save_parameters_by_key(&size,packages_parameter,NULL); - if (parameters){ - char *command_parameters = yon_char_parsed_to_string(parameters,size," -- "); - char *command = yon_char_unite(ubconfig_dull_command,"--target system ",command_parameters,NULL); - if (!system(yon_debug_output("%s\n",command))){} - free(command); - yon_char_parsed_free(parameters,size); +// void on_os_components_uncheck_all(GtkWidget *,main_window *widgets){ +// int active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->OSSoftwareUncheckAllCheck)); +// switch(active){ +// case 1:{ +// GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->OSSoftwareListBox)); +// GList *iter; +// for(iter = list;iter;iter=iter->next){ +// os_row *row = g_object_get_data(iter->data,"kernel_row"); +// int sensitive = gtk_widget_get_sensitive(row->InstallCheck); +// if (sensitive){ +// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(row->InstallCheck),0); +// } +// } +// } break; +// } +// gtk_widget_hide(widgets->OSSoftwareUncheckAllCheck); +// g_signal_handlers_block_by_func(G_OBJECT(widgets->OSSoftwareUncheckAllCheck),on_os_components_uncheck_all,widgets); +// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->OSSoftwareUncheckAllCheck),0); +// g_signal_handlers_unblock_by_func(G_OBJECT(widgets->OSSoftwareUncheckAllCheck),on_os_components_uncheck_all,widgets); +// } + +void on_os_components_switch_all(GtkWidget *self,main_window *widgets){ + g_signal_handlers_block_by_func(G_OBJECT(self),G_CALLBACK(on_os_components_switch_all),widgets); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(self),0); + g_signal_handlers_unblock_by_func(G_OBJECT(self),G_CALLBACK(on_os_components_switch_all),widgets); + int active = !!g_object_get_data(G_OBJECT(self),"uncheck"); + GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->OSSoftwareListBox)); + GList *iter; + for(iter = list;iter;iter=iter->next){ + os_row *row = g_object_get_data(iter->data,"kernel_row"); + int sensitive = gtk_widget_get_sensitive(row->InstallCheck); + if (sensitive){ + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(row->InstallCheck),!active); } } - return 1; -} - -void on_os_components_uncheck_all(GtkWidget *,main_window *widgets){ - int active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->OSSoftwareUncheckAllCheck)); switch(active){ - case 1:{ - GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->OSSoftwareListBox)); - GList *iter; - for(iter = list;iter;iter=iter->next){ - os_row *row = g_object_get_data(iter->data,"kernel_row"); - int sensitive = gtk_widget_get_sensitive(row->InstallCheck); - if (sensitive){ - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(row->InstallCheck),0); - } - } - } break; + case 0: gtk_button_set_label(GTK_BUTTON(self),UNCHECK_ALL_LABEL); + g_object_set_data(G_OBJECT(self),"uncheck",widgets); + break; + case 1: gtk_button_set_label(GTK_BUTTON(self),CHECK_ALL_LABEL); + g_object_set_data(G_OBJECT(self),"uncheck",NULL); } - gtk_widget_hide(widgets->OSSoftwareUncheckAllCheck); - g_signal_handlers_block_by_func(G_OBJECT(widgets->OSSoftwareUncheckAllCheck),on_os_components_uncheck_all,widgets); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->OSSoftwareUncheckAllCheck),0); - g_signal_handlers_unblock_by_func(G_OBJECT(widgets->OSSoftwareUncheckAllCheck),on_os_components_uncheck_all,widgets); } int yon_os_components_check_packages_size(GtkWidget *, main_window *widgets){ long pacman_size = 0; { + int active = 1; GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->OSSoftwareListBox)); GList *listiter; for (listiter=list;listiter;listiter=listiter->next){ @@ -108,10 +56,18 @@ int yon_os_components_check_packages_size(GtkWidget *, main_window *widgets){ long cur_size = row->size_raw; pacman_size += cur_size; if (gtk_widget_get_sensitive(row->InstallCheck)){ - gtk_widget_show(widgets->OSSoftwareUncheckAllCheck); + // gtk_widget_show(widgets->OSSoftwareUncheckAllCheck); + active = 0; } } } + switch(active){ + case 0: gtk_button_set_label(GTK_BUTTON(widgets->OSSoftwareUncheckAllCheck),UNCHECK_ALL_LABEL); + g_object_set_data(G_OBJECT(widgets->OSSoftwareUncheckAllCheck),"uncheck",widgets); + break; + case 1: gtk_button_set_label(GTK_BUTTON(widgets->OSSoftwareUncheckAllCheck),CHECK_ALL_LABEL); + g_object_set_data(G_OBJECT(widgets->OSSoftwareUncheckAllCheck),"uncheck",NULL); + } } { GtkTreeIter iter; @@ -348,12 +304,9 @@ void yon_os_components_init(main_window *widgets){ if (!main_config.configure_mode){ yon_config_update_by_args(main_config.config_load_path, modules_parameter,NULL); } - // int size = 0; GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->OSSoftwareListBox)); GList *iter; for (iter=list;iter;iter=iter->next){ - // os_row *row = g_object_get_data(iter->data,"kernel_row"); - // free(row); gtk_widget_destroy(GTK_WIDGET(iter->data)); } if (!gtk_widget_get_parent(widgets->OSSpinner)) @@ -364,25 +317,48 @@ void yon_os_components_init(main_window *widgets){ while(gtk_events_pending()) gtk_main_iteration(); } -void on_software_uncheck_all(GtkWidget *, main_window *widgets){ - int active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->AdditionalComponentsUncheckAllCheck)); +// void on_software_uncheck_all(GtkWidget *, main_window *widgets){ +// int active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->AdditionalComponentsUncheckAllCheck)); +// switch(active){ +// case 1:{ +// GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->AdditionalComponentsList)); +// GList *iter; +// for(iter = list;iter;iter=iter->next){ +// os_row *row = g_object_get_data(iter->data,"kernel_row"); +// int sensitive = gtk_widget_get_sensitive(row->InstallCheck); +// if (sensitive){ +// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(row->InstallCheck),0); +// } +// } +// } break; +// } +// gtk_widget_hide(widgets->AdditionalComponentsUncheckAllCheck); +// g_signal_handlers_block_by_func(G_OBJECT(widgets->AdditionalComponentsUncheckAllCheck),on_software_switch_all,widgets); +// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->AdditionalComponentsUncheckAllCheck),0); +// g_signal_handlers_unblock_by_func(G_OBJECT(widgets->AdditionalComponentsUncheckAllCheck),on_software_switch_all,widgets); +// } + +void on_software_switch_all(GtkWidget *self,main_window *widgets){ + g_signal_handlers_block_by_func(G_OBJECT(self),G_CALLBACK(on_software_switch_all),widgets); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(self),0); + g_signal_handlers_unblock_by_func(G_OBJECT(self),G_CALLBACK(on_software_switch_all),widgets); + int active = !!g_object_get_data(G_OBJECT(self),"uncheck"); + GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->AdditionalComponentsList)); + GList *iter; + for(iter = list;iter;iter=iter->next){ + os_row *row = g_object_get_data(iter->data,"kernel_row"); + int sensitive = gtk_widget_get_sensitive(row->InstallCheck); + if (sensitive){ + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(row->InstallCheck),!active); + } + } switch(active){ - case 1:{ - GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->AdditionalComponentsList)); - GList *iter; - for(iter = list;iter;iter=iter->next){ - os_row *row = g_object_get_data(iter->data,"kernel_row"); - int sensitive = gtk_widget_get_sensitive(row->InstallCheck); - if (sensitive){ - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(row->InstallCheck),0); - } - } - } break; + case 0: gtk_button_set_label(GTK_BUTTON(self),UNCHECK_ALL_LABEL); + g_object_set_data(G_OBJECT(self),"uncheck",widgets); + break; + case 1: gtk_button_set_label(GTK_BUTTON(self),CHECK_ALL_LABEL); + g_object_set_data(G_OBJECT(self),"uncheck",NULL); } - gtk_widget_hide(widgets->AdditionalComponentsUncheckAllCheck); - g_signal_handlers_block_by_func(G_OBJECT(widgets->AdditionalComponentsUncheckAllCheck),on_software_uncheck_all,widgets); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->AdditionalComponentsUncheckAllCheck),0); - g_signal_handlers_unblock_by_func(G_OBJECT(widgets->AdditionalComponentsUncheckAllCheck),on_software_uncheck_all,widgets); } int yon_software_save(main_window *widgets){ @@ -427,6 +403,7 @@ int yon_software_save(main_window *widgets){ int yon_software_check_packages_size(GtkWidget *, main_window *widgets){ long pacman_size = 0; { + int active = 1; GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->AdditionalComponentsList)); GList *listiter; for (listiter=list;listiter;listiter=listiter->next){ @@ -435,10 +412,18 @@ int yon_software_check_packages_size(GtkWidget *, main_window *widgets){ long cur_size = row->size_raw; pacman_size += cur_size; if (gtk_widget_get_sensitive(row->InstallCheck)){ - gtk_widget_show(widgets->AdditionalComponentsUncheckAllCheck); + // gtk_widget_show(widgets->AdditionalComponentsUncheckAllCheck); + active = 0; } } } + switch(active){ + case 0: gtk_button_set_label(GTK_BUTTON(widgets->AdditionalComponentsUncheckAllCheck),UNCHECK_ALL_LABEL); + g_object_set_data(G_OBJECT(widgets->AdditionalComponentsUncheckAllCheck),"uncheck",widgets); + break; + case 1: gtk_button_set_label(GTK_BUTTON(widgets->AdditionalComponentsUncheckAllCheck),CHECK_ALL_LABEL); + g_object_set_data(G_OBJECT(widgets->AdditionalComponentsUncheckAllCheck),"uncheck",NULL); + } } { GtkTreeIter iter; @@ -567,8 +552,10 @@ int yon_pacman_software_save(main_window *widgets){ if (!yon_installation_check_packages_size(widgets)) return 0; GtkTreeIter iter; GtkTreeModel *model = GTK_TREE_MODEL(widgets->PacmanSoftwareChosenList); + char *old_packages = config(packages_parameter); yon_config_register(packages_parameter,packages_parameter_command,NULL); - yon_config_set_status(packages_parameter,-1); + int status = yon_char_is_empty(old_packages); + yon_config_set_status(packages_parameter,status-1); for_iter(model,&iter){ char *target; @@ -764,8 +751,8 @@ void *yon_pacman_load(struct pacman_struct *pacman){ const char *find_package = pacman->find_package; // char *command = get_local_module_info_command(find_package); pacman->packages = yon_packages_find(YON_PACKAGES_SYNC,find_package,&pacman->packages_size); - // g_idle_add((GSourceFunc)yon_pacman_fill,pacman); - yon_pacman_fill(pacman); + g_idle_add((GSourceFunc)yon_pacman_fill,pacman); + // yon_pacman_fill(pacman); return NULL; } diff --git a/source/ubinstall-gtk-config-hub.c b/source/ubinstall-gtk-config-hub.c index 7792e6d..1fbd0f9 100644 --- a/source/ubinstall-gtk-config-hub.c +++ b/source/ubinstall-gtk-config-hub.c @@ -109,34 +109,7 @@ int yon_configuration_hub_save(main_window *widgets){ } if (!main_config.configure_mode){ int size; - config_str parameters = yon_config_get_save_parameters_by_key(&size,modules_parameter, - packages_parameter, - root_password_parameter, - autologin_parameter, - xkbmodel_parameter, - xkblayout_parameter, - xkbvariant_parameter, - xkboptions_parameter, - hostname_parameter, - zone_parameter, - lang_parameter, - locale_parameter, - num_lock_boot_parameter, - swap_parameter, - swap_size_parameter, - boot_parameter, - packages_parameter, - device_typevfs_parameter, - NTPSERVERS_parameter, - DOMAIN_parameter, - DOMAIN_admanger_parameter, - KERNEL_BOOT_parameter, - SERVICES_ENABLE_parameter, - AUTOEXEC_parameter, - GRUB_SUPERUSERS_parameter, - GRUB_TIMEOUT_parameter, - GRUB_DEFAULT_parameter, - AUTOLOGINUSER_parameter, + config_str parameters = yon_config_get_save_parameters_by_key(&size, finish_parameter, NULL); if (parameters){ diff --git a/source/ubinstall-gtk-configuration-mode.c b/source/ubinstall-gtk-configuration-mode.c index 32311cf..85ac687 100644 --- a/source/ubinstall-gtk-configuration-mode.c +++ b/source/ubinstall-gtk-configuration-mode.c @@ -32,7 +32,7 @@ int yon_configuration_path_check(const char *path){ dialog_confirmation_data *data = yon_confirmation_dialog_data_new(); data->action_text = homedir_create?CREATE_CONFIG_DIALOG_LABEL_HOMEDIR:CREATE_CONFIG_DIALOG_LABEL; data->title = WARNING_TITLE_LABEL; - if (yon_confirmation_dialog_call(NULL,data)==GTK_RESPONSE_ACCEPT){ + if ((!yon_char_is_empty(main_config.force_ini)&&!strcmp(main_config.force_ini,path))||yon_confirmation_dialog_call(NULL,data)==GTK_RESPONSE_ACCEPT){ char *dir_path = yon_file_get_parent(full_path); if (access(full_path,F_OK)&&(access(dir_path,W_OK)||access(dir_path,R_OK))){ if (system(ubconfig_file_create_pkexec(full_path))){ diff --git a/source/ubinstall-gtk-install-start.c b/source/ubinstall-gtk-install-start.c index c79400f..f735862 100644 --- a/source/ubinstall-gtk-install-start.c +++ b/source/ubinstall-gtk-install-start.c @@ -22,7 +22,47 @@ void *on_quick_install_start(void *data){ g_idle_add((GSourceFunc)yon_progress_bar_start,widgets); if (!main_config.dry_run){ - char *command = yon_debug_output("%s\n",quick_install_command(main_config.config_load_path)); + char *install_path = main_config.config_load_path; + if (!install_path) install_path = "system"; + char *command = yon_debug_output("%s\n",auto_install_command(install_path)); + yon_debug_output("%s\n","Entered installation"); + if (system(yon_debug_output("%s\n",command))){ + + gdk_threads_add_idle((GSourceFunc)on_install_error,widgets); + free(command); + g_mutex_lock(&main_config.install_mutex); + main_config.install_complete=1; + g_mutex_unlock(&main_config.install_mutex); + return 0; + }; + free(command); + g_mutex_lock(&main_config.install_mutex); + main_config.install_complete=1; + g_mutex_unlock(&main_config.install_mutex); + g_idle_add((GSourceFunc)on_install_success,widgets); + } else { + yon_launch("ubconfig --source system get /"); + } + return 0; +} + +void on_autoinstall_start(GtkWidget *, main_window *widgets){ + main_config.save_configured=1; + gtk_widget_show(gtk_widget_get_parent(widgets->InstallationProgress)); + pthread_create(&main_config.install_thread,NULL,on_auto_install_start,widgets); + gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_INSTALLATION); + yon_page_init(widgets,YON_PAGE_INSTALLATION); + yon_page_update(widgets); + +} +void *on_auto_install_start(void *data){ + main_window *widgets = (main_window*)data; + + g_idle_add((GSourceFunc)yon_progress_bar_start,widgets); + if (!main_config.dry_run){ + char *install_path = main_config.config_load_path; + if (!install_path) install_path = "system"; + char *command = yon_debug_output("%s\n",auto_install_command(install_path)); yon_debug_output("%s\n","Entered installation"); if (system(yon_debug_output("%s\n",command))){ diff --git a/source/ubinstall-gtk-kernel.c b/source/ubinstall-gtk-kernel.c index 87392f9..682f16b 100644 --- a/source/ubinstall-gtk-kernel.c +++ b/source/ubinstall-gtk-kernel.c @@ -495,4 +495,81 @@ void yon_kernel_addon_init(main_window *widgets){ yon_char_parsed_free(kernels,size); +} +int yon_kernel_save(main_window *widgets){ + GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->KernelListBox)); + char *config_val = config(packages_parameter); + if (yon_char_is_empty(config_val)) { + char *old_packages = config(packages_parameter); + yon_config_register(packages_parameter,packages_parameter_command,NULL); + int status = yon_char_is_empty(old_packages); + yon_config_set_status(packages_parameter,status-1); + } + char *enabled_module = NULL; + int overall_size = 0; + int active_size = 0; + for(GList *iter = list;iter;iter = iter->next){ + overall_size++; + kernel_row *row = g_object_get_data(G_OBJECT(iter->data),"kernel_row"); + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(row->InstallCheck))){ + if (gtk_widget_get_sensitive(row->InstallCheck)){ + char *append_str = yon_char_replace(row->modules," ",","); + yon_config_append_elements(packages_parameter,append_str,","); + free(append_str); + active_size++; + } + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(row->EnableRadio))){ + enabled_module = row->package; + } + } else { + char *append_str = yon_char_replace(row->modules," ",","); + yon_config_remove_elements(packages_parameter,append_str,","); + free(append_str); + } + } + + if (!yon_char_is_empty(enabled_module)){ + yon_config_register(KERNEL_BOOT_parameter,KERNEL_BOOT_parameter_command,enabled_module); + } else { + yon_config_remove_by_key(KERNEL_BOOT_parameter); + } + + if (!main_config.configure_mode){ + yon_debug_output("%s\n",yon_config_save_args_simple(main_config.config_load_path,packages_parameter, KERNEL_BOOT_parameter,NULL)); + } + return 1; +} + +int yon_kernel_addon_save(main_window *widgets){ + char *parameter = config(packages_parameter); + GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->KernelAddonListBox)); + if (yon_char_is_empty(parameter)){ + yon_config_register(packages_parameter,packages_parameter_command,NULL); + + } + for(GList *iter = list;iter;iter = iter->next){ + kernel_addon_row *row = g_object_get_data(G_OBJECT(iter->data),"kernel_row"); + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(row->InstallCheck))){ + if (gtk_widget_get_sensitive(row->InstallCheck)){ + yon_config_append_elements(packages_parameter,row->modules,","); + } + } else { + char *append_str = yon_char_replace(row->modules," ",","); + yon_config_remove_elements(packages_parameter,row->modules,","); + free(append_str); + } + } + + if (!main_config.configure_mode){ + int size; + config_str parameters = yon_config_get_save_parameters_by_key(&size,packages_parameter,NULL); + if (parameters){ + char *command_parameters = yon_char_parsed_to_string(parameters,size," -- "); + char *command = yon_char_unite(ubconfig_dull_command,"--target system ",command_parameters,NULL); + if (!system(yon_debug_output("%s\n",command))){} + free(command); + yon_char_parsed_free(parameters,size); + } + } + return 1; } \ No newline at end of file diff --git a/source/ubinstall-gtk-language.c b/source/ubinstall-gtk-language.c index 9bb71f3..2780261 100644 --- a/source/ubinstall-gtk-language.c +++ b/source/ubinstall-gtk-language.c @@ -13,7 +13,7 @@ void yon_language_update(main_window *widgets){ int parsed_size; config_str parsed = yon_char_parse(cur_lang,&parsed_size,"|"); gtk_list_store_append(widgets->LanguageList,&iter); - gtk_list_store_set(widgets->LanguageList,&iter,1,parsed[1],2,parsed[2],3,parsed[0],-1); + gtk_list_store_set(widgets->LanguageList,&iter,0,1,1,parsed[1],2,parsed[2],3,parsed[0],-1); } } else { gtk_switch_set_active(GTK_SWITCH(widgets->LocaleDefaultSwitch),0); @@ -35,6 +35,11 @@ void yon_language_update(main_window *widgets){ yon_char_parsed_free(parsed,parsed_size); } } + if (!config_languages){ + if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(widgets->LanguageList),&iter)){ + gtk_list_store_set(widgets->LanguageList,&iter,0,1,-1); + } + } } } diff --git a/source/ubinstall-gtk-page-switch.c b/source/ubinstall-gtk-page-switch.c index 5d27784..cbacb4d 100644 --- a/source/ubinstall-gtk-page-switch.c +++ b/source/ubinstall-gtk-page-switch.c @@ -54,9 +54,10 @@ enum YON_PAGES yon_page_get_next(main_window *widgets, enum YON_PAGES page){ case YON_PAGE_RECOVERY_BEGIN: main_config.save_configured = 1; return YON_PAGE_RECOVERY_PROCESS; break; case YON_PAGE_RECOVERY_PROCESS: return YON_PAGE_RECOVERY_COMPLETION; break; case YON_PAGE_INSTALLATION: return YON_PAGE_COMPLETION; break; - case YON_PAGE_CONFIGURE_SAVE: - break; case YON_PAGE_CONFIGURE_END: + return YON_PAGE_CONFIGURE_SAVE; + break; + case YON_PAGE_CONFIGURE_SAVE: gtk_main_quit(); exit(0); break; @@ -152,7 +153,7 @@ void yon_navigation_buttons_set_sensetiveness(main_window *widgets){ // yon_load_proceed(YON_CONFIG_LOCAL); gtk_widget_hide(widgets->BackButton); gtk_widget_set_sensitive(widgets->NextButton,1); - gtk_widget_set_sensitive(widgets->CancelInstallButton,0); + // gtk_widget_set_sensitive(widgets->CancelInstallButton,0); gtk_widget_set_sensitive(widgets->LoadLocalConfigurationMenuItem,1); gtk_widget_set_sensitive(widgets->LoadExternalConfigurationMenuItem,1); gtk_widget_hide(widgets->BackButton); @@ -186,7 +187,7 @@ void yon_navigation_buttons_set_sensetiveness(main_window *widgets){ gtk_widget_set_sensitive(widgets->CancelInstallButton,1); break; case YON_PAGE_CONFIGURE_END: - gtk_button_set_label(GTK_BUTTON(widgets->NextButton),SAVE_AND_EXIT_LABEL); + gtk_button_set_label(GTK_BUTTON(widgets->NextButton),SAVE_LABEL); gtk_button_set_label(GTK_BUTTON(widgets->CancelInstallButton),EXIT_LABEL); break; @@ -646,6 +647,8 @@ void on_page_cancel_clicked(GtkWidget *, main_window *widgets){ gtk_main_quit(); break; case YON_PAGE_SECTIONS: + case YON_PAGE_WELCOME: + case YON_PAGE_LICENCE: on_yon_exit(NULL,NULL,widgets); break; default: { @@ -656,6 +659,7 @@ void on_page_cancel_clicked(GtkWidget *, main_window *widgets){ if (yon_confirmation_dialog_call(widgets->MainWindow,data)==GTK_RESPONSE_ACCEPT ){ pthread_cancel(main_config.install_thread); kill(main_config.install_thread,SIGKILL); + if (main_config.autoinstall) exit(0); g_signal_handlers_disconnect_by_func(G_OBJECT(widgets->install_info_monitor),yon_installation_progress_update,widgets); g_file_monitor_cancel(widgets->install_info_monitor); widgets->install_info_monitor = NULL; diff --git a/source/ubinstall-gtk-saving.c b/source/ubinstall-gtk-saving.c index 17c8531..a8ecb58 100644 --- a/source/ubinstall-gtk-saving.c +++ b/source/ubinstall-gtk-saving.c @@ -7,7 +7,7 @@ void yon_config_save_proceed(char *path, YON_CONFIG_TYPE type){ void yon_load_proceed(YON_CONFIG_TYPE type){ if (type!=YON_CONFIG_CUSTOM){ yon_config_clean(); - if (main_config.config_load_path){ + if (main_config.config_load_path&&!main_config.configure_mode){ if (main_config.startup_config){ yon_config_restore(NULL); yon_config_custom_clean(main_config.startup_config); @@ -22,7 +22,9 @@ void yon_load_proceed(YON_CONFIG_TYPE type){ case YON_CONFIG_LOCAL: main_config.config_load_path = yon_char_new("system"); main_config.config_save_path = main_config.config_load_path; - yon_config_custom_load_config(&main_config.startup_config,config_get_command("system"),NULL); + if (!main_config.configure_mode){ + yon_config_custom_load_config(&main_config.startup_config,config_get_command("system"),NULL); + } yon_config_load_config(type,config_get_command("system"),NULL); break; case YON_CONFIG_CUSTOM: @@ -30,7 +32,7 @@ void yon_load_proceed(YON_CONFIG_TYPE type){ char *path = NULL; path=yon_custom_config_init(GTK_FILE_CHOOSER_ACTION_OPEN); if (!yon_char_is_empty(path)){ - if (main_config.config_load_path){ + if (main_config.config_load_path&&!main_config.configure_mode){ if (main_config.startup_config){ yon_config_restore(NULL); yon_config_custom_clean(main_config.startup_config); @@ -41,12 +43,16 @@ void yon_load_proceed(YON_CONFIG_TYPE type){ main_config.config_save_path = main_config.config_load_path; yon_config_clean(); yon_config_load_config(type,config_get_command(path),NULL); - yon_config_custom_load_config(&main_config.startup_config,config_get_command(path),NULL); + if (!main_config.configure_mode){ + yon_config_custom_load_config(&main_config.startup_config,config_get_command(path),NULL); + } } } else { yon_config_clean(); yon_config_load_config(type,config_get_command(main_config.force_ini),NULL); + if (!main_config.configure_mode){ yon_config_custom_load_config(&main_config.startup_config,config_get_command(main_config.force_ini),NULL); + } } break; default: @@ -185,10 +191,10 @@ void *on_config_save(void *data){ main_window *widgets = (main_window*)data; g_idle_add((GSourceFunc)yon_progress_bar_start,widgets); + char *command = yon_debug_output("%s\n",install_start_command(main_config.config_save_path)); if (!main_config.dry_run){ - char *command = yon_debug_output("%s\n",save_config_command); yon_debug_output("%s\n","Entered installation"); - if (system(yon_debug_output("%s\n",command))){ + if (system(command)){ gdk_threads_add_idle((GSourceFunc)on_install_error,widgets); free(command); @@ -215,9 +221,9 @@ void *on_setup_system_configuration(void * data){ main_window *widgets = (main_window*)data; if (widgets){}; + char *command = yon_debug_output("%s\n",configuration_start_command(main_config.config_save_path)); if (!main_config.dry_run){ - char *command = set_user_config_command; - if (system(yon_debug_output("%s\n",command))){}; + if (system(command)){}; free(command); } else { yon_launch("ubconfig --source system get /"); diff --git a/source/ubinstall-gtk-startup-apps.c b/source/ubinstall-gtk-startup-apps.c index ce73dfa..4a495fc 100644 --- a/source/ubinstall-gtk-startup-apps.c +++ b/source/ubinstall-gtk-startup-apps.c @@ -30,7 +30,7 @@ void on_startup_apps_remove(GtkWidget *self,main_window *widgets){ if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->StartupAppsTree)),&model,&iter)){ char *unit; int deletable; - gtk_tree_model_get(model,&iter,2,&unit,4,&deletable,-1); + gtk_tree_model_get(model,&iter,1,&unit,4,&deletable,-1); if (!deletable) return; dialog_confirmation_data *data = yon_confirmation_dialog_data_new(); data->action_text = SERVICE_REMOVE_CONFIRMATION_LABEL(unit); @@ -103,7 +103,11 @@ void yon_startup_apps_init(main_window *widgets){ if (parsed_size&&parsed){ for (int i=0;iStartupAppsList,&iter); - gtk_list_store_set(widgets->StartupAppsList,&iter,0,1,1,parsed[i],4,1,-1); + char *app = NULL; + char *description = NULL; + yon_window_config_get_parameter("service_app",parsed[i],&app,YON_TYPE_STRING); + yon_window_config_get_parameter("service_desc",parsed[i],&description,YON_TYPE_STRING); + gtk_list_store_set(widgets->StartupAppsList,&iter,0,1,1,parsed[i],2,app,3,description,4,1,-1); } } yon_char_parsed_free(parsed,parsed_size); @@ -204,9 +208,12 @@ int yon_startup_app_save(main_window *widgets){ list_size++; char *target; int status; - gtk_tree_model_get(model,&iter,0,&status,1,&target,-1); + char *app, *description; + gtk_tree_model_get(model,&iter,0,&status,1,&target,2,&app,3,&description,-1); if (status){ yon_char_parsed_add_or_create_if_exists(modules,&size,target); + yon_window_config_add_instant_parameter(target,"service_app",app,YON_TYPE_STRING); + yon_window_config_add_instant_parameter(target,"service_desc",description,YON_TYPE_STRING); } } if (size){ diff --git a/source/ubinstall-gtk-startup-services.c b/source/ubinstall-gtk-startup-services.c index 17cd010..a689c4f 100644 --- a/source/ubinstall-gtk-startup-services.c +++ b/source/ubinstall-gtk-startup-services.c @@ -38,7 +38,7 @@ void on_startup_services_remove(GtkWidget *self,main_window *widgets){ if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->StartupServicesTree)),&model,&iter)){ char *unit; int deletable; - gtk_tree_model_get(model,&iter,2,&unit,4,&deletable,-1); + gtk_tree_model_get(model,&iter,1,&unit,4,&deletable,-1); if (!deletable) return; dialog_confirmation_data *data = yon_confirmation_dialog_data_new(); data->action_text = SERVICE_REMOVE_CONFIRMATION_LABEL(unit); @@ -111,7 +111,11 @@ void yon_startup_services_init(main_window *widgets){ if (parsed_size&&parsed){ for (int i=0;iStartupList,&iter); - gtk_list_store_set(widgets->StartupList,&iter,0,1,1,parsed[i],-1); + char *app = NULL; + char *description = NULL; + yon_window_config_get_parameter("service_app",parsed[i],&app,YON_TYPE_STRING); + yon_window_config_get_parameter("service_desc",parsed[i],&description,YON_TYPE_STRING); + gtk_list_store_set(widgets->StartupList,&iter,0,1,1,parsed[i],2,app,3,description,-1); } } yon_char_parsed_free(parsed,parsed_size); @@ -208,9 +212,12 @@ int yon_startup_save(main_window *widgets){ list_size++; char *target; int status; - gtk_tree_model_get(model,&iter,0,&status,1,&target,-1); + char *app, *description; + gtk_tree_model_get(model,&iter,0,&status,1,&target,2,&app,3,&description,-1); if (status){ yon_char_parsed_add_or_create_if_exists(modules,&size,target); + yon_window_config_add_instant_parameter(target,"service_app",app,YON_TYPE_STRING); + yon_window_config_add_instant_parameter(target,"service_desc",description,YON_TYPE_STRING); } } if (size){ diff --git a/source/ubinstall-gtk-users.c b/source/ubinstall-gtk-users.c index e3470ac..b0e388f 100644 --- a/source/ubinstall-gtk-users.c +++ b/source/ubinstall-gtk-users.c @@ -270,7 +270,7 @@ void yon_user_init(main_window *widgets){ } user->changed=1; gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(user->AdminCheck),1); - if (yon_char_is_empty(default_passwd)){ + if (yon_char_is_empty(default_passwd)||yon_config_check_ignore(DEFAULTPASSWD_parameter)){ gtk_combo_box_set_active(GTK_COMBO_BOX(user->PasswordCombo),0); gtk_entry_set_placeholder_text(GTK_ENTRY(widgets->UserRootPasswordEntry),yon_config_default_get_by_key(DEFAULTPASSWD_parameter)); } else { @@ -316,7 +316,7 @@ void yon_user_init(main_window *widgets){ gtk_widget_show(user->MainBox); } - if (yon_char_is_empty(root_password)){ + if (yon_char_is_empty(root_password)||yon_config_check_ignore(root_password_parameter)){ gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->UserRootPasswordCombo),0); gtk_entry_set_placeholder_text(GTK_ENTRY(widgets->UserRootPasswordEntry),yon_config_default_get_by_key(root_password_parameter)); } else { diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index 61d9db7..ad995c2 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -322,6 +322,11 @@ void yon_update_page(main_window *widgets){ while(gtk_events_pending()) gtk_main_iteration(); yon_page_init(widgets,page); g_signal_handlers_unblock_by_func(G_OBJECT(widgets->db_lock_monitor),G_CALLBACK(yon_db_unlock_update),widgets); + if (page == YON_PAGE_PACMAN_SOFTWARE){ + const char *search_string = gtk_entry_get_text(GTK_ENTRY(widgets->PacmanSoftwareSearchEntry)); + if (!yon_char_is_empty(search_string)) on_pacman_search_enter(GTK_ENTRY(widgets->PacmanSoftwareSearchEntry),widgets); + g_hash_table_remove_all(widgets->pacmanchosen); + } on_status_update(NULL,widgets); } @@ -830,8 +835,8 @@ void yon_main_window_create(main_window *widgets){ g_signal_connect(G_OBJECT(widgets->SamePlaceDeviceTree),"cursor-changed",G_CALLBACK(on_device_selection_changed),widgets); g_signal_connect(G_OBJECT(widgets->UserdataDevicesTree),"cursor-changed",G_CALLBACK(on_device_selection_changed),widgets); - g_signal_connect(G_OBJECT(widgets->OSSoftwareUncheckAllCheck),"toggled",G_CALLBACK(on_os_components_uncheck_all),widgets); - g_signal_connect(G_OBJECT(widgets->AdditionalComponentsUncheckAllCheck),"toggled",G_CALLBACK(on_software_uncheck_all),widgets); + g_signal_connect(G_OBJECT(widgets->OSSoftwareUncheckAllCheck),"toggled",G_CALLBACK(on_os_components_switch_all),widgets); + g_signal_connect(G_OBJECT(widgets->AdditionalComponentsUncheckAllCheck),"toggled",G_CALLBACK(on_software_switch_all),widgets); g_signal_connect(G_OBJECT(widgets->NextInstallationSizeSpin),"value-changed",G_CALLBACK(yon_size_changed),widgets); g_signal_connect(G_OBJECT(widgets->UserdataFormatSizeSpin),"value-changed",G_CALLBACK(yon_size_changed),widgets); g_signal_connect(G_OBJECT(widgets->OSFormatSizeSpin),"value-changed",G_CALLBACK(yon_size_changed),widgets); @@ -936,6 +941,8 @@ void yon_main_window_create(main_window *widgets){ g_signal_connect(G_OBJECT(widgets->AboutMenuItem),"activate",G_CALLBACK(yon_on_about),NULL); g_signal_connect(G_OBJECT(widgets->DocumentationMenuItem),"activate",G_CALLBACK(on_open_documentation_confirmation),WIKI_LINK); } + + yon_gtk_entry_set_password_visibility_icon(GTK_ENTRY(widgets->NetworkDomainPasswordEntry)); yon_gtk_entry_set_password_visibility_icon(GTK_ENTRY(widgets->UserRootPasswordEntry)); yon_window_config_setup(GTK_WINDOW(widgets->MainWindow)); @@ -1030,6 +1037,10 @@ void yon_main_window_create(main_window *widgets){ gtk_tree_model_filter_set_visible_func(GTK_TREE_MODEL_FILTER(widgets->InstallerCountryFilter),(GtkTreeModelFilterVisibleFunc)on_country_filter,widgets,NULL); + if (main_config.autoinstall||!yon_char_is_empty(config(finish_parameter))){ + on_autoinstall_start(NULL,widgets); + } + gtk_tree_view_set_search_equal_func(GTK_TREE_VIEW(widgets->LanguagesTree),(GtkTreeViewSearchEqualFunc)on_languages_search_func,widgets,NULL); gtk_overlay_add_overlay(GTK_OVERLAY(widgets->RegionMapOverlay),widgets->TimeZoneMapOverlayBox); gtk_overlay_set_overlay_pass_through(GTK_OVERLAY(widgets->RegionMapOverlay),widgets->TimeZoneMapOverlayBox,1); @@ -1119,13 +1130,13 @@ int main(int argc, char *argv[]){ int option_index = 0; struct option long_options[] = { {"dry-run", 0, 0, 'D'}, - {"scenario", 0, 0, 's'}, + // {"scenario", 0, 0, 's'}, {"autoinstall", 0, 0, 'A'}, {NULL, 0, NULL, 0} }; optind = 1; for (int i = 0; i < size; i++) { - int argument = getopt_long(argc, argv, "D", long_options, &option_index); + int argument = getopt_long(argc, argv, "DA", long_options, &option_index); switch (argument) { case 'D': main_config.dry_run = 1; diff --git a/source/ubinstall-gtk.h b/source/ubinstall-gtk.h index 509e1bd..d5f4b36 100755 --- a/source/ubinstall-gtk.h +++ b/source/ubinstall-gtk.h @@ -296,11 +296,10 @@ layout && /description:/ {\ #define get_localisation_command "ubconfig -ea --source global get [autoinstall] AUTOINSTALL[installer_locale] -- get [autoinstall] AUTOINSTALL['ubconfig set [locale] LANG'] -- get [locale] LANG" -#define save_config_command yon_char_unite("/usr/bin/bash -c \"nice ubinstall autoinstall",main_config.debug_mode?" --debug":"","\"", NULL) -#define quick_install_command(path) yon_char_unite("nice ubinstall autoinstall",main_config.debug_mode?" --debug":""," --config='",path,"' --noautoconfig --noinstall_extra", NULL) +#define install_start_command(path) yon_char_unite("/usr/bin/bash -c \"nice ubinstall autoinstall",main_config.debug_mode?" --debug":""," --noautoconfig --noinstall_extra",strcmp(path,"system")?" --config=":"",strcmp(path,"system")?path:"","\"", NULL) +#define configuration_start_command(path) yon_char_unite("nice ubinstall autoconfig install_extra",main_config.debug_mode?" --debug":"",strcmp(path,"system")?" --config=":"",strcmp(path,"system")?path:"", NULL) -#define set_user_config_command yon_char_unite("nice ubinstall autoconfig",main_config.debug_mode?" --debug":""," install_extra", NULL) -#define save_additional_config_command(parameters) yon_char_unite("ubconfig --target system set [autoinstall] ", parameters, NULL) +#define auto_install_command(path) yon_char_unite("nice ubinstall autoinstall",main_config.debug_mode?" --debug":"",strcmp(path,"system")?" --config=":"",strcmp(path,"system")?path:"", NULL) #define get_default_password_command "ubconfig --raw --conarg --source default get [users] NOSECUREROOTPASSWD" @@ -1615,11 +1614,11 @@ void yon_gtk_widget_set_translation(GtkWidget *target); void on_bootloader_user_edit(GtkWidget *, main_window *widgets); void on_bootloader_admin_toggled(GtkWidget *, char *path, main_window *widgets); void on_bootloader_user_remove(GtkWidget *, main_window *widgets); -void on_software_uncheck_all(GtkWidget *, main_window *widgets); +void on_software_switch_all(GtkWidget *, main_window *widgets); gboolean on_kernel_enabled_toggled(GtkWidget *self, GdkEventButton *, kernel_row *row); void on_status_update(GtkWidget *,main_window *widgets); gboolean on_kernel_addon_menu_block(GObject *self, GdkEventButton *event); -void on_os_components_uncheck_all(GtkWidget *,main_window *widgets); +void on_os_components_switch_all(GtkWidget *,main_window *widgets); gboolean yon_os_components_load(main_window *widgets); gboolean on_user_autoloin_switch(GtkWidget *, int status, main_window *); void on_locale_selected(GtkTreeView *self,main_window *widgets); @@ -1643,4 +1642,6 @@ void *yon_status_thread_update(main_window *widgets); void yon_db_lock_update(GFileMonitor *,GFile *,GFile *,GFileMonitorEvent ,main_window *widgets); void yon_db_unlock_update(GFileMonitor *,GFile *,GFile *,GFileMonitorEvent ,main_window *widgets); void on_config_install_success(GtkWidget *self, int state, main_window *widgets); -void *on_quick_install_start(void *data); \ No newline at end of file +void *on_quick_install_start(void *data); +void on_autoinstall_start(GtkWidget *self, main_window *widgets); +void *on_auto_install_start(void *data); \ No newline at end of file diff --git a/source/ubl-strings.h b/source/ubl-strings.h index fb0a0aa..b69fba6 100644 --- a/source/ubl-strings.h +++ b/source/ubl-strings.h @@ -142,10 +142,11 @@ NULL) #define LOG_VIEW_LABEL _("Log exploration") #define UNCHECK_ALL_LABEL _("Uncheck all") +#define CHECK_ALL_LABEL _("Check all") #define CONFIGURATION_TITLE_LABEL _("Configuration") #define CONFIGURATION_FINISH_HEAD_LABEL _("Installer configuration has been finished") -#define CONFIGURATION_FINISH_LABEL _("Choose a save option on the header bar") +#define CONFIGURATION_FINISH_LABEL _("You can now proceed to saving the settings") #define CONFIGURATION_SAVE_HEAD_LABEL _("Configuration has been saved") #define CONFIGURATION_SAVE_LABEL _("You can safely exit configurator or return and create new configuration file.") @@ -456,7 +457,7 @@ NULL) // #define _LABEL _("The process of restoring the system is underway...") // #define _LABEL _("System recovery successfully completed!") // #define _LABEL _("You can reboot the system and use the installed version or continue to work in the current system.") -// #define _LABEL _("Selecting additional system kernel components from the repository. Internet access required") +// #define _LABEL _("Selecting additional kernel components to install from the repository. Internet access required") // #define _LABEL _("Repository") // #define _LABEL _("Name") // #define _LABEL _("Version") @@ -484,6 +485,8 @@ NULL) // #define _LABEL _("Version:") // #define _LABEL _("Size:") // #define _LABEL _("Select installation sources") +// #define _LABEL _("Model") +// #define _LABEL _("Vendor") #define slide_1_title _("Product ecosystem") #define slide_1_text _("Developed by a team of professionals and successfully presented on the market.\n\ diff --git a/ubinstall-gtk.glade b/ubinstall-gtk.glade index 9629206..3fd7967 100644 --- a/ubinstall-gtk.glade +++ b/ubinstall-gtk.glade @@ -404,6 +404,7 @@ + True False @@ -2078,12 +2079,7 @@ agreement True False - 5 5 - 5 - 5 - 5 - 5 True @@ -2143,6 +2139,7 @@ Select a different installation sources. Uncheck all + True True False True @@ -2229,7 +2226,7 @@ Select a different installation sources. True False end - 256 + 320 com.ublinux.ubinstall-gtk.configure-complete @@ -2300,7 +2297,7 @@ Select a different installation sources. True False end - 256 + 320 com.ublinux.ubinstall-gtk.recovery-complete @@ -3145,7 +3142,7 @@ Select a different installation sources. True False - Selecting additional system kernel components from the repository. Internet access required + Selecting additional kernel components to install from the repository. Internet access required True 0 @@ -3496,12 +3493,6 @@ Select a different installation sources. True False - 5 - 5 - 5 - 5 - 5 - 5 True @@ -3550,6 +3541,7 @@ Select a different installation sources. Uncheck all + True True False True @@ -6546,41 +6538,6 @@ Select a different installation sources. 1 - - - True - False - 5 - - - True - True - - - False - True - 0 - - - - - True - False - Authentication in the bootloader menu - - - False - True - 1 - - - - - False - True - 2 - - True @@ -6598,62 +6555,40 @@ Select a different installation sources. True - False False + vertical 5 - + True - True - in - 128 - 256 + False + 5 - + True True - BootloadUsersList - - - - - - Administrator - - - - 0 - - - - - - - Username - - - - 1 - - - - - - - Password - - - - 3 - - - - + + False + True + 0 + + + + + True + False + Authentication in the bootloader menu + + + False + True + 1 + - True + False True 0 @@ -6661,36 +6596,124 @@ Select a different installation sources. True + False False - vertical 5 - + True True - True - image17 - + in + 128 + 256 + + + True + True + BootloadUsersList + 0 + + + + + + Administrator + + + + 0 + + + + + + + Username + + + + 1 + + + + + + + Password + + + + 3 + + + + + + - False + True True 0 - + True - False - True - True - Edit user - image43 - + False + vertical + 5 + + + True + True + True + image17 + + + + False + True + 0 + + + + + True + False + True + True + Edit user + image43 + + + + False + True + 1 + + + + + True + False + True + True + image18 + + + + False + True + 2 + + False @@ -6698,26 +6721,9 @@ Select a different installation sources. 1 - - - True - False - True - True - image18 - - - - False - True - 2 - - - False + True True 1 @@ -6863,144 +6869,170 @@ Select a different installation sources. 2 - - - False - True - 1 - - - - - True - False - vertical - 5 - - - True - False - 5 - - - True - True - - - False - True - 0 - - - - - True - False - Domain name: - - - False - True - 1 - - - - - True - False - True - 10 - - - False - True - 2 - - - - - True - False - Password: - - - False - True - 5 - - - - - True - False - True - False - * - 10 - - - False - True - 6 - - - - - False - True - 0 - - + + + False + True + 1 + + + + + True + False + vertical + 5 - + True False - 5 + 0.019999999552965164 + in - + True False - vertical + 5 + 5 + 5 + 5 - + + True + False + vertical + 5 + + + True + False + 5 + + + True + False + Domain name: + 0 + + + False + True + 0 + + + + + True + False + True + 8 + + + True + True + 1 + + + + + False + True + 0 + + + + + True + False + 5 + + + True + False + Domain administrator: + 0 + + + False + True + 0 + + + + + True + False + True + 8 + + + True + True + 1 + + + + + False + True + 1 + + + + + True + False + 5 + + + True + False + Password: + 0 + + + False + True + 0 + + + + + True + False + True + False + + 14 + + + True + True + 1 + + + + + False + True + 2 + + + - - False - True - 0 - - - - - True - False - Domain administrator: - - - False - True - 1 - - - + + True - False True - 10 - - False - True - 2 - False True - 1 + 0 @@ -7753,7 +7785,7 @@ Select a different installation sources. True False end - 256 + 320 com.ublinux.ubinstall-gtk.install-complete @@ -7826,7 +7858,7 @@ or continue working in the system Live environment. True False end - 256 + 320 com.ublinux.ubinstall-gtk.install-complete @@ -7897,7 +7929,7 @@ or continue working in the system Live environment. True False end - 256 + 320 com.ublinux.ubinstall-gtk.configure-complete @@ -7968,7 +8000,7 @@ or continue working in the system Live environment. True False end - 256 + 320 com.ublinux.ubinstall-gtk.install-error @@ -8044,7 +8076,7 @@ or continue working in the system Live environment. True False - 256 + 320 com.ublinux.ubinstall-gtk.configure-complete @@ -8074,7 +8106,7 @@ or continue working in the system Live environment. True False - Choose a save option on the header bar + You can now proceed to saving the settings center True 0 @@ -8122,7 +8154,7 @@ or continue working in the system Live environment. True False end - 256 + 320 com.ublinux.ubinstall-gtk.configure-complete @@ -8398,33 +8430,33 @@ or continue working in the system Live environment. - Description + Size - 1 + 3 - Label + Model - 2 + 1 - Size + Vendor - 3 + 4 @@ -8435,7 +8467,7 @@ or continue working in the system Live environment. - 4 + 2 @@ -8912,33 +8944,33 @@ or continue working in the system Live environment. - Description + Size - 1 + 3 - Label + Model - 2 + 1 - Size + Vendor - 3 + 4 @@ -8949,7 +8981,7 @@ or continue working in the system Live environment. - 4 + 2 @@ -9674,33 +9706,33 @@ or continue working in the system Live environment. - Description + Size - 1 + 3 - Label + Model - 2 + 1 - Size + Vendor - 3 + 4 @@ -9711,7 +9743,7 @@ or continue working in the system Live environment. - 4 + 2 @@ -10447,33 +10479,33 @@ separately into the selected partition. - Description + Size - 1 + 3 - Label + Model - 2 + 1 - Size + Vendor - 3 + 4 @@ -10484,7 +10516,7 @@ separately into the selected partition. - 4 + 2 @@ -11942,33 +11974,33 @@ separately into the selected partition. - Description + Size - 1 + 3 - Label + Model - 2 + 1 - Size + Vendor - 3 + 4 @@ -11979,7 +12011,7 @@ separately into the selected partition. - 4 + 2 @@ -12137,7 +12169,7 @@ separately into the selected partition. - True + False True 2 @@ -12400,33 +12432,33 @@ separately into the selected partition. - Description + Size - 1 + 3 - Label + Model - 2 + 1 - Size + Vendor - 3 + 4 @@ -12437,7 +12469,7 @@ separately into the selected partition. - 4 + 2 @@ -12851,33 +12883,33 @@ separately into the selected partition. - Description + Size - 1 + 3 - Label + Model - 2 + 1 - Size + Vendor - 3 + 4 @@ -12888,7 +12920,7 @@ separately into the selected partition. - 4 + 2 @@ -13704,33 +13736,33 @@ separately into the selected partition. - Description + Size - 1 + 3 - Label + Model - 2 + 1 - Size + Vendor - 3 + 4 @@ -13741,7 +13773,7 @@ separately into the selected partition. - 4 + 2 @@ -14699,6 +14731,13 @@ separately into the selected partition. + + + + + + + @@ -14737,12 +14776,6 @@ separately into the selected partition. - - - - - - diff --git a/ubinstall-gtk_ru.po b/ubinstall-gtk_ru.po index 1c89b56..0d956ab 100644 --- a/ubinstall-gtk_ru.po +++ b/ubinstall-gtk_ru.po @@ -613,7 +613,7 @@ msgstr "Загрузить" msgid "Installer configuration has been finished" msgstr "Настройка конфигурации завершена" -msgid "Choose a save option on the header bar" +msgid "You can now proceed to saving the settings" msgstr "Выберите опцию сохранения на верхней панели" #, fuzzy