diff --git a/locale/ubinstall-gtk_ru.po b/locale/ubinstall-gtk_ru.po index 36b0968..86af129 100644 --- a/locale/ubinstall-gtk_ru.po +++ b/locale/ubinstall-gtk_ru.po @@ -1179,11 +1179,11 @@ msgstr "ISO-образ" #: source/ubl-strings.h:330 msgid "Account name:" -msgstr "Имя Вашей учётной записи:" +msgstr "Имя учётной записи:" #: source/ubl-strings.h:331 msgid "Login:" -msgstr "Логин для входа в систему:" +msgstr "Логин входа в систему:" #: source/ubl-strings.h:332 msgid "Password:" diff --git a/source/ubinstall-gtk-components.c b/source/ubinstall-gtk-components.c index 31b59da..94c5416 100644 --- a/source/ubinstall-gtk-components.c +++ b/source/ubinstall-gtk-components.c @@ -466,6 +466,7 @@ gboolean yon_software_insert(struct row_data *row_input){ } void yon_software_init(main_window *widgets){ + on_status_update(NULL,widgets); if (!main_config.configure_mode){ yon_config_update_by_args(packages_parameter,NULL); } @@ -538,6 +539,7 @@ int yon_pacman_software_save(main_window *widgets){ } void yon_pacman_init(main_window *widgets){ + on_status_update(NULL,widgets); if (!main_config.configure_mode){ yon_config_update_by_args(packages_parameter,NULL); } diff --git a/source/ubinstall-gtk-packages.c b/source/ubinstall-gtk-packages.c index 3f5352b..64a7e5f 100644 --- a/source/ubinstall-gtk-packages.c +++ b/source/ubinstall-gtk-packages.c @@ -63,6 +63,7 @@ GtkTreeIter *yon_subcategory_check(GtkTreeStore *target, GtkTreeIter *parent_ite } void yon_packages_tab_init(main_window *widgets){ + on_status_update(NULL,widgets); if (!main_config.configure_mode){ yon_config_update_by_args(packages_parameter,NULL); } diff --git a/source/ubinstall-gtk-users.c b/source/ubinstall-gtk-users.c index df8239c..b37f046 100644 --- a/source/ubinstall-gtk-users.c +++ b/source/ubinstall-gtk-users.c @@ -21,17 +21,22 @@ int yon_users_save(main_window *widgets){ GList *users = gtk_container_get_children(GTK_CONTAINER(widgets->UserAddBox)); GList *iter; - for (iter=users;iter;iter=iter->next){ - yon_user_struct *user = g_object_get_data(G_OBJECT(iter->data),"yon_user_struct"); - if (user){ - if (!yon_user_save(user)){ - yon_ubl_status_box_spawn(GTK_CONTAINER(main_config.status_box),_EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); - - return 0; + if (!users){ + yon_config_register(DEFAULTUSER_parameter,DEFAULTUSER_parameter_command,"root"); + } else { + for (iter=users;iter;iter=iter->next){ + yon_user_struct *user = g_object_get_data(G_OBJECT(iter->data),"yon_user_struct"); + if (user){ + if (!yon_user_save(user)){ + yon_ubl_status_box_spawn(GTK_CONTAINER(main_config.status_box),_EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); + + return 0; + } } } - } + yon_config_remove_by_args(DEFAULTUSER_parameter,NULL); + } if (!main_config.configure_mode){ int users_size; config_str users = yon_config_get_all_keys_by_key(USERADD_parameter_search,&users_size); @@ -182,13 +187,22 @@ void yon_user_init(main_window *widgets){ int users_size; config_str users = yon_config_get_all_by_key(USERADD_parameter_search,&users_size); if (!users_size){ + char *default_user = config(DEFAULTUSER_parameter); + char *default_passwd = config(DEFAULTPASSWD_parameter); yon_user_struct *user = yon_user_struct_new(); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(user->AdminCheck),1); g_signal_connect(G_OBJECT(user->AdminCheck),"clicked",G_CALLBACK(yon_user_admin_check),widgets); g_object_set_data(G_OBJECT(user->MainBox),"widgets",widgets); gtk_box_pack_start(GTK_BOX(widgets->UserAddBox),user->MainBox,0,0,0); gtk_entry_set_text(GTK_ENTRY(user->UsernameEntry),ADMINISTRATOR_LABEL); - gtk_entry_set_text(GTK_ENTRY(user->LoginEntry),"superadmin"); + if (!yon_char_is_empty(default_user)) + gtk_entry_set_text(GTK_ENTRY(user->LoginEntry),default_user); + else { + gtk_entry_set_text(GTK_ENTRY(user->LoginEntry),ADMINISTRATOR_LABEL); + } + if (!yon_char_is_empty(default_passwd)) + gtk_entry_set_text(GTK_ENTRY(user->PasswordEntry),default_passwd); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(user->AdminCheck),1); } for (int i=0;iKernelPacmanStatusImage),inactive_icon_path,GTK_ICON_SIZE_BUTTON); gtk_image_set_from_icon_name(GTK_IMAGE(widgets->KernelAddonPacmanStatusImage),inactive_icon_path,GTK_ICON_SIZE_BUTTON); gtk_image_set_from_icon_name(GTK_IMAGE(widgets->PacmanSoftwareStatusImage),inactive_icon_path,GTK_ICON_SIZE_BUTTON); + gtk_image_set_from_icon_name(GTK_IMAGE(widgets->AdditionalComponentsStatusImage),inactive_icon_path,GTK_ICON_SIZE_BUTTON); + gtk_image_set_from_icon_name(GTK_IMAGE(widgets->PackagesStatusImage),inactive_icon_path,GTK_ICON_SIZE_BUTTON); gtk_label_set_text(GTK_LABEL(widgets->KernelPacmanStatusLabel),UNACCESSED_LABEL); gtk_label_set_text(GTK_LABEL(widgets->PacmanSoftwareStatusLabel),UNACCESSED_LABEL); gtk_label_set_text(GTK_LABEL(widgets->KernelAddonPacmanStatusLabel),UNACCESSED_LABEL); + gtk_label_set_text(GTK_LABEL(widgets->AdditionalComponentsStatusLabel),UNACCESSED_LABEL); + gtk_label_set_text(GTK_LABEL(widgets->PackagesStatusLabel),UNACCESSED_LABEL); } else { gtk_image_set_from_icon_name(GTK_IMAGE(widgets->KernelPacmanStatusImage),active_icon_path,GTK_ICON_SIZE_BUTTON); gtk_image_set_from_icon_name(GTK_IMAGE(widgets->KernelAddonPacmanStatusImage),active_icon_path,GTK_ICON_SIZE_BUTTON); gtk_image_set_from_icon_name(GTK_IMAGE(widgets->PacmanSoftwareStatusImage),active_icon_path,GTK_ICON_SIZE_BUTTON); + gtk_image_set_from_icon_name(GTK_IMAGE(widgets->AdditionalComponentsStatusImage),active_icon_path,GTK_ICON_SIZE_BUTTON); + gtk_image_set_from_icon_name(GTK_IMAGE(widgets->PackagesStatusImage),active_icon_path,GTK_ICON_SIZE_BUTTON); gtk_label_set_text(GTK_LABEL(widgets->KernelPacmanStatusLabel),ACCESSED_LABEL); gtk_label_set_text(GTK_LABEL(widgets->PacmanSoftwareStatusLabel),ACCESSED_LABEL); gtk_label_set_text(GTK_LABEL(widgets->KernelAddonPacmanStatusLabel),ACCESSED_LABEL); + gtk_label_set_text(GTK_LABEL(widgets->AdditionalComponentsStatusLabel),ACCESSED_LABEL); + gtk_label_set_text(GTK_LABEL(widgets->PackagesStatusLabel),ACCESSED_LABEL); } } @@ -516,6 +524,9 @@ void yon_main_window_create(main_window *widgets){ widgets->KeyboardScrollLockSwitch = yon_gtk_builder_get_widget(builder,"KeyboardScrollLockSwitch"); widgets->KeyboardNumLockCombo = yon_gtk_builder_get_widget(builder,"KeyboardNumLockCombo"); + widgets->AdditionalComponentsStatusImage = yon_gtk_builder_get_widget(builder,"AdditionalComponentsStatusImage"); + widgets->AdditionalComponentsStatusLabel = yon_gtk_builder_get_widget(builder,"AdditionalComponentsStatusLabel"); + widgets->AdditionalComponentsStatusButton = yon_gtk_builder_get_widget(builder,"AdditionalComponentsStatusButton"); widgets->AdditionalComponentsList = yon_gtk_builder_get_widget(builder,"AdditionalComponentsList"); widgets->AdditionalComponentsOverallSizeLabel = yon_gtk_builder_get_widget(builder,"AdditionalComponentsOverallSizeLabel"); widgets->AdditionalComponentsUncheckAllCheck = yon_gtk_builder_get_widget(builder,"AdditionalComponentsUncheckAllCheck"); @@ -608,6 +619,9 @@ void yon_main_window_create(main_window *widgets){ widgets->AutoHostnameCheck=yon_gtk_builder_get_widget(builder,"AutoHostnameCheck"); widgets->AdvancedVirtualDeviceLabel = yon_gtk_builder_get_widget(builder,"AdvancedVirtualDeviceLabel"); + widgets->PackagesStatusImage = yon_gtk_builder_get_widget(builder,"PackagesStatusImage"); + widgets->PackagesStatusLabel = yon_gtk_builder_get_widget(builder,"PackagesStatusLabel"); + widgets->PackagesStatusButton = yon_gtk_builder_get_widget(builder,"PackagesStatusButton"); widgets->PackagesTree = yon_gtk_builder_get_widget(builder,"PackagesTree"); widgets->PackagesChosenCell = GTK_CELL_RENDERER(gtk_builder_get_object(builder,"PackagesChosenCell")); widgets->PackagesList = GTK_TREE_STORE(gtk_builder_get_object(builder,"Packages")); @@ -645,6 +659,8 @@ void yon_main_window_create(main_window *widgets){ g_signal_connect(G_OBJECT(widgets->LoadLocalConfigurationMenuItem),"activate",G_CALLBACK(on_config_local_load),widgets); g_signal_connect(G_OBJECT(widgets->LoadExternalConfigurationMenuItem),"activate",G_CALLBACK(on_config_custom_load),widgets); + g_signal_connect(G_OBJECT(widgets->PackagesStatusButton),"clicked",G_CALLBACK(on_status_update),widgets); + g_signal_connect(G_OBJECT(widgets->AdditionalComponentsStatusButton),"clicked",G_CALLBACK(on_status_update),widgets); g_signal_connect(G_OBJECT(widgets->KernelPacmanStatusButton),"clicked",G_CALLBACK(on_status_update),widgets); g_signal_connect(G_OBJECT(widgets->KernelAddonPacmanStatusButton),"clicked",G_CALLBACK(on_status_update),widgets); g_signal_connect(G_OBJECT(widgets->PacmanSoftwareStatusButton),"clicked",G_CALLBACK(on_status_update),widgets); diff --git a/source/ubinstall-gtk.h b/source/ubinstall-gtk.h index d50b76c..a9a9c41 100755 --- a/source/ubinstall-gtk.h +++ b/source/ubinstall-gtk.h @@ -267,6 +267,10 @@ layout && /description:/ {\ #define finish_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[finish]" #define admuid_parameter "ADMUID" #define admuid_parameter_command "ubconfig --source global get [users] ADMUID" +#define DEFAULTUSER_parameter "AUTOINSTALL[ubconfig set [users] DEFAULTUSER]" +#define DEFAULTUSER_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL['ubconfig set [users] DEFAULTUSER']" +#define DEFAULTPASSWD_parameter "AUTOINSTALL[ubconfig set [users] DEFAULTPASSWD]" +#define DEFAULTPASSWD_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL['ubconfig set [users] DEFAULTPASSWD']" #define SYSTEM_LANG_parameter "AUTOINSTALL['ubconfig set [locale] LANG']" #define SYSTEM_LANG_parameter_command "ubconfig --source global get autoinstall AUTOINSTALL['ubconfig set [locale] LANG']" @@ -628,6 +632,9 @@ typedef struct GtkWidget *AboutMenuItem; GtkWidget *DocumentationMenuItem; + GtkWidget *AdditionalComponentsStatusImage; + GtkWidget *AdditionalComponentsStatusLabel; + GtkWidget *AdditionalComponentsStatusButton; GtkWidget *AdditionalComponentsList; GtkWidget *AdditionalComponentsOverallSizeLabel; GtkWidget *AdditionalComponentsUncheckAllCheck; @@ -801,6 +808,9 @@ typedef struct GtkWidget *PrevInstallationSliderImage; GtkWidget *NextInstallationSliderImage; + GtkWidget *PackagesStatusImage; + GtkWidget *PackagesStatusLabel; + GtkWidget *PackagesStatusButton; GtkTreeStore *PackagesList; GtkCellRenderer *PackagesChosenCell; GtkWidget *PackagesTree; diff --git a/source/ubl-strings.h b/source/ubl-strings.h index 3d93fd7..2649b8b 100644 --- a/source/ubl-strings.h +++ b/source/ubl-strings.h @@ -151,8 +151,8 @@ NULL) #define CONFIGURATION_SAVE_LABEL _("You can safely exit configurator or return and create new configuration file.") #define SCROLL_TO_END_LABEL _("Scroll to the end") -#define ADMINISTRATOR_LABEL _("Empty default user") -// #define ADMINISTRATOR_LABEL _("Administrator") +// #define ADMINISTRATOR_LABEL _("Empty default user") +#define ADMINISTRATOR_LABEL _("Administrator") #define DEFAULT_LOCALES_LABEL _("English, U.S.A.; Russian, Russia") #define READ_INSTALL_LOG_LABEL _("Read installation log") diff --git a/ubinstall-gtk-log-view.glade b/ubinstall-gtk-log-view.glade index cc26655..4b6fc21 100644 --- a/ubinstall-gtk-log-view.glade +++ b/ubinstall-gtk-log-view.glade @@ -76,6 +76,7 @@ True True + False diff --git a/ubinstall-gtk.glade b/ubinstall-gtk.glade index 402dced..57d060a 100644 --- a/ubinstall-gtk.glade +++ b/ubinstall-gtk.glade @@ -602,6 +602,16 @@ False com.ublinux.libublsettingsui-gtk3.sync-symbolic + + True + False + com.ublinux.libublsettingsui-gtk3.sync-symbolic + + + True + False + com.ublinux.libublsettingsui-gtk3.sync-symbolic + True False @@ -3381,6 +3391,72 @@ Select a different installation source. 0 + + + True + False + 5 + + + True + False + Repository status: + + + False + True + 0 + + + + + True + False + + + + False + True + 1 + + + + + True + False + Accessed + + + False + True + 2 + + + + + True + True + True + image46 + + + + False + True + 3 + + + + + False + True + 1 + + True @@ -3442,7 +3518,7 @@ Select a different installation source. True True - 1 + 2 @@ -3509,7 +3585,7 @@ Select a different installation source. False True - 2 + 3 @@ -7265,6 +7341,72 @@ Select a different installation source. 0 + + + True + False + 5 + + + True + False + Repository status: + + + False + True + 0 + + + + + True + False + + + + False + True + 1 + + + + + True + False + Accessed + + + False + True + 2 + + + + + True + True + True + image47 + + + + False + True + 3 + + + + + False + True + 1 + + True @@ -8655,6 +8797,9 @@ or continue working in the system Live environment. True DevicesList 0 + + + Device @@ -8755,6 +8900,9 @@ or continue working in the system Live environment. True PartitionsList 0 + + + Section @@ -9413,6 +9561,9 @@ or continue working in the system Live environment. True DevicesList 0 + + + Device @@ -9513,6 +9664,9 @@ or continue working in the system Live environment. True PartitionsList 0 + + + Section @@ -10159,95 +10313,86 @@ separately into the selected partition. - + True - False - 0 + True in + 50 - + + 125 True - False + True + DevicesList + 0 - - 125 - True - True - DevicesList - 0 + - - - - + + 6 5 - - - + + + + + + Device - - Device - - - + + 0 - - - + + + + + + Description - - Description - - - + + 1 - - - + + + + + + Label - - Label - - - + + 2 - - - + + + + + + Size - - Size - - - + + 3 - - - + + + + + + Serial - - Serial - - - + + 4 - - - + - - - True @@ -10285,7 +10430,7 @@ separately into the selected partition. True True in - 128 + 50 125 @@ -10293,6 +10438,9 @@ separately into the selected partition. True PartitionsList 0 + + + @@ -11180,6 +11328,7 @@ separately into the selected partition. True False Installing the GRUB bootloader into the MBR or EFI partition + True 0 @@ -11258,6 +11407,7 @@ separately into the selected partition. True False Update (reinstall) the GRUB bootloader + True 0 @@ -11336,6 +11486,7 @@ separately into the selected partition. True False Restore missing or corrupted system files. Users data is not affected + True 0 @@ -11414,6 +11565,7 @@ separately into the selected partition. True False Installing only user data without OS components + True 0 @@ -11680,6 +11832,9 @@ separately into the selected partition. True DevicesList 0 + + + Device @@ -11780,6 +11935,9 @@ separately into the selected partition. True PartitionsList 0 + + + Section @@ -12134,6 +12292,9 @@ separately into the selected partition. True DevicesList 0 + + + Device @@ -12234,6 +12395,9 @@ separately into the selected partition. True PartitionsList 0 + + + Section @@ -12326,7 +12490,7 @@ separately into the selected partition. - False + True True 1 @@ -12581,6 +12745,9 @@ separately into the selected partition. True DevicesList 0 + + + Device @@ -13348,291 +13515,299 @@ separately into the selected partition. vertical 5 - + + 309 True - False + True vertical - 5 + 165 + True + True True False + vertical 5 - + True False - Select device: - 0 - - - False - True - 0 - - - - - True - True - True - image12 - + 5 + + + True + False + Select device: + 0 + + + False + True + 0 + + + + + True + True + True + image12 + + + + False + True + end + 1 + + + + + True + True + True + image42 + + + + False + True + end + 2 + + False True - end 1 - - True - True - True - image42 - - - - False - True - end - 2 - - - - - False - True - 1 - - - - - True - True - in - 128 - - + True True - DevicesList - 0 - - - + in + 50 - - Device + + True + True + DevicesList + 0 - - - 0 - + + Device + + + + 0 + + + - - - - - Description - - - 1 - + + Description + + + + 1 + + + - - - - - Label - - - 2 - + + Label + + + + 2 + + + - - - - - Size - - - 3 - + + Size + + + + 3 + + + - - - - - Serial - - - 4 - + + Serial + + + + 4 + + + + + True + True + 2 + - False - True - 2 + True + False - - - False - True - 0 - - - - - True - False - vertical - + True False - Select partiton: - 0 - - - False - True - 0 - - - - - True - True - in - 128 + vertical + + + True + False + Select partiton: + 0 + + + False + True + 0 + + - + True True - PartitionsList - 0 - - - + in + 50 - - Section + + True + True + PartitionsList + 0 - - - 0 - + + Section + + + + 0 + + + - - - - - File system - - - 3 - + + File system + + + + 3 + + + - - - - - Label - - - 4 - + + Label + + + + 4 + + + - - - - - File system label - - - 10 - + + File system label + + + + 10 + + + - - - - - Size - - - 1 - + + Size + + + + 1 + + + - - - - - Free (%) - - - 2 - + + Free (%) + + + + 2 + + + - - - - - Flags - - - 11 - + + Flags + + + + 11 + + + - - - - - Mount point - - - 9 - + + Mount point + + + + 9 + + + + + True + True + 1 + - False - True - 1 + True + True False True - 1 + 2 @@ -14045,7 +14220,7 @@ separately into the selected partition. False True - 2 + 3