diff --git a/locale/ubinstall-gtk.pot b/locale/ubinstall-gtk.pot index 608a5bb..cb0e8ea 100644 --- a/locale/ubinstall-gtk.pot +++ b/locale/ubinstall-gtk.pot @@ -1302,4 +1302,12 @@ msgstr "" #: source/ubl-strings.h:20 msgid "Remove locale" +msgstr "" + +#: source/ubl-strings.h:20 +msgid "New partition:" +msgstr "" + +#: source/ubl-strings.h:20 +msgid "Attention! The selected partition will be reduced and the next new partition will be created. The data will be saved in the selected partition. The new partition will be formatted." msgstr "" \ No newline at end of file diff --git a/locale/ubinstall-gtk_ru.po b/locale/ubinstall-gtk_ru.po index c690083..d7393e2 100644 --- a/locale/ubinstall-gtk_ru.po +++ b/locale/ubinstall-gtk_ru.po @@ -3144,4 +3144,12 @@ msgstr "Укажите предпочитаемый язык системы" #: source/ubl-strings.h:20 msgid "Remove locale" -msgstr "Удалить локаль" \ No newline at end of file +msgstr "Удалить локаль" + +#: source/ubl-strings.h:20 +msgid "New partition:" +msgstr "Новый раздел:" + +#: source/ubl-strings.h:20 +msgid "Attention! The selected partition will be reduced and the next new partition will be created. The data will be saved in the selected partition. The new partition will be formatted." +msgstr "Внимание! Выбранный раздел будет уменьшен и будет создан следующий новый раздел. На выбранном разделе данные будут сохранены. Новый раздел будет отформатирован." \ No newline at end of file diff --git a/source/ubinstall-gtk-advanced.c b/source/ubinstall-gtk-advanced.c index 2d87075..b5b4a89 100644 --- a/source/ubinstall-gtk-advanced.c +++ b/source/ubinstall-gtk-advanced.c @@ -119,7 +119,7 @@ void yon_advanced_partition_set_from_section(advanced_partition *part, advanced_ gtk_switch_set_active(GTK_SWITCH(part->FormatSwitch),1); if (section->size){ gtk_spin_button_set_value(GTK_SPIN_BUTTON(part->SizeSpin),section->size); - gtk_combo_box_set_active(GTK_COMBO_BOX(part->SizeCombo),yon_get_size_get_from_letter(section->size_letter)); + gtk_combo_box_set_active(GTK_COMBO_BOX(part->SizeCombo),yon_get_size_get_from_letter(section->size_letter)-1); } if (section->part_label){ gtk_entry_set_text(GTK_ENTRY(part->PartLabelEntry),section->part_label); diff --git a/source/ubinstall-gtk-installation.c b/source/ubinstall-gtk-installation.c index 802b662..ac6c95c 100644 --- a/source/ubinstall-gtk-installation.c +++ b/source/ubinstall-gtk-installation.c @@ -535,7 +535,7 @@ void yon_install_init(main_window *widgets, enum YON_PAGES page){ gtk_combo_box_set_active(GTK_COMBO_BOX(partition_encryption_combo),0); } char *format = config(part_format_parameter); - if ((!yon_char_is_empty(format)&&!strcmp(format,"yes"))||format_switch==widgets->CommonFormatSwitch){ + if ((!yon_char_is_empty(format)&&!strcmp(format,"yes"))||!gtk_widget_get_sensitive(format_switch)){ gtk_switch_set_active(GTK_SWITCH(format_switch),1); if (device_label){ char *parameter = config(part_label_parameter); @@ -550,7 +550,7 @@ void yon_install_init(main_window *widgets, enum YON_PAGES page){ char *parameter = config(part_size_parameter); if (!yon_char_is_empty(parameter)){ gtk_spin_button_set_value(GTK_SPIN_BUTTON(partition_size_spin),atol(parameter)); - gtk_combo_box_set_active(GTK_COMBO_BOX(partition_size_combo),yon_get_size_get_from_letter(parameter[strlen(parameter)-1])); + gtk_combo_box_set_active(GTK_COMBO_BOX(partition_size_combo),yon_get_size_get_from_letter(parameter[strlen(parameter)-1])-1); } else { gtk_spin_button_set_value(GTK_SPIN_BUTTON(partition_size_spin),0); gtk_combo_box_set_active(GTK_COMBO_BOX(partition_size_combo),0); @@ -586,7 +586,7 @@ void yon_install_init(main_window *widgets, enum YON_PAGES page){ gtk_entry_set_text(GTK_ENTRY(partition_encryption_entry),""); } } - } else { + } else if (gtk_widget_get_sensitive(format_switch)){ gtk_switch_set_active(GTK_SWITCH(format_switch),0); } } diff --git a/source/ubinstall-gtk-saving.c b/source/ubinstall-gtk-saving.c index 78c8281..165605a 100644 --- a/source/ubinstall-gtk-saving.c +++ b/source/ubinstall-gtk-saving.c @@ -1,52 +1,33 @@ #include "ubinstall-gtk.h" - - -// void _yon_saving_threaded(char *final_command){ -// FILE *file = popen(final_command,"r"); -// int file_save; -// config_str file_return = yon_config_load_file(file,&file_save); -// pclose(file); -// file_return = yon_char_parsed_append(file_return,&file_save,final_command); -// char *result = yon_char_parsed_to_string(file_return,file_save,""); -// yon_debug_output("%s\n",result); -// yon_char_parsed_free(file_return,file_save); -// free(result); -// } - void yon_config_save_proceed(char *path, YON_CONFIG_TYPE type){ yon_debug_output("%s\n",yon_config_save_simple(type,path)); } - -void yon_load_proceed(YON_CONFIG_TYPE type){ + +void yon_load_proceed(YON_CONFIG_TYPE type){ if (type!=YON_CONFIG_CUSTOM){ yon_config_clean(); - yon_config_load_config(YON_CONFIG_DEFAULT,yon_config_get_command(main_config.config_load_path),NULL); } - if (type==YON_CONFIG_GLOBAL){ - yon_config_load_config(type,yon_config_get_command(main_config.config_load_path),NULL); - } else if (type==YON_CONFIG_LOCAL){ - yon_config_load_config(type,yon_config_get_command(main_config.config_load_path),NULL); - } else if (type==YON_CONFIG_CUSTOM){ - textdomain(template_ui_LocaleName); - GtkWidget *dialog = yon_config_save_window_new(); - textdomain(LocaleName); - int response = gtk_dialog_run(GTK_DIALOG(dialog)); - if (response == GTK_RESPONSE_ACCEPT){ - char *file = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog)); - if (!yon_char_is_empty(file)){ - main_config.config_load_path=yon_char_new(file); + if (!yon_char_is_empty(config_get_default_command)) + yon_config_load_config(YON_CONFIG_DEFAULT,config_get_default_command,NULL); + switch (type){ + case YON_CONFIG_GLOBAL: + yon_config_load_config(type,config_get_command("global"),NULL); + break; + case YON_CONFIG_LOCAL: + yon_config_load_config(type,config_get_command("system"),NULL); + break; + case YON_CONFIG_CUSTOM: + char *path = NULL; + path=yon_custom_config_init(GTK_FILE_CHOOSER_ACTION_OPEN); + if (!yon_char_is_empty(path)){ yon_config_clean(); - if (!yon_char_is_empty(config_get_default_command)) - yon_config_load_config(YON_CONFIG_DEFAULT,config_get_default_command,NULL); - char *command = yon_config_get_command(main_config.config_load_path); - yon_config_load_config(type,command,NULL); - } - gtk_widget_destroy(dialog); - } else { - gtk_widget_destroy(dialog); - } - } + yon_config_load_config(type,config_get_command(path),NULL); + } + break; + default: + break; + } } void on_config_local_load(GtkWidget *,main_window *widgets){ @@ -83,7 +64,7 @@ void on_config_custom_load_last(GtkWidget *,main_window *widgets){ yon_config_clean(); if (!yon_char_is_empty(config_get_default_command)) yon_config_load_config(YON_CONFIG_DEFAULT,config_get_default_command,NULL); - char *command = yon_config_get_command(main_config.config_load_path); + char *command = config_get_command(main_config.config_load_path); yon_config_load_config(YON_CONFIG_CUSTOM,command,NULL); yon_page_init(widgets,gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->Notebook))); main_config.load_mode=YON_CONFIG_CUSTOM; @@ -106,372 +87,6 @@ void on_config_global_save(GtkWidget *,main_window *widgets){ } -// void on_config_custom_save(GtkWidget *, main_window *widgets){ -// char *path = NULL; -// GtkWidget *dialog = gtk_file_chooser_dialog_new(TITLE_LABEL,NULL,GTK_FILE_CHOOSER_ACTION_SAVE,CANCEL_LABEL,GTK_RESPONSE_CANCEL,SAVE_LABEL,GTK_RESPONSE_ACCEPT,NULL); -// textdomain(TITLE_LABEL); -// GtkFileFilter *filter = gtk_file_filter_new(); -// gtk_window_set_icon_name(GTK_WINDOW(dialog),yon_char_append("com.ublinux.",LocaleName)); -// gtk_file_filter_add_pattern(filter,"*.ini"); -// gtk_file_filter_set_name(filter, "*.ini"); -// gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog),filter); -// int response = gtk_dialog_run(GTK_DIALOG(dialog)); -// if (response == GTK_RESPONSE_ACCEPT){ -// char *file = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog)); -// if (!yon_char_is_empty(file)){ -// if (!strstr(file,".ini")) file = yon_char_append(file,".ini"); -// if (access(file,0)!=F_OK){ -// char *command_creation = ubconfig_file_create(file); -// int a = system(yon_debug_output("%s\n",command_creation)); -// if (access(file,0)!=F_OK||a){ -// yon_ubl_status_box_render(CUSTOM_CONFIG_CREATION_ERROR_LABEL,BACKGROUND_IMAGE_FAIL_TYPE); -// return; -// } -// } -// } -// path = yon_char_unite("'",file,"'",NULL); -// free(file); -// gtk_widget_destroy(dialog); -// } else { -// gtk_widget_destroy(dialog); -// return; -// } -// yon_save_proceed(path,YON_CONFIG_CUSTOM); -// if (path) free(path); -// gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_COMPLETED); -// } -// -// void yon_open_browser(GtkWidget *, char *link); -// void yon_open_browser(GtkWidget *, char *link){ -// GtkWidget *window = yon_ubl_browser_window_open(link,TITLE_LABEL); -// if (window) -// gtk_window_set_icon_name(GTK_WINDOW(window),yon_char_append("com.ublinux.",LocaleName)); -// } - -// void yon_interface_update(main_window *widgets){ -// if (widgets){}; -// enum YON_PAGES page=YON_PAGE_COMPLETED; -// char *type = config(AUTOINSTALL_TYPE_INSTALL); -// if (!yon_char_is_empty(type)){ -// if (!strcmp(type,"fast")){ -// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->InstallationRadio),1); -// page = YON_PAGE_INSTALL_COMMON; -// } else if (!strcmp(type,"next")){ -// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->InstallationNearRadio),1); -// page = YON_PAGE_INSTALL_SEPARATE; -// } else if (!strcmp(type,"part")){ -// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->InstallationLinuxRadio),1); -// page = YON_PAGE_INSTALL_SAME_PARTITION; -// } else if (!strcmp(type,"grub_install")){ -// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->InstallationWindowsRadio),1); -// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->GrubInstallRadio),1); -// page = YON_PAGE_OPTIONS_GRUB_INSTALL; -// } else if (!strcmp(type,"grub_update")){ -// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->InstallationWindowsRadio),1); -// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->GrubUpdateRadio),1); -// page = YON_PAGE_OPTIONS_GRUB_UPDATE; -// } else if (!strcmp(type,"system_only")){ -// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->InstallationWindowsRadio),1); -// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->OSRadio),1); -// page = YON_PAGE_OPTIONS_OS_ONLY; -// } else if (!strcmp(type,"data_only")){ -// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->InstallationWindowsRadio),1); -// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->UserDataOnlyRadio),1); -// page = YON_PAGE_OPTIONS_USRDATA_ONLY; -// } else if (!strcmp(type,"custom")){ -// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->InstallationWindowsRadio),1); -// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->SeparateRadio),1); -// page = YON_PAGE_OPTIONS_SEPARATE; -// } -// } -// char *device = config(AUTOINSTALL_DEVICE); -// char *part = NULL; -// if (page!=YON_PAGE_INSTALL_COMMON) -// part = config(part_parameter); -// char *fs_type = config(part_fs_type_parameter); -// char *device_label = config(device_label_parameter); -// char *format = config(part_format_parameter); -// char *part_size = config(part_size_parameter); -// GtkListStore *device_list = widgets->DevicesList; -// GtkListStore *part_list=widgets->PartitionsList; -// GtkWidget *device_tree=NULL; -// GtkWidget *part_tree=NULL; -// switch (page){ -// case YON_PAGE_INSTALL_COMMON:{ -// device_tree = widgets->CommonInstallationDevicesTree; -// } break; -// -// case YON_PAGE_INSTALL_SEPARATE:{ -// device_tree = widgets->NextInstallationSysDevicesTree; -// part_tree = widgets->NextInstallationSysSectionTree; -// if (!yon_char_is_empty(part_size)){ -// gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->NextInstallationSizeSpin),atof(part_size)); -// if (part_size[strlen(part_size)-1]=='M') gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->NextInstallationSizeTypeSpin),0); -// if (part_size[strlen(part_size)-1]=='G') gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->NextInstallationSizeTypeSpin),1); -// if (part_size[strlen(part_size)-1]=='T') gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->NextInstallationSizeTypeSpin),2); -// } -// if (format&&!strcmp(format,"yes")) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->NextInstallationFormatCheck),1); -// else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->NextInstallationFormatCheck),main_config.format_default); -// if (!yon_char_is_empty(fs_type)) -// gtk_combo_box_set_active_id(GTK_COMBO_BOX(widgets->NextInstallationFilesystemTypeCombo),fs_type); -// if (device_label) -// gtk_entry_set_text(GTK_ENTRY(widgets->NextInstallationSectionNameEntry),device_label); -// else -// gtk_entry_set_text(GTK_ENTRY(widgets->NextInstallationSectionNameEntry),""); -// -// } break; -// -// case YON_PAGE_INSTALL_SAME_PARTITION:{ -// device_tree = widgets->SamePlaceDeviceTree; -// part_tree = widgets->SamePlacePartTree; -// if (!yon_char_is_empty(fs_type)) -// gtk_combo_box_set_active_id(GTK_COMBO_BOX(widgets->SameInstallationFilesystemTypeCombo),fs_type); -// if (format&&!strcmp(format,"yes")) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->SameInstallationFormatCheck),1); -// else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->SameInstallationFormatCheck),main_config.format_default); -// if (device_label) -// gtk_entry_set_text(GTK_ENTRY(widgets->SameInstallationSectionNameEntry),device_label); -// else -// gtk_entry_set_text(GTK_ENTRY(widgets->SameInstallationSectionNameEntry),""); -// -// } break; -// case YON_PAGE_OPTIONS_GRUB_INSTALL:{ -// device_tree = widgets->GrubInstallDevicesTree; -// } break; -// -// case YON_PAGE_OPTIONS_GRUB_UPDATE:{ -// device_tree = widgets->GrubUpdateDevicesTree; -// } break; -// -// case YON_PAGE_OPTIONS_SEPARATE:{ -// GtkTreeIter iter; -// device_tree = widgets->SeparateDevicesTree; -// part_tree = widgets->SeparateSysSectionTree; -// for_iter(GTK_TREE_MODEL(device_list),&iter){ -// char *cur_device; -// gtk_tree_model_get(GTK_TREE_MODEL(device_list),&iter, 0,&cur_device,-1); -// if (!strcmp(cur_device,device)){ -// gtk_tree_selection_select_iter(gtk_tree_view_get_selection(GTK_TREE_VIEW(device_tree)),&iter); -// break; -// } -// } -// on_near_installation_device_changed(device_tree,widgets); -// for_iter(GTK_TREE_MODEL(part_list),&iter){ -// char *cur_part; -// gtk_tree_model_get(GTK_TREE_MODEL(device_list),&iter, 0,&cur_part,-1); -// if (!strcmp(cur_part,part)){ -// gtk_tree_selection_select_iter(gtk_tree_view_get_selection(GTK_TREE_VIEW(part_tree)),&iter); -// } -// } -// } break; -// -// case YON_PAGE_OPTIONS_OS_ONLY:{ -// device_tree = widgets->OSDevicesTree; -// part_tree = widgets->OSSysSectionTree; -// } break; -// -// case YON_PAGE_OPTIONS_USRDATA_ONLY:{ -// device_tree = widgets->UserdataDevicesTree; -// part_tree = widgets->UserdataSysSectionTree; -// } break; -// -// default:{}break; -// } -// GtkTreeIter iter; -// char *cur_device=""; -// if (page!=YON_PAGE_OPTIONS_SEPARATE && !yon_char_is_empty(device)){ -// for_iter (widgets->DevicesList,&iter){ -// gtk_tree_model_get(GTK_TREE_MODEL(widgets->DevicesList),&iter,0,&cur_device,-1); -// if (!strcmp(device,cur_device)){ -// gtk_tree_selection_select_iter(gtk_tree_view_get_selection(GTK_TREE_VIEW(device_tree)),&iter); -// break; -// } -// } -// on_near_installation_device_changed(device_tree,widgets); -// if (!yon_char_is_empty(part)){ -// for_iter (widgets->PartitionsList,&iter){ -// gtk_tree_model_get(GTK_TREE_MODEL(widgets->PartitionsList),&iter,0,&part,-1); -// if (!strcmp(device,cur_device)){ -// gtk_tree_selection_select_iter(gtk_tree_view_get_selection(GTK_TREE_VIEW(part_tree)),&iter); -// break; -// } -// } -// } -// } -// char *system_locale = config(locale_parameter); -// if (!yon_char_is_empty(system_locale)){ -// char *chosen_langs = ""; -// for_iter(widgets->LanguagesList,&iter){ -// char *cur=NULL, *render = NULL; -// gtk_tree_model_get(GTK_TREE_MODEL(widgets->LanguagesList),&iter,1,&render,2,&cur,-1); -// if (strstr(system_locale,cur)){ -// gtk_list_store_set((widgets->LanguagesList),&iter,0,1,-1); -// chosen_langs = yon_char_unite(chosen_langs,!yon_char_is_empty(chosen_langs)?";":"",render,NULL); -// } else { -// gtk_list_store_set((widgets->LanguagesList),&iter,0,0,-1); -// } -// } -// if (!yon_char_is_empty(chosen_langs)){ -// gtk_entry_set_text(GTK_ENTRY(widgets->AvailableLanguagesEntry),chosen_langs); -// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->LanguagesSensitiveCheck),1); -// free(chosen_langs); -// } else { -// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->LanguagesSensitiveCheck),0); -// gtk_entry_set_text(GTK_ENTRY(widgets->AvailableLanguagesEntry),""); -// } -// } else { -// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->LanguagesSensitiveCheck),0); -// gtk_entry_set_text(GTK_ENTRY(widgets->AvailableLanguagesEntry),""); -// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->LanguagesSensitiveCheck),0); -// int langsize; -// config_str lang = default_langs(&langsize); -// for_iter(widgets->LanguagesList,&iter){ -// char *cur=NULL; -// gtk_tree_model_get(GTK_TREE_MODEL(widgets->LanguagesList),&iter,2,&cur,-1); -// if (lang&&yon_char_parsed_check_exist(lang,langsize,cur)>-1){ -// gtk_list_store_set(widgets->LanguagesList,&iter,0,1,-1); -// } else { -// gtk_list_store_set(widgets->LanguagesList,&iter,0,0,-1); -// } -// if (cur) free(cur); -// } -// if (langsize) yon_char_parsed_free(lang,langsize); -// } -// char *zone = config(zone_parameter); -// char *region = NULL; -// -// if (!yon_char_is_empty(zone)) region = yon_char_divide_search(zone,"/",-1); else {gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->RegionSensitiveSwitch),0);} -// if (!yon_char_is_empty(region)){ -// gtk_combo_box_set_active_id(GTK_COMBO_BOX(widgets->RegionCombo),region); -// } else { -// gtk_combo_box_set_active_id(GTK_COMBO_BOX(widgets->RegionCombo),"Europe"); -// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->RegionSensitiveSwitch),0); -// } -// if (!yon_char_is_empty(zone)){ -// gtk_combo_box_set_active_id(GTK_COMBO_BOX(widgets->ZoneCombo),zone); -// } else { -// gtk_combo_box_set_active_id(GTK_COMBO_BOX(widgets->ZoneCombo),"Moscow"); -// } -// char *language = config(lang_parameter); -// if (!yon_char_is_empty(language)){ -// gtk_combo_box_set_active_id(GTK_COMBO_BOX(widgets->LanguageCombo),language); -// } else { -// gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->LanguageCombo),0); -// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->MainLanguageSensitiveCheck),0); -// } -// char *kbmodel = config (xkbmodel_parameter); -// char *optinos = config(xkboptions_parameter); -// char *layout = config(xkblayout_parameter); -// if (!yon_char_is_empty(kbmodel)){ -// gtk_combo_box_set_active_id(GTK_COMBO_BOX(widgets->KeyboardModelCombo),kbmodel); -// } else { -// gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->KeyboardModelCombo),0); -// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->KeyboardModelSensitiveCheck),0); -// -// } -// if (!yon_char_is_empty(optinos)){ -// gtk_combo_box_set_active_id(GTK_COMBO_BOX(widgets->LayoutBindingCombo),optinos); -// } else { -// gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->LayoutBindingCombo),0); -// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->OptionsSensitiveCheck),0); -// } -// if (!yon_char_is_empty(layout)){ -// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->ManualLayoutRadio),1); -// for_iter(widgets->LayoutList,&iter){ -// char *cur=NULL; -// gtk_tree_model_get(GTK_TREE_MODEL(widgets->LayoutList),&iter,0,&cur,-1); -// if (strstr(layout,cur)){ -// gtk_tree_store_set(widgets->LayoutList,&iter,3,1,-1); -// } else { -// gtk_tree_store_set(widgets->LayoutList,&iter,3,0,-1); -// } -// } -// } else { -// for_iter(widgets->LayoutList,&iter){ -// char *id; -// gtk_tree_model_get(GTK_TREE_MODEL(widgets->LayoutList),&iter,0,&id,-1); -// if (!strcmp(id,"ru")||!strcmp(id,"us")){ -// gtk_tree_store_set(widgets->LayoutList,&iter,3,1,-1); -// } else { -// gtk_tree_store_set((widgets->LayoutList),&iter,3,0,-1); -// } -// } -// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->LayoutSensitiveCheck),0); -// } -// char *user_name = config(user_name_parameter); -// char *user_gecos = config(user_gecos_parameter); -// char *user_password = config(user_password_parameter); -// char *root_password = config(root_password_parameter); -// char *autologin = config(autologin_parameter); -// char *hostname = config(hostname_parameter); -// if (!yon_char_is_empty(user_name)){ -// if (!strcmp(user_name,"root")){ -// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->UserRootOnlyCheck),1); -// } else { -// gtk_entry_set_text(GTK_ENTRY(widgets->UserRootLoginEntry),user_name); -// } -// } else { -// gtk_entry_set_text(GTK_ENTRY(widgets->UserRootLoginEntry),""); -// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->LoginSensitiveCheck),0); -// } -// if (!yon_char_is_empty(user_gecos)){ -// gtk_entry_set_text(GTK_ENTRY(widgets->UserRootNameEntry),_(user_gecos)); -// } else { -// gtk_entry_set_text(GTK_ENTRY(widgets->UserRootNameEntry),""); -// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->UsernameSensitiveCheck),0); -// } -// int def_size=0; -// config_str default_password = NULL; -// if (!getuid()){ -// default_password = yon_config_load(yon_debug_output("%s\n",get_default_password_command), &def_size); -// if (def_size>0&&default_password){ -// yon_char_remove_last_symbol(default_password[0],'\n'); -// } -// } -// if ((def_size>0&&!strcmp(default_password[0],user_password))||yon_char_is_empty(user_password)){ -// gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->UserRootPasswordCombo),0); -// gtk_entry_set_text(GTK_ENTRY(widgets->UserRootPasswordEntry),""); -// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->PasswordSensitiveCheck),0); -// -// } else if (!yon_char_is_empty(user_password)){ -// gtk_entry_set_text(GTK_ENTRY(widgets->UserRootPasswordEntry),user_password); -// gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->UserRootPasswordCombo),1); -// } -// if ((def_size>0&&!strcmp(default_password[0],user_password))||yon_char_is_empty(user_password)){ -// gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->AdminPasswordCombo),0); -// gtk_entry_set_text(GTK_ENTRY(widgets->AdminPasswordEntry),""); -// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->RootPasswordSensitiveCheck),0); -// -// } else if (!yon_char_is_empty(root_password)){ -// gtk_entry_set_text(GTK_ENTRY(widgets->AdminPasswordEntry),root_password); -// gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->AdminPasswordCombo),1); -// } -// if (!yon_char_is_empty(autologin)){ -// if (!strcmp(autologin,"yes")) -// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->UserAutologinSwitch),1); -// else -// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->UserAutologinSwitch),0); -// } else { -// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->UserAutologinSwitch),main_config.autologin_default); -// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->AutologinSensitiveCheck),0); -// } -// if (!yon_char_is_empty(hostname)){ -// if (strcmp(hostname,"auto")){ -// gtk_entry_set_text(GTK_ENTRY(widgets->HotnameEntry),hostname); -// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->AutoHostnameCheck),0); -// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->HostnameSensitiveCheck),1); -// } else{ -// gtk_entry_set_text(GTK_ENTRY(widgets->HotnameEntry),""); -// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->AutoHostnameCheck),1); -// } -// } else { -// gtk_entry_set_text(GTK_ENTRY(widgets->HotnameEntry),""); -// g_signal_handlers_block_by_func(G_OBJECT(widgets->AutoHostnameCheck),on_autohostname_check,widgets); -// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->AutoHostnameCheck),1); -// g_signal_handlers_unblock_by_func(G_OBJECT(widgets->AutoHostnameCheck),on_autohostname_check,widgets); -// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->HostnameSensitiveCheck),0); -// } -// } - gboolean on_install_success(main_window *widgets){ gtk_label_set_text(GTK_LABEL(widgets->InstallationLabel),""); gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_COMPLETION); diff --git a/source/ubinstall-gtk.h b/source/ubinstall-gtk.h index 5d50692..71d3ee1 100755 --- a/source/ubinstall-gtk.h +++ b/source/ubinstall-gtk.h @@ -267,7 +267,7 @@ layout && /description:/ {\ #define full_log_path "/var/log/ubinstall.log" -#define yon_config_get_command(target) yon_char_unite("ubconfig --source ",target," --conarg get [autoinstall] AUTOINSTALL[*]",NULL) +#define config_get_command(target) yon_char_unite("ubconfig --source ",target," --conarg get [autoinstall] AUTOINSTALL[*]",NULL) #define config_get_default_command "ubconfig --source default --conarg get [autoinstall] AUTOINSTALL[*]" diff --git a/source/ubl-strings.h b/source/ubl-strings.h index 76ad8b1..24c2978 100644 --- a/source/ubl-strings.h +++ b/source/ubl-strings.h @@ -268,6 +268,7 @@ NULL) #define TERRITORY_LABEL _("Territory") #define LANGUAGE_TITLE_INFO_LABEL _("Specify your preferred system languages") #define REMOVE_LOCALE_TOOLTIP_LABEL _("Remove locale") +#define NEW_PARTITION_LABEL _("New partition:") // #define _LABEL _("Package:") // #define _LABEL _("Module:") diff --git a/ubinstall-gtk.glade b/ubinstall-gtk.glade index 4ec67a7..5c7c0fc 100644 --- a/ubinstall-gtk.glade +++ b/ubinstall-gtk.glade @@ -780,7 +780,6 @@ agreement 5 5 left - False True @@ -8307,7 +8306,7 @@ or continue working in the environment, booted from the Live image. True False - <b>Attention!</b> The system will be installed in the selected partition. If you do not change the FS type or format, all data on the partition will be saved. + <b>Attention!</b> The selected partition will be reduced and the next new partition will be created. The data will be saved in the selected partition. The new partition will be formatted. True True 0 @@ -8599,7 +8598,7 @@ or continue working in the environment, booted from the Live image. True False - Partition: + New partition: 0 @@ -8635,7 +8634,9 @@ or continue working in the environment, booted from the Live image. True + False True + True False @@ -8683,6 +8684,7 @@ or continue working in the environment, booted from the Live image. True False + True True