WIP installation process beginning

pull/94/head
parent f71848ea9d
commit 240baaef1f
No known key found for this signature in database
GPG Key ID: FF1D842BF4DDE92B

@ -116,6 +116,12 @@ set(SOURCE_FILES
ubinstall-gtk-separate.c
ubinstall-gtk-users.c
ubinstall-gtk-configuration-mode.c
ubinstall-gtk-decorations.c
ubinstall-gtk-log.c
ubinstall-gtk-password.c
ubinstall-gtk-saving.c
ubinstall-gtk-standard.c
ubinstall-gtk-install-start.c
ubinstall-gtk.h
ubl-strings.h
)

@ -20,7 +20,6 @@ int yon_grub_install_save(main_window *widgets){
yon_config_register(AUTOINSTALL_DEVICE,AUTOINSTALL_DEVICE_command,cur_device);
yon_config_register(part_parameter,part_parameter_command,partition);
yon_config_register(AUTOINSTALL_TYPE_INSTALL,AUTOINSTALL_TYPE_INSTALL_command,"grub_install");
yon_config_remove_by_key(part_parameter);
return 1;
}
@ -44,6 +43,5 @@ int yon_grub_update_save(main_window *widgets){
yon_config_register(AUTOINSTALL_DEVICE,AUTOINSTALL_DEVICE_command,cur_device);
yon_config_register(part_parameter,part_parameter_command,partition);
yon_config_register(AUTOINSTALL_TYPE_INSTALL,AUTOINSTALL_TYPE_INSTALL_command,"grub_update");
yon_config_remove_by_key(part_parameter);
return 1;
}

@ -0,0 +1,6 @@
#include "ubinstall-gtk.h"
int yon_installation_start(main_window *widgets){
g_thread_new("install_thread",(GThreadFunc)on_config_save,widgets);
return 1;
}

@ -233,4 +233,206 @@ int yon_install_advanced_save(main_window *widgets){
}
return 1;
}
}
void yon_set_max_size_from_partition(GtkTreeView *table, GtkSpinButton *spin_button, GtkComboBox *spin_combo){
GtkTreeModel *model;
GtkTreeIter iter;
long selected_size;
if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(table),&model,&iter)){
gtk_tree_model_get(model,&iter,6,&selected_size,-1);
if (!selected_size){
gtk_tree_model_get(model,&iter,5,&selected_size,-1);
}
if (selected_size){
GtkAdjustment *adj = gtk_spin_button_get_adjustment(spin_button);
const char *sizemod = gtk_combo_box_get_active_id(spin_combo);
double new_size = yon_size_long_convert_to_mod(selected_size,sizemod[0]);
gtk_adjustment_set_upper(adj,new_size);
gdouble old_value = gtk_adjustment_get_value(adj);
if (old_value>new_size){
gtk_adjustment_set_value(adj,new_size);
}
}
}
}
void on_partition_changed(GtkWidget *self, main_window *widgets){
if (self==widgets->InstallationNearSysSectionTree||self == widgets->InstallationNearSizeTypeSpin){
yon_set_max_size_from_partition(GTK_TREE_VIEW(widgets->InstallationNearSysSectionTree),GTK_SPIN_BUTTON(widgets->InstallationNearSizeSpin),GTK_COMBO_BOX(widgets->InstallationNearSizeTypeSpin));
}
}
// void on_separate_installation_changed(GtkWidget *self, main_window *widgets){
// gtk_list_store_clear(widgets->PartitionsList);
// GtkTreeIter iter;
// GtkTreeModel *model;
// if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(self)),&model,&iter)){
// gtk_tree_selection_select_iter(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->SeparateUserDevicesTree)),&iter);
// char *disk_path="";
// gtk_tree_model_get(model,&iter,0,&disk_path,-1);
// int size;
// config_str partitions;
// partitions = yon_config_load(yon_debug_output("%s\n",get_parts_and_devices_command),&size);
// for (int i=0;i<size;i++){
// yon_char_remove_last_symbol(partitions[i],'\n');
// int parsed_size;
// config_str parsed = yon_char_parse(partitions[i],&parsed_size,";");
// }
// char *string = yon_char_parsed_to_string(parsed,size,"");
// struct json_object *root;
// struct json_object *blockdevices;
// root = json_tokener_parse(string);
// json_object_object_get_ex(root, "blockdevices", &blockdevices);
// for (long unsigned int i = 0; i < json_object_array_length(blockdevices); i++) {
// struct json_object *device = json_object_array_get_idx(blockdevices, i);
// struct json_object *type, *path, *size, *model, *fstype, *fsused;
// json_object_object_get_ex(device, "type", &type);
// if (strcmp("part",json_object_get_string(type)))
// continue;
// json_object_object_get_ex(device, "path", &path);
// if (!strstr(json_object_get_string(path),disk_path)){
// continue;
// }
// json_object_object_get_ex(device, "size", &size);
// json_object_object_get_ex(device, "model", &model);
// json_object_object_get_ex(device, "fstype", &fstype);
// json_object_object_get_ex(device, "fsused", &fsused);
// double free_space=0;
// char *free_space_string="";
// if (size&&fsused){
// char *fsused_str = (char*)json_object_get_string(fsused);
// double fsused_kbytes = atof(fsused_str);
// for (int i=0;i<yon_get_size_get_from_letter(fsused_str[strlen(fsused_str)-1]);i++){
// fsused_kbytes*=1024;
// }
// char *size_str = (char*)json_object_get_string(size);
// double size_kbytes = atof(size_str);
// for (int i=0;i<yon_get_size_get_from_letter(size_str[strlen(size_str)-1]);i++){
// size_kbytes*=1024;
// }
// int sz=0;
// free_space = size_kbytes-fsused_kbytes;
// for (sz=0;free_space>1024;sz=sz+1){
// free_space=free_space/1024;
// }
// if (sz==-1) {
// sz=0;
// free_space=free_space/1024;
// }
// free_space_string = yon_char_append(yon_char_from_double(free_space)," ");
// free_space_string[strlen(free_space_string)-1]=*(yon_size_get_mod(sz));
// }
// gtk_adjustment_set_upper(gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(widgets->InstallationNearSizeSpin)),0.0);
// gtk_list_store_append(widgets->PartitionsList,&iter);
// gtk_list_store_set(widgets->PartitionsList,&iter,0,json_object_get_string(path),1,json_object_get_string(size),2,free_space_string,3,json_object_get_string(fstype),-1);
// }
// yon_char_parsed_free(parsed,size);
// }
// }
void on_device_selection_changed(GtkWidget *self, main_window *widgets){
gtk_list_store_clear(widgets->PartitionsList);
GtkTreeIter iter;
GtkTreeModel *model;
if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(self)),&model,&iter)){
char *disk_path;
gtk_tree_model_get(model,&iter,0,&disk_path,-1);
int size;
config_str partitions;
partitions = yon_config_load(yon_debug_output("%s\n",get_parts_and_devices_command),&size);
for (int i=0;i<size;i++){
yon_char_remove_last_symbol(partitions[i],'\n');
int parsed_size;
config_str parsed = yon_char_parse(partitions[i],&parsed_size,";");
if (!strcmp(parsed[0],"part")){
char *name = parsed[1];
if (strstr(name,disk_path)){
char *capacity = NULL;
long capacity_long = 0;
char *free_space = NULL;
long free_space_long = 0;
char *fs_type = NULL;
char *label = NULL;
if (parsed_size>2){
char sizemod='\0';
capacity_long = atol(parsed[2]);
char *temp = yon_char_from_double(yon_size_long_convert_automatic(capacity_long,&sizemod));
capacity = yon_char_append_c(temp,sizemod);
free(temp);
}
if (parsed_size>7&&!yon_char_is_empty(parsed[7])){
char sizemod='\0';
free_space_long = capacity_long-atol(parsed[7]);
char *temp = yon_char_from_double(yon_size_long_convert_automatic(free_space_long,&sizemod));
free_space = yon_char_append_c(temp,sizemod);
free(temp);
}
if (parsed_size>3){
fs_type = parsed[3];
}
if (parsed_size>4){
label = parsed[4];
}
gtk_list_store_append(widgets->PartitionsList,&iter);
gtk_list_store_set(widgets->PartitionsList,&iter,0,name,1,capacity,2,free_space,3,fs_type,4,label,5,capacity_long,6,free_space_long,-1);
}
yon_char_parsed_free(parsed,parsed_size);
}
}
gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->InstallationNearSizeSpin),0.0);
gtk_adjustment_set_upper(gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(widgets->InstallationNearSizeSpin)),0.0);
}
}
// void on_same_installation_device_changed(GtkWidget *, main_window *widgets){
// gtk_list_store_clear(widgets->PartitionsList);
// GtkTreeIter iter;
// GtkTreeModel *model;
// if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->SamePlaceDeviceTree)),&model,&iter)){
// char *disk_path="";
// gtk_tree_model_get(model,&iter,0,&disk_path,-1);
// int size;
// config_str parsed;
// parsed = yon_config_load(yon_debug_output("%s\n",get_parts_and_devices_command),&size);
// char *string = yon_char_parsed_to_string(parsed,size,"");
// struct json_object *root;
// struct json_object *blockdevices;
// root = json_tokener_parse(string);
// json_object_object_get_ex(root, "blockdevices", &blockdevices);
// for (long unsigned int i = 0; i < json_object_array_length(blockdevices); i++) {
// struct json_object *device = json_object_array_get_idx(blockdevices, i);
// struct json_object *type, *path, *size, *model, *vendor, *serial;
// json_object_object_get_ex(device, "type", &type);
// if (strcmp("part",json_object_get_string(type)))
// continue;
// json_object_object_get_ex(device, "path", &path);
// if (!strstr(json_object_get_string(path),disk_path)){
// continue;
// }
// json_object_object_get_ex(device, "size", &size);
// json_object_object_get_ex(device, "model", &model);
// json_object_object_get_ex(device, "vendor", &vendor);
// json_object_object_get_ex(device, "serial", &serial);
// gtk_list_store_append(widgets->PartitionsList,&iter);
// gtk_list_store_set(widgets->PartitionsList,&iter,0,json_object_get_string(path),1,json_object_get_string(model),2,json_object_get_string(serial),3,json_object_get_string(size),4,json_object_get_string(vendor),-1);
// }
// yon_char_parsed_free(parsed,size);
// }
// }

@ -0,0 +1,127 @@
#include "ubinstall-gtk.h"
// void on_log_closed(GtkWidget *, dictionary *dict){
// main_window *widgets = yon_dictionary_get_data(dict->first,main_window*);
// log_window *window = yon_dictionary_get_data(dict->first->next,log_window*);
//
// gtk_widget_set_sensitive(widgets->ReadFullLogButton,1);
// gtk_widget_set_sensitive(widgets->ReadShortLogButton,1);
//
// free(window->command);
// window->Window=NULL;
// }
// log_window *yon_log_window_new(){
// log_window *window = malloc(sizeof(log_window));
// GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_log_view);
// window->Window = yon_gtk_builder_get_widget(builder,"MainWindow");
// window->ScrollWindow = yon_gtk_builder_get_widget(builder,"ScrollWindow");
// window->HeadLabel = yon_gtk_builder_get_widget(builder,"headerTopic");
// window->LogLabel = yon_gtk_builder_get_widget(builder,"LogLabel");
// window->StatusBox = yon_gtk_builder_get_widget(builder,"StatusBox");
// window->ScrollToEndCheck = yon_gtk_builder_get_widget(builder,"ScrollToEndCheck");
// gtk_widget_show(window->Window);
// return window;
// }
// gboolean yon_read_log(void *data){
// log_window *window = (log_window*)data;
// if (window->Window){
// int size;
// g_mutex_lock(&main_config.progress_mutex);
// config_str parsed = yon_file_open(window->command,&size);
// g_mutex_unlock(&main_config.progress_mutex);
// if (size){
// char *final = yon_char_parsed_to_string(parsed,size,"");
// gtk_label_set_text(GTK_LABEL(window->LogLabel),final);
// if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->ScrollToEndCheck))){
// gtk_adjustment_set_value(gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(window->ScrollWindow)),gtk_adjustment_get_upper(gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(window->ScrollWindow))));
// }
// free(final);
// yon_char_parsed_free(parsed,size);
// }
// g_mutex_lock(&main_config.install_mutex);
// if (!main_config.install_complete){
// g_mutex_unlock(&main_config.install_mutex);
// return 1;
// } else {
// g_mutex_unlock(&main_config.install_mutex);
// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->ScrollToEndCheck),0);
// gtk_widget_set_sensitive(window->ScrollToEndCheck,0);
// }
// }
// return 0;
// }
// void on_process_log_view(GtkWidget *,main_window *widgets){
// log_window *window = yon_log_window_new();
// dictionary *dict=NULL;
// yon_dictionary_add_or_create_if_exists_with_data(dict,"widgets",widgets);
// yon_dictionary_add_or_create_if_exists_with_data(dict,"window",window);
// g_signal_connect(G_OBJECT(window->Window),"destroy",G_CALLBACK(on_log_closed),dict);
// gtk_widget_set_sensitive(widgets->ReadFullLogButton,0);
// gtk_widget_set_sensitive(widgets->ReadShortLogButton,0);
// yon_gtk_window_setup(GTK_WINDOW(window->Window),NULL,INSTALL_LOG_LABEL,icon_path,"log_viewer");
// window->command = yon_char_new(short_log_path);
// gdk_threads_add_timeout(500,(GSourceFunc)yon_read_log,window);
// }
// void on_summary_log_view(GtkWidget *,main_window *widgets){
// log_window *window = yon_log_window_new();
// dictionary *dict=NULL;
// yon_dictionary_add_or_create_if_exists_with_data(dict,"widgets",widgets);
// yon_dictionary_add_or_create_if_exists_with_data(dict,"window",window);
// g_signal_connect(G_OBJECT(window->Window),"destroy",G_CALLBACK(on_log_closed),dict);
// gtk_widget_set_sensitive(widgets->ReadFullLogButton,0);
// gtk_widget_set_sensitive(widgets->ReadShortLogButton,0);
// yon_gtk_window_setup(GTK_WINDOW(window->Window),NULL,PROGRESS_LOG_LABEL,icon_path,"log_viewer");
// window->command = yon_char_new(full_log_path);
// gdk_threads_add_timeout(500,(GSourceFunc)yon_read_log,window);
//
// }
// gboolean yon_installation_progress_update(void *data) {
// main_window *widgets = (main_window*)data;
// int size;
//
// g_mutex_lock(&main_config.progress_mutex);
// config_str text = yon_file_open(progress_path, &size);
// g_mutex_unlock(&main_config.progress_mutex);
//
// if (size) {
// if (!yon_char_is_empty(text[size-1]) && text[size-1][0] == '(') {
// char *current_copy = yon_char_new(text[size-1]);
// char *percentage = yon_char_divide_search(current_copy, ")", -1);
//
// if (!strstr(percentage, "#pb")) {
// double fraction = atof(percentage+1);
// gtk_label_set_text(GTK_LABEL(widgets->InstallationLabel), current_copy);
// gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(widgets->InstallationProgress), fraction / 100);
// gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(widgets->PackageInstallationProgress), 0);
// gtk_label_set_text(GTK_LABEL(widgets->PackageInstallationLabel), "");
// } else {
// gtk_widget_show(gtk_widget_get_parent(widgets->PackageInstallationProgress));
//
// config_str parsed = yon_char_parse(current_copy, &size, " ");
// if (size >= 3) {
// double fraction = atof(parsed[2]) / 100;
// gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(widgets->PackageInstallationProgress), fraction);
// gtk_label_set_text(GTK_LABEL(widgets->PackageInstallationLabel), yon_char_parsed_to_string(parsed, size, " "));
// }
// }
//
// }
// yon_char_parsed_free(text, size);
// }
//
// g_mutex_lock(&main_config.install_mutex);
// if (main_config.install_thread) {
// g_mutex_unlock(&main_config.install_mutex);
// return 1;
// } else {
// g_mutex_unlock(&main_config.install_mutex);
// gtk_label_set_text(GTK_LABEL(widgets->PackageInstallationLabel), "");
// return 0;
// }
// }

@ -1,5 +1,34 @@
#include "ubinstall-gtk.h"
// void on_autohostname_check(GtkWidget *, main_window *widgets){
// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->HostnameSensitiveCheck),1);
// if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->AutoHostnameCheck))){
// gtk_widget_set_sensitive(widgets->HotnameEntry,0);
// gtk_entry_set_placeholder_text(GTK_ENTRY(widgets->HotnameEntry),"auto");
// }else{
// gtk_widget_set_sensitive(widgets->HotnameEntry,1);
// gtk_entry_set_placeholder_text(GTK_ENTRY(widgets->HotnameEntry),"ublinux-install");
// }
// }
// void on_autohostname_sensitiveness_check(GtkWidget *, main_window *widgets){
// if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->HostnameSensitiveCheck))){
// gtk_widget_set_sensitive(widgets->AutoHostnameCheck,1);
// if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->AutoHostnameCheck))){
// gtk_widget_set_sensitive(widgets->HotnameEntry,0);
// } else
// gtk_widget_set_sensitive(widgets->HotnameEntry,1);
// } else {
// gtk_widget_set_sensitive(widgets->HotnameEntry,0);
// gtk_widget_set_sensitive(widgets->AutoHostnameCheck,0);
// }
// }
// void on_hostname_entry_changed (GtkWidget *, main_window *widgets){
// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->HostnameSensitiveCheck),1);
// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->AutoHostnameCheck),0);
// }
network_info *yon_network_info_new(){
network_info *info = new(network_info);
GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_network_info);
@ -79,9 +108,35 @@ void on_connection_add(main_window *widgets){
int yon_network_save(main_window *widgets){
if (gtk_switch_get_active(GTK_SWITCH(widgets->NetworkDomainSwitch))){
// const char *domain_name = gtk_entry_get_text(GTK_ENTRY(widgets->NetworkDomainNameEntry));
// const char *domain_admin = gtk_entry_get_text(GTK_ENTRY(widgets->NetworkDomainAdminEntry));
// const char *domain_password = gtk_entry_get_text(GTK_ENTRY(widgets->NetworkDomainPasswordEntry));
const char *domain_name = gtk_entry_get_text(GTK_ENTRY(widgets->NetworkDomainNameEntry));
if (!yon_char_is_empty(domain_name)){
yon_ubl_status_box_render(EMPTY_IMPORTANT_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
yon_ubl_status_highlight_incorrect(widgets->NetworkDomainNameEntry);
return 0;
}
const char *domain_admin = gtk_entry_get_text(GTK_ENTRY(widgets->NetworkDomainAdminEntry));
const char *domain_password = gtk_entry_get_text(GTK_ENTRY(widgets->NetworkDomainPasswordEntry));
if (!yon_char_is_empty(domain_name)) yon_config_register(DOMAIN_parameter,DOMAIN_parameter_command,(char*)domain_name);
else yon_config_remove_by_key(DOMAIN_parameter);
if ((!yon_char_is_empty(domain_admin)&&yon_char_is_empty(domain_password))||(yon_char_is_empty(domain_admin)&&!yon_char_is_empty(domain_password))){
yon_ubl_status_box_render(EMPTY_IMPORTANT_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
yon_ubl_status_highlight_incorrect(widgets->NetworkDomainAdminEntry);
yon_ubl_status_highlight_incorrect(widgets->NetworkDomainPasswordEntry);
return 0;
}
if (!yon_char_is_empty(domain_admin)&&!yon_char_is_empty(domain_password)){
int size;
config_str encrypted_password = yon_config_load(encrypt_domain_password_command(domain_password),&size);
if (!size){
yon_ubl_status_box_render(ENCRYPT_ERROR_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
yon_ubl_status_highlight_incorrect(widgets->NetworkDomainPasswordEntry);
return 0;
}
char *admin_string_full = yon_char_unite(domain_admin,":",encrypted_password[0],NULL);
yon_config_register(DOMAIN_admanger_parameter,DOMAIN_parameter_command,admin_string_full);
} else {
yon_config_remove_by_key(DOMAIN_admanger_parameter);
}
}
if (gtk_switch_get_active(GTK_SWITCH(widgets->NetworkNTPServerSwitch))){

@ -18,15 +18,15 @@ enum YON_PAGES yon_page_get_next(main_window *widgets, enum YON_PAGES page){
case YON_PAGE_STARTUP: return YON_PAGE_BOOTLOADER; break;
case YON_PAGE_BOOTLOADER: return YON_PAGE_NETWORK; break;
case YON_PAGE_NETWORK: return main_config.configure_mode? YON_PAGE_CONFIGURE_END : YON_PAGE_INSTALLATION; break;
case YON_PAGE_INSTALL_COMMON: return YON_PAGE_KERNEL; break;
case YON_PAGE_INSTALL_SEPARATE: return YON_PAGE_KERNEL; break;
case YON_PAGE_INSTALL_SAME_PARTITION: return YON_PAGE_KERNEL; break;
case YON_PAGE_INSTALL_ADVANCED: return YON_PAGE_KERNEL; break;
case YON_PAGE_INSTALL_COMMON: return main_config.configure_mode?YON_PAGE_KERNEL:YON_PAGE_INSTALLATION_BEGIN; break;
case YON_PAGE_INSTALL_SEPARATE: return main_config.configure_mode?YON_PAGE_KERNEL:YON_PAGE_INSTALLATION_BEGIN; break;
case YON_PAGE_INSTALL_SAME_PARTITION: return main_config.configure_mode?YON_PAGE_KERNEL:YON_PAGE_INSTALLATION_BEGIN; break;
case YON_PAGE_INSTALL_ADVANCED: return main_config.configure_mode?YON_PAGE_KERNEL:YON_PAGE_INSTALLATION_BEGIN; break;
case YON_PAGE_INSTALL_RECOVERY: return yon_recovery_get_next(widgets); break;
case YON_PAGE_RECOVERY_GRUB_INSTALL: return YON_PAGE_INSTALLATION; break;
case YON_PAGE_RECOVERY_GRUB_UPDATE: return YON_PAGE_INSTALLATION; break;
case YON_PAGE_RECOVERY_OS_ONLY: return YON_PAGE_INSTALLATION; break;
case YON_PAGE_RECOVERY_USRDATA_ONLY: return YON_PAGE_INSTALLATION; break;
case YON_PAGE_RECOVERY_GRUB_INSTALL: return main_config.configure_mode?YON_PAGE_INSTALLATION:YON_PAGE_INSTALLATION_BEGIN; break;
case YON_PAGE_RECOVERY_GRUB_UPDATE: return main_config.configure_mode?YON_PAGE_INSTALLATION:YON_PAGE_INSTALLATION_BEGIN; break;
case YON_PAGE_RECOVERY_OS_ONLY: return main_config.configure_mode?YON_PAGE_INSTALLATION:YON_PAGE_INSTALLATION_BEGIN; break;
case YON_PAGE_RECOVERY_USRDATA_ONLY: return main_config.configure_mode?YON_PAGE_INSTALLATION:YON_PAGE_INSTALLATION_BEGIN; break;
default:return YON_PAGE_WELCOME;
}
return YON_PAGE_WELCOME;
@ -158,6 +158,9 @@ int yon_page_save(main_window *widgets, enum YON_PAGES page){
case YON_PAGE_RECOVERY_USRDATA_ONLY:
return yon_install_options_save(widgets->UserdataDevicesTree,widgets->UserdataSysSectionTree,"data_only",widgets);
break;
case YON_PAGE_INSTALLATION_BEGIN:
return yon_installation_start(widgets);
break;
default:return 1;
}
return 1;
@ -207,4 +210,165 @@ enum YON_PAGES yon_recovery_get_next(main_window *widgets){
else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->UserDataOnlyRadio)))
return YON_PAGE_RECOVERY_USRDATA_ONLY;
return YON_PAGE_SECTIONS;
}
}
void on_page_next_clicked(GtkWidget *, main_window *widgets){
enum YON_PAGES page = gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->Notebook));
page = yon_page_get_next(widgets,page);
if ((int)page!=-1){
gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),page);
}
yon_page_update(widgets);
}
void on_page_prev_clicked(GtkWidget *, main_window *widgets){
enum YON_PAGES page = gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->Notebook));
page = yon_page_get_prev(page);
if ((int)page!=-1){
gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),page);
}
yon_page_update(widgets);
}
// void on_page_changed(GtkWidget *,GtkWidget *,int page, main_window *widgets){
// if (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);
// textdomain(LocaleName);
// gtk_button_set_label(GTK_BUTTON(widgets->NextButton),NEXT_LABEL);
// 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);
// yon_switch_page_render(widgets,0);
// } break;
//
// case YON_PAGE_LICENCE:{
// gtk_widget_set_sensitive(widgets->CancelInstallButton,1);
// gtk_widget_set_sensitive(widgets->BackButton,1);
// yon_switch_page_render(widgets,1);
// } break;
//
// case YON_PAGE_REGION: {
// yon_image_resize_from_container(GTK_IMAGE(widgets->RegionImage), widgets->regions_original);
// yon_switch_page_render(widgets,4);
// } break;
//
// case YON_PAGE_KEYBOARD: {
//
// yon_switch_page_render(widgets,5);
// yon_image_resize_from_container(GTK_IMAGE(widgets->KeyboardImage), widgets->keyboard_original);
// } break;
//
// case YON_PAGE_OS_COMPONENTS:
// case YON_PAGE_SOFTWARE:
// case YON_PAGE_INSTALLATION_BEGIN:
// yon_switch_page_render(widgets,3);
//
// break;
// case YON_PAGE_INSTALLATION:{
// yon_switch_page_render(widgets,3);
// gtk_widget_set_sensitive(widgets->BackButton,0);
// if ((!main_config.configure_mode))
// gtk_widget_set_sensitive(widgets->CancelInstallButton,0);
// if (!main_config.progress_thread&&!main_config.configure_mode)
// main_config.progress_thread = gdk_threads_add_timeout(500,(GSourceFunc)yon_installation_progress_update,widgets);
//
// if (!main_config.slider_thread&&!main_config.configure_mode)
// main_config.slider_thread = g_timeout_add(5000,(GSourceFunc)on_image_slide,widgets);
// gtk_widget_show(gtk_widget_get_parent(widgets->InstallationProgress));
// } break;
//
// 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:{
// on_summary_log_view((GtkWidget*)NULL,widgets);
//
// yon_switch_page_render(widgets,7);
// gtk_widget_set_sensitive(widgets->BackButton,0);
// 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,1);
// gtk_widget_set_sensitive(widgets->CancelInstallButton,1);
// g_mutex_lock(&main_config.install_mutex);
// main_config.install_complete=0;
// g_mutex_unlock(&main_config.install_mutex);
// main_config.save_done=0;
// textdomain(LocaleName);
// 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.ubinstall-gtk.sync-symbolic",GTK_ICON_SIZE_BUTTON);
//
// } break;
// case YON_PAGE_COMPLETION:{
// yon_switch_page_render(widgets,7);
// gtk_widget_set_sensitive(widgets->BackButton,0);
// 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,1);
// gtk_widget_set_sensitive(widgets->CancelInstallButton,1);
// g_mutex_lock(&main_config.install_mutex);
// main_config.install_complete=0;
// g_mutex_unlock(&main_config.install_mutex);
// main_config.save_done=0;
// textdomain(LocaleName);
// 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.ubinstall-gtk.sync-symbolic",GTK_ICON_SIZE_BUTTON);
// }
// gtk_widget_hide(gtk_widget_get_parent(widgets->InstallationProgress));
// gtk_widget_hide(gtk_widget_get_parent(widgets->PackageInstallationProgress));
// 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);
// g_mutex_lock(&main_config.install_mutex);
// main_config.install_complete=0;
// g_mutex_unlock(&main_config.install_mutex);
// main_config.save_done=0;
// textdomain(LocaleName);
// 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:
// case YON_PAGE_INSTALL_SAME_PARTITION:
// case YON_PAGE_INSTALL_RECOVERY:
// case YON_PAGE_OPTIONS_GRUB_INSTALL:
// case YON_PAGE_OPTIONS_GRUB_UPDATE:
// case YON_PAGE_OPTIONS_SEPARATE:
// case YON_PAGE_OPTIONS_SEPARATE_USRDATA:
// 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);
// }
// }
// }

@ -0,0 +1,44 @@
#include "ubinstall-gtk.h"
// void yon_password_set_sensitive_from_toggle(GtkWidget *self, main_window *widgets){
// GtkWidget *combo = NULL;
// GtkWidget *entry = NULL;
// if (self == widgets->PasswordSensitiveCheck){
// combo = widgets->PasswordCombo;
// entry = widgets->PasswordEntry;
// } else {
// combo = widgets->AdminPasswordCombo;
// entry = widgets->AdminPasswordEntry;
// }
// if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(self))){
// gtk_widget_set_sensitive(combo,1);
// if (gtk_combo_box_get_active(GTK_COMBO_BOX(combo))){
// gtk_widget_set_sensitive(entry,1);
// } else {
// gtk_widget_set_sensitive(entry,0);
// }
// } else {
// gtk_widget_set_sensitive(combo,0);
// gtk_widget_set_sensitive(entry,0);
//
// }
// }
// void yon_password_combo_set_sensitive(GtkWidget *self, main_window *widgets){
// GtkWidget *entry = NULL;
// GtkWidget *toggle = NULL;
// if (self == widgets->PasswordCombo){
// entry = widgets->PasswordEntry;
// toggle = widgets->PasswordSensitiveCheck;
// } else if (self == widgets->AdminPasswordCombo){
// entry = widgets->AdminPasswordEntry;
// toggle = widgets->RootPasswordSensitiveCheck;
// }
// if (gtk_combo_box_get_active(GTK_COMBO_BOX(self))&&gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(toggle))){
// gtk_widget_set_sensitive(entry,1);
// } else {
// gtk_widget_set_sensitive(entry,0);
//
// }
// }

@ -1,5 +1,11 @@
#include "ubinstall-gtk.h"
// void on_region_resized(GtkWidget *,main_window *widgets){
// yon_image_resize_from_container(GTK_IMAGE(widgets->SlidesImage), (GdkPixbuf*)g_list_nth_data(widgets->slides_original,cur_slide));
// yon_image_resize_from_container(GTK_IMAGE(widgets->RegionImage), widgets->regions_original);
// yon_image_resize_from_container(GTK_IMAGE(widgets->KeyboardImage), widgets->keyboard_original);
// }
int yon_region_save(main_window *widgets){
if (gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->RegionCombo))==-1){
yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),REGION_EMPTY_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);

@ -0,0 +1,544 @@
#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_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){
// yon_config_clean();
// if (!yon_char_is_empty(config_get_default_command))
// yon_config_load_config(YON_CONFIG_DEFAULT,yon_debug_output("%s\n",config_get_default_command),NULL);
// if (type==YON_CONFIG_GLOBAL){
// yon_config_load_config(type,yon_debug_output("%s\n",config_get_global_command),NULL);
// } else if (type==YON_CONFIG_LOCAL){
// yon_config_load_config(type,yon_debug_output("%s\n",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.ubinstall");
// 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_debug_output("%s\n",yon_config_get_custom_command(path)),NULL);
// if (path) free(path);
// }
// }
// void on_config_local_load(GtkWidget *,main_window *widgets){
// yon_load_proceed(YON_CONFIG_LOCAL);
// yon_interface_update(widgets);
// main_config.load_mode=1;
// }
// void on_config_global_load(GtkWidget *,main_window *widgets){
// yon_load_proceed(YON_CONFIG_GLOBAL);
// yon_interface_update(widgets);
// main_config.load_mode=0;
// }
// void on_config_custom_load(GtkWidget *,main_window *widgets){
// yon_load_proceed(YON_CONFIG_CUSTOM);
// yon_interface_update(widgets);
// main_config.load_mode=3;
// }
// 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){
// 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){
// 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){
// 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_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;
// if (!yon_char_is_empty(part_size)){
// 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 (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->RegionSensitiveCheck),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->RegionSensitiveCheck),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->LoginEntry),user_name);
// }
// } else {
// gtk_entry_set_text(GTK_ENTRY(widgets->LoginEntry),"");
// 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->UserNameEntry),_(user_gecos));
// } else {
// gtk_entry_set_text(GTK_ENTRY(widgets->UserNameEntry),"");
// 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->PasswordCombo),0);
// gtk_entry_set_text(GTK_ENTRY(widgets->PasswordEntry),"");
// 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->PasswordEntry),user_password);
// gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->PasswordCombo),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->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);
// 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);
yon_page_update(widgets);
return 0;
}
gboolean on_install_error(main_window *widgets){
gtk_label_set_text(GTK_LABEL(widgets->InstallationLabel),"");
gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_INSTALL_ERROR);
yon_page_update(widgets);
return 0;
}
void *on_config_save(void *data){
main_window *widgets = (main_window*)data;
int size=0;
config_str parameters = yon_config_get_selection_by_key_no_ignored(&size,
AUTOINSTALL_TYPE_INSTALL,
AUTOINSTALL_DEVICE,
device_format_parameter,
device_label_parameter,
part_parameter,
part_type_parameter,
part_size_parameter,
NULL);
FILE *file = fopen(progress_path,"w");
if (file)
fclose(file);
char *command = yon_debug_output("%s\n",save_config_command(yon_char_parsed_to_string(parameters,size," ")));
yon_char_parsed_free(parameters,size);
yon_debug_output("%s\n","Entered installation");
if (system(yon_debug_output("%s\n",command))){
gdk_threads_add_idle((GSourceFunc)on_install_error,widgets);
free(command);
g_mutex_lock(&main_config.install_mutex);
main_config.install_complete=1;
g_mutex_unlock(&main_config.install_mutex);
return 0;
};
free(command);
g_mutex_lock(&main_config.install_mutex);
main_config.install_complete=1;
g_mutex_unlock(&main_config.install_mutex);
if (!main_config.save_done&&main_config.save_configured){
on_setup_system_configuration(widgets);
}
return 0;
}
void *on_setup_system_configuration(void * data){
yon_debug_output("%s\n","Entered thread");
main_window *widgets = (main_window*)data;
if (widgets){};
int size;
config_str all_parameters = yon_config_get_selection_by_key(&size,
user_name_parameter,
user_gecos_parameter,
user_password_parameter,
root_password_parameter,
autologin_parameter,
xkbmodel_parameter,
xkblayout_parameter,
xkbvariant_parameter,
xkboptions_parameter,
hostname_parameter,
zone_parameter,
lang_parameter,
locale_parameter,
NULL);
if (all_parameters){
char *parameter_string = yon_char_parsed_to_string(all_parameters,size," ");
char *command = set_user_config_command(parameter_string);
if (system(yon_debug_output("%s\n",command))){};
yon_char_parsed_free(all_parameters,size);
free(command);
if (parameter_string) free(parameter_string);
}
g_idle_add((GSourceFunc)on_install_success,widgets);
return NULL;
}

@ -0,0 +1,48 @@
#include "ubinstall-gtk.h"
// void on_open_documentation_confirmation(GtkWidget *self, char *link);
// void on_open_documentation_confirmation(GtkWidget *self, char *link){
// if (main_config.always_open_documentation==0){
// GtkBuilder *builder = gtk_builder_new_from_resource(ui_glade_path_documentation);
// documentation_confirmation_window *window = malloc(sizeof(documentation_confirmation_window));
// window->Window = yon_gtk_builder_get_widget(builder,"helpConfirmationWindow");
// window->AcceptButton = yon_gtk_builder_get_widget(builder,"ReadHelpButton");
// window->CloseButton = yon_gtk_builder_get_widget(builder,"CancelHelpButton");
// window->HeaderLabel = yon_gtk_builder_get_widget(builder,"webHeaderNameLabel");
// window->AlwaysOpenCheck = yon_gtk_builder_get_widget(builder,"AlwaysOpenDocumentationCheckbox");
// gtk_label_set_text(GTK_LABEL(window->HeaderLabel),TITLE_LABEL);
// gtk_widget_show_all(window->Window);
// g_signal_connect(G_OBJECT(window->CloseButton),"clicked",G_CALLBACK(on_subwindow_close),NULL);
// g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(yon_open_browser),yon_char_new(link));
// g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(on_subwindow_close),NULL);
//
//
// } else {
// yon_open_browser(self,link);
// }
// }
// void on_link(GtkWidget *self, char* uri);
// void on_link(GtkWidget *self, char* uri){
// gtk_widget_destroy(self);
// on_open_documentation_confirmation(self,uri);
// }
// void on_about(GtkWidget *);
// void on_about(GtkWidget *){
// GtkBuilder *builder=gtk_builder_new_from_resource(ui_glade_path_about);
// GtkWidget *window=yon_gtk_builder_get_widget(builder,"AboutWindow");
// GtkWidget *title=yon_gtk_builder_get_widget(builder,"headerAboutTopic");
// GtkWidget *hideButtonBox=yon_gtk_builder_get_widget(builder,"buttonBoxHide");
// gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(window),version_application);
// gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(window),TITLE_LABEL);
// gtk_about_dialog_set_logo_icon_name(GTK_ABOUT_DIALOG(window),yon_char_append("com.ublinux.",LocaleName));
// gtk_window_set_icon_name(GTK_WINDOW(window),yon_char_append("com.ublinux.",LocaleName));
// gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(window),LocaleName);
// gtk_label_set_text(GTK_LABEL(title),TITLE_LABEL);
// g_signal_connect(G_OBJECT(window),"activate-link",G_CALLBACK(on_link),WIKI_LINK);
// gtk_widget_set_visible(hideButtonBox,0);
// gtk_widget_destroy(hideButtonBox);
// gtk_widget_show(window);
// }

File diff suppressed because it is too large Load Diff

@ -65,6 +65,8 @@
"/com/ublinux/images/slide-12.png", \
NULL
#define encrypt_domain_password_command(target) yon_char_unite("echo '",target,"' | base64",NULL)
#define get_ntp_default_command "ubconfig --default get [network] NTPSERVERS_DEFAULT"
#define get_ntp_ru_command "ubconfig --default get [network] NTPSERVERS_RU"
@ -75,7 +77,7 @@ NULL
#define get_layouts_command "xkbcli list --load-exotic | awk \"layout && /description:/ {match(\\$0,/: *(.*)/,matches);description=matches[1];printf \\\"%s|%s\\n\\\",layout,description;layout=\\\"\\\"} /layout:/ {match(\\$0, /: *'([^']+)'/,matches);l=matches[1];if (layouts[l]) next;layout=layouts[l]=l}\" | sort -u"
#define get_layouts_local_command(layout) yon_char_unite("xkbcli list --load-exotic | awk -v layout=\"",layout,"\" \"BEGIN {layout_pattern = sprintf(\\\"^ *- *layout: *'%s'\\\",layout);matched=0} matched && /variant:/ {match(\\$0, /: *'([^']+)'/, matches);variant = matches[1]} matched && /description:/ {match(\\$0, /: *(.+)/, matches);description = matches[1]} matched && /^ *-/{matched=0; if (variant) printf \\\"%s|%s\\n\\\",variant,description} \\$0 ~ layout_pattern {matched=1;variant=\\\"\\\";description=\\\"\\\";next}\" | sort -u",NULL)
#define get_devices_command "lsblk --noheadings --nodeps -Jo PATH,SIZE,MODEL,VENDOR,SERIAL --exclude 7,253"
#define get_parts_and_devices_command "lsblk --noheadings -Jo TYPE,PATH,SIZE,FSTYPE,LABEL,PARTLABEL,MOUNTPOINT,FSUSED,FSUSE% --exclude 7,253"
#define get_parts_and_devices_command "lsblk --noheadings --bytes -o TYPE,PATH,SIZE,FSTYPE,LABEL,PARTLABEL,MOUNTPOINT,FSUSED,FSUSE% --exclude 7,253 |awk '{print ($1\";\"$2\";\"$3\";\"$4\";\"$5\";\"$6\";\"$7\";\"$8\";\"$9)}'"
#define AUTOINSTALL_TYPE_INSTALL "AUTOINSTALL[install_type]"
#define AUTOINSTALL_TYPE_INSTALL_command "ubconfig --source global get [autoinstall] AUTOINSTALL[install_type]"
@ -142,6 +144,10 @@ NULL
#define device_typevfs_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[device_typevfs]"
#define NTPSERVERS_parameter "AOUTINSTALL[ubconfig set [network] NTPSERVERS]"
#define NTPSERVERS_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[ubconfig set [network] NTPSERVERS]"
#define DOMAIN_parameter "AOUTINSTALL[ubconfig set [network] DOMAIN]"
#define DOMAIN_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[ubconfig set [network] DOMAIN]"
#define DOMAIN_admanger_parameter "AOUTINSTALL[ubconfig set [network] DOMAIN[admanger]]"
#define DOMAIN_admanger_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[ubconfig set [network] DOMAIN[admanger]]"
#define save_config_command(parameters) yon_char_unite("ubconfig --target system set [autoinstall] AUTOINSTALL[log]=yes ",parameters, "; nice ubinstall2 --debug autoinstall", NULL)
@ -274,6 +280,10 @@ typedef struct {
GtkWidget *MainWindow;
GtkWidget *StartScenarioButton;
GtkWidget *SourceButton;
GtkWidget *SkipInstallationButton;
GtkWidget *StatusBox;
GtkWidget *WelcomeToggle;
GtkWidget *LicenceToggle;
@ -466,6 +476,11 @@ typedef struct {
GtkWidget *AdvancedSwapFixedSwitch;
GtkWidget *AdvancedSwapFixedSizeSwitch;
dictionary *advanced_sections;
GFile *install_progress_file;
GFileMonitor *install_progress_monitor;
GFile *install_info_file;
GFileMonitor *install_info_monitor;
} main_window;
typedef struct {
@ -577,7 +592,7 @@ void on_password_accept(GtkWidget *self, dictionary *dict);
void yon_interface_update(main_window *widgets);
void on_summary_log_view(GtkWidget *,main_window *widgets);
void on_near_installation_device_changed(GtkWidget *self, main_window *widgets);
void on_device_selection_changed(GtkWidget *self, main_window *widgets);
void on_toggle_button_switch_on(GtkWidget *, GtkToggleButton *toggle);
@ -602,7 +617,7 @@ void on_language_window_accept(GtkWidget *,dictionary *dict);
void on_keyboard_removed(GtkWidget *, main_window *widgets);
void on_exit_accepted(main_window *widgets);
void on_gparted_open();
void on_same_installation_device_changed(GtkWidget *, main_window *widgets);
// void on_same_installation_device_changed(GtkWidget *, main_window *widgets);
void on_separate_installation_changed(GtkWidget *self, main_window *widgets);
void on_partition_changed(GtkWidget *self, main_window *widgets);
void yon_set_max_size_from_partition(GtkTreeView *table, GtkSpinButton *spin_size, GtkComboBox *size_type);
@ -618,11 +633,13 @@ void on_log_closed(GtkWidget *, dictionary *dict);
void on_page_changed(GtkWidget *,GtkWidget *,int page, main_window *widgets);
gboolean yon_installation_progress_update(void *data);
void *on_config_save(void *data);
void *on_setup_system_configuration(void * data);
gboolean on_image_slide(void *data);
void on_region_resized(GtkWidget *,main_window *widgets);
int yon_image_resize_from_container(GtkImage *target, GdkPixbuf *pixbuf_unscaled);
void on_configuration_mode_switch(GtkWidget *self,main_window *widgets);
double yon_size_long_convert_automatic(unsigned long bytes, char *size);
double yon_size_long_convert_to_mod(double size, char mod);
void on_root_get_root(char *argline);
void on_config_custom_save(GtkWidget *, main_window *widgets);
void on_config_global_save(GtkWidget *,main_window *widgets);
@ -668,4 +685,6 @@ void on_connection_add(main_window *widgets);
void on_ntp_sync(GtkWidget *, main_window *widgets);
int yon_advanced_sections_save(dictionary *dict);
void yon_configuration_mode_check(main_window *widgets);
void on_configuration_mode_switch(GtkWidget *self,main_window *widgets);
void on_configuration_mode_switch(GtkWidget *self,main_window *widgets);
void *_yon_installation_start(main_window *widgets);
int yon_installation_start(main_window *widgets);

@ -100,7 +100,6 @@
#define PASSWORD_SHORT_LABEL(min_size_char) yon_char_unite(_("Password must be at least")," ", min_size_char," ",_("characters"))
#define RESTART_LABEL _("Restart PC")
#define EXIT_LABEL _("Exit")
#define CHOOSE_LABEL _("Choose file system type for the section:")
#define SECTION_NAME_LABEL _("Section name:")
#define FORMAT_LABEL _("Format")
@ -185,4 +184,5 @@
#define WARNING_TEXT_LABEL _("Are you sure want to exit and\ninterrupt installation process?")
#define WARNING_REBOOT_TEXT_LABEL _("Are you sure want to reboot system?")
#define DEFAULT_BOOTLOAD_MENU_ITEM_LABEL _("Default (Use last succeeded)")
#define DEFAULT_BOOTLOAD_MENU_ITEM_LABEL _("Default (Use last succeeded)")
#define ENCRYPT_ERROR_LABEL _("Password encryption error")

@ -16,6 +16,14 @@ background:transparent;
color: @theme_text_color;
}
.bggrey{
border-radius:5px;
border-color:@theme_text_color;
border-style:solid;
border-width:0.3px;
box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.15);
}
.inherited>* {
border:none;
background:inherit;

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save