diff --git a/locale/ubinstall-gtk.pot b/locale/ubinstall-gtk.pot index 7629e5a..34a5dfa 100644 --- a/locale/ubinstall-gtk.pot +++ b/locale/ubinstall-gtk.pot @@ -1085,6 +1085,10 @@ msgstr "" msgid "Edit user" msgstr "" +#: source/ubl-strings.h:308 +msgid "Edit application" +msgstr "Редактировать приложение" + #: source/ubl-strings.h:308 msgid "You are about to delete bootloader user" msgstr "" diff --git a/locale/ubinstall-gtk_ru.po b/locale/ubinstall-gtk_ru.po index b4c473b..37bd888 100644 --- a/locale/ubinstall-gtk_ru.po +++ b/locale/ubinstall-gtk_ru.po @@ -1101,6 +1101,10 @@ msgstr "Добавить пользователя" msgid "Edit user" msgstr "Редактировать пользователя" +#: source/ubl-strings.h:308 +msgid "Edit application" +msgstr "Редактировать приложение" + #: source/ubl-strings.h:308 msgid "You are about to delete bootloader user" msgstr "Вы собираетесь удалить пользователя загрузчика" diff --git a/source/ubinstall-gtk-installation.c b/source/ubinstall-gtk-installation.c index ec8342a..23abf14 100644 --- a/source/ubinstall-gtk-installation.c +++ b/source/ubinstall-gtk-installation.c @@ -132,7 +132,7 @@ int yon_install_same_partition_save(main_window *widgets){ yon_config_register(part_parameter,part_parameter_command,part); if (gtk_switch_get_active(GTK_SWITCH(widgets->SameInstallationFormatSwitch))){ - yon_config_register(part_format_parameter,part_format_parameter_command,"no"); + yon_config_register(part_format_parameter,part_format_parameter_command,"yes"); char *device_name = (char*)gtk_entry_get_text(GTK_ENTRY(widgets->SameInstallationSectionNameEntry)); if (!yon_char_is_empty(device_name)){ yon_config_register(part_label_parameter,part_label_parameter_command,device_name); @@ -148,7 +148,7 @@ int yon_install_same_partition_save(main_window *widgets){ } } else { - yon_config_register(part_format_parameter,part_format_parameter_command,"yes"); + yon_config_register(part_format_parameter,part_format_parameter_command,"no"); yon_config_remove_by_key(part_label_parameter); yon_config_remove_by_key(part_format_parameter); yon_config_remove_by_key(part_fs_type_parameter); @@ -317,7 +317,11 @@ void yon_userdata_password_open(GtkWidget *, main_window *widgets){ void yon_install_init(main_window *widgets, enum YON_PAGES page){ if (!main_config.configure_mode){ - yon_config_update_by_args(main_config.config_load_path, AUTOINSTALL_TYPE_INSTALL,device_parameter,part_label_parameter,part_fs_type_parameter,NULL); + yon_config_update_by_args(main_config.config_load_path, AUTOINSTALL_TYPE_INSTALL, + device_parameter,part_label_parameter,part_fs_type_parameter, + part_format_parameter,part_fs_label_parameter,part_parameter, + part_size_parameter,part_crypt_parameter, + NULL); } yon_devices_setup(widgets); diff --git a/source/ubinstall-gtk-keyboard.c b/source/ubinstall-gtk-keyboard.c index 11e8206..7a55944 100644 --- a/source/ubinstall-gtk-keyboard.c +++ b/source/ubinstall-gtk-keyboard.c @@ -48,7 +48,7 @@ int yon_keyboard_save(main_window *widgets){ yon_config_remove_by_key(num_lock_boot_parameter); } if (!main_config.configure_mode){ - yon_debug_output("%s\n",yon_config_save_args_simple(main_config.config_load_path,xkbmodel_parameter,num_lock_boot_parameter,NULL)); + yon_debug_output("%s\n",yon_config_save_args_simple(main_config.config_load_path,xkblayout_parameter,xkbmodel_parameter,num_lock_boot_parameter,NULL)); } on_options_save(NULL,widgets); return 1; diff --git a/source/ubinstall-gtk-page-switch.c b/source/ubinstall-gtk-page-switch.c index 601d35b..6ee374d 100644 --- a/source/ubinstall-gtk-page-switch.c +++ b/source/ubinstall-gtk-page-switch.c @@ -335,7 +335,8 @@ int yon_page_save(main_window *widgets, enum YON_PAGES page){ break; case YON_PAGE_INSTALLATION_BEGIN: yon_installation_start(widgets); - [[fallthrough]]; + // [[fallthrough]]; + break; case YON_PAGE_CONFIGURE_END: int status = yon_config_save(widgets); if (status){ diff --git a/source/ubinstall-gtk-saving.c b/source/ubinstall-gtk-saving.c index 413e73e..d196c5c 100644 --- a/source/ubinstall-gtk-saving.c +++ b/source/ubinstall-gtk-saving.c @@ -159,40 +159,9 @@ enum INSTALL_TYPE yon_ubl_get_install_mode(){ void *on_config_save(void *data){ main_window *widgets = (main_window*)data; - int size=0; - config_str parameters = NULL; - enum INSTALL_TYPE install_mode = yon_ubl_get_install_mode(); - switch(install_mode){ - case INSTALL_COMMON: - parameters = yon_config_get_selection_by_key_no_ignored(&size,install_common_parameters,modules_parameter,NULL); - break; - case INSTALL_PART: - parameters = yon_config_get_selection_by_key_no_ignored(&size,install_part_parameters,modules_parameter,NULL); - break; - case INSTALL_NEXT: - parameters = yon_config_get_selection_by_key_no_ignored(&size,install_next_parameters,modules_parameter,NULL); - break; - case INSTALL_ADVANCED: - parameters = yon_config_get_selection_by_key_no_ignored(&size,install_advanced_parameters,modules_parameter,NULL); - break; - case INSTALL_GRUB_INSTALL: - case INSTALL_GRUB_UPDATE: - parameters = yon_config_get_selection_by_key_no_ignored(&size,install_grub_install_update_parameters,NULL); - break; - case INSTALL_SYSTEM_ONLY: - parameters = yon_config_get_selection_by_key_no_ignored(&size,install_system_only_parameters,NULL); - break; - case INSTALL_USER_ONLY: - parameters = yon_config_get_selection_by_key_no_ignored(&size,install_userdata_only_parameters,NULL); - break; - default: - yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),ERROR_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); - return 0; - } g_idle_add((GSourceFunc)yon_progress_bar_start,widgets); if (!main_config.dry_run){ - char *command = yon_debug_output("%s\n",save_config_command(yon_char_parsed_to_string(parameters,size," "))); - yon_char_parsed_free(parameters,size); + 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))){ @@ -300,7 +269,7 @@ void *on_setup_system_configuration(void * data){ if (!main_config.dry_run){ char *parameter_string = yon_char_parsed_to_string(all_parameters,size," "); - char *command = set_user_config_command(parameter_string); + char *command = set_user_config_command; // if (main_config.debug_mode){ // yon_launch(ubinstall_dry_run_command); // } diff --git a/source/ubinstall-gtk-startup-apps.c b/source/ubinstall-gtk-startup-apps.c index 1146f2f..9549a1b 100644 --- a/source/ubinstall-gtk-startup-apps.c +++ b/source/ubinstall-gtk-startup-apps.c @@ -57,7 +57,7 @@ void yon_startup_apps_init(main_window *widgets){ config_str parsed = yon_char_parse(apps_ret[i],&parsed_size,";"); if (parsed_size&&!yon_char_is_empty(parsed[0])){ gtk_list_store_append(widgets->StartupAppsList,&iter); - gtk_list_store_set(widgets->StartupAppsList,&iter,0,0,1,parsed[0],2,yon_char_return_if_exist(parsed[1],""),3,yon_char_return_if_exist(_(parsed[2]),""),-1); + gtk_list_store_set(widgets->StartupAppsList,&iter,0,0,1,parsed[1],2,yon_char_return_if_exist(parsed[0],""),3,yon_char_return_if_exist(_(parsed[2]),""),-1); } } diff --git a/source/ubinstall-gtk-users.c b/source/ubinstall-gtk-users.c index 94c7d0e..a2e6d09 100644 --- a/source/ubinstall-gtk-users.c +++ b/source/ubinstall-gtk-users.c @@ -84,12 +84,6 @@ int yon_user_save(yon_user_struct *user){ yon_ubl_status_highlight_incorrect(user->PasswordEntry); return 0; } - } else { - char *default_passwd = config(DEFAULTPASSWD_parameter); - if (yon_char_is_empty(default_passwd)){ - default_passwd = config(DEFAULTPASSWD_system_parameter); - } - password = default_passwd; } char *admin_uid = NULL; if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(user->AdminCheck))){ @@ -210,16 +204,17 @@ void yon_user_init(main_window *widgets){ gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(widgets->UserRootPasswordCombo),NULL,DEFAULT_LABEL); gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(widgets->UserRootPasswordCombo),NULL,SET_PASSWORD_LABEL); char *root_password = config(root_password_parameter); - if (yon_char_is_empty(root_password)){ - root_password = config(DEFAULTROOTPASSWD_system_parameter); - } + // if (yon_char_is_empty(root_password)){ + // root_password = config(DEFAULTROOTPASSWD_system_parameter); + // } char *autologin = config(autologin_parameter); if (!yon_char_is_empty(root_password)&&strcmp(root_password,config(DEFAULTROOTPASSWD_system_parameter))){ gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->UserRootPasswordCombo),1); gtk_entry_set_text(GTK_ENTRY(widgets->UserRootPasswordEntry),root_password); } else { gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->UserRootPasswordCombo),0); - gtk_entry_set_text(GTK_ENTRY(widgets->UserRootPasswordEntry),root_password); + gtk_entry_set_placeholder_text(GTK_ENTRY(widgets->UserRootPasswordEntry),root_password); + } if (!yon_char_is_empty(autologin)&&(!strcmp(autologin,"yes")||!strcmp(autologin,"enable"))){ gtk_switch_set_active(GTK_SWITCH(widgets->UserAutologinSwitch),1); @@ -260,13 +255,13 @@ void yon_user_init(main_window *widgets){ gtk_entry_set_text(GTK_ENTRY(user->LoginEntry),"superadmin"); } user->changed=1; - if (!yon_char_is_empty(default_passwd)) + if (!yon_char_is_empty(default_passwd)&&strcmp(default_passwd,config(DEFAULTPASSWD_system_parameter))){ gtk_entry_set_text(GTK_ENTRY(user->PasswordEntry),default_passwd); - // if (!yon_char_is_empty(def_usr)&& !strcmp(def_usr,default_user)){ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(user->AdminCheck),1); - // } else { - // gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(user->AdminCheck),strcmp(addadm,"yes")); - // } + } else { + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(user->AdminCheck),0); + gtk_entry_set_placeholder_text(GTK_ENTRY(widgets->UserRootPasswordEntry),default_passwd); + } } } for (int i=0;iPasswordEntry),parsed[5]); gtk_combo_box_set_active(GTK_COMBO_BOX(user->PasswordCombo),1); - } else { - gtk_entry_set_text(GTK_ENTRY(user->PasswordEntry),default_passwd); - gtk_combo_box_set_active(GTK_COMBO_BOX(user->PasswordCombo),0); } } if (parsed_size>1){ diff --git a/source/ubinstall-gtk.h b/source/ubinstall-gtk.h index 00b4d86..fbe142a 100755 --- a/source/ubinstall-gtk.h +++ b/source/ubinstall-gtk.h @@ -287,10 +287,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(parameters) yon_char_unite("ubconfig --target system set [autoinstall] AUTOINSTALL[log]=yes ", parameters, "; nice ubinstall autoinstall",main_config.debug_mode?" --debug":""," --noautoconfig --noinstall_extra", NULL) +#define save_config_command yon_char_unite("nice ubinstall autoinstall",main_config.debug_mode?" --debug":""," --noautoconfig --noinstall_extra", NULL) #define quick_install_command(path) yon_char_unite("nice ubinstall autoinstall",main_config.debug_mode?" --debug":""," --config='",path,"' --noautoconfig --noinstall_extra", NULL) -#define set_user_config_command(parameters) yon_char_unite("ubconfig --target system set [autoinstall] ", parameters, ";nice ubinstall autoconfig",main_config.debug_mode?" --debug":""," install_extra", 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 get_default_password_command "ubconfig --raw --conarg --source default get [users] NOSECUREROOTPASSWD"