diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c
index c3d1e8e..9e410d3 100644
--- a/source/ubinstall-gtk.c
+++ b/source/ubinstall-gtk.c
@@ -449,10 +449,14 @@ void on_page_navigation_clicked(GtkWidget *self, main_window *widgets){
yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->CommonInstallationDevicesTree));
return;
}
+ char *file_system_type = (char*)gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(widgets->CommonInstallationFilesystemTypeCombo));
+ char *device_name = (char*)gtk_entry_get_text(GTK_ENTRY(widgets->CommonInstallationSectionNameEntry));
char *device;
gtk_tree_model_get(model,&iter,0,&device,-1);
yon_config_register(AUTOINSTALL_TYPE_INSTALL,AUTOINSTALL_TYPE_INSTALL_command,"fast");
yon_config_register(AUTOINSTALL_TYPE_INSTALL,AUTOINSTALL_DEVICE_command,device);
+ yon_config_register(device_label_parameter,device_label_parameter_command,device_name);
+ yon_config_register(part_type_parameter,part_type_parameter_command,file_system_type);
int size=0;
config_str parameters = yon_config_get_all(&size);
@@ -475,11 +479,23 @@ void on_page_navigation_clicked(GtkWidget *self, main_window *widgets){
yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->CommonInstallationDevicesTree));
return;
}
+ double part_size = gtk_spin_button_get_value(GTK_SPIN_BUTTON(widgets->InstallationNearSizeSpin));
+ if (part_size){
+ char *size_letter = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(widgets->InstallationNearSizeTypeSpin));
+ char *size_final = yon_char_append(yon_char_from_long((long)part_size),size_letter);
+ yon_config_register(part_size_parameter,part_size_parameter_command,size_final);
+ } else yon_config_remove_by_key(part_size_parameter);
+ char *file_system_type = (char*)gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(widgets->NextInstallationFilesystemTypeCombo));
+ char *device_name = (char*)gtk_entry_get_text(GTK_ENTRY(widgets->NextInstallationSectionNameEntry));
char *part;
gtk_tree_model_get(model,&iter,0,&part,-1);
yon_config_register(AUTOINSTALL_TYPE_INSTALL,AUTOINSTALL_TYPE_INSTALL_command,"near");
yon_config_register(AUTOINSTALL_TYPE_INSTALL,AUTOINSTALL_DEVICE_command,device);
yon_config_register(AUTOINSTALL_TYPE_INSTALL,AUTOSTART_PARTS_command,part);
+ yon_config_register(device_label_parameter,device_label_parameter_command,device_name);
+ yon_config_register(part_type_parameter,part_type_parameter_command,file_system_type);
+ if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->NextInstallationFormatCheck)))
+ yon_config_register(device_format_parameter,device_format_parameter_command,"no");
int size=0;
config_str parameters = yon_config_get_all(&size);
@@ -503,41 +519,53 @@ void on_page_navigation_clicked(GtkWidget *self, main_window *widgets){
yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->CommonInstallationDevicesTree));
return;
}
+ double part_size = gtk_spin_button_get_value(GTK_SPIN_BUTTON(widgets->SamePlaceSizeSpin));
+ if (part_size){
+ char *size_letter = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(widgets->SamePlaceSizeTypeSpin));
+ char *size_final = yon_char_append(yon_char_from_long((long)part_size),size_letter);
+ yon_config_register(part_size_parameter,part_size_parameter_command,size_final);
+ } else yon_config_remove_by_key(part_size_parameter);
+ char *file_system_type = (char*)gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(widgets->SameInstallationFilesystemTypeCombo));
+ char *device_name = (char*)gtk_entry_get_text(GTK_ENTRY(widgets->SameInstallationSectionNameEntry));
char *part;
gtk_tree_model_get(model,&iter,0,&part,-1);
yon_config_register(AUTOINSTALL_TYPE_INSTALL,AUTOINSTALL_TYPE_INSTALL_command,"near");
yon_config_register(AUTOINSTALL_TYPE_INSTALL,AUTOINSTALL_DEVICE_command,device);
yon_config_register(AUTOINSTALL_TYPE_INSTALL,AUTOSTART_PARTS_command,part);
+ yon_config_register(device_label_parameter,device_label_parameter_command,device_name);
+ yon_config_register(part_type_parameter,part_type_parameter_command,file_system_type);
+ if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->NextInstallationFormatCheck)))
+ yon_config_register(device_format_parameter,device_format_parameter_command,"no");
int size=0;
config_str parameters = yon_config_get_all(&size);
main_config.config_save_thread = g_thread_new("savethread",(GThreadFunc)on_config_save,save_config_command(yon_char_parsed_to_string(parameters,size," ")));
gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_INSTALLATION);
}break;
- case YON_PAGE_USERS:{
+ case YON_PAGE_USERS:{ //users
if (yon_char_is_empty(gtk_entry_get_text(GTK_ENTRY(widgets->UserNameEntry)))){
yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
yon_ubl_status_highlight_incorrect(widgets->UserNameEntry);
return;
} else if (yon_char_is_empty(gtk_entry_get_text(GTK_ENTRY(widgets->LoginEntry)))){
yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
- yon_ubl_status_highlight_incorrect(widgets->UserNameEntry);
+ yon_ubl_status_highlight_incorrect(widgets->LoginEntry);
return;
} else if (gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->PasswordCombo))==1&&yon_char_is_empty(gtk_entry_get_text(GTK_ENTRY(widgets->PasswordEntry)))){
yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
- yon_ubl_status_highlight_incorrect(widgets->UserNameEntry);
+ yon_ubl_status_highlight_incorrect(widgets->PasswordEntry);
return;
} else if (gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->AdminPasswordCombo))==1&&yon_char_is_empty(gtk_entry_get_text(GTK_ENTRY(widgets->AdminPasswordEntry)))){
yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
- yon_ubl_status_highlight_incorrect(widgets->UserNameEntry);
+ yon_ubl_status_highlight_incorrect(widgets->AdminPasswordEntry);
return;
} else if (yon_char_is_empty(gtk_entry_get_text(GTK_ENTRY(widgets->HotnameEntry)))){
yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
- yon_ubl_status_highlight_incorrect(widgets->UserNameEntry);
+ yon_ubl_status_highlight_incorrect(widgets->HotnameEntry);
return;
}
char *username = (char*)gtk_entry_get_text(GTK_ENTRY(widgets->UserNameEntry));
@@ -585,9 +613,9 @@ void on_page_navigation_clicked(GtkWidget *self, main_window *widgets){
}
}
-void on_region_changed(GtkComboBoxText *self, main_window *widgets);
-void on_region_changed(GtkComboBoxText *self, main_window *widgets){
- char *active = (char*)gtk_combo_box_text_get_active_text(self);
+void on_region_changed(GtkComboBox *self, main_window *widgets);
+void on_region_changed(GtkComboBox *self, main_window *widgets){
+ char *active = (char*)gtk_combo_box_get_active_id(self);
active = yon_char_append("/usr/share/zoneinfo/",active);
int size;
gtk_combo_box_text_remove_all(GTK_COMBO_BOX_TEXT(widgets->ZoneCombo));
@@ -771,6 +799,15 @@ main_window *yon_main_window_complete(){
widgets->PackageInstallationProgress = yon_gtk_builder_get_widget(builder,"PackageInstallationProgress");
widgets->PackageInstallationLabel = yon_gtk_builder_get_widget(builder,"PackageInstallationLabel");
+ widgets->SameInstallationFilesystemTypeCombo = yon_gtk_builder_get_widget(builder,"SameInstallationFilesystemTypeCombo");
+ widgets->SameInstallationFormatCheck = yon_gtk_builder_get_widget(builder,"SameInstallationFormatCheck");
+ widgets->SameInstallationSectionNameEntry = yon_gtk_builder_get_widget(builder,"SameInstallationSectionNameEntry");
+ widgets->NextInstallationFilesystemTypeCombo = yon_gtk_builder_get_widget(builder,"NextInstallationFilesystemTypeCombo");
+ widgets->NextInstallationFormatCheck = yon_gtk_builder_get_widget(builder,"NextInstallationFormatCheck");
+ widgets->NextInstallationSectionNameEntry = yon_gtk_builder_get_widget(builder,"NextInstallationSectionNameEntry");
+ widgets->CommonInstallationFilesystemTypeCombo = yon_gtk_builder_get_widget(builder,"CommonInstallationFilesystemTypeCombo");
+ widgets->CommonInstallationSectionNameEntry = yon_gtk_builder_get_widget(builder,"CommonInstallationSectionNameEntry");
+
widgets->StatusBox = yon_gtk_builder_get_widget(builder,"StatusBox");
widgets->AdditionalSoftwareCell = GTK_CELL_RENDERER(gtk_builder_get_object(builder,"AdditionalSoftwareCell"));
diff --git a/source/ubinstall-gtk.h b/source/ubinstall-gtk.h
index abb7f75..818a980 100644
--- a/source/ubinstall-gtk.h
+++ b/source/ubinstall-gtk.h
@@ -101,6 +101,14 @@ NULL
#define lang_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[hostname]"
#define locale_parameter "AUTOINSTALL[hostname]"
#define locale_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[hostname]"
+#define device_format_parameter "AUTOINSTALL[device_format]"
+#define device_format_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[device_format]"
+#define device_label_parameter "AUTOINSTALL[device_label]"
+#define device_label_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[device_label]"
+#define part_size_parameter "AUTOINSTALL[part_size]"
+#define part_size_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[part_size]"
+#define part_type_parameter "AUTOINSTALL[part_type]"
+#define part_type_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[part_type]"
#define save_config_command(parameters) yon_char_append("pkexec ubconfig set [autoinstall] ",parameters)
@@ -220,6 +228,15 @@ typedef struct {
GtkWidget *LicenceLabel;
GtkWidget *SlidesImage;
+ GtkWidget *SameInstallationFilesystemTypeCombo;
+ GtkWidget *SameInstallationFormatCheck;
+ GtkWidget *SameInstallationSectionNameEntry;
+ GtkWidget *NextInstallationFilesystemTypeCombo;
+ GtkWidget *NextInstallationFormatCheck;
+ GtkWidget *NextInstallationSectionNameEntry;
+ GtkWidget *CommonInstallationFilesystemTypeCombo;
+ GtkWidget *CommonInstallationSectionNameEntry;
+
GtkWidget *InstallationNearSysDevicesTree;
GtkWidget *InstallationNearSysSectionTree;
GtkWidget *InstallationNearSizeSpin;
diff --git a/ubinstall-gtk-keyboard.glade b/ubinstall-gtk-keyboard.glade
index 7d46458..8ca0241 100644
--- a/ubinstall-gtk-keyboard.glade
+++ b/ubinstall-gtk-keyboard.glade
@@ -122,7 +122,7 @@
True
False
32
- com.ublinux.libublsettingsui-gtk3
+ com.ublinux.ubinstall-gtk-gui
diff --git a/ubinstall-gtk-language.glade b/ubinstall-gtk-language.glade
index 7cfa969..acec6b0 100644
--- a/ubinstall-gtk-language.glade
+++ b/ubinstall-gtk-language.glade
@@ -133,7 +133,7 @@
True
False
32
- com.ublinux.ubinstall-gui
+ com.ublinux.ubinstall-gtk-gui
diff --git a/ubinstall-gtk.glade b/ubinstall-gtk.glade
index 6feb5ac..25c0b2f 100644
--- a/ubinstall-gtk.glade
+++ b/ubinstall-gtk.glade
@@ -79,7 +79,7 @@
+
+
+ True
+ False
+ 5
+
+
+ True
+ False
+ Choose file system type for the section:
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 1
+
+ - ext3
+ - ext4
+ - fat16
+ - fat32
+ - exfat
+ - riserfs
+ - udf
+ - xfs
+ - zfs
+
+
+
+ True
+ True
+ 1
+
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ False
+ 5
+
+
+ True
+ False
+ Section name:
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+
+
+ True
+ True
+ 1
+
+
+
+
+ False
+ True
+ 3
+
+
11
@@ -2855,6 +2937,7 @@ installed.
True
False
+ 1
- Mb
- Gb
@@ -2881,6 +2964,102 @@ installed.
1
+
+
+ True
+ False
+ 5
+
+
+ True
+ False
+ Choose file system type for the section:
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+
+ - ext3
+ - ext4
+ - fat16
+ - fat32
+ - exfat
+ - riserfs
+ - udf
+ - xfs
+ - zfs
+
+
+
+ True
+ True
+ 1
+
+
+
+
+ Format
+ True
+ True
+ False
+ True
+ True
+
+
+ False
+ True
+ 2
+
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ False
+ 5
+
+
+ True
+ False
+ Section name:
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+
+
+ True
+ True
+ 1
+
+
+
+
+ False
+ True
+ 3
+
+
12
@@ -3279,10 +3458,11 @@ installed.
True
False
+ 1
- - Mb
- - Gb
- - Tb
+ - Mb
+ - Gb
+ - Tb
@@ -3305,6 +3485,103 @@ installed.
1
+
+
+ True
+ False
+ 5
+
+
+ True
+ False
+ Choose file system type for the section:
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 1
+
+ - ext3
+ - ext4
+ - fat16
+ - fat32
+ - exfat
+ - riserfs
+ - udf
+ - xfs
+ - zfs
+
+
+
+ True
+ True
+ 1
+
+
+
+
+ Format
+ True
+ True
+ False
+ True
+ True
+
+
+ False
+ True
+ 2
+
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ False
+ 5
+
+
+ True
+ False
+ Section name:
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+
+
+ True
+ True
+ 1
+
+
+
+
+ False
+ True
+ 3
+
+
13