localisation updates, 90% of config loading

pull/16/head
parent f7d5e5e39d
commit 95f6a79bf3

@ -79,167 +79,291 @@ void yon_load_proceed(YON_CONFIG_TYPE type){
void yon_interface_update(main_window *widgets){ void yon_interface_update(main_window *widgets){
if (widgets){}; if (widgets){};
// enum YON_PAGES page=YON_PAGE_COMPLETED; enum YON_PAGES page=YON_PAGE_COMPLETED;
// char *type = config(AUTOINSTALL_TYPE_INSTALL); char *type = config(AUTOINSTALL_TYPE_INSTALL);
// if (strcmp(type,"fast")){ if (!yon_char_is_empty(type)){
// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->InstallationRadio),1); if (!strcmp(type,"fast")){
// page = YON_PAGE_INSTALL_COMMON; gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->InstallationRadio),1);
// } else if (strcmp(type,"next")){ page = YON_PAGE_INSTALL_COMMON;
// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->InstallationNearRadio),1); } else if (!strcmp(type,"next")){
// page = YON_PAGE_INSTALL_SEPARATE; gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->InstallationNearRadio),1);
// } else if (strcmp(type,"part")){ page = YON_PAGE_INSTALL_SEPARATE;
// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->InstallationLinuxRadio),1); } else if (!strcmp(type,"part")){
// page = YON_PAGE_INSTALL_SAME_PARTITION; gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->InstallationLinuxRadio),1);
// } else if (!strcmp(type,"grub_install")){ page = YON_PAGE_INSTALL_SAME_PARTITION;
// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->InstallationWindowsRadio),1); } else if (!strcmp(type,"grub_install")){
// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->GrubInstallRadio),1); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->InstallationWindowsRadio),1);
// page = YON_PAGE_OPTIONS_GRUB_INSTALL; gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->GrubInstallRadio),1);
// } else if (strcmp(type,"grub_update")){ page = YON_PAGE_OPTIONS_GRUB_INSTALL;
// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->InstallationWindowsRadio),1); } else if (!strcmp(type,"grub_update")){
// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->GrubUpdateRadio),1); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->InstallationWindowsRadio),1);
// page = YON_PAGE_OPTIONS_GRUB_UPDATE; gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->GrubUpdateRadio),1);
// } else if (strcmp(type,"system_only")){ page = YON_PAGE_OPTIONS_GRUB_UPDATE;
// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->InstallationWindowsRadio),1); } else if (!strcmp(type,"system_only")){
// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->OSRadio),1); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->InstallationWindowsRadio),1);
// page = YON_PAGE_OPTIONS_OS_ONLY; gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->OSRadio),1);
// } else if (strcmp(type,"data_only")){ page = YON_PAGE_OPTIONS_OS_ONLY;
// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->InstallationWindowsRadio),1); } else if (!strcmp(type,"data_only")){
// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->UserDataOnlyRadio),1); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->InstallationWindowsRadio),1);
// page = YON_PAGE_OPTIONS_USRDATA_ONLY; gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->UserDataOnlyRadio),1);
// } else if (strcmp(type,"custom")){ page = YON_PAGE_OPTIONS_USRDATA_ONLY;
// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->InstallationWindowsRadio),1); } else if (!strcmp(type,"custom")){
// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->SeparateRadio),1); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->InstallationWindowsRadio),1);
// page = YON_PAGE_OPTIONS_SEPARATE; 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) char *device = config(AUTOINSTALL_DEVICE);
// part = config(part_parameter); char *part = NULL;
if (page!=YON_PAGE_INSTALL_COMMON)
// char *fs_type = config(part_type_parameter); part = config(part_parameter);
// char *device_label = config(device_label_parameter);
// char *format = config(device_format_parameter); char *fs_type = config(part_type_parameter);
// char *part_size = config(part_size_parameter); char *device_label = config(device_label_parameter);
char *format = config(device_format_parameter);
// GtkListStore *device_list = widgets->DevicesList; char *part_size = config(part_size_parameter);
// GtkListStore *part_list=widgets->PartitionsList;
// GtkWidget *device_tree=NULL; GtkListStore *device_list = widgets->DevicesList;
// GtkWidget *part_tree=NULL; GtkListStore *part_list=widgets->PartitionsList;
// switch (page){ GtkWidget *device_tree=NULL;
// case YON_PAGE_INSTALL_COMMON:{ GtkWidget *part_tree=NULL;
// device_tree = widgets->CommonInstallationDevicesTree; switch (page){
// } break; case YON_PAGE_INSTALL_COMMON:{
// case YON_PAGE_INSTALL_SEPARATE:{ device_tree = widgets->CommonInstallationDevicesTree;
// device_tree = widgets->InstallationNearSysDevicesTree; } break;
// part_tree = widgets->InstallationNearSysSectionTree; case YON_PAGE_INSTALL_SEPARATE:{
// gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->InstallationNearSizeSpin),atof(part_size)); device_tree = widgets->InstallationNearSysDevicesTree;
// if (part_size[strlen(part_size)-1]=='M') gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->InstallationNearSizeTypeSpin),0); part_tree = widgets->InstallationNearSysSectionTree;
// if (part_size[strlen(part_size)-1]=='G') gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->InstallationNearSizeTypeSpin),1); if (!yon_char_is_empty(part_size)){
// if (part_size[strlen(part_size)-1]=='T') gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->InstallationNearSizeTypeSpin),2); gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->InstallationNearSizeSpin),atof(part_size));
// if (!strcmp(format,"no")) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->NextInstallationFormatCheck),0); if (part_size[strlen(part_size)-1]=='M') gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->InstallationNearSizeTypeSpin),0);
// else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->NextInstallationFormatCheck),1); if (part_size[strlen(part_size)-1]=='G') gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->InstallationNearSizeTypeSpin),1);
// gtk_combo_box_set_active_id(GTK_COMBO_BOX(widgets->NextInstallationFilesystemTypeCombo),fs_type); if (part_size[strlen(part_size)-1]=='T') gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->InstallationNearSizeTypeSpin),2);
// gtk_entry_set_text(GTK_ENTRY(widgets->NextInstallationSectionNameEntry),device_label); }
if (format&&!strcmp(format,"yes")) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->NextInstallationFormatCheck),1);
// } break; else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->NextInstallationFormatCheck),main_config.format_default);
// case YON_PAGE_INSTALL_SAME_PARTITION:{ gtk_combo_box_set_active_id(GTK_COMBO_BOX(widgets->NextInstallationFilesystemTypeCombo),fs_type);
// device_tree = widgets->SamePlaceDeviceTree; gtk_entry_set_text(GTK_ENTRY(widgets->NextInstallationSectionNameEntry),device_label);
// part_tree = widgets->SamePlacePartTree;
// gtk_combo_box_set_active_id(GTK_COMBO_BOX(widgets->SameInstallationFilesystemTypeCombo),fs_type); } break;
// if (!strcmp(format,"no")) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->SameInstallationFormatCheck),0); case YON_PAGE_INSTALL_SAME_PARTITION:{
// else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->SameInstallationFormatCheck),1); device_tree = widgets->SamePlaceDeviceTree;
// gtk_entry_set_text(GTK_ENTRY(widgets->SameInstallationSectionNameEntry),device_label); part_tree = widgets->SamePlacePartTree;
// } break; gtk_combo_box_set_active_id(GTK_COMBO_BOX(widgets->SameInstallationFilesystemTypeCombo),fs_type);
// case YON_PAGE_OPTIONS_GRUB_INSTALL:{ if (format&&!strcmp(format,"yes")) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->SameInstallationFormatCheck),1);
// device_tree = widgets->GrubInstallDevicesTree; else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->SameInstallationFormatCheck),main_config.format_default);
// } break; if (device_label)
// case YON_PAGE_OPTIONS_GRUB_UPDATE:{ gtk_entry_set_text(GTK_ENTRY(widgets->SameInstallationSectionNameEntry),device_label);
// device_tree = widgets->GrubUpdateDevicesTree; else
// } break; gtk_entry_set_text(GTK_ENTRY(widgets->SameInstallationSectionNameEntry),"");
// case YON_PAGE_OPTIONS_SEPARATE:{
// GtkTreeIter iter; } break;
// device_tree = widgets->SeparateDevicesTree; case YON_PAGE_OPTIONS_GRUB_INSTALL:{
// part_tree = widgets->SeparateSysSectionTree; device_tree = widgets->GrubInstallDevicesTree;
// for_iter(GTK_TREE_MODEL(device_list),&iter){ } break;
// char *cur_device; case YON_PAGE_OPTIONS_GRUB_UPDATE:{
// gtk_tree_model_get(GTK_TREE_MODEL(device_list),&iter, 0,&cur_device,-1); device_tree = widgets->GrubUpdateDevicesTree;
// if (!strcmp(cur_device,device)){ } break;
// gtk_tree_selection_select_iter(gtk_tree_view_get_selection(GTK_TREE_VIEW(device_tree)),&iter); case YON_PAGE_OPTIONS_SEPARATE:{
// break; GtkTreeIter iter;
// } device_tree = widgets->SeparateDevicesTree;
// } part_tree = widgets->SeparateSysSectionTree;
// for_iter(GTK_TREE_MODEL(part_list),&iter){ for_iter(GTK_TREE_MODEL(device_list),&iter){
// char *cur_part; char *cur_device;
// gtk_tree_model_get(GTK_TREE_MODEL(device_list),&iter, 0,&cur_part,-1); gtk_tree_model_get(GTK_TREE_MODEL(device_list),&iter, 0,&cur_device,-1);
// if (!strcmp(cur_part,part)){ if (!strcmp(cur_device,device)){
// gtk_tree_selection_select_iter(gtk_tree_view_get_selection(GTK_TREE_VIEW(part_tree)),&iter); gtk_tree_selection_select_iter(gtk_tree_view_get_selection(GTK_TREE_VIEW(device_tree)),&iter);
// } break;
// } }
// } break; }
// case YON_PAGE_OPTIONS_OS_ONLY:{ on_near_installation_device_changed(device_tree,widgets);
// device_tree = widgets->OSDevicesTree; for_iter(GTK_TREE_MODEL(part_list),&iter){
// part_tree = widgets->OSSysSectionTree; char *cur_part;
// } break; gtk_tree_model_get(GTK_TREE_MODEL(device_list),&iter, 0,&cur_part,-1);
// case YON_PAGE_OPTIONS_USRDATA_ONLY:{ if (!strcmp(cur_part,part)){
// device_tree = widgets->UserdataDevicesTree; gtk_tree_selection_select_iter(gtk_tree_view_get_selection(GTK_TREE_VIEW(part_tree)),&iter);
// part_tree = widgets->UserdataSysSectionTree; }
// } break; }
// default:{}break; } break;
// } case YON_PAGE_OPTIONS_OS_ONLY:{
device_tree = widgets->OSDevicesTree;
// GtkTreeIter iter; part_tree = widgets->OSSysSectionTree;
} break;
// char *zone = config(zone_parameter); case YON_PAGE_OPTIONS_USRDATA_ONLY:{
// char *region = NULL; device_tree = widgets->UserdataDevicesTree;
// if (!yon_char_is_empty(zone)) region = yon_char_divide_search(zone,"",-1); part_tree = widgets->UserdataSysSectionTree;
// char *system_locale = config(locale_parameter); } break;
// char *language = config(lang_parameter); default:{}break;
// for_iter(widgets->LanguagesList,&iter){ }
// char *cur=NULL;
// gtk_tree_model_get(GTK_TREE_MODEL(widgets->LanguagesList),&iter,1,&cur,-1); GtkTreeIter iter;
// if (strstr(system_locale,cur)){ char *cur_device="";
// gtk_list_store_set(GTK_TREE_MODEL(widgets->LanguagesList),&iter,0,1,-1); if (page!=YON_PAGE_OPTIONS_SEPARATE && !yon_char_is_empty(device)){
// } else { for_iter (widgets->DevicesList,&iter){
// gtk_list_store_set(GTK_TREE_MODEL(widgets->LanguagesList),&iter,0,0,-1); 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);
// gtk_tree_model_filter_refilter(GTK_TREE_MODEL_FILTER(widgets->LanguagesFilter)); break;
// gtk_combo_box_set_active_id(GTK_COMBO_BOX(widgets->RegionCombo),region); }
// gtk_combo_box_set_active_id(GTK_COMBO_BOX(widgets->ZoneCombo),zone); }
// gtk_combo_box_set_active_id(GTK_COMBO_BOX(widgets->LanguageCombo),language); on_near_installation_device_changed(device_tree,widgets);
if (!yon_char_is_empty(part)){
for_iter (widgets->PartitionsList,&iter){
// char *kbmodel = config (xkbmodel_parameter); gtk_tree_model_get(GTK_TREE_MODEL(widgets->PartitionsList),&iter,0,&part,-1);
// char *optinos = config(xkboptions_parameter); if (!strcmp(device,cur_device)){
// char *layout = config(xkblayout_parameter); gtk_tree_selection_select_iter(gtk_tree_view_get_selection(GTK_TREE_VIEW(part_tree)),&iter);
break;
}
}
// char *user_name = config(user_name_parameter); }
// char *user_gecos = config(user_name_parameter); }
// char *user_password = config(user_name_parameter);
// char *root_password = config(user_name_parameter);
// char *autologin = config(user_name_parameter); char *system_locale = config(locale_parameter);
// char *hostname = config(user_name_parameter); if (!yon_char_is_empty(system_locale)){
for_iter(widgets->LanguagesList,&iter){
char *cur=NULL;
gtk_tree_model_get(GTK_TREE_MODEL(widgets->LanguagesList),&iter,1,&cur,-1);
if (strstr(system_locale,cur)){
gtk_list_store_set((widgets->LanguagesList),&iter,0,1,-1);
} else {
gtk_list_store_set((widgets->LanguagesList),&iter,0,0,-1);
}
}
gtk_tree_model_filter_refilter(GTK_TREE_MODEL_FILTER(widgets->LanguagesFilter));
} else {
for_iter(widgets->LanguagesList,&iter){
gtk_list_store_set((widgets->LanguagesList),&iter,0,0,-1);
}
gtk_tree_model_filter_refilter(GTK_TREE_MODEL_FILTER(widgets->LanguagesFilter));
}
char *zone = config(zone_parameter);
char *region = NULL;
if (!yon_char_is_empty(zone)) region = yon_char_divide_search(zone,"/",-1);
if (!yon_char_is_empty(region)){
gtk_combo_box_set_active_id(GTK_COMBO_BOX(widgets->RegionCombo),region);
} else {
gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->RegionCombo),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(GTK_COMBO_BOX(widgets->ZoneCombo),0);
}
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);
}
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);
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);
if (!yon_char_is_empty(layout)){
for_iter(widgets->LayoutList,&iter){
char *cur=NULL;
gtk_tree_model_get(GTK_TREE_MODEL(widgets->LayoutList),&iter,1,&cur,-1);
if (strstr(layout,cur)){
gtk_tree_store_set(widgets->LayoutList,&iter,0,1,-1);
} else {
gtk_tree_store_set(widgets->LayoutList,&iter,0,0,-1);
}
}
gtk_tree_model_filter_refilter(GTK_TREE_MODEL_FILTER(widgets->LanguagesFilter));
} else {
for_iter(widgets->LayoutList,&iter){
gtk_tree_store_set((widgets->LayoutList),&iter,0,0,-1);
}
gtk_tree_model_filter_refilter(GTK_TREE_MODEL_FILTER(widgets->LanguagesFilter));
}
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)){
gtk_entry_set_text(GTK_ENTRY(widgets->LoginEntry),user_name);
} else gtk_entry_set_text(GTK_ENTRY(widgets->LoginEntry),"");
if (!yon_char_is_empty(user_gecos)){
gtk_entry_set_text(GTK_ENTRY(widgets->UserNameEntry),user_gecos);
} else gtk_entry_set_text(GTK_ENTRY(widgets->UserNameEntry),"");
if (!yon_char_is_empty(user_password)){
gtk_entry_set_text(GTK_ENTRY(widgets->PasswordEntry),user_password);
gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->PasswordCombo),1);
} else {
gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->PasswordCombo),0);
gtk_entry_set_text(GTK_ENTRY(widgets->PasswordEntry),"");
}
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);
} else {
gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->AdminPasswordCombo),0);
gtk_entry_set_text(GTK_ENTRY(widgets->AdminPasswordEntry),"");
}
if (!yon_char_is_empty(autologin)){
if (!strcmp(autologin,"yes"))
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->AutologinCheck),1);
else
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->AutologinCheck),0);
} else
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->AutologinCheck),main_config.autologin_default);
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);
} 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),"");
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->AutoHostnameCheck),1);
}
} }
void on_config_local_load(GtkWidget *,main_window *); void on_config_local_load(GtkWidget *,main_window *widgets);
void on_config_local_load(GtkWidget *,main_window *){ void on_config_local_load(GtkWidget *,main_window *widgets){
yon_load_proceed(YON_CONFIG_LOCAL); yon_load_proceed(YON_CONFIG_LOCAL);
yon_interface_update(widgets);
main_config.load_mode=1; main_config.load_mode=1;
} }
void on_config_global_load(GtkWidget *,main_window *); void on_config_global_load(GtkWidget *,main_window *);
void on_config_global_load(GtkWidget *,main_window *){ void on_config_global_load(GtkWidget *,main_window *widgets){
yon_load_proceed(YON_CONFIG_GLOBAL); yon_load_proceed(YON_CONFIG_GLOBAL);
yon_interface_update(widgets);
main_config.load_mode=0; main_config.load_mode=0;
} }
void on_config_custom_load(GtkWidget *,main_window *); void on_config_custom_load(GtkWidget *,main_window *);
void on_config_custom_load(GtkWidget *,main_window *){ void on_config_custom_load(GtkWidget *,main_window *widgets){
yon_load_proceed(YON_CONFIG_CUSTOM); yon_load_proceed(YON_CONFIG_CUSTOM);
yon_interface_update(widgets);
main_config.load_mode=3; main_config.load_mode=3;
} }
@ -963,10 +1087,10 @@ void on_page_navigation_clicked(GtkWidget *self, main_window *widgets){
GtkTreeModel *model = GTK_TREE_MODEL(widgets->LanguagesFilter); GtkTreeModel *model = GTK_TREE_MODEL(widgets->LanguagesFilter);
char *lang_code=NULL; char *lang_code=NULL;
for_iter(model,&iter){ for_iter(model,&iter){
gtk_tree_model_get(model,&iter,1,&lang_code,-1); gtk_tree_model_get(model,&iter,2,&lang_code,-1);
languages = yon_char_unite(languages,",",lang_code,NULL); languages = yon_char_unite(languages,!yon_char_is_empty(languages)?",":"",lang_code,NULL);
} }
if (yon_char_is_empty(gtk_entry_get_text(GTK_ENTRY(widgets->AvailableLanguagesEntry)))){ if (yon_char_is_empty(languages)){
yon_config_remove_by_key(locale_parameter); yon_config_remove_by_key(locale_parameter);
} else { } else {
yon_config_register(locale_parameter,locale_parameter_command,languages); yon_config_register(locale_parameter,locale_parameter_command,languages);
@ -1017,9 +1141,9 @@ void on_page_navigation_clicked(GtkWidget *self, main_window *widgets){
yon_config_remove_by_key(xkbmodel_parameter); yon_config_remove_by_key(xkbmodel_parameter);
} }
if (!yon_char_is_empty(layouts_list)) if (!yon_char_is_empty(layouts_list))
yon_config_register(locale_parameter,locale_parameter_command,layouts_list); yon_config_register(xkblayout_parameter,xkblayout_parameter_command,layouts_list);
else else
yon_config_remove_by_key(locale_parameter); yon_config_remove_by_key(xkblayout_parameter);
gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),page+1); gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),page+1);
} break; } break;
@ -1153,7 +1277,7 @@ void on_page_navigation_clicked(GtkWidget *self, main_window *widgets){
if (yon_char_is_empty(gtk_entry_get_text(GTK_ENTRY(widgets->LoginEntry)))){ if (yon_char_is_empty(gtk_entry_get_text(GTK_ENTRY(widgets->LoginEntry)))){
yon_config_remove_by_key(user_name_parameter); yon_config_remove_by_key(user_name_parameter);
} else { } else {
char *login = (char*)gtk_entry_get_text(GTK_ENTRY(widgets->UserNameEntry)); char *login = (char*)gtk_entry_get_text(GTK_ENTRY(widgets->LoginEntry));
yon_config_register(user_name_parameter,user_name_parameter_command,login); yon_config_register(user_name_parameter,user_name_parameter_command,login);
} }
@ -1194,7 +1318,7 @@ void on_page_navigation_clicked(GtkWidget *self, main_window *widgets){
yon_config_remove_by_key(hostname_parameter); yon_config_remove_by_key(hostname_parameter);
} else { } else {
char *hostname = (char*)gtk_entry_get_text(GTK_ENTRY(widgets->UserNameEntry)); char *hostname = (char*)gtk_entry_get_text(GTK_ENTRY(widgets->HotnameEntry));
yon_config_register(hostname_parameter,hostname_parameter_command,hostname); yon_config_register(hostname_parameter,hostname_parameter_command,hostname);
} }
@ -1212,7 +1336,6 @@ void on_page_navigation_clicked(GtkWidget *self, main_window *widgets){
gtk_tree_model_get(GTK_TREE_MODEL(widgets->LayoutsFilter),&iter,0,&id,3,&status,-1); gtk_tree_model_get(GTK_TREE_MODEL(widgets->LayoutsFilter),&iter,0,&id,3,&status,-1);
if (status){ if (status){
char *temp = yon_char_unite(locales,!yon_char_is_empty(locales)?",":"",id,NULL); char *temp = yon_char_unite(locales,!yon_char_is_empty(locales)?",":"",id,NULL);
free(locales);
locales=temp; locales=temp;
} }
} }
@ -1563,7 +1686,6 @@ void on_separate_installation_changed(GtkWidget *self, main_window *widgets){
} }
} }
void on_near_installation_device_changed(GtkWidget *self, main_window *widgets);
void on_near_installation_device_changed(GtkWidget *self, main_window *widgets){ void on_near_installation_device_changed(GtkWidget *self, main_window *widgets){
gtk_list_store_clear(widgets->PartitionsList); gtk_list_store_clear(widgets->PartitionsList);
GtkTreeIter iter; GtkTreeIter iter;

@ -106,7 +106,7 @@ NULL
#define locale_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[locale]" #define locale_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[locale]"
#define device_format_parameter "AUTOINSTALL[device_format]" #define device_format_parameter "AUTOINSTALL[device_format]"
#define device_format_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[device_format]" #define device_format_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[device_format]"
#define device_label_parameter "AUTOINSTALL[part_label]" #define device_label_parameter "AUTOINSTALL[device_label]"
#define device_label_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[part_label]" #define device_label_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[part_label]"
#define part_size_parameter "AUTOINSTALL[part_size]" #define part_size_parameter "AUTOINSTALL[part_size]"
#define part_size_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[part_size]" #define part_size_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[part_size]"
@ -135,10 +135,10 @@ NULL
#define full_log_path "/var/log/ubinstall.log" #define full_log_path "/var/log/ubinstall.log"
#define yon_config_get_custom_command(target) yon_char_unite("ubconfig --source ",target," get [autoinstall] AUTOINSTALL[installer_lang] AUTOINSTALL[install_type] AUTOINSTALL[device] AUTOINSTALL[part] AUTOINSTALL[part_size] AUTOINSTALL[part_label] AUTOINSTALL[part_fs_type] AUTOINSTALL[part_format] UTOINSTALL[locale] AUTOINSTALL[lang] AUTOINSTALL[zone] AUTOINSTALL[user_name] AUTOINSTALL[user_gecos] AUTOINSTALL[user_password] AUTOINSTALL[root_password] AUTOINSTALL[autologin] AUTOINSTALL[xkbmodel] AUTOINSTALL[xkblayout] AUTOINSTALL[xkbvariant] AUTOINSTALL[xkboptions] AUTOINSTALL[hostname] AUTOINSTALL[modules] AUTOINSTALL[modules_extra]",NULL) #define yon_config_get_custom_command(target) yon_char_unite("ubconfig --source ",target," get [autoinstall] AUTOINSTALL[installer_lang] AUTOINSTALL[install_type] AUTOINSTALL[device] AUTOINSTALL[part] AUTOINSTALL[part_size] AUTOINSTALL[part_label] AUTOINSTALL[part_fs_type] AUTOINSTALL[part_format] UTOINSTALL[locale] AUTOINSTALL[lang] AUTOINSTALL[zone] AUTOINSTALL[user_name] AUTOINSTALL[user_gecos] AUTOINSTALL[user_password] AUTOINSTALL[root_password] AUTOINSTALL[autologin] AUTOINSTALL[xkbmodel] AUTOINSTALL[xkblayout] AUTOINSTALL[xkbvariant] AUTOINSTALL[xkboptions] AUTOINSTALL[hostname] AUTOINSTALL[modules] AUTOINSTALL[modules_extra] AUTOINSTALL[device_label] AUTOINSTALL[locale]",NULL)
#define config_get_local_command "ubconfig --source system get [autoinstall] AUTOINSTALL[installer_lang] AUTOINSTALL[install_type] AUTOINSTALL[device] AUTOINSTALL[part] AUTOINSTALL[part_size] AUTOINSTALL[part_label] AUTOINSTALL[part_fs_type] AUTOINSTALL[part_format] UTOINSTALL[locale] AUTOINSTALL[lang] AUTOINSTALL[zone] AUTOINSTALL[user_name] AUTOINSTALL[user_gecos] AUTOINSTALL[user_password] AUTOINSTALL[root_password] AUTOINSTALL[autologin] AUTOINSTALL[xkbmodel] AUTOINSTALL[xkblayout] AUTOINSTALL[xkbvariant] AUTOINSTALL[xkboptions] AUTOINSTALL[hostname] AUTOINSTALL[modules] AUTOINSTALL[modules_extra]" #define config_get_local_command "ubconfig --source system get [autoinstall] AUTOINSTALL[installer_lang] AUTOINSTALL[install_type] AUTOINSTALL[device] AUTOINSTALL[part] AUTOINSTALL[part_size] AUTOINSTALL[part_label] AUTOINSTALL[part_fs_type] AUTOINSTALL[part_format] UTOINSTALL[locale] AUTOINSTALL[lang] AUTOINSTALL[zone] AUTOINSTALL[user_name] AUTOINSTALL[user_gecos] AUTOINSTALL[user_password] AUTOINSTALL[root_password] AUTOINSTALL[autologin] AUTOINSTALL[xkbmodel] AUTOINSTALL[xkblayout] AUTOINSTALL[xkbvariant] AUTOINSTALL[xkboptions] AUTOINSTALL[hostname] AUTOINSTALL[modules] AUTOINSTALL[modules_extra] AUTOINSTALL[device_label] AUTOINSTALL[locale]"
#define config_get_global_command yon_char_new("ubconfig --source global get [autoinstall] AUTOINSTALL[installer_lang] AUTOINSTALL[install_type] AUTOINSTALL[device] AUTOINSTALL[part] AUTOINSTALL[part_size] AUTOINSTALL[part_label] AUTOINSTALL[part_fs_type] AUTOINSTALL[part_format] UTOINSTALL[locale] AUTOINSTALL[lang] AUTOINSTALL[zone] AUTOINSTALL[user_name] AUTOINSTALL[user_gecos] AUTOINSTALL[user_password] AUTOINSTALL[root_password] AUTOINSTALL[autologin] AUTOINSTALL[xkbmodel] AUTOINSTALL[xkblayout] AUTOINSTALL[xkbvariant] AUTOINSTALL[xkboptions] AUTOINSTALL[hostname] AUTOINSTALL[modules] AUTOINSTALL[modules_extra]") #define config_get_global_command yon_char_new("ubconfig --source global get [autoinstall] AUTOINSTALL[installer_lang] AUTOINSTALL[install_type] AUTOINSTALL[device] AUTOINSTALL[part] AUTOINSTALL[part_size] AUTOINSTALL[part_label] AUTOINSTALL[part_fs_type] AUTOINSTALL[part_format] UTOINSTALL[locale] AUTOINSTALL[lang] AUTOINSTALL[zone] AUTOINSTALL[user_name] AUTOINSTALL[user_gecos] AUTOINSTALL[user_password] AUTOINSTALL[root_password] AUTOINSTALL[autologin] AUTOINSTALL[xkbmodel] AUTOINSTALL[xkblayout] AUTOINSTALL[xkbvariant] AUTOINSTALL[xkboptions] AUTOINSTALL[hostname] AUTOINSTALL[modules] AUTOINSTALL[modules_extra] AUTOINSTALL[device_label] AUTOINSTALL[locale]")
#define config_get_default_command "ubconfig --source default get [autoinstall] AUTOINSTALL[installer_lang] AUTOINSTALL[install_type] AUTOINSTALL[device] AUTOINSTALL[part] AUTOINSTALL[part_size] AUTOINSTALL[part_label] AUTOINSTALL[part_fs_type] AUTOINSTALL[part_format] UTOINSTALL[locale] AUTOINSTALL[lang] AUTOINSTALL[zone] AUTOINSTALL[user_name] AUTOINSTALL[user_gecos] AUTOINSTALL[user_password] AUTOINSTALL[root_password] AUTOINSTALL[autologin] AUTOINSTALL[xkbmodel] AUTOINSTALL[xkblayout] AUTOINSTALL[xkbvariant] AUTOINSTALL[xkboptions] AUTOINSTALL[hostname] AUTOINSTALL[modules] AUTOINSTALL[modules_extra]" #define config_get_default_command "ubconfig --source default get [autoinstall] AUTOINSTALL[installer_lang] AUTOINSTALL[install_type] AUTOINSTALL[device] AUTOINSTALL[part] AUTOINSTALL[part_size] AUTOINSTALL[part_label] AUTOINSTALL[part_fs_type] AUTOINSTALL[part_format] UTOINSTALL[locale] AUTOINSTALL[lang] AUTOINSTALL[zone] AUTOINSTALL[user_name] AUTOINSTALL[user_gecos] AUTOINSTALL[user_password] AUTOINSTALL[root_password] AUTOINSTALL[autologin] AUTOINSTALL[xkbmodel] AUTOINSTALL[xkblayout] AUTOINSTALL[xkbvariant] AUTOINSTALL[xkboptions] AUTOINSTALL[hostname] AUTOINSTALL[modules] AUTOINSTALL[modules_extra] AUTOINSTALL[device_label] AUTOINSTALL[locale]"
#define config_get_global_only_parameters "" #define config_get_global_only_parameters ""
#define config_get_local_only_parameters "" #define config_get_local_only_parameters ""
@ -203,6 +203,8 @@ typedef struct {
guint progress_thread; guint progress_thread;
int configure_mode; int configure_mode;
int log_progress_buzy; int log_progress_buzy;
int autologin_default;
int format_default;
} config; } config;
typedef struct { typedef struct {
@ -424,3 +426,4 @@ char *yon_save_command_prepare(char *command, char *target);
void yon_interface_update(main_window *widgets); void yon_interface_update(main_window *widgets);
void on_summary_log_view(GtkWidget *); void on_summary_log_view(GtkWidget *);
void on_near_installation_device_changed(GtkWidget *self, main_window *widgets);

@ -143,3 +143,20 @@
#define LOG_VIEW_LABEL _("Log exploration") #define LOG_VIEW_LABEL _("Log exploration")
#define SAVE_LABEL _("Save") #define SAVE_LABEL _("Save")
#define LOAD_LABEL _("Load") #define LOAD_LABEL _("Load")
#define LOAD_GLOBAL_LABEL _("Load global configuration")
#define LOAD_LOCAL_LABEL _("Load local configuration")
#define LOAD_CUSTOM_LABEL _("Load from specific file")
#define SAVE_ALL_LABEL _("Save configuration")
#define SAVE_GLOBAL_LABEL _("Save to global configuration")
#define SAVE_LOCAL_LABEL _("Save to local configuration")
#define SAVE_CUSTOM_LABEL _("Save to specific file")
#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_SAVE_HEAD_LABEL _("Configuration has been saved")
#define CONFIGURATION_SAVE_LABEL _("You can safely exit configurator or return and create new configuration file.")

@ -564,6 +564,7 @@ agreement</property>
<property name="margin-top">5</property> <property name="margin-top">5</property>
<property name="margin-bottom">5</property> <property name="margin-bottom">5</property>
<property name="tab-pos">left</property> <property name="tab-pos">left</property>
<property name="show-tabs">False</property>
<child> <child>
<object class="GtkBox"> <object class="GtkBox">
<property name="visible">True</property> <property name="visible">True</property>
@ -1000,7 +1001,6 @@ and help you install UBLinux on your computer</property>
</child> </child>
<child> <child>
<object class="GtkRadioButton" id="InstallationWindowsRadio"> <object class="GtkRadioButton" id="InstallationWindowsRadio">
<property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="receives-default">False</property> <property name="receives-default">False</property>
<property name="draw-indicator">True</property> <property name="draw-indicator">True</property>

@ -549,6 +549,42 @@ msgstr ""
msgid "Log exploration" msgid "Log exploration"
msgstr "" msgstr ""
msgid "Load global configuration"
msgstr ""
msgid "Load local configuration"
msgstr ""
msgid "Load from specific file"
msgstr ""
msgid "Save configuration"
msgstr ""
msgid "Save to global configuration"
msgstr ""
msgid "Save to local configuration"
msgstr ""
msgid "Save to specific file"
msgstr ""
msgid "Configuration"
msgstr ""
msgid "Installer configuration has been finished"
msgstr ""
msgid "Choose a save option on the header bar"
msgstr ""
msgid "Configuration has been saved"
msgstr ""
msgid "You can safely exit configurator or return and create new configuration file."
msgstr ""
msgid "Afrikaans" msgid "Afrikaans"
msgstr "" msgstr ""

@ -332,13 +332,17 @@ msgstr "Расширенный режим установки"
#: source/ubl-strings.h:72 #: source/ubl-strings.h:72
msgid "" msgid ""
"Installing OS files, user data on different partitions, creating RAID, etc." "Installing OS files, user data on different partitions, creating RAID, etc."
msgstr "Установка файлов ОС, пользовательских данныъ на разные разделы, создание RAID и др." msgstr ""
"Установка файлов ОС, пользовательских данныъ на разные разделы, создание "
"RAID и др."
#: source/ubl-strings.h:73 #: source/ubl-strings.h:73
msgid "" msgid ""
"Attention! The selected OS UBLinux components will be installed\n" "Attention! The selected OC UBLinux components will be installed\n"
"separately into the selected partition." "separately into the selected partition."
msgstr "Внимание! В выбранный раздел будет произведена раздельная установка выбранных компонентов ОС UBLinux/" msgstr ""
"Внимание! В выбранный раздел будет произведена раздельная установка "
"выбранных компонентов ОС UBLinux/"
#: source/ubl-strings.h:74 #: source/ubl-strings.h:74
msgid "GRUB install" msgid "GRUB install"
@ -362,7 +366,8 @@ msgstr "Раздельная установка"
#: source/ubl-strings.h:79 #: source/ubl-strings.h:79
msgid "Installing OS components and user data on different disk partitions" msgid "Installing OS components and user data on different disk partitions"
msgstr "Установка компонентов ОС и пользовательских данных на разные разделы диска" msgstr ""
"Установка компонентов ОС и пользовательских данных на разные разделы диска"
#: source/ubl-strings.h:80 #: source/ubl-strings.h:80
msgid "OS only" msgid "OS only"
@ -571,6 +576,44 @@ msgstr "Во время процесса установки произошла
msgid "Log exploration" msgid "Log exploration"
msgstr "Просмотр лога" msgstr "Просмотр лога"
msgid "Load global configuration"
msgstr "Загрузить глобальную конфигурацию"
msgid "Load local configuration"
msgstr "Загрузить локальную конфигурацию"
msgid "Load from specific file"
msgstr "Зашрузить из файла"
msgid "Save configuration"
msgstr "Сохранить конфигурацию"
msgid "Save to global configuration"
msgstr "Сохранить глобальную конфигурацию"
msgid "Save to local configuration"
msgstr "Сохранить в локальную конфигурацию"
msgid "Save to specific file"
msgstr "Сохранить в файл"
msgid "Configuration"
msgstr "Конфигурация"
msgid "Installer configuration has been finished"
msgstr "Настройка конфигурации завершена"
msgid "Choose a save option on the header bar"
msgstr "Выберите опцию сохранения на верхней панели"
#, fuzzy
msgid "Configuration has been saved"
msgstr "Конфигурация сохранена"
msgid ""
"You can safely exit configurator or return and create new configuration file."
msgstr "Вы можете выйти из настройки конфигурации или настроить другой файл конфигурации."
msgid "Afrikaans" msgid "Afrikaans"
msgstr "Африканский" msgstr "Африканский"

Loading…
Cancel
Save