Saving added. Loading 50% done. No localisation

pull/16/head
parent f5601a8292
commit 6d5524b52c

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
<g fill="#2e3436">
<path d="m 14.902344 2 c -0.042969 0.007812 -0.085938 0.019531 -0.125 0.03125 c -0.449219 0.101562 -0.792969 0.542969 -0.78125 1 v 1.6875 c 0.003906 1.3125 0.003906 1.3125 -1.5625 1.3125 h -1.4375 c -0.523438 0 -1 0.476562 -1 1 c -0.007813 0.074219 -0.007813 0.148438 0 0.21875 v 0.78125 h 6 v -5 c 0.003906 -0.0625 0.003906 -0.125 0 -0.1875 v -0.8125 h -0.8125 c -0.09375 -0.023438 -0.1875 -0.035156 -0.28125 -0.03125 z m 0 0"/>
<path d="m 0.00390625 8 v 5 c -0.00390625 0.0625 -0.00390625 0.125 0 0.1875 v 0.8125 h 0.81249975 c 0.09375 0.023438 0.1875 0.035156 0.28125 0.03125 c 0.042969 -0.007812 0.085938 -0.019531 0.125 -0.03125 c 0.449219 -0.101562 0.792969 -0.542969 0.78125 -1 v -1.6875 c -0.003906 -1.3125 -0.003906 -1.3125 1.5625 -1.3125 h 1.4375 c 0.523438 0 1 -0.476562 1 -1 c 0.007813 -0.074219 0.007813 -0.144531 0 -0.21875 v -0.78125 z m 0 0"/>
<path d="m 8 1 c -3.152344 0 -5.820312 2.125 -6.6875 5 h 2.09375 c 0.773438 -1.765625 2.539062 -3 4.59375 -3 s 3.820312 1.234375 4.59375 3 h 2.09375 c -0.867188 -2.875 -3.535156 -5 -6.6875 -5 z m -6.6875 9 c 0.867188 2.875 3.535156 5 6.6875 5 s 5.820312 -2.125 6.6875 -5 h -2.09375 c -0.773438 1.765625 -2.539062 3 -4.59375 3 s -3.820312 -1.234375 -4.59375 -3 z m 0 0"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

@ -3,12 +3,280 @@
config main_config;
//functions
void _yon_saving_threaded(char *final_command);
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);
free(result);
}
char *yon_save_command_prepare(char *command, char *target){
int size;
config_str parsed = yon_char_parse(command,&size," ");
free(parsed[2]);
parsed[2]=yon_char_new(target);
free(parsed[3]);
parsed[3]=yon_char_new("set");
for (int i=5;i<size;i++){
char * cur = yon_config_get_by_key(parsed[i]);
char *full_value = yon_char_unite(parsed[i],"='",cur,"'",NULL);
free(parsed[i]);
free(cur);
parsed[i]=full_value;
}
char *final = yon_char_parsed_to_string(parsed,size," ");
yon_char_parsed_free(parsed,size);
return final;
}
void yon_save_proceed(char *path, YON_CONFIG_TYPE type);
void yon_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){
// if (yon_config_load_register(type,,,NULL)){
// }
// }
void yon_load_proceed(YON_CONFIG_TYPE type);
void yon_load_proceed(YON_CONFIG_TYPE type){
yon_config_clean();
if (!yon_char_is_empty(config_get_default_command))
yon_config_load_config(YON_CONFIG_DEFAULT,config_get_default_command,NULL);
if (type==YON_CONFIG_GLOBAL){
yon_config_load_config(type,config_get_global_command,NULL);
} else if (type==YON_CONFIG_LOCAL){
yon_config_load_config(type,config_get_local_command,NULL);
} else if (type==YON_CONFIG_CUSTOM){
char *path="";
GtkWidget *dialog = gtk_file_chooser_dialog_new(TITLE_LABEL,NULL,GTK_FILE_CHOOSER_ACTION_SAVE,CANCEL_LABEL,GTK_RESPONSE_CANCEL,OPEN_LABEL,GTK_RESPONSE_ACCEPT,NULL);
yon_gtk_window_setup(GTK_WINDOW(dialog),NULL,TITLE_LABEL,icon_path,"FileChooserWindow");
textdomain(LocaleName);
gtk_window_set_icon_name(GTK_WINDOW(dialog),"com.ublinux.ubl-settings-video");
gtk_window_set_title(GTK_WINDOW(dialog),TITLE_LABEL);
GtkFileFilter *filter = gtk_file_filter_new();
gtk_file_filter_add_pattern(filter,"*.ini");
gtk_file_filter_set_name(filter, "*.ini");
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog),filter);
gtk_widget_show(dialog);
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)){
path=yon_char_unite("'",file,"'",NULL);
free(file);
}
gtk_widget_destroy(dialog);
} else {
gtk_widget_destroy(dialog);
}
yon_config_load_config(type,yon_config_get_custom_command(path),NULL);
}
}
void yon_interface_update(main_window *widgets){
enum YON_PAGES page;
char *type = config(AUTOINSTALL_TYPE_INSTALL);
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_type_parameter);
char *device_label = config(device_label_parameter);
char *format = config(device_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->InstallationNearSysDevicesTree;
part_tree = widgets->InstallationNearSysSectionTree;
gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->InstallationNearSizeSpin),atof(part_size));
if (part_size[strlen(part_size)-1]=='M') gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->InstallationNearSizeTypeSpin),0);
if (part_size[strlen(part_size)-1]=='G') gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->InstallationNearSizeTypeSpin),1);
if (part_size[strlen(part_size)-1]=='T') gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->InstallationNearSizeTypeSpin),2);
if (!strcmp(format,"no")) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->NextInstallationFormatCheck),0);
else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->NextInstallationFormatCheck),1);
gtk_combo_box_set_active_id(GTK_COMBO_BOX(widgets->NextInstallationFilesystemTypeCombo),fs_type);
gtk_entry_set_text(GTK_ENTRY(widgets->NextInstallationSectionNameEntry),device_label);
} break;
case YON_PAGE_INSTALL_SAME_PARTITION:{
device_tree = widgets->SamePlaceDeviceTree;
part_tree = widgets->SamePlacePartTree;
gtk_combo_box_set_active_id(GTK_COMBO_BOX(widgets->SameInstallationFilesystemTypeCombo),fs_type);
if (!strcmp(format,"no")) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->SameInstallationFormatCheck),0);
else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->SameInstallationFormatCheck),1);
gtk_entry_set_text(GTK_ENTRY(widgets->SameInstallationSectionNameEntry),device_label);
} 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;
}
}
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;
}
char *zone = config(zone_parameter);
char *system_locale = config(locale_parameter);
char *language = config(lang_parameter);
char *kbmodel = config (xkbmodel_parameter);
char *optinos = config(xkboptions_parameter);
char *layout = config(xkblayout_parameter);
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 *hostname = config(user_name_parameter);
}
void on_config_local_load(GtkWidget *,main_window *);
void on_config_local_load(GtkWidget *,main_window *){
yon_load_proceed(YON_CONFIG_LOCAL);
main_config.load_mode=1;
}
void on_config_global_load(GtkWidget *,main_window *);
void on_config_global_load(GtkWidget *,main_window *){
yon_load_proceed(YON_CONFIG_GLOBAL);
main_config.load_mode=0;
}
void on_config_custom_load(GtkWidget *,main_window *);
void on_config_custom_load(GtkWidget *,main_window *){
yon_load_proceed(YON_CONFIG_CUSTOM);
main_config.load_mode=3;
}
void on_config_global_local_save(GtkWidget *,main_window *widgets);
void on_config_global_local_save(GtkWidget *,main_window *widgets){
yon_save_proceed(NULL,YON_CONFIG_BOTH);
gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_COMPLETED);
}
void on_config_local_save(GtkWidget *,main_window *widgets);
void on_config_local_save(GtkWidget *,main_window *widgets){
yon_save_proceed("system",YON_CONFIG_LOCAL);
gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_COMPLETED);
}
void on_config_global_save(GtkWidget *,main_window *widgets);
void on_config_global_save(GtkWidget *,main_window *widgets){
yon_save_proceed("global",YON_CONFIG_GLOBAL);
gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_COMPLETED);
}
void on_config_custom_save(GtkWidget *, main_window *widgets);
void on_config_custom_save(GtkWidget *, main_window *widgets){
char *path = NULL;
// YON_CONFIG_TYPE type = YON_CONFIG_CUSTOM;
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));
// char *directory = gtk_file_chooser_get_current_folder(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(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);
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){
@ -228,6 +496,7 @@ void config_init(){
main_config.install_complete=0;
main_config.save_done=0;
main_config.configure_mode=0;
main_config.load_mode=-1;
}
void on_configuration_mode_switch(GtkWidget *self);
@ -308,7 +577,6 @@ gboolean on_image_slide(void *data){
return 1;
}
char* yon_debug_output(char *pattern,char*text);
char* yon_debug_output(char *pattern,char*text){
if (main_config.debug_mode){
printf(pattern,text);
@ -405,6 +673,7 @@ void on_page_changed(GtkWidget *,GtkWidget *,int page, main_window *widgets);
void on_page_changed(GtkWidget *,GtkWidget *,int page, main_window *widgets){
switch(page){
case YON_PAGE_WELCOME: {
gtk_widget_hide(widgets->SaveButton);
gtk_widget_set_sensitive(widgets->CancelInstallButton,0);
gtk_widget_set_sensitive(widgets->BackButton,0);
gtk_widget_set_sensitive(widgets->NextButton,1);
@ -412,7 +681,7 @@ void on_page_changed(GtkWidget *,GtkWidget *,int page, main_window *widgets){
gtk_button_set_label(GTK_BUTTON(widgets->CancelInstallButton),CANCEL_LABEL);
gtk_image_set_from_icon_name(GTK_IMAGE(gtk_button_get_image(GTK_BUTTON(widgets->NextButton))),"com.ublinux.ubinstall-gtk.arrow-right-symbolic",GTK_ICON_SIZE_BUTTON);
gtk_image_set_from_icon_name(GTK_IMAGE(gtk_button_get_image(GTK_BUTTON(widgets->CancelInstallButton))),"com.ublinux.ubinstall-gtk.circle-exit-symbolic",GTK_ICON_SIZE_BUTTON);
// gtk_widget_set_sensitive(widgets->ConfigurationModeMenuItem,1);
gtk_widget_set_sensitive(widgets->ConfigurationModeMenuItem,1);
yon_switch_page_render(widgets,0);
} break;
@ -455,6 +724,7 @@ void on_page_changed(GtkWidget *,GtkWidget *,int page, main_window *widgets){
case YON_PAGE_USERS:
yon_switch_page_render(widgets,6);
gtk_widget_set_sensitive(widgets->NextButton,1);
gtk_widget_hide(widgets->SaveButton);
break;
case YON_PAGE_INSTALL_ERROR:
case YON_PAGE_COMPLETION:{
@ -469,10 +739,27 @@ void on_page_changed(GtkWidget *,GtkWidget *,int page, main_window *widgets){
main_config.save_done=0;
gtk_button_set_label(GTK_BUTTON(widgets->NextButton),RESTART_LABEL);
gtk_button_set_label(GTK_BUTTON(widgets->CancelInstallButton),EXIT_LABEL);
gtk_image_set_from_icon_name(GTK_IMAGE(gtk_button_get_image(GTK_BUTTON(widgets->NextButton))),"com.ublinux.libublsettingsui-gtk3.sync-symbolic",GTK_ICON_SIZE_BUTTON);
gtk_image_set_from_icon_name(GTK_IMAGE(gtk_button_get_image(GTK_BUTTON(widgets->NextButton))),
"com.ublinux.ubinstall-gtk.sync-symbolic",GTK_ICON_SIZE_BUTTON);
}
break;
case YON_PAGE_COMPLETED:{
yon_switch_page_render(widgets,7);
gtk_widget_set_sensitive(widgets->BackButton,1);
gtk_widget_hide(gtk_widget_get_parent(widgets->PackageInstallationProgress));
gtk_widget_hide(widgets->InstallationLabel);
gtk_widget_hide(widgets->PackageInstallationLabel);
gtk_widget_set_sensitive(widgets->NextButton,0);
gtk_widget_set_sensitive(widgets->CancelInstallButton,1);
main_config.install_complete=0;
main_config.save_done=0;
gtk_button_set_label(GTK_BUTTON(widgets->CancelInstallButton),EXIT_LABEL);
gtk_image_set_from_icon_name(GTK_IMAGE(gtk_button_get_image(GTK_BUTTON(widgets->NextButton))),
"com.ublinux.ubinstall-gtk.sync-symbolic",GTK_ICON_SIZE_BUTTON);
}break;
case YON_PAGE_SECTIONS:
case YON_PAGE_INSTALL_COMMON:
case YON_PAGE_INSTALL_SEPARATE:
@ -485,6 +772,12 @@ void on_page_changed(GtkWidget *,GtkWidget *,int page, main_window *widgets){
case YON_PAGE_OPTIONS_OS_ONLY:
case YON_PAGE_OPTIONS_USRDATA_ONLY: {
yon_switch_page_render(widgets,2);
} break;
case YON_PAGE_CONFIGURE_END: {
gtk_widget_set_sensitive(widgets->BackButton,1);
gtk_widget_set_sensitive(widgets->NextButton,0);
gtk_widget_set_sensitive(widgets->CancelInstallButton,1);
gtk_widget_show(widgets->SaveButton);
}
}
}
@ -607,7 +900,7 @@ void on_page_navigation_clicked(GtkWidget *self, main_window *widgets){
switch (page){
case YON_PAGE_WELCOME:{
gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_LICENCE);
// gtk_widget_set_sensitive(widgets->ConfigurationModeMenuItem,0);
gtk_widget_set_sensitive(widgets->ConfigurationModeMenuItem,0);
} break;
case YON_PAGE_SECTIONS:{ //sections
@ -1102,6 +1395,14 @@ void on_page_navigation_clicked(GtkWidget *self, main_window *widgets){
gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_SECTIONS);
break;
case YON_PAGE_CONFIGURE_END:{
gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_USERS);
} break;
case YON_PAGE_COMPLETED:{
gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_USERS);
} break;
default:{
gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),page-1);
}
@ -1466,6 +1767,17 @@ main_window *yon_main_window_complete(){
widgets->UserdataDevicesTree = yon_gtk_builder_get_widget(builder,"UserdataDevicesTree");
widgets->UserdataSysSectionTree = yon_gtk_builder_get_widget(builder,"UserdataSysSectionTree");
widgets->SaveButton = yon_gtk_builder_get_widget(builder,"SaveButton");
widgets->LoadGlobalConfigurationMenuItem = yon_gtk_builder_get_widget(builder,"LoadGlobalConfigurationMenuItem");
widgets->LoadLocalConfigurationMenuItem = yon_gtk_builder_get_widget(builder,"LoadLocalConfigurationMenuItem");
widgets->LoadExternalConfigurationMenuItem = yon_gtk_builder_get_widget(builder,"LoadExternalConfigurationMenuItem");
widgets->SaveGlobalLocalConfigurationMenuItem = yon_gtk_builder_get_widget(builder,"SaveGlobalLocalConfigurationMenuItem");
widgets->SaveGlobalConfigurationMenuItem = yon_gtk_builder_get_widget(builder,"SaveGlobalConfigurationMenuItem");
widgets->SaveLocalConfigurationMenuItem = yon_gtk_builder_get_widget(builder,"SaveLocalConfigurationMenuItem");
widgets->SaveExternalConfigurationMenuItem = yon_gtk_builder_get_widget(builder,"SaveExternalConfigurationMenuItem");
widgets->LanguagesList = GTK_LIST_STORE(gtk_builder_get_object(builder,"LanguagesList"));
widgets->LanguagesFilter = GTK_TREE_MODEL(gtk_builder_get_object(builder,"LanguagesFilter"));
widgets->LayoutsFilter = GTK_TREE_MODEL(gtk_builder_get_object(builder,"LayoutsFilter"));
@ -1473,6 +1785,15 @@ main_window *yon_main_window_complete(){
widgets->AdditionalSoftwareList = GTK_LIST_STORE(gtk_builder_get_object(builder,"AdditionalSoftwareList"));
widgets->PartitionsList = GTK_LIST_STORE(gtk_builder_get_object(builder,"PartitionsList"));
g_signal_connect(G_OBJECT(widgets->LoadGlobalConfigurationMenuItem),"activate",G_CALLBACK(on_config_global_load),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->SaveGlobalLocalConfigurationMenuItem),"activate",G_CALLBACK(on_config_global_local_save),widgets);
g_signal_connect(G_OBJECT(widgets->SaveGlobalConfigurationMenuItem),"activate",G_CALLBACK(on_config_global_save),widgets);
g_signal_connect(G_OBJECT(widgets->SaveLocalConfigurationMenuItem),"activate",G_CALLBACK(on_config_local_save),widgets);
g_signal_connect(G_OBJECT(widgets->SaveExternalConfigurationMenuItem),"activate",G_CALLBACK(on_config_custom_save),widgets);
g_signal_connect(G_OBJECT(widgets->ReadFullLogButton),"clicked",G_CALLBACK(on_process_log_view),widgets);
g_signal_connect(G_OBJECT(widgets->ReadShortLogButton),"clicked",G_CALLBACK(on_summary_log_view),widgets);

@ -135,6 +135,16 @@ NULL
#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 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_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_default_command ""
#define config_get_global_only_parameters ""
#define config_get_local_only_parameters ""
#define ubconfig_file_create(target) yon_char_unite("ubconfig --target \"",target,"\" create",NULL)
typedef char* string;
string version_application;
@ -182,6 +192,7 @@ typedef struct {
int password_min_length;
int save_done;
int load_mode;
int install_complete;
int debug_mode;
@ -201,6 +212,17 @@ typedef struct {
GtkListStore *AdditionalSoftwareList;
GtkListStore *PartitionsList;
GtkWidget *LoadGlobalConfigurationMenuItem;
GtkWidget *LoadLocalConfigurationMenuItem;
GtkWidget *LoadExternalConfigurationMenuItem;
GtkWidget *SaveGlobalLocalConfigurationMenuItem;
GtkWidget *SaveGlobalConfigurationMenuItem;
GtkWidget *SaveLocalConfigurationMenuItem;
GtkWidget *SaveExternalConfigurationMenuItem;
GtkWidget *SaveButton;
GtkWidget *MainWindow;
GtkWidget *StatusBox;
@ -392,4 +414,9 @@ void NewFunction(ubinstall_language_window *window, GtkBuilder *builder);
ubinstall_keyboard_window *yon_ubinstall_keyboard_new();
password_window *yon_password_new();
void on_password_accept(GtkWidget *self, dictionary *dict);
void on_password_accept(GtkWidget *self, dictionary *dict);
char* yon_debug_output(char *pattern,char*text);
char *yon_save_command_prepare(char *command, char *target);
void yon_interface_update(main_window *widgets);

@ -6,7 +6,10 @@
#define WELCOME_LABEL _("Welcome to UBLinux installation")
#define WELCOME_BOTTOM_LABEL _("This program will ask you few questions\nand help you install UBLinux on your computer")
#define OPEN_LABEL _("Open")
#define KEYBOARD_TITLE_LABEL _("Keyboard layout")
#define CUSTOM_CONFIG_CREATION_ERROR_LABEL _("New configuration file creation failed")
#define CANCEL_LABEL _("Cancel")
#define BACK_LABEL _("Back")
@ -138,3 +141,5 @@
#define ERROR_LABEL _("Error has occured while installation process")
#define LOG_VIEW_LABEL _("Log exploration")
#define SAVE_LABEL _("Save")
#define LOAD_LABEL _("Load")

@ -72,7 +72,7 @@
</columns>
</object>
<object class="GtkAdjustment" id="adjustment1">
<property name="upper">100</property>
<property name="upper">999999</property>
<property name="value">16</property>
<property name="step-increment">1</property>
<property name="page-increment">10</property>
@ -165,6 +165,40 @@
<object class="GtkMenu" id="menu1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="reserve-toggle-size">False</property>
<child>
<object class="GtkMenuItem" id="LoadGlobalConfigurationMenuItem">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Load global configuration</property>
<style>
<class name="menuitemtop"/>
</style>
</object>
</child>
<child>
<object class="GtkMenuItem" id="LoadLocalConfigurationMenuItem">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Load local configuration</property>
<style>
<class name="menuitemmiddle"/>
</style>
</object>
</child>
<child>
<object class="GtkMenuItem" id="LoadExternalConfigurationMenuItem">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Load from specific file</property>
<style>
<class name="menuitembottom"/>
</style>
</object>
</child>
<style>
<class name="thin"/>
</style>
</object>
<object class="GtkMenu" id="menu2">
<property name="visible">True</property>
@ -201,6 +235,54 @@
</object>
</child>
</object>
<object class="GtkMenu" id="menu3">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="reserve-toggle-size">False</property>
<child>
<object class="GtkMenuItem" id="SaveGlobalLocalConfigurationMenuItem">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Save configuration</property>
<style>
<class name="menuitemtop"/>
</style>
</object>
</child>
<child>
<object class="GtkMenuItem" id="SaveGlobalConfigurationMenuItem">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Save to global configuration</property>
<style>
<class name="menuitemmiddle"/>
</style>
</object>
</child>
<child>
<object class="GtkMenuItem" id="SaveLocalConfigurationMenuItem">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Save to local configuration</property>
<style>
<class name="menuitemmiddle"/>
</style>
</object>
</child>
<child>
<object class="GtkMenuItem" id="SaveExternalConfigurationMenuItem">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Save to specific file</property>
<style>
<class name="menuitembottom"/>
</style>
</object>
</child>
<style>
<class name="thin"/>
</style>
</object>
<object class="GtkWindow" id="MainWindow">
<property name="width-request">800</property>
<property name="height-request">500</property>
@ -482,7 +564,6 @@ agreement</property>
<property name="margin-top">5</property>
<property name="margin-bottom">5</property>
<property name="tab-pos">left</property>
<property name="show-tabs">False</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
@ -2485,9 +2566,10 @@ or continue working in the UBLinux Live environment.</property>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Installation completion</property>
<property name="label" translatable="yes">Completion</property>
<attributes>
<attribute name="weight" value="bold"/>
<attribute name="scale" value="1"/>
<attribute name="foreground" value="#33722f2e7a06"/>
<attribute name="size" value="15360"/>
</attributes>
@ -2500,7 +2582,6 @@ or continue working in the UBLinux Live environment.</property>
</child>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
@ -2509,6 +2590,41 @@ or continue working in the UBLinux Live environment.</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="valign">end</property>
<property name="label" translatable="yes">Success</property>
<attributes>
<attribute name="weight" value="bold"/>
<attribute name="size" value="14336"/>
</attributes>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="valign">start</property>
<property name="label" translatable="yes">You have successfully saved configuration.</property>
<property name="justify">center</property>
<property name="wrap">True</property>
<attributes>
<attribute name="size" value="12288"/>
</attributes>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</object>
<packing>
<property name="position">11</property>
@ -3332,15 +3448,15 @@ installed.</property>
<property name="can-focus">False</property>
<property name="active">1</property>
<items>
<item translatable="yes">ext3</item>
<item translatable="yes">ext4</item>
<item translatable="yes">fat16</item>
<item translatable="yes">fat32</item>
<item translatable="yes">exfat</item>
<item translatable="yes">riserfs</item>
<item translatable="yes">udf</item>
<item translatable="yes">xfs</item>
<item translatable="yes">zfs</item>
<item id="ext3" translatable="yes">ext3</item>
<item id="ext4" translatable="yes">ext4</item>
<item id="fat16" translatable="yes">fat16</item>
<item id="fat32" translatable="yes">fat32</item>
<item id="exfat" translatable="yes">exfat</item>
<item id="riserfs" translatable="yes">riserfs</item>
<item id="udf" translatable="yes">udf</item>
<item id="xfs" translatable="yes">xfs</item>
<item id="zfs" translatable="yes">zfs</item>
</items>
</object>
<packing>
@ -7000,6 +7116,7 @@ separately into the selected partition.</property>
</child>
<child>
<object class="GtkMenuButton">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="focus-on-click">False</property>
<property name="receives-default">True</property>
@ -7058,6 +7175,48 @@ separately into the selected partition.</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkMenuButton" id="SaveButton">
<property name="can-focus">True</property>
<property name="focus-on-click">False</property>
<property name="receives-default">True</property>
<property name="popup">menu3</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkLabel" id="headerSaveConfigLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Save</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">pan-down-symbolic</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
<packing>
<property name="pack-type">end</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
</object>

Loading…
Cancel
Save