diff --git a/gresource.xml b/gresource.xml
index 7c8474c..0ed7fcf 100644
--- a/gresource.xml
+++ b/gresource.xml
@@ -8,6 +8,15 @@
ubinstall-gtk-documentation.glade
ubinstall-gtk-log-view.glade
ubinstall-gtk-warning.glade
+ ubinstall-gtk-user.glade
+ ubinstall-gtk-menu.glade
+ ubinstall-gtk-menu-item.glade
+ ubinstall-gtk-kernel-row.glade
+ ubinstall-gtk-os-row.glade
+ ubinstall-gtk-service-window.glade
+ ubinstall-gtk-bootloader-user.glade
+ ubinstall-gtk-network-box.glade
+ ubinstall-gtk-advanced-box.glade
ubinstall-gtk.css
@@ -37,5 +46,9 @@
modules.csv
+ kernel-list.csv
+ kernel-list-addon.csv
+ services-list.csv
+ network-list.csv
\ No newline at end of file
diff --git a/kernel-list-addon.csv b/kernel-list-addon.csv
new file mode 100644
index 0000000..d7f1808
--- /dev/null
+++ b/kernel-list-addon.csv
@@ -0,0 +1,13 @@
+NAME;PAСKAGE_UBM;PAСKAGE;DESCRIPTION
+Linux 5.15 headers;ubm-002-linux515-headers;linux515-headers;The Linux kernel headers v5.15
+Linux 5.15 Docs;ubm-003-linux515-docs;linux515-docs;The Linux kernel docs v5.15
+Linux 5.15 DKMS modules;ubm-linux515-dkms;;The Linux kernel DKMS modules v5.15 : v4l2loopback, rtl88x2bu, r8125, rtl8192eu
+Linux 5.15 DKMS modules;ubm-linux515-r8168-8136;;The Linux kernel DKMS modules v5.15 : r8168-8136
+Linux 6.1 headers;ubm-002-linux61-headers;linux61-headers;The Linux kernel headers v6.1
+Linux 6.1 Docs;ubm-003-linux61-docs;linux61-docs;The Linux kernel docs v6.1
+Linux 6.1 DKMS modules;ubm-linux61-dkms;;The Linux kernel DKMS modules v6.1 : v4l2loopback, rtl88x2bu, r8125, rtl8192eu
+Linux 6.1 DKMS modules;ubm-linux61-r8168-8136;;The Linux kernel DKMS modules v6.1 : r8168-8136
+Linux 6.6 headers;ubm-002-linux66-headers;linux66-headers;The Linux kernel headers v6.6
+Linux 6.6 Docs;ubm-003-linux66-docs;linux66-docs;The Linux kernel docs v6.6
+Linux 6.6 DKMS modules;ubm-linux66-dkms;;The Linux kernel DKMS modules v6.6 : v4l2loopback, rtl88x2bu, r8125, rtl8192eu
+Linux 6.6 DKMS modules;ubm-linux66-dkms-r8168-8136;;The Linux kernel DKMS modules v6.6 : r8168-8136
\ No newline at end of file
diff --git a/kernel-list.csv b/kernel-list.csv
new file mode 100644
index 0000000..e97af1f
--- /dev/null
+++ b/kernel-list.csv
@@ -0,0 +1,5 @@
+NAME;PAСKAGE_UBM;PAСKAGE;PAСKAGE_UBM_REQUIRED;PAСKAGE_REQUIRED;TAG;DESCRIPTION
+Linux 5.15;ubm-001-linux515-test;linux515-test;ubm-002-linux515-test-headers;linux515-test-headers;LTS, Stable, RealTime, Hardened, Recomended;The Linux kernel v5.15 and modules, headers. Additional kernel modules: acpi_call, bbswitch, broadcom-wl, r8168, rtl8723bu, tp_smapi, vhba-module, virtualbox-host-modules, zfs
+Linux 5.15;ubm-001-linux515;linux515;ubm-002-linux515-headers;linux515-headers;LTS, Stable;The Linux kernel v5.15 and modules, headers. Additional kernel modules: acpi_call, bbswitch, broadcom-wl, r8168, rtl8723bu, tp_smapi, vhba-module, virtualbox-host-modules, zfs
+Linux 6.1;ubm-001-linux61;linux61;ubm-002-linux61-headers;linux61-headers;LTS, Stable, Recomended;The Linux kernel v6.1 and modules, headers. Additional kernel modules: acpi_call, bbswitch, broadcom-wl, r8168, rtl8723bu, tp_smapi, vhba-module, virtualbox-host-modules, zfs
+Linux 6.6;ubm-001-linux66;linux66;ubm-002-linux66-headers;linux66-headers;LTS, Stable;The Linux kernel v6.6 and modules, headers. Additional kernel modules: acpi_call, bbswitch, broadcom-wl, r8168, rtl8723bu, tp_smapi, vhba-module, virtualbox-host-modules, zfs
\ No newline at end of file
diff --git a/network-list.csv b/network-list.csv
new file mode 100644
index 0000000..dc8b9cc
--- /dev/null
+++ b/network-list.csv
@@ -0,0 +1,45 @@
+TYPE;NAME
+Ethernet;enp0s0
+Ethernet;enp0s1
+Ethernet;enp0s2
+Ethernet;enp0s3
+Ethernet;enp1s0
+Ethernet;enp1s1
+Ethernet;enp1s2
+Ethernet;enp1s3
+Ethernet;enp2s0
+Ethernet;enp2s1
+Ethernet;enp2s2
+Ethernet;enp2s3
+Ethernet;enp3s0
+Ethernet;enp3s1
+Ethernet;enp3s2
+Ethernet;enp3s3
+Ethernet;ens160
+Ethernet;ens35
+WiFi;wifi
+WiFi;wl0
+WiFi;wl1
+WiFi;wl2
+WiFi;wl3
+WiFi;wlan0
+WiFi;wlan1
+WiFi;wlan2
+WiFi;wlan3
+VPN;tap0
+VPN;tap1
+VPN;tap2
+VPN;tap3
+VPN;tun0
+VPN;tun0
+VPN;tun1
+VPN;tun2
+VPN;tun3
+VPN;pppoe0
+VPN;pppoe1
+VPN;pppoe2
+VPN;pppoe3
+Bridge;br0
+Bridge;br1
+Bridge;br2
+Bridge;br3
\ No newline at end of file
diff --git a/services-list.csv b/services-list.csv
new file mode 100644
index 0000000..fbb62e4
--- /dev/null
+++ b/services-list.csv
@@ -0,0 +1,11 @@
+NAME;NAME_SERVICES;DESCRIPTION
+UBManager WebPanel;cockpit.socket;Operating system monitoring and management manager service
+Network Manager;NetworkManager;Is a program for providing detection and configuration for systems to automatically connect to networks
+SSH;sshd;The daemon that listens for connections from clients on port 22
+NTP Client;systemd-timesyncd;Is a system service that may be used to synchronize the local system clock with a remote Network Time Protocol (NTP) server
+Avahi;avahi-daemon,avahi-dnsconfd;Is a free zero-configuration networking (zeroconf) implementation, including a system for multicast DNS and DNS Service Discovery
+CUPS;cups;Is a modular printing system for Unix-like computer operating systems which allows a computer to act as a print server
+Samba;smb,nmb;Provides network shares for folders and printers using the SMB/CIFS protocol commonly used on Windows. SMB and NMB Daemon
+Samba winbind;winbind;Provides network shares for folders and printers using the SMB/CIFS protocol commonly used on Windows. Winbind Daemon
+SwapSpace;swapspace;Operating system dynamic swap file management service
+Bluetouth;bluetooth;A Service is a container for logically related Bluetooth data items
\ No newline at end of file
diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
index a3e0cae..990ee99 100644
--- a/source/CMakeLists.txt
+++ b/source/CMakeLists.txt
@@ -65,9 +65,22 @@ set(DEPENDFILES
../ubinstall-gtk-documentation.glade
../ubinstall-gtk-log-view.glade
../ubinstall-gtk-warning.glade
+ ../ubinstall-gtk-user.glade
+ ../ubinstall-gtk-menu.glade
+ ../ubinstall-gtk-menu-item.glade
+ ../ubinstall-gtk-kernel-row.glade
+ ../ubinstall-gtk-os-row.glade
+ ../ubinstall-gtk-service-window.glade
+ ../ubinstall-gtk-bootloader-user.glade
+ ../ubinstall-gtk-network-box.glade
+ ../ubinstall-gtk-advanced-box.glade
../gresource.xml
../ubinstall-gtk.css
../modules.csv
+ ../kernel-list.csv
+ ../kernel-list-addon.csv
+ ../services-list.csv
+ ../network-list.csv
)
file(COPY ${DEPENDFILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
@@ -105,6 +118,25 @@ endif()
set(SOURCE_FILES
ubinstall-gtk.c
+ ubinstall-gtk-page-switch.c
+ ubinstall-gtk-keyboard.c
+ ubinstall-gtk-region.c
+ ubinstall-gtk-bootloader.c
+ ubinstall-gtk-components.c
+ ubinstall-gtk-grub.c
+ ubinstall-gtk-installation.c
+ ubinstall-gtk-network.c
+ 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-startup-services.c
+ ubinstall-gtk-kernel.c
ubinstall-gtk.h
ubl-strings.h
)
@@ -118,6 +150,7 @@ set(LIBRARIES
pthread
ublsettings
ublsettings-gtk3
+ ublsettingsui-gtk3
)
diff --git a/source/ubinstall-gtk-bootloader.c b/source/ubinstall-gtk-bootloader.c
new file mode 100644
index 0000000..0782600
--- /dev/null
+++ b/source/ubinstall-gtk-bootloader.c
@@ -0,0 +1,441 @@
+#include "ubinstall-gtk.h"
+
+int yon_bootloader_save(main_window *widgets){
+ if (gtk_switch_get_active(GTK_SWITCH(widgets->BootloadTimerSwitch))){
+ long time = gtk_spin_button_get_value(GTK_SPIN_BUTTON(widgets->BootloadTimerSpin));
+ yon_config_register(GRUB_TIMEOUT_parameter,GRUB_TIMEOUT_parameter_command,yon_char_from_long(time));
+ } else {
+ yon_config_remove_by_key(GRUB_TIMEOUT_parameter);
+ }
+ char *OS = (char*)gtk_entry_get_text(GTK_ENTRY(widgets->BootloadDefaultOSEntry));
+ if (strcmp(OS,DEFAULT_BOOTLOAD_MENU_ITEM_LABEL)){
+ yon_config_register(GRUB_DEFAULT_parameter,GRUB_DEFAULT_parameter_command,OS);
+ } else {
+ yon_config_remove_by_key(GRUB_DEFAULT_parameter);
+ }
+ if (gtk_switch_get_active(GTK_SWITCH(widgets->BootloadNoPasswordSwitch))){
+ GtkTreeIter iter;
+ yon_config_register(AUTOLOGINUSER_parameter,AUTOLOGINUSER_parameter_command,"yes");
+ GtkTreeModel *model = GTK_TREE_MODEL(widgets->BootloadUsersList);
+ int admin_size=0;
+ config_str admin_list = NULL;
+ for_iter(model,&iter){
+ int is_admin;
+ char *username, *password;
+ gtk_tree_model_get(model,&iter,0,&is_admin,1,&username,2,&password,-1);
+ if (is_admin){
+ yon_char_parsed_add_or_create_if_exists(admin_list,&admin_size,username);
+ }
+ char *admin_string = yon_char_parsed_to_string(admin_list,admin_size,",");
+ yon_config_register(GRUB_PASSWORD_parameter(username),GRUB_PASSWORD_parameter_command(username),password);
+ yon_config_register(GRUB_SUPERUSERS_parameter,GRUB_SUPERUSERS_parameter_command,admin_string);
+ free(admin_string);
+ }
+ } else {
+ int size;
+ config_str users = yon_config_get_all_by_key(GRUB_PASSWORD_parameter_search,&size);
+ for (int i=0;iPasswordEntry);
+ yon_password_window *dialog = yon_password_open(output_target);
+ yon_gtk_window_setup(GTK_WINDOW(dialog->Window),GTK_WINDOW(window->Window),NULL,icon_path,"password_window");
+ gtk_widget_show(window->Window);
+
+}
+
+void on_bootloader_user_accept(GtkWidget *, bootloader_user_window *window){
+ main_window *widgets = g_object_get_data(G_OBJECT(window->AcceptButton),"widgets");
+ const char *username = gtk_entry_get_text(GTK_ENTRY(window->UsernameEntry));
+
+ if (yon_char_is_empty(window->prev_name)){
+ GtkTreeIter iter;
+ GtkTreeModel *model = GTK_TREE_MODEL(widgets->BootloadUsersList);
+ for_iter(model,&iter){
+ char *name;
+ gtk_tree_model_get(model,&iter,1,&name,-1);
+ if (!strcmp(name,username)){
+ dialog_confirmation_data *data = yon_confirmation_dialog_data_new();
+ data->action_text = BOOTLOADER_USER_EXIST_LABEL(username);
+ if (yon_confirmation_dialog_call(window->Window,data)!=GTK_RESPONSE_ACCEPT){
+ return;
+ }
+ }
+ }
+ }
+ const char *password = gtk_entry_get_text(GTK_ENTRY(window->PasswordEntry));
+ if (yon_char_is_empty(username)){
+ yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
+ yon_ubl_status_highlight_incorrect(window->UsernameEntry);
+ return;
+ }
+ if (yon_char_is_empty(password)){
+ yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
+ yon_ubl_status_highlight_incorrect(window->PasswordEntry);
+ return;
+ }
+ if (!yon_char_is_empty(window->prev_name)&&strcmp(username,window->prev_name)){
+ yon_config_remove_by_key(GRUB_PASSWORD(window->prev_name));
+ int size;
+ char *superusers = config(GRUB_SUPERUSERS_parameter);
+ config_str parsed = yon_char_parse(superusers,&size,",");
+ int pos = yon_char_parsed_check_exist(parsed,size,(char*)username);
+ if (pos>-1){
+ parsed = yon_char_parsed_rip(parsed,&size,pos);
+ char *superusers = yon_char_parsed_to_string(parsed,size,",");
+ if (!yon_char_is_empty(superusers)){
+ yon_config_register(GRUB_SUPERUSERS_parameter,GRUB_SUPERUSERS_parameter_command,superusers);
+ } else {
+ yon_config_remove_by_key(GRUB_SUPERUSERS_parameter);
+ }
+ }
+ }
+ yon_config_register(GRUB_PASSWORD(username),GRUB_SUPERUSERS_parameter_command,(char*)password);
+ GtkTreeIter iter;
+ gtk_list_store_append(widgets->BootloadUsersList,&iter);
+ gtk_list_store_set(widgets->BootloadUsersList,&iter,0,gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->AdminCheck)),1,username,2,"******",-1);
+
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->AdminCheck))){
+ int size;
+ char *superusers = config(GRUB_SUPERUSERS_parameter);
+ config_str parsed = yon_char_parse(superusers,&size,",");
+ if (yon_char_parsed_check_exist(parsed,size,(char*)username)==-1){
+ yon_char_parsed_add_or_create_if_exists(parsed,&size,(char*)username);
+ char *superusers = yon_char_parsed_to_string(parsed,size,",");
+ yon_config_register(GRUB_SUPERUSERS_parameter,GRUB_SUPERUSERS_parameter_command,superusers);
+ }
+ } else {
+ int size;
+ char *superusers = config(GRUB_SUPERUSERS_parameter);
+ config_str parsed = yon_char_parse(superusers,&size,",");
+ int pos = yon_char_parsed_check_exist(parsed,size,(char*)username);
+ if (pos!=-1){
+ parsed = yon_char_parsed_rip(parsed,&size,pos);
+
+ char *superusers = yon_char_parsed_to_string(parsed,size,",");
+ yon_config_register(GRUB_SUPERUSERS_parameter,GRUB_SUPERUSERS_parameter_command,superusers);
+ }
+ }
+ on_subwindow_close(window->Window);
+}
+
+bootloader_user_window *yon_bootloader_user_window_new(){
+ bootloader_user_window *window = new(bootloader_user_window);
+
+ GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_bootloader_user);
+
+ window->Window = yon_gtk_builder_get_widget(builder,"MainWindow");
+ window->StatusBox = yon_gtk_builder_get_widget(builder,"StatusBox");
+ window->TitleLabel = yon_gtk_builder_get_widget(builder,"TitleLabel");
+ window->AdminCheck = yon_gtk_builder_get_widget(builder,"AdminCheck");
+ window->UsernameEntry = yon_gtk_builder_get_widget(builder,"UsernameEntry");
+ window->PasswordEntry = yon_gtk_builder_get_widget(builder,"PasswordEntry");
+ window->PasswordButton = yon_gtk_builder_get_widget(builder,"PasswordButton");
+ window->CancelButton = yon_gtk_builder_get_widget(builder,"CancelButton");
+ window->AcceptButton = yon_gtk_builder_get_widget(builder,"AcceptButton");
+ window->prev_name = NULL;
+
+ g_signal_connect(G_OBJECT(window->CancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL);
+ g_signal_connect(G_OBJECT(window->PasswordButton),"clicked",G_CALLBACK(yon_password_change),window);
+ yon_gtk_entry_set_password_visibility_icon(GTK_ENTRY(window->PasswordEntry));
+ yon_gtk_entry_block_restricted_symbols(GTK_ENTRY(window->UsernameEntry));
+ return window;
+}
+
+void on_bootloader_user_add(GtkWidget *, main_window *widgets){
+ bootloader_user_window *window = yon_bootloader_user_window_new();
+ g_object_set_data(G_OBJECT(window->AcceptButton),"widgets",widgets);
+ g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(on_bootloader_user_accept),window);
+ yon_gtk_window_setup(GTK_WINDOW(window->Window),GTK_WINDOW(widgets->MainWindow),NULL,icon_path,"bootloader_window");
+ gtk_widget_show(window->Window);
+}
+
+void on_menu_chosen(GtkWidget *, yon_menu_item *item){
+ if (strcmp(item->target,DEFAULT_MENU_ITEM_LABEL)){
+ gtk_entry_set_text(GTK_ENTRY(item->widgets->BootloadDefaultOSEntry),item->target);
+ } else {
+ gtk_entry_set_text(GTK_ENTRY(item->widgets->BootloadDefaultOSEntry),DEFAULT_MENU_ITEM_LABEL);
+ }
+ GdkDisplay *display = gdk_display_get_default();
+ GdkSeat *seat = gdk_display_get_default_seat(display);
+ if (item->window->seat_grab)
+ gdk_seat_ungrab(seat);
+ else
+ gtk_grab_remove(item->window->MenuWindow);
+ gtk_widget_destroy(item->window->MenuWindow);
+
+}
+
+void on_submenu_open(GtkWidget *,yon_menu_item *item){
+ yon_menu_window *window = item->window;
+
+ dictionary *dact = NULL;
+ for_dictionaries(dact,item->children){
+ yon_menu_item *child = yon_dictionary_get_data(dact,yon_menu_item*);
+ gtk_widget_hide(child->NextIconButton);
+ gtk_list_box_insert(GTK_LIST_BOX(window->ChildrenListBox),child->MenuItemBox,-1);
+ g_signal_connect(G_OBJECT(child->MenuButton),"clicked",G_CALLBACK(on_menu_chosen),dact->data);
+
+ }
+ gtk_revealer_set_reveal_child(GTK_REVEALER(item->window->ItemsRevealer),0);
+ gtk_revealer_set_reveal_child(GTK_REVEALER(item->window->ChildrenRevealer),1);
+ gtk_box_set_child_packing(GTK_BOX(gtk_widget_get_parent(window->ChildrenRevealer)),window->ChildrenRevealer,1,1,0,GTK_PACK_START);
+ gtk_box_set_child_packing(GTK_BOX(gtk_widget_get_parent(window->ItemsRevealer)),window->ItemsRevealer,0,0,0,GTK_PACK_START);
+ yon_on_revealer_switched(window);
+ g_signal_connect(G_OBJECT(window->MenuWindow),"size-allocate",G_CALLBACK(on_menu_window_size_reallocated),window);
+
+}
+
+yon_menu_window *yon_menu_window_open(GtkWidget *, main_window *widgets){
+ yon_menu_window *window = yon_menu_window_new();
+ gtk_window_set_transient_for(GTK_WINDOW(window->MenuWindow),GTK_WINDOW(widgets->MainWindow));
+ {
+ yon_menu_item *item = yon_menu_item_new();
+ item->widgets=widgets;
+ item->window=window;
+ item->children=NULL;
+ gtk_label_set_text(GTK_LABEL(item->MenuTextLabel),DEFAULT_MENU_ITEM_LABEL);
+ item->target=yon_char_new(DEFAULT_MENU_ITEM_LABEL);
+ gtk_list_box_insert(GTK_LIST_BOX(window->ItemsListBox),item->MenuItemBox,-1);
+ yon_dictionary_add_or_create_if_exists_with_data(window->menu_items,DEFAULT_MENU_ITEM_LABEL,item);
+ gtk_widget_show(item->MenuItemBox);
+ gtk_widget_hide(item->NextIconButton);
+ g_signal_connect(G_OBJECT(item->MenuButton),"clicked",G_CALLBACK(on_menu_chosen),item);
+ }
+ int size;
+ config_str parsed = yon_config_load(get_menus_entry_command,&size);
+ for (int i=0;i");
+ dictionary * cur_item = NULL;
+ if (param_size==2&&(cur_item=yon_dictionary_get(&window->menu_items,parameter[0]))){
+ yon_menu_item *item = (yon_menu_item*)cur_item->data;
+ yon_menu_item *item_child = yon_menu_item_new();
+ gtk_widget_hide(item_child->NextIconButton);
+ gtk_label_set_text(GTK_LABEL(item_child->MenuTextLabel),parameter[1]);
+ item_child->target=yon_char_new(parsed[i]);
+ gtk_widget_show(item_child->MenuItemBox);
+ yon_dictionary_add_or_create_if_exists_with_data(item->children,parameter[1],item_child);
+ item_child->widgets=widgets;
+ item_child->window=window;
+
+ } else {
+ yon_menu_item *item = yon_menu_item_new();
+ item->widgets=widgets;
+ item->window=window;
+ gtk_label_set_text(GTK_LABEL(item->MenuTextLabel),parameter[0]);
+ item->target=yon_char_new(parsed[i]);
+ gtk_list_box_insert(GTK_LIST_BOX(window->ItemsListBox),item->MenuItemBox,-1);
+ yon_dictionary_add_or_create_if_exists_with_data(window->menu_items,parameter[0],item);
+ gtk_widget_show(item->MenuItemBox);
+ if (param_size==2){
+ yon_menu_item *item_child = yon_menu_item_new();
+ gtk_widget_show(item->NextIconButton);
+ gtk_widget_hide(item_child->NextIconButton);
+ gtk_label_set_text(GTK_LABEL(item_child->MenuTextLabel),parameter[1]);
+ item_child->target=yon_char_new(parsed[i]);
+ gtk_widget_show(item_child->MenuItemBox);
+ item_child->widgets=widgets;
+ item_child->window=window;
+ g_signal_connect(G_OBJECT(item->MenuButton),"clicked",G_CALLBACK(on_submenu_open),item);
+ yon_dictionary_add_or_create_if_exists_with_data(item->children,parameter[1],item_child);
+ } else {
+ gtk_widget_hide(item->NextIconButton);
+ g_signal_connect(G_OBJECT(item->MenuButton),"clicked",G_CALLBACK(on_menu_chosen),item);
+ }
+ }
+
+ }
+ gtk_window_set_transient_for(GTK_WINDOW(window->MenuWindow), GTK_WINDOW(widgets->MainWindow));
+
+ int x,y,width;
+ gtk_widget_realize(window->MenuWindow);
+ gdk_window_get_position(gtk_widget_get_window(widgets->BootloadDefaulOSButton),&x,&y);
+ gtk_widget_translate_coordinates(widgets->BootloadDefaulOSButton,widgets->MainWindow,x,y,&window->button_pos_x,&window->button_pos_y);
+ gtk_window_get_size(GTK_WINDOW(window->MenuWindow),&width,NULL);
+ GtkAllocation alloc;
+ gtk_widget_get_allocation(widgets->BootloadDefaulOSButton, &alloc);
+ gtk_window_get_position(GTK_WINDOW(widgets->MainWindow),&x,&y);
+ gtk_window_move(GTK_WINDOW(window->MenuWindow),window->button_pos_x-width,window->button_pos_y);
+ gtk_widget_show(window->MenuWindow);
+ GdkGrabStatus status = gdk_seat_grab(gdk_display_get_default_seat(gdk_display_get_default()),gtk_widget_get_window(window->MenuWindow),GDK_SEAT_CAPABILITY_POINTER,TRUE,NULL,NULL,NULL,NULL);
+ if (status != GDK_GRAB_SUCCESS) {
+ window->seat_grab=0;
+ gtk_grab_add(window->MenuWindow);
+ } else {
+ window->seat_grab=1;
+ }
+ return window;
+}
+
+gboolean on_menu_clicked(GtkWidget *, GdkEventButton *event, yon_menu_window *window){
+ int x,y,width,height;
+ gtk_window_get_size(GTK_WINDOW(window->MenuWindow),&width,&height);
+ gtk_window_get_position(GTK_WINDOW(window->MenuWindow),&x,&y);
+ if (event->x_rooty_rootx_root>x+width||event->y_root>y+height){
+
+ GdkDisplay *display = gdk_display_get_default();
+ GdkSeat *seat = gdk_display_get_default_seat(display);
+ if (window->seat_grab)
+ gdk_seat_ungrab(seat);
+ else
+ gtk_grab_remove(window->MenuWindow);
+ gtk_widget_destroy(window->MenuWindow);
+ }
+ return 1;
+
+}
+
+gboolean yon_on_revealer_switched (yon_menu_window *window){
+ if (gtk_revealer_get_reveal_child(GTK_REVEALER(window->ItemsRevealer))){
+ gtk_widget_hide(window->ChildrenRevealer);
+ gtk_widget_show(window->ItemsRevealer);
+ } else {
+ gtk_widget_hide(window->ItemsRevealer);
+ gtk_widget_show(window->ChildrenRevealer);
+
+ }
+ return G_SOURCE_REMOVE;
+}
+
+void on_children_clean(GtkWidget*, yon_menu_window *window){
+ GList *list = gtk_container_get_children(GTK_CONTAINER(window->ChildrenListBox));
+ list = g_list_last(list);
+ for (guint i=0;idata));
+ g_object_ref(G_OBJECT(item->data));
+ gtk_container_remove(GTK_CONTAINER(list->data),GTK_WIDGET(item->data));
+ gtk_widget_destroy(GTK_WIDGET(list->data));
+ g_list_free(item);
+ list=list->prev;
+ }
+
+ gtk_revealer_set_reveal_child(GTK_REVEALER(window->ItemsRevealer),1);
+ gtk_revealer_set_reveal_child(GTK_REVEALER(window->ChildrenRevealer),0);
+ gtk_box_set_child_packing(GTK_BOX(gtk_widget_get_parent(window->ItemsRevealer)),window->ItemsRevealer,1,1,0,GTK_PACK_START);
+ yon_on_revealer_switched(window);
+ g_signal_connect(G_OBJECT(window->MenuWindow),"size-allocate",G_CALLBACK(on_menu_window_size_reallocated),window);
+ gtk_box_set_child_packing(GTK_BOX(gtk_widget_get_parent(window->ChildrenRevealer)),window->ChildrenRevealer,0,0,0,GTK_PACK_START);
+
+}
+
+void on_menu_window_size_reallocated(GtkWidget *self,GtkAllocation *,yon_menu_window *window){
+ int x,y,width;
+ gtk_window_get_size(GTK_WINDOW(window->MenuWindow),&width,NULL);
+ gtk_window_get_position(GTK_WINDOW(gtk_window_get_transient_for(GTK_WINDOW(window->MenuWindow))),&x,&y);
+ gtk_window_move(GTK_WINDOW(window->MenuWindow),window->button_pos_x-width,window->button_pos_y);
+ g_signal_handlers_disconnect_by_func(self,on_menu_window_size_reallocated,window);
+}
+
+ yon_menu_window *yon_menu_window_new(){
+ yon_menu_window *window = new(yon_menu_window);
+ GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_menu_window);
+ window->MenuWindow = yon_gtk_builder_get_widget(builder,"MainWindow");
+ window->ItemsRevealer = yon_gtk_builder_get_widget(builder,"ItemsRevealer");
+ window->BackButton = yon_gtk_builder_get_widget(builder,"BackButton");
+ window->ItemsListBox = yon_gtk_builder_get_widget(builder,"ItemsListBox");
+ window->ChildrenRevealer = yon_gtk_builder_get_widget(builder,"ChildrenRevealer");
+ window->ChildrenListBox = yon_gtk_builder_get_widget(builder,"ChildrenListBox");
+
+ window->menu_items=NULL;
+
+ g_signal_connect(G_OBJECT(window->BackButton),"clicked",G_CALLBACK(on_children_clean),window);
+ g_signal_connect(G_OBJECT(window->MenuWindow),"button-press-event",G_CALLBACK(on_menu_clicked),window);
+ return window;
+}
+
+yon_menu_item *yon_menu_item_new(){
+ yon_menu_item *item = new(yon_menu_item);
+ GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_menu_item);
+ item->MenuItemBox = yon_gtk_builder_get_widget(builder,"MenuItemBox");
+ item->MenuButton = yon_gtk_builder_get_widget(builder,"MenuButton");
+ item->MenuTextLabel = yon_gtk_builder_get_widget(builder,"MenuTextLabel");
+ item->NextIconButton = yon_gtk_builder_get_widget(builder,"NextIconButton");
+ item->children=NULL;
+
+ return item;
+}
+
+void yon_bootloader_interface_update(main_window *widgets){
+ char *timeout = config(GRUB_TIMEOUT_parameter);
+ char *admins = config(GRUB_SUPERUSERS_parameter);
+ char *autologin = config(AUTOLOGINUSER_parameter);
+ char *os = config(GRUB_DEFAULT_parameter);
+ int size;
+ config_str users = yon_config_get_all_by_key(GRUB_PASSWORD_parameter_search,&size);
+ if (!yon_char_is_empty(timeout)){
+ long timeout_l = atol(timeout);
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->BootloadTimerSpin),timeout_l);
+ }
+ if (!yon_char_is_empty(os)){
+ gtk_entry_set_text(GTK_ENTRY(widgets->BootloadDefaultOSEntry),os);
+ } else {
+ gtk_entry_set_text(GTK_ENTRY(widgets->BootloadDefaultOSEntry),DEFAULT_MENU_ITEM_LABEL);
+ }
+ if (!yon_char_is_empty(autologin)&&(!strcmp(autologin,"yes")||!strcmp(autologin,"enable"))){
+ gtk_switch_set_active(GTK_SWITCH(widgets->BootloadNoPasswordSwitch),1);
+ } else {
+ int admins_size;
+ config_str admins_parsed = yon_char_parse(admins,&admins_size,",");
+ for (int i=0;iBootloadUsersList,&iter);
+ gtk_list_store_set(widgets->BootloadUsersList,&iter,0,yon_char_parsed_check_exist(admins_parsed,admins_size,key),1,key,2,value,-1);
+ }
+ }
+
+}
+
+void yon_bootloader_init(main_window *widgets){
+ char *timeout = config(GRUB_TIMEOUT_parameter);
+ char *os = config(GRUB_DEFAULT_parameter);
+ char *autologin = config(AUTOLOGINUSER_parameter);
+ char *admins = config(GRUB_SUPERUSERS_parameter);
+ int size;
+ config_str users = yon_config_get_all_by_key(GRUB_PASSWORD_parameter_search,&size);
+ if (!yon_char_is_empty(timeout)){
+ long timeout_long = atol(timeout);
+ gtk_switch_set_active(GTK_SWITCH(widgets->BootloadTimerSwitch),1);
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->BootloadTimerSpin),timeout_long);
+ } else{
+ gtk_switch_set_active(GTK_SWITCH(widgets->BootloadTimerSwitch),0);
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->BootloadTimerSpin),0);
+ }
+ if (!yon_char_is_empty(os)){
+ gtk_entry_set_text(GTK_ENTRY(widgets->BootloadDefaultOSEntry),os);
+ } else {
+ gtk_entry_set_text(GTK_ENTRY(widgets->BootloadDefaultOSEntry),DEFAULT_BOOTLOAD_MENU_ITEM_LABEL);
+ }
+ if (!yon_char_is_empty(autologin)&&(!strcmp(autologin,"yes")||!strcmp(autologin,"enable"))){
+ gtk_switch_set_active(GTK_SWITCH(widgets->BootloadNoPasswordSwitch),1);
+ int admins_size;
+ config_str admins_parsed = yon_char_parse(admins,&admins_size,",");
+ GtkTreeIter iter;
+ for (int i=0;iBootloadUsersList,&iter);
+ gtk_list_store_set(widgets->BootloadUsersList,&iter,0,yon_char_parsed_check_exist(admins_parsed,admins_size,key),1,key,2,parameter,3,"******",-1);
+ free(parameter);
+ free(parameter_name);
+ free(key);
+ }
+ yon_char_parsed_free(admins_parsed,admins_size);
+ }
+}
\ No newline at end of file
diff --git a/source/ubinstall-gtk-components.c b/source/ubinstall-gtk-components.c
new file mode 100644
index 0000000..8191083
--- /dev/null
+++ b/source/ubinstall-gtk-components.c
@@ -0,0 +1,261 @@
+#include "ubinstall-gtk.h"
+
+int yon_kernel_save(main_window *widgets){
+ GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->KernelListBox));
+ char *install_modules = "";
+ char *enabled_module = NULL;
+ for(GList *iter = list;iter;iter = iter->next){
+ kernel_row *row = g_object_get_data(G_OBJECT(iter->data),"kernel_row");
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(row->InstallCheck))){
+ char *temp = yon_char_unite(install_modules,!yon_char_is_empty(install_modules)?" ":"",row->modules,NULL);
+ if (!yon_char_is_empty(install_modules)) free(install_modules);
+ install_modules = temp;
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(row->EnableRadio))){
+ enabled_module = row->package;
+ }
+ }
+ }
+
+ if (yon_char_is_empty(enabled_module)){
+ yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),ENABLED_KERNEL_MISSING_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
+ return 0;
+ }
+
+ if (!yon_char_is_empty(install_modules)){
+ yon_config_register(modules_extra_parameter,modules_extra_parameter_command,install_modules);
+ } else {
+ yon_config_remove_by_key(modules_extra_parameter);
+ }
+ yon_config_register(KERNEL_BOOT_parameter,KERNEL_BOOT_parameter_command,enabled_module);
+ return 1;
+}
+
+int yon_kernel_addon_save(main_window *widgets){
+ GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->KernelAddonListBox));
+ char *install_modules = "";
+ for(GList *iter = list;iter;iter = iter->next){
+ kernel_row *row = g_object_get_data(G_OBJECT(iter->data),"kernel_row");
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(row->InstallCheck))){
+ char *temp = yon_char_unite(install_modules,!yon_char_is_empty(install_modules)?" ":"",row->modules,NULL);
+ if (!yon_char_is_empty(install_modules)) free(install_modules);
+ install_modules = temp;
+ }
+ }
+
+ if (!yon_char_is_empty(install_modules)){
+ char *parameter = config(modules_extra_parameter);
+ char *parameter_new = yon_char_unite(!yon_char_is_empty(parameter)?parameter:"",!yon_char_is_empty(parameter)?",":"",install_modules,NULL);
+ yon_config_register(modules_extra_parameter,modules_extra_parameter_command,parameter_new);
+ free(parameter_new);
+ }
+ return 1;
+}
+
+int yon_os_components_save(main_window *widgets){
+ GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->OSSoftwareListBox));
+ GList *iter;
+ int size;
+ config_str modules = NULL;
+ for(iter = list;iter;iter=iter->next){
+ os_row *row = g_object_get_data(iter->data,"kernel_row");
+ char *target = row->name;
+ int status = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(row->InstallCheck));
+ if (status){
+ yon_char_parsed_add_or_create_if_exists(modules,&size,target);
+ }
+ }
+ g_list_free(list);
+ if (size){
+ char *final = yon_char_parsed_to_string(modules,size,",");
+ yon_config_register(modules_parameter,modules_parameter_command,final);
+ } else {
+ yon_config_remove_by_key(modules_parameter);
+ }
+ return 1;
+}
+
+os_row *yon_os_row_new(){
+ os_row *row = new(os_row);
+ GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_os_row);
+ row->RowBox = yon_gtk_builder_get_widget(builder,"TableRow");
+ row->InstallCheck = yon_gtk_builder_get_widget(builder,"InstallCheck");
+ row->NameLabel = yon_gtk_builder_get_widget(builder,"NameLabel");
+ row->TagsBox = yon_gtk_builder_get_widget(builder,"TagsBox");
+ row->VersionLabel = yon_gtk_builder_get_widget(builder,"VersionLabel");
+ row->DescriptionLabel = yon_gtk_builder_get_widget(builder,"DescriptionLabel");
+ row->name=NULL;
+ row->modules=NULL;
+ row->version=NULL;
+
+ g_signal_connect(G_OBJECT(row->InstallCheck),"toggled",G_CALLBACK(on_kernel_install_enabled),row);
+
+ row->row = gtk_list_box_row_new();
+ gtk_container_add(GTK_CONTAINER(row->row),row->RowBox);
+ gtk_widget_show(row->row);
+
+ g_object_set_data(G_OBJECT(row->InstallCheck),"kernel_row",row);
+ g_object_set_data(G_OBJECT(row->row),"kernel_row",row);
+
+ return row;
+}
+
+void yon_os_row_setup(os_row *row, char *name, char *version,char *tags, char *description){
+ row->name = yon_char_new(name);
+
+ char *description_full = yon_char_new(description);
+ if (strlen(description)>100){
+ guint size;
+ config_str description_wrapped = yon_char_wrap_to_lines(description,3,&size);
+ description_full = yon_char_parsed_to_string(description_wrapped,size,"\n");
+ yon_char_parsed_free(description_wrapped,size);
+ }
+ gtk_label_set_label(GTK_LABEL(row->NameLabel),name);
+ gtk_label_set_label(GTK_LABEL(row->VersionLabel),version);
+ gtk_label_set_label(GTK_LABEL(row->DescriptionLabel),description_full);
+
+ yon_kernel_row_setup_tags((kernel_row*)row,tags);
+ free(description_full);
+}
+
+void yon_os_components_init(main_window *widgets){
+ int size = 0;
+ GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->OSSoftwareListBox));
+ GList *iter;
+ if (!list){
+ int base_size;
+ config_str base = yon_config_load(get_modules_command,&base_size);
+ for (int i=0;iOSSoftwareListBox),row->row,-1);
+ int min_size=0;
+ gtk_widget_get_preferred_width(row->NameLabel,&min_size,NULL);
+ if (min_size>size) size=min_size;
+
+
+ }
+ yon_char_parsed_free(base,base_size);
+ while(gtk_events_pending()) gtk_main_iteration();
+ list = gtk_container_get_children(GTK_CONTAINER(widgets->OSSoftwareListBox));
+ for(iter = list;iter;iter=iter->next){
+ os_row *row = g_object_get_data(iter->data,"kernel_row");
+ gtk_widget_set_size_request(row->NameLabel,size,-1);
+ }
+ }
+
+ char *modules = config(modules_parameter);
+ if (!yon_char_is_empty(modules)){
+ int parsed_size;
+ config_str parsed = yon_char_parse(modules,&parsed_size,",");
+ for(iter = list;iter;iter=iter->next){
+ os_row *row = g_object_get_data(iter->data,"kernel_row");
+ char *target = row->name;
+ if (yon_char_parsed_check_exist(parsed,parsed_size,target)>-1){
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(row->InstallCheck),1);
+ } else {
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(row->InstallCheck),1);
+ }
+ }
+ yon_char_parsed_free(parsed,parsed_size);
+ }
+}
+
+int yon_software_save(main_window *widgets){
+
+ GtkTreeIter iter;
+ GtkTreeModel *model = GTK_TREE_MODEL(widgets->AdditionalSoftwareList);
+ int size = 0;
+ config_str modules = NULL;
+ for_iter(model,&iter){
+ char *target;
+ int status;
+ gtk_tree_model_get(model,&iter,0,&status,1,&target,-1);
+ if (status){
+ yon_char_parsed_add_or_create_if_exists(modules,&size,target);
+ }
+ }
+ if (size){
+ char *final = yon_char_parsed_to_string(modules,size,",");
+ char *parameter = config(modules_extra_parameter);
+ char *parameter_new = yon_char_unite(!yon_char_is_empty(parameter)?parameter:"",!yon_char_is_empty(parameter)?",":"",final,NULL);
+ yon_config_register(modules_extra_parameter,modules_extra_parameter_command,parameter_new);
+ free(parameter_new);
+ }
+ return 1;
+}
+
+void yon_software_init(main_window *widgets){
+ GtkTreeIter iter;
+ if (!gtk_tree_model_get_iter_first(GTK_TREE_MODEL(widgets->AdditionalSoftwareList),&iter)){
+ int size;
+ config_str parsed = NULL;
+ parsed = yon_resource_open_file(additional_software_path,&size);
+ for (int i=1;iAdditionalSoftwareList,&iter);
+ gtk_list_store_set(widgets->AdditionalSoftwareList,&iter,0,1,1,module_parsed[0],2,module_parsed[1],3,module_parsed[2],-1); //2,module_parsed[2]
+ yon_char_parsed_free(module_parsed,module_size);
+ }
+ }
+ if (size) yon_char_parsed_free(parsed,size);
+ }
+
+ char *modules = config(modules_extra_parameter);
+
+ int size;
+ config_str parsed = yon_char_parse(modules,&size,",");
+ for_iter(GTK_TREE_MODEL(widgets->AdditionalSoftwareList),&iter){
+ char *target;
+ gtk_tree_model_get(GTK_TREE_MODEL(widgets->AdditionalSoftwareList),&iter,1,&target);
+ if (yon_char_parsed_check_exist(parsed,size,target)>-1){
+ gtk_list_store_set(widgets->AdditionalSoftwareList,&iter,0,1,-1);
+ } else {
+ gtk_list_store_set(widgets->AdditionalSoftwareList,&iter,0,0,-1);
+ }
+ }
+ yon_char_parsed_free(parsed,size);
+}
+
+int yon_pacman_software_save(main_window *widgets){
+ GtkTreeIter iter;
+ GtkTreeModel *model = GTK_TREE_MODEL(widgets->PacmanSoftwareChosenList);
+ int size;
+ config_str parameters = NULL;
+ for_iter(model,&iter){
+ char *target;
+ gtk_tree_model_get(model,&iter,1,&target,-1);
+ yon_char_parsed_add_or_create_if_exists(parameters,&size,target);
+ }
+ char *final = yon_char_parsed_to_string(parameters,size,",");
+ yon_char_parsed_free(parameters,size);
+ if (!yon_char_is_empty(final)){
+ yon_config_register(packages_parameter,packages_parameter_command,final);
+ } else {
+ yon_config_remove_by_key(packages_parameter);
+ }
+ return 1;
+}
+
+void yon_pacman_init(main_window *widgets){
+ char *pacman_packages = config(packages_parameter);
+
+ int size;
+ config_str parsed = yon_char_parse(pacman_packages,&size,",");
+ for (int i=0;iPacmanSoftwareChosenList,&iter);
+ gtk_list_store_set(widgets->PacmanSoftwareChosenList,&iter,0,1,1,parsed[i],2,version,3,description,-1);
+ }
+ yon_char_parsed_free(parsed,size);
+}
\ No newline at end of file
diff --git a/source/ubinstall-gtk-configuration-mode.c b/source/ubinstall-gtk-configuration-mode.c
new file mode 100644
index 0000000..d0b0e8f
--- /dev/null
+++ b/source/ubinstall-gtk-configuration-mode.c
@@ -0,0 +1,25 @@
+#include "ubinstall-gtk.h"
+
+void on_configuration_mode_switch(GtkWidget *self,main_window *widgets){
+ if (getuid()) {
+ if (main_config.configure_mode==1){
+ char *argline = LocaleName;
+ for (int i=1;iMainWindow);
+ }
+ }
+ }
+ main_config.configure_mode = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(self));
+}
diff --git a/source/ubinstall-gtk-decorations.c b/source/ubinstall-gtk-decorations.c
new file mode 100644
index 0000000..e69de29
diff --git a/source/ubinstall-gtk-grub.c b/source/ubinstall-gtk-grub.c
new file mode 100644
index 0000000..8999484
--- /dev/null
+++ b/source/ubinstall-gtk-grub.c
@@ -0,0 +1,47 @@
+#include "ubinstall-gtk.h"
+
+int yon_grub_install_save(main_window *widgets){
+ GtkTreeIter iter;
+ GtkTreeModel *model;
+ if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->GrubInstallDevicesTree)),&model,&iter)){
+ yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_DEVICE_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
+ yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->GrubInstallDevicesTree));
+ return 0;
+ }
+ char *cur_device;
+ gtk_tree_model_get(model,&iter,0,&cur_device,-1);
+ if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->GrubInstallPartitionTree)),&model,&iter)){
+ yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_DEVICE_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
+ yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->GrubInstallPartitionTree));
+ return 0;
+ }
+ char *partition;
+ gtk_tree_model_get(model,&iter,0,&partition,-1);
+ 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");
+ return 1;
+}
+
+int yon_grub_update_save(main_window *widgets){
+ GtkTreeIter iter;
+ GtkTreeModel *model;
+ if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->GrubUpdateDevicesTree)),&model,&iter)){
+ yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_DEVICE_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
+ yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->GrubUpdateDevicesTree));
+ return 0;
+ }
+ char *cur_device;
+ gtk_tree_model_get(model,&iter,0,&cur_device,-1);
+ if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->GrubUpdatePartitionTree)),&model,&iter)){
+ yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_DEVICE_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
+ yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->GrubUpdatePartitionTree));
+ return 0;
+ }
+ char *partition;
+ gtk_tree_model_get(model,&iter,0,&partition,-1);
+ 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");
+ return 1;
+}
\ No newline at end of file
diff --git a/source/ubinstall-gtk-install-start.c b/source/ubinstall-gtk-install-start.c
new file mode 100644
index 0000000..d6648ca
--- /dev/null
+++ b/source/ubinstall-gtk-install-start.c
@@ -0,0 +1,11 @@
+#include "ubinstall-gtk.h"
+
+int yon_installation_start(main_window *widgets){
+ return !pthread_create(&main_config.install_thread,NULL,on_config_save,widgets);
+}
+
+void yon_quick_install(GtkWidget *, main_window *widgets){
+ main_config.save_configured=1;
+ pthread_create(&main_config.install_thread,NULL,on_config_save,widgets);
+ gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_INSTALLATION);
+}
\ No newline at end of file
diff --git a/source/ubinstall-gtk-installation.c b/source/ubinstall-gtk-installation.c
new file mode 100644
index 0000000..ac01b58
--- /dev/null
+++ b/source/ubinstall-gtk-installation.c
@@ -0,0 +1,810 @@
+#include "ubinstall-gtk.h"
+
+int yon_install_common_save(main_window *widgets){
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+ if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->CommonInstallationDevicesTree)),&model,&iter)){
+ yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_DEVICE_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
+ yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->CommonInstallationDevicesTree));
+ return 0;
+ }
+ char *device;
+ yon_config_remove_by_key(part_size_parameter);
+ yon_config_remove_by_key(part_parameter);
+ gtk_tree_model_get(model,&iter,0,&device,-1);
+ yon_config_register(AUTOINSTALL_TYPE_INSTALL,AUTOINSTALL_TYPE_INSTALL_command,"fast");
+ yon_config_register(AUTOINSTALL_DEVICE,AUTOINSTALL_DEVICE_command,device);
+
+ char *device_name = (char*)gtk_entry_get_text(GTK_ENTRY(widgets->CommonInstallationSectionNameEntry));
+ if (!yon_char_is_empty(device_name)){
+ yon_config_register(part_label_parameter,part_label_parameter_command,device_name);
+ } else {
+ yon_config_remove_by_key(part_label_parameter);
+ }
+
+ char *file_system_type = (char*)gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(widgets->CommonInstallationFilesystemTypeCombo));
+ if (!yon_char_is_empty(file_system_type)){
+ yon_config_register(part_fs_type_parameter,part_fs_type_parameter_command,file_system_type);
+ } else {
+ yon_config_remove_by_key(part_fs_type_parameter);
+ }
+ return 1;
+}
+
+int yon_install_separate_save(main_window *widgets){
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+ if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->NextInstallationSysDevicesTree)),&model,&iter)){
+ yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_DEVICE_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
+ yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->CommonInstallationDevicesTree));
+ return 0;
+ }
+ char *device;
+ gtk_tree_model_get(model,&iter,0,&device,-1);
+ if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->NextInstallationSysSectionTree)),&model,&iter)){
+ yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_DEVICE_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
+ yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->CommonInstallationDevicesTree));
+ return 0;
+ }
+ if (gtk_switch_get_active(GTK_SWITCH(widgets->NextInstallationFormatSwitch))){
+ yon_config_register(part_format_parameter,part_format_parameter_command,"yes");
+ double part_size = gtk_spin_button_get_value(GTK_SPIN_BUTTON(widgets->NextInstallationSizeSpin));
+ if (part_size){
+ char *size_letter = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(widgets->NextInstallationSizeTypeSpin));
+ 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 *device_name = (char*)gtk_entry_get_text(GTK_ENTRY(widgets->NextInstallationSectionNameEntry));
+ if (!yon_char_is_empty(device_name)){
+ yon_config_register(part_label_parameter,part_label_parameter_command,device_name);
+ } else {
+ yon_config_remove_by_key(part_label_parameter);
+
+ }
+
+ char *file_system_type = (char*)gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(widgets->NextInstallationFilesystemTypeCombo));
+ if (!yon_char_is_empty(file_system_type)){
+ yon_config_register(part_fs_type_parameter,part_fs_type_parameter_command,file_system_type);
+
+ } else {
+ yon_config_remove_by_key(part_fs_type_parameter);
+
+ }
+ } else {
+ yon_config_register(part_format_parameter,part_format_parameter_command,"no");
+ yon_config_remove_by_key(part_label_parameter);
+ yon_config_remove_by_key(part_fs_type_parameter);
+ yon_config_remove_by_key(part_format_parameter);
+ yon_config_remove_by_key(part_fs_type_parameter);
+ yon_config_remove_by_key(part_format_parameter);
+ }
+
+ char *part;
+ gtk_tree_model_get(model,&iter,0,&part,-1);
+ yon_config_register(AUTOINSTALL_TYPE_INSTALL,AUTOINSTALL_TYPE_INSTALL_command,"next");
+ yon_config_register(AUTOINSTALL_DEVICE,AUTOINSTALL_DEVICE_command,device);
+ yon_config_register(part_parameter,part_parameter_command,part);
+ return 1;
+}
+
+int yon_install_same_partition_save(main_window *widgets){
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+ if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->SamePlaceDeviceTree)),&model,&iter)){
+ yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_DEVICE_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
+ yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->CommonInstallationDevicesTree));
+ return 0;
+ }
+ char *device;
+ gtk_tree_model_get(model,&iter,0,&device,-1);
+ if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->SamePlacePartTree)),&model,&iter)){
+ yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_DEVICE_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
+ yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->CommonInstallationDevicesTree));
+ return 0;
+ }
+ yon_config_remove_by_key(part_size_parameter);
+ char *part;
+ gtk_tree_model_get(model,&iter,0,&part,-1);
+ yon_config_register(AUTOINSTALL_TYPE_INSTALL,AUTOINSTALL_TYPE_INSTALL_command,"part");
+ yon_config_register(AUTOINSTALL_DEVICE,AUTOINSTALL_DEVICE_command,device);
+ yon_config_register(part_parameter,part_parameter_command,part);
+
+ if (gtk_switch_get_active(GTK_SWITCH(widgets->SameInstallationFormatSwitch))){
+ yon_config_register(part_format_parameter,part_format_parameter_command,"yes");
+ char *device_name = (char*)gtk_entry_get_text(GTK_ENTRY(widgets->SameInstallationSectionNameEntry));
+ if (!yon_char_is_empty(device_name)){
+ yon_config_register(part_label_parameter,part_label_parameter_command,device_name);
+ } else {
+ yon_config_remove_by_key(part_label_parameter);
+ }
+
+ char *file_system_type = (char*)gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(widgets->SameInstallationFilesystemTypeCombo));
+ if (!yon_char_is_empty(file_system_type)){
+ yon_config_register(part_fs_type_parameter,part_fs_type_parameter_command,file_system_type);
+ } else {
+ yon_config_remove_by_key(part_fs_type_parameter);
+
+ }
+ } else {
+ yon_config_register(part_format_parameter,part_format_parameter_command,"no");
+ yon_config_remove_by_key(part_label_parameter);
+ yon_config_remove_by_key(part_format_parameter);
+ yon_config_remove_by_key(part_fs_type_parameter);
+ }
+ return 1;
+}
+
+int yon_advanced_sections_save(dictionary *dict){
+ if (!dict) return 0;
+ advanced_partition *first_section = yon_dictionary_get_data(dict->first,advanced_partition*);
+ advanced_partition *last_section = NULL;
+ if (dict->first->next){
+ last_section = yon_dictionary_get_data(dict->first->next,advanced_partition*);
+ }
+
+ char *part_first = first_section->part;
+ char *part_last = last_section?last_section->part:NULL;
+ char *part = yon_char_unite(part_first,last_section?",":NULL,part_last,NULL);
+ yon_config_register(part_parameter,part_parameter_command,part);
+
+ char * format_first = gtk_switch_get_active(GTK_SWITCH(first_section->FormatSwitch))?"yes":"no";
+ char * format_last = last_section?gtk_switch_get_active(GTK_SWITCH(last_section->FormatSwitch))?"yes":"no":NULL;
+ char *format = yon_char_unite(format_first,part_last?",":NULL,format_last,NULL);
+ yon_config_register(part_format_parameter,part_format_parameter_command,format);
+
+ if (!yon_char_is_empty(format)){
+ char *size_first = g_strdup_printf("%d%s",gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(first_section->SizeSpin)),yon_size_get_mod(gtk_combo_box_get_active(GTK_COMBO_BOX(first_section->SizeCombo))));
+ char *size_last = last_section&&!strcmp(format_last,"yes")?g_strdup_printf("%d%s",gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(last_section->SizeSpin)),yon_size_get_mod(gtk_combo_box_get_active(GTK_COMBO_BOX(last_section->SizeCombo)))):NULL;
+ char *size = yon_char_unite(size_first,size_last?",":NULL,size_last,NULL);
+ yon_config_register(part_size_parameter,part_size_parameter_command,size);
+
+ char *part_label_first = (char*)gtk_entry_get_text(GTK_ENTRY(first_section->SectionMarkEntry));
+ char *part_label_last = last_section&&!strcmp(format_last,"yes")?(char*)gtk_entry_get_text(GTK_ENTRY(last_section->SectionMarkEntry)):NULL;
+ char *part_label = yon_char_unite(part_label_first,part_label_last?",":NULL,part_label_last,NULL);
+ yon_config_register(part_label_parameter,part_label_parameter_command,part_label);
+
+ char *fs_label_first = (char*)gtk_entry_get_text(GTK_ENTRY(first_section->FileSystemMarkentry));
+ char *fs_label_last = last_section&&!strcmp(format_last,"yes")?(char*)gtk_entry_get_text(GTK_ENTRY(last_section->FileSystemMarkentry)):NULL;
+ char *fs_label = yon_char_unite(fs_label_first,fs_label_last?",":NULL,fs_label_last,NULL);
+ yon_config_register(part_fs_label_parameter,part_fs_label_parameter_command,fs_label);
+
+ char *fs_type_first = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(first_section->FileSystemTypeCombo));
+ char *fs_type_last = last_section&&!strcmp(format_last,"yes")?(char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(last_section->FileSystemTypeCombo)):NULL;
+ char *fs_type = yon_char_unite(fs_type_first,fs_type_last?",":NULL,fs_type_last,NULL);
+ yon_config_register(part_fs_type_parameter,part_fs_type_parameter_command,fs_type);
+
+ char *part_crypt_first = gtk_combo_box_get_active(GTK_COMBO_BOX(first_section->EncryptionCombo))?(char*)gtk_entry_get_text(GTK_ENTRY(first_section->EncryptionEntry)):NULL;
+ char *part_crypt_last = last_section&&!strcmp(format_last,"yes")&>k_combo_box_get_active(GTK_COMBO_BOX(last_section->EncryptionCombo))?(char*)gtk_entry_get_text(GTK_ENTRY(first_section->EncryptionEntry)):NULL;
+ char *part_crypt = NULL;
+ if (part_crypt_first||part_crypt_last){
+ part_crypt = yon_char_unite(part_crypt_first,part_crypt_last?",":NULL,part_crypt_last,NULL);
+ }
+ if (part_crypt){
+ yon_config_register(part_crypt_parameter,part_crypt_parameter_command,part_crypt);
+ } else {
+ yon_config_remove_by_key(part_crypt_parameter);
+ }
+ }
+ return 1;
+}
+
+int yon_install_advanced_save(main_window *widgets){
+
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+ if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->AdvancedDeviceTree)),&model,&iter)){
+ yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_DEVICE_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
+ yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->AdvancedDeviceTree));
+ return 0;
+ }
+ char *device;
+ gtk_tree_model_get(model,&iter,0,&device,-1);
+ if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->AdvancedPartitionTree)),&model,&iter)){
+ yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_DEVICE_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
+ yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->AdvancedPartitionTree));
+ return 0;
+ }
+ yon_config_remove_by_key(part_size_parameter);
+ char *part;
+ gtk_tree_model_get(model,&iter,0,&part,-1);
+
+ if (!yon_advanced_sections_save(widgets->advanced_sections)){
+ return 0;
+ }
+
+ if (gtk_switch_get_active(GTK_SWITCH(widgets->AdvancedSwapSwitch))){
+ if (gtk_switch_get_active(GTK_SWITCH(widgets->AdvancedSwapAutoSwitch))){
+ yon_config_register(swap_parameter,swap_parameter_command,"auto");
+ } else if (gtk_switch_get_active(GTK_SWITCH(widgets->AdvancedSwapRamSwitch))){
+ yon_config_register(swap_parameter,swap_parameter_command,"yes");
+ yon_config_register(swap_size_parameter,swap_size_parameter_command,"ram");
+ } else {
+ yon_config_register(swap_parameter,swap_parameter_command,"yes");
+ char *swap = g_strdup_printf("%d%s",gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widgets->AdvancedSwapFixedSpin)),yon_size_get_mod(gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->AdvancedSwapFixedSizeSwitch))+1));
+ yon_config_register(swap_size_parameter,swap_size_parameter_command,swap);
+ }
+ }
+ const char *device_typevfs = gtk_combo_box_get_active_id(GTK_COMBO_BOX(widgets->AdvancedVirtualDeviceCombo));
+ if (!yon_char_is_empty(device_typevfs)){
+ yon_config_register(device_typevfs_parameter,device_typevfs_parameter_command,(char*)device_typevfs);
+ } else {
+ yon_config_remove_by_key(device_typevfs_parameter);
+ }
+ if (gtk_switch_get_active(GTK_SWITCH(widgets->AdvancedLoadTypeSwitch))){
+ char *bios = gtk_switch_get_active(GTK_SWITCH(widgets->AdvancedBiosSectorSwitch))?"bios":"";
+ char *efi = gtk_switch_get_active(GTK_SWITCH(widgets->AdvancedEFISwitch))?"efi":NULL;
+ char *boot = yon_char_unite(bios,!yon_char_is_empty(bios)&&!yon_char_is_empty(efi)?"+":"",efi,NULL);
+ yon_config_register(boot_parameter,boot_parameter_command,boot);
+ } else {
+ yon_config_register(boot_parameter,boot_parameter_command,"none");
+ }
+
+ return 1;
+}
+
+void yon_install_advanced_init(main_window *){
+ // char *boot = config(boot_parameter);
+ // char *swap = config(swap_parameter);
+}
+
+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->NextInstallationSysSectionTree||self == widgets->NextInstallationSizeTypeSpin){
+ yon_set_max_size_from_partition(GTK_TREE_VIEW(widgets->NextInstallationSysSectionTree),GTK_SPIN_BUTTON(widgets->NextInstallationSizeSpin),GTK_COMBO_BOX(widgets->NextInstallationSizeTypeSpin));
+ }
+
+}
+
+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;i2){
+ 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->NextInstallationSizeSpin),0.0);
+ gtk_adjustment_set_upper(gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(widgets->NextInstallationSizeSpin)),0.0);
+ }
+}
+
+void yon_devices_setup(main_window *widgets){
+ GtkTreeIter iter;
+ if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(widgets->DevicesList),&iter)) return;
+ int size;
+ config_str parsed = NULL;
+ parsed = yon_config_load(yon_debug_output("%s\n",get_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);
+ free(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 *path, *size, *model, *vendor, *serial;
+
+ json_object_object_get_ex(device, "path", &path);
+ 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->DevicesList,&iter);
+ gtk_list_store_set(widgets->DevicesList,&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),6,1,-1);
+
+ }
+ yon_char_parsed_free(parsed,size);
+}
+
+void yon_install_init(main_window *widgets, enum YON_PAGES page){
+ yon_devices_setup(widgets);
+
+ GtkWidget *device_tree = NULL;
+ GtkWidget *partition_tree = NULL;
+ GtkWidget *format_switch = NULL;
+ GtkWidget *device_label = NULL;
+ GtkWidget *fs_type_combo = NULL;
+ GtkWidget *partition_size_spin = NULL;
+ GtkWidget *partition_size_combo = NULL;
+ GtkWidget *partition_mark_entry = NULL;
+ GtkWidget *partition_fs_mark_entry = NULL;
+ GtkWidget *partition_encryption_combo = NULL;
+ GtkWidget *partition_encryption_entry = NULL;
+
+ switch(page){
+ case YON_PAGE_INSTALL_COMMON:
+ device_tree = widgets->CommonInstallationDevicesTree;
+ device_label = widgets->CommonInstallationSectionNameEntry;
+ format_switch = widgets->CommonFormatSwitch;
+ fs_type_combo = widgets->CommonInstallationFilesystemTypeCombo;
+ break;
+ case YON_PAGE_INSTALL_SAME_PARTITION:
+ device_tree = widgets->SamePlaceDeviceTree;
+ partition_tree = widgets->SamePlacePartTree;
+ format_switch = widgets->SameInstallationFormatSwitch;
+ partition_mark_entry = widgets->SameInstallationSectionNameEntry;
+ fs_type_combo = widgets->SameInstallationFilesystemTypeCombo;
+ break;
+ case YON_PAGE_INSTALL_SEPARATE:
+ device_tree = widgets->NextInstallationSysDevicesTree;
+ partition_tree = widgets->NextInstallationSysSectionTree;
+ format_switch = widgets->NextInstallationFormatSwitch;
+ partition_size_spin = widgets->NextInstallationSizeSpin;
+ partition_size_combo = widgets->NextInstallationSizeTypeSpin;
+ partition_mark_entry = widgets->NextInstallationSectionNameEntry;
+ fs_type_combo = widgets->NextInstallationFilesystemTypeCombo;
+
+ break;
+ case YON_PAGE_INSTALL_ADVANCED:
+ yon_install_advanced_init(widgets);
+ return;
+ break;
+ case YON_PAGE_RECOVERY_GRUB_INSTALL:
+ device_tree = widgets->GrubInstallDevicesTree;
+ partition_tree = widgets->GrubInstallPartitionTree;
+
+ break;
+ case YON_PAGE_RECOVERY_GRUB_UPDATE:
+ device_tree = widgets->GrubUpdateDevicesTree;
+ partition_tree = widgets->GrubUpdatePartitionTree;
+
+ break;
+ case YON_PAGE_RECOVERY_OS_ONLY:
+ device_tree = widgets->OSDevicesTree;
+ partition_tree = widgets->OSSysSectionTree;
+ format_switch = widgets->OSFormatSwitch;
+ partition_size_spin = widgets->OSFormatSizeSpin;
+ partition_size_combo = widgets->OSFormatSizeCombo;
+ partition_mark_entry = widgets->OSFormatPartitionEntry;
+ fs_type_combo = widgets->OSFilesystemTypeCombo;
+ partition_fs_mark_entry = widgets->OSFormatFSMarkEntry;
+ partition_encryption_combo = widgets->OSFormatEncryptionCombo;
+ partition_encryption_entry = widgets->OSFormatEncryptionEntry;
+
+ break;
+ case YON_PAGE_RECOVERY_USRDATA_ONLY:
+ device_tree = widgets->UserdataDevicesTree;
+ partition_tree = widgets->UserdataSysSectionTree;
+ format_switch = widgets->OSFormatSwitch;
+ partition_size_spin = widgets->UserdataFormatSwitch;
+ partition_size_combo = widgets->UserdataFormatSizeCombo;
+ partition_mark_entry = widgets->UserdataFormatPartitionEntry;
+ fs_type_combo = widgets->UserdataFilesystemTypeCombo;
+ partition_fs_mark_entry = widgets->UserdataFormatFSMarkEntry;
+ partition_encryption_combo = widgets->UserdataFormatEncryptionCombo;
+ partition_encryption_entry = widgets->UserdataFormatEncryptionEntry;
+ break;
+ default:return;
+ }
+
+
+ char *device = config(AUTOINSTALL_DEVICE);
+ char *part = config(part_parameter);
+
+
+ if (!yon_char_is_empty(device)){
+ GtkTreeIter iter;
+ GtkTreeModel *model = GTK_TREE_MODEL(widgets->DevicesList);
+ for_iter(model,&iter){
+ char *target;
+ gtk_tree_model_get(model,&iter,0,&target,-1);
+ if (!yon_char_is_empty(target)&&!strcmp(target,device)){
+ gtk_tree_selection_select_iter(gtk_tree_view_get_selection(GTK_TREE_VIEW(device_tree)),&iter);
+ break;
+ }
+ }
+ if (partition_tree&&!yon_char_is_empty(part)){
+ model = GTK_TREE_MODEL(widgets->PartitionsList);
+ for_iter(model,&iter){
+ char *target;
+ gtk_tree_model_get(model,&iter,0,&target,-1);
+ if (!yon_char_is_empty(target)&&!strcmp(target,device)){
+ gtk_tree_selection_select_iter(gtk_tree_view_get_selection(GTK_TREE_VIEW(partition_tree)),&iter);
+ break;
+ }
+ }
+ }
+ }
+ if (format_switch){
+ char *format = config(part_format_parameter);
+ if ((!yon_char_is_empty(format)&&!strcmp(format,"yes"))||format_switch==widgets->CommonFormatSwitch){
+ gtk_switch_set_active(GTK_SWITCH(format_switch),1);
+ if (device_label){
+ char *parameter = config(part_label_parameter);
+ if (!yon_char_is_empty(parameter)){
+ gtk_entry_set_text(GTK_ENTRY(device_label),parameter);
+ } else {
+ gtk_entry_set_text(GTK_ENTRY(device_label),"");
+ }
+ }
+ if (fs_type_combo){
+ char *parameter = config(part_fs_type_parameter);
+ if (!yon_char_is_empty(parameter)){
+ gtk_combo_box_set_active_id(GTK_COMBO_BOX(fs_type_combo),parameter);
+ } else {
+ gtk_combo_box_set_active(GTK_COMBO_BOX(fs_type_combo),0);
+ }
+ }
+ if (partition_size_spin&&partition_size_combo){
+ char *parameter = config(part_size_parameter);
+ if (!yon_char_is_empty(parameter)){
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(partition_size_spin),atol(parameter));
+ gtk_combo_box_set_active(GTK_COMBO_BOX(partition_size_combo),yon_get_size_get_from_letter(parameter[strlen(parameter)-1]));
+ } else {
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(partition_size_spin),0);
+ gtk_combo_box_set_active(GTK_COMBO_BOX(partition_size_combo),0);
+ }
+ }
+ if (partition_mark_entry){
+ char *parameter = config(part_label_parameter);
+ if (!yon_char_is_empty(parameter)){
+ gtk_entry_set_text(GTK_ENTRY(partition_mark_entry),parameter);
+ } else {
+ gtk_entry_set_text(GTK_ENTRY(partition_mark_entry),"");
+ }
+ }
+ if (partition_fs_mark_entry){
+ char *parameter = config(part_fs_label_parameter);
+ if (!yon_char_is_empty(parameter)){
+ gtk_entry_set_text(GTK_ENTRY(partition_fs_mark_entry),parameter);
+ } else {
+ gtk_entry_set_text(GTK_ENTRY(partition_fs_mark_entry),"");
+ }
+ }
+ if (partition_encryption_combo && partition_encryption_entry){
+ char *parameter = config(part_crypt_parameter);
+ if (!yon_char_is_empty(parameter)&&!strstr(parameter,",")){
+ char *password = yon_char_new(parameter);
+ char *crypt = yon_char_divide_search(password,":",-1);
+ gtk_combo_box_set_active_id(GTK_COMBO_BOX(partition_encryption_combo),crypt);
+ gtk_entry_set_text(GTK_ENTRY(partition_encryption_entry),password);
+ free(password);
+ free(crypt);
+ } else {
+ gtk_combo_box_set_active(GTK_COMBO_BOX(partition_encryption_combo),0);
+ gtk_entry_set_text(GTK_ENTRY(partition_encryption_entry),"");
+ }
+ }
+ } else {
+ gtk_switch_set_active(GTK_SWITCH(format_switch),0);
+ }
+ }
+
+}
+
+void on_advanced_password_clicked(GtkWidget *, advanced_partition *part){
+ yon_password_open(GTK_ENTRY(part->EncryptionEntry));
+}
+
+void yon_advanced_partition_clear(main_window *widgets){
+ GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->AdvancedPartitionAddBox));
+ GList *iter;
+ for (iter=list;iter;iter=iter->next){
+ advanced_partition *part = g_object_get_data(G_OBJECT(iter->data),"advanced_partition");
+ gtk_widget_destroy(GTK_WIDGET(iter->data));
+ free(part);
+ }
+ on_advanced_parts_removed(NULL,NULL,widgets);
+}
+
+int yon_advanced_get_part_size(main_window *widgets){
+ int size = 0;
+ GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->AdvancedPartitionAddBox));
+ size = g_list_length(list);
+ g_list_free(list);
+ return size;
+}
+
+void yon_advanced_set_part_sensitivity(main_window *widgets, gboolean state){
+ GtkTreeIter iter;
+ GtkTreeModel *model = GTK_TREE_MODEL(widgets->PartitionsList);
+ int status;
+ for_iter(model,&iter){
+ gtk_tree_model_get(model,&iter,8,&status,-1);
+ if (!status){
+ gtk_list_store_set(widgets->PartitionsList,&iter,8,state?state:0,-1);
+ } else {
+ gtk_list_store_set(widgets->PartitionsList,&iter,8,1,-1);
+ }
+ }
+}
+
+void yon_advanced_set_device_sensitivity(main_window *widgets, gboolean state){
+ GtkTreeIter iter;
+ GtkTreeModel *model = GTK_TREE_MODEL(widgets->DevicesList);
+ for_iter(model,&iter){
+ gtk_list_store_set(widgets->DevicesList,&iter,6,state,-1);
+ }
+}
+
+advanced_partition *yon_advanced_partition_new(){
+ advanced_partition *part = new(advanced_partition);
+ GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_advanced_part);
+ part->MainBox = yon_gtk_builder_get_widget(builder,"MainBox");
+ part->SectionLabel = yon_gtk_builder_get_widget(builder,"SectionLabel");
+ part->SystemSectionToggle = yon_gtk_builder_get_widget(builder,"SystemSectionToggle");
+ part->UserDataSectionToggle = yon_gtk_builder_get_widget(builder,"UserDataSectionToggle");
+ part->RemoveButton = yon_gtk_builder_get_widget(builder,"RemoveButton");
+ part->FormatSwitch = yon_gtk_builder_get_widget(builder,"FormatSwitch");
+ part->SizeSpin = yon_gtk_builder_get_widget(builder,"SizeSpin");
+ part->SizeCombo = yon_gtk_builder_get_widget(builder,"SizeCombo");
+ part->SectionMarkEntry = yon_gtk_builder_get_widget(builder,"SectionMarkEntry");
+ part->FileSystemTypeCombo = yon_gtk_builder_get_widget(builder,"FileSystemTypeCombo");
+ part->FileSystemMarkentry = yon_gtk_builder_get_widget(builder,"FileSystemMarkentry");
+ part->EncryptionCombo = yon_gtk_builder_get_widget(builder,"EncryptionCombo");
+ part->EncryptionEntry = yon_gtk_builder_get_widget(builder,"EncryptionEntry");
+ part->EncryptionButton = yon_gtk_builder_get_widget(builder,"EncryptionButton");
+ part->FormatRevealer = yon_gtk_builder_get_widget(builder,"FormatRevealer");
+ part->order_iter = NULL;
+ part->part = NULL;
+
+ yon_gtk_revealer_set_from_switch(GTK_REVEALER(part->FormatRevealer),GTK_SWITCH(part->FormatSwitch));
+ g_signal_connect(G_OBJECT(part->EncryptionButton),"clicked",G_CALLBACK(on_advanced_password_clicked),part);
+ // g_signal_connect(G_OBJECT(part->SystemSectionToggle),"clicked",G_CALLBACK(on_advanced_system_toggled),part);
+ // g_signal_connect(G_OBJECT(part->UserDataSectionToggle),"clicked",G_CALLBACK(on_advanced_user_toggled),part);
+
+ g_object_set_data(G_OBJECT(part->MainBox),"advanced_partition",part);
+ g_object_set_data(G_OBJECT(part->RemoveButton),"advanced_partition",part);
+
+ return part;
+}
+
+void on_advanced_part_remove(GtkWidget *self, main_window *widgets){
+ advanced_partition *part = g_object_get_data(G_OBJECT(self),"advanced_partition");
+
+ if (part->part_type == ADVANCED_PART_EXISTING){
+ GtkTreeIter iter;
+ GtkTreeModel *model = GTK_TREE_MODEL(widgets->PartitionsList);
+ for_iter(model,&iter){
+ int status;
+ char *target;
+ gtk_tree_model_get(model,&iter,0,&target,7,&status,-1);
+ if (status&&!strcmp(target,part->part)){
+ gtk_list_store_set(GTK_LIST_STORE(model),&iter,7,0,-1);
+ yon_advanced_set_part_sensitivity(widgets,1);
+ }
+
+ }
+ }
+ g_object_set_data(G_OBJECT(widgets->AdvancedPartitionAddBox),part->part,NULL);
+ g_sequence_remove(part->order_iter);
+ gtk_widget_destroy(part->MainBox);
+ on_advanced_parts_removed(NULL,NULL,widgets);
+ free(part);
+
+}
+
+void on_advanced_parts_added(GtkWidget *,GtkWidget*,main_window *widgets){
+ if (yon_advanced_get_part_size(widgets)>=2){
+ yon_advanced_set_part_sensitivity(widgets,0);
+ gtk_widget_hide(widgets->AdvancedAddButton);
+ }
+}
+
+void on_advanced_parts_removed(GtkWidget *,GtkWidget*,main_window *widgets){
+ int size = yon_advanced_get_part_size(widgets);
+ if (size<2){
+ yon_advanced_set_part_sensitivity(widgets,1);
+ gtk_widget_show(widgets->AdvancedAddButton);
+ }
+ if (!size){
+
+ }
+}
+
+void yon_advanced_partition_setup(advanced_partition *part,main_window *widgets){
+ g_signal_connect(G_OBJECT(part->RemoveButton),"clicked",G_CALLBACK(on_advanced_part_remove),widgets);
+ g_object_set_data(G_OBJECT(widgets->AdvancedPartitionAddBox),part->part,part);
+}
+
+void on_install_advanced_add_new(GtkWidget *, main_window *widgets){
+ advanced_partition *part = yon_advanced_partition_new();
+ part->part_type = ADVANCED_PART_NEW;
+ part->order_iter = g_sequence_append(widgets->advanced_partition_order,part);
+ gtk_box_pack_start(GTK_BOX(widgets->AdvancedPartitionAddBox),part->MainBox,0,0,0);
+ gtk_widget_show(part->MainBox);
+ yon_advanced_partition_setup(part,widgets);
+ on_advanced_parts_added(NULL,NULL,widgets);
+}
+
+void on_install_advanced_device_chosen(GtkCellRenderer *, gchar *path, main_window *widgets){
+ gtk_list_store_clear(widgets->PartitionsList);
+ yon_advanced_partition_clear(widgets);
+
+ int size;
+ config_str partitions;
+ partitions = yon_config_load(yon_debug_output("%s\n",get_parts_and_devices_command),&size);
+ for (int i=0;iDevicesList);
+
+ int chosen = 0;
+ chosen = yon_advanced_get_part_size(widgets);
+
+ if (gtk_tree_model_get_iter_from_string(model,&iter,path)){
+ int status;
+ gtk_tree_model_get(model,&iter,5,&status,-1);
+ if (!status){
+ if (chosen <2){
+ gtk_list_store_set(widgets->DevicesList,&iter,5,!status,-1);
+ chosen++;
+ } else {
+ for_iter (model,&iter){
+ gtk_tree_model_get(model,&iter,5,&status,-1);
+ if (!status){
+ gtk_list_store_set(widgets->DevicesList,&iter,6,0,-1);
+ }
+ }
+
+ }
+ } else {
+ gtk_list_store_set(widgets->DevicesList,&iter,5,!status,-1);
+ if (chosen == 2){
+ for_iter (model,&iter){
+ gtk_list_store_set(widgets->DevicesList,&iter,6,1,-1);
+ }
+ }
+ chosen--;
+ }
+ }
+
+ if (chosen) gtk_widget_set_sensitive(widgets->AdvancedAddButton,1);
+ else gtk_widget_set_sensitive(widgets->AdvancedAddButton,0);
+
+ for_iter (model,&iter){
+ char *disk_path;
+ int status;
+ gtk_tree_model_get(model,&iter,0,&disk_path,5,&status,-1);
+ if (!status) continue;
+
+ for (int i=0;i2){
+ 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];
+ }
+
+ GtkTreeIter itar;
+ gtk_list_store_append(widgets->PartitionsList,&itar);
+ gtk_list_store_set(widgets->PartitionsList,&itar,0,name,1,capacity,2,free_space,3,fs_type,4,label,5,capacity_long,6,free_space_long,8,1,-1);
+ }
+ yon_char_parsed_free(parsed,parsed_size);
+ }
+ }
+ }
+
+}
+
+void on_install_advanced_partition_chosen(GtkCellRenderer*, gchar *path, main_window *widgets){
+ GtkTreeIter iter;
+ GtkTreeModel *model = GTK_TREE_MODEL(widgets->PartitionsList);
+
+ int chosen = 0;
+ chosen = yon_advanced_get_part_size(widgets);
+
+ gtk_tree_model_get_iter_from_string(model,&iter,path);
+ int status;
+ char *target_part;
+ gtk_tree_model_get(model,&iter,0,&target_part,7,&status,-1);
+
+ if (!status){
+ if (chosen<2){
+ gtk_list_store_set(widgets->PartitionsList,&iter,7,!status,-1);
+ chosen++;
+ advanced_partition *part = yon_advanced_partition_new();
+ part->part_type = ADVANCED_PART_EXISTING;
+ part->order_iter = g_sequence_append(widgets->advanced_partition_order,part);
+ part->part = target_part;
+ gtk_box_pack_start(GTK_BOX(widgets->AdvancedPartitionAddBox),part->MainBox,0,0,0);
+ gtk_widget_show(part->MainBox);
+ yon_advanced_partition_setup(part,widgets);
+ on_advanced_parts_added(NULL,NULL,widgets);
+ }
+ } else {
+ gtk_list_store_set(widgets->PartitionsList,&iter,7,!status,-1);
+ advanced_partition *part = g_object_get_data(G_OBJECT(widgets->AdvancedPartitionAddBox),target_part);
+ if (part){
+ on_advanced_part_remove(part->RemoveButton,widgets);
+ }
+ }
+}
\ No newline at end of file
diff --git a/source/ubinstall-gtk-kernel.c b/source/ubinstall-gtk-kernel.c
new file mode 100644
index 0000000..f41a73c
--- /dev/null
+++ b/source/ubinstall-gtk-kernel.c
@@ -0,0 +1,299 @@
+#include "ubinstall-gtk.h"
+
+void on_kernel_install_enabled(GtkWidget *, kernel_row *row){
+ int active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(row->InstallCheck));
+ gtk_widget_set_sensitive(row->EnableRadio,active);
+ if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(row->InstallCheck))){
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(main_config.kernel_unchosen_radio),1);
+ }
+}
+
+kernel_row *yon_kernel_row_new(){
+ kernel_row *row = new(kernel_row);
+ GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_kernel_row);
+
+ row->RowBox = yon_gtk_builder_get_widget(builder,"TableRow");
+ row->InstallCheck = yon_gtk_builder_get_widget(builder,"InstallCheck");
+ row->EnableRadio = yon_gtk_builder_get_widget(builder,"EnableRadio");
+ row->EnableSeparator = yon_gtk_builder_get_widget(builder,"EnableSeparator");
+ row->NameLabel = yon_gtk_builder_get_widget(builder,"NameLabel");
+ row->TagsBox = yon_gtk_builder_get_widget(builder,"TagsBox");
+ row->TagsSeparator = yon_gtk_builder_get_widget(builder,"TagsSeparator");
+ row->ModulesLabel = yon_gtk_builder_get_widget(builder,"ModulesLabel");
+ row->DescriptionLabel = yon_gtk_builder_get_widget(builder,"DescriptionLabel");
+ row->name=NULL;
+ row->modules=NULL;
+ row->package=NULL;
+
+ g_signal_connect(G_OBJECT(row->InstallCheck),"toggled",G_CALLBACK(on_kernel_install_enabled),row);
+
+ row->row = gtk_list_box_row_new();
+ gtk_container_add(GTK_CONTAINER(row->row),row->RowBox);
+ gtk_widget_show(row->row);
+
+ g_object_set_data(G_OBJECT(row->InstallCheck),"kernel_row",row);
+ g_object_set_data(G_OBJECT(row->EnableRadio),"kernel_row",row);
+ g_object_set_data(G_OBJECT(row->row),"kernel_row",row);
+
+ return row;
+}
+
+int yon_tag_add(GtkBox *target,char *tag_label, char *tag_style, char *icon_name){
+ if (GTK_IS_BOX(target)&&!yon_char_is_empty(tag_label)&&!yon_char_is_empty(tag_style)){
+ GtkWidget *box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,2);
+ GtkWidget *label = gtk_label_new(tag_label);
+ PangoAttrList *attr = pango_attr_list_new();
+ PangoAttribute *scale_attr = pango_attr_size_new_absolute(12 * PANGO_SCALE);
+ gtk_label_set_attributes(GTK_LABEL(label),attr);
+
+ g_object_set_data(G_OBJECT(box),"label",label);
+
+ pango_attr_list_insert(attr,scale_attr);
+
+ gtk_style_context_add_class(gtk_widget_get_style_context(label),tag_style);
+ GtkWidget *icon = NULL;
+ if (icon_name){
+ icon = gtk_image_new_from_icon_name(icon_name,GTK_ICON_SIZE_BUTTON);
+ gtk_box_pack_start(GTK_BOX(box),icon,0,0,0);
+ }
+ gtk_box_pack_start(GTK_BOX(box),label,1,1,0);
+ gtk_widget_show(label);
+ gtk_widget_show(box);
+ gtk_box_pack_start(target,box,0,0,0);
+ return 1;
+ }
+ return 0;
+}
+
+void yon_kernel_row_setup_tags(kernel_row *row, char *tags){
+ int size;
+ config_str parsed = yon_char_parse(tags,&size,", ");
+ for (int i=0;iTagsBox),tag_name,tag_type,NULL);
+ }
+}
+
+void yon_kernel_row_setup(kernel_row *row, char *name, char *modules,char *package, char *tags, char *description){
+ row->name = yon_char_new(name);
+ row->modules = yon_char_new(modules);
+ row->package = yon_char_new(package);
+
+ char *description_full = yon_char_new(description);
+ if (strlen(description)>100){
+ guint size;
+ config_str description_wrapped = yon_char_wrap_to_lines(description,3,&size);
+ description_full = yon_char_parsed_to_string(description_wrapped,size,"\n");
+ yon_char_parsed_free(description_wrapped,size);
+ }
+ gtk_label_set_label(GTK_LABEL(row->NameLabel),name);
+ gtk_label_set_label(GTK_LABEL(row->ModulesLabel),modules);
+ gtk_label_set_label(GTK_LABEL(row->DescriptionLabel),description_full);
+
+ yon_kernel_row_setup_tags(row,tags);
+ free(description_full);
+}
+
+void yon_kernel_resize(main_window *widgets){
+ GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->KernelListBox));
+ GList *iter = list;
+ // gtk_widget_realize(widgets->KernelListBox);
+ int install_size=0;
+ int enable_size=0;
+ int name_size=0;
+ int modules_size=0;
+ gtk_widget_get_preferred_width(widgets->KernelInstallLabel,&install_size,NULL);
+ gtk_widget_get_preferred_width(widgets->KernelEnableLabel,&enable_size,NULL);
+ gtk_widget_get_preferred_width(widgets->KernelNameLabel,&name_size,NULL);
+ gtk_widget_get_preferred_width(widgets->KernelModulesLabel,&modules_size,NULL);
+
+ for (;iter;iter=iter->next){
+ kernel_row *row = g_object_get_data(G_OBJECT(iter->data),"kernel_row");
+ int cur_name_size;
+ int cur_modules_size;
+
+ gtk_widget_get_preferred_width(row->NameLabel,&cur_name_size,NULL);
+ gtk_widget_get_preferred_width(row->ModulesLabel,&cur_modules_size,NULL);
+ if (name_sizeKernelNameLabel),name_size,-1);
+ gtk_widget_set_size_request(GTK_WIDGET(widgets->KernelModulesLabel),modules_size,-1);
+ for (iter = list;iter;iter = iter->next){
+ kernel_row *row = g_object_get_data(G_OBJECT(iter->data),"kernel_row");
+ gtk_widget_set_size_request(GTK_WIDGET(row->InstallCheck),install_size,-1);
+ gtk_widget_set_size_request(GTK_WIDGET(row->EnableRadio),enable_size,-1);
+ gtk_widget_set_size_request(row->NameLabel,name_size,-1);
+ gtk_widget_set_size_request(row->ModulesLabel,modules_size,-1);
+ }
+ g_list_free(list);
+}
+
+void yon_kernel_addon_resize(main_window *widgets){
+ GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->KernelAddonListBox));
+ GList *iter = list;
+ // gtk_widget_realize(widgets->KernelListBox);
+ int install_size=0;
+ int name_size=0;
+ int modules_size=0;
+ gtk_widget_get_preferred_width(widgets->KernelAddonInstallLabel,&install_size,NULL);
+ gtk_widget_get_preferred_width(widgets->KernelAddonNameLabel,&name_size,NULL);
+ gtk_widget_get_preferred_width(widgets->KernelAddonModulesLabel,&modules_size,NULL);
+
+ for (;iter;iter=iter->next){
+ kernel_row *row = g_object_get_data(G_OBJECT(iter->data),"kernel_row");
+ int cur_name_size;
+ int cur_modules_size;
+
+ gtk_widget_get_preferred_width(row->NameLabel,&cur_name_size,NULL);
+ gtk_widget_get_preferred_width(row->ModulesLabel,&cur_modules_size,NULL);
+ if (name_sizeKernelAddonNameLabel),name_size,-1);
+ gtk_widget_set_size_request(GTK_WIDGET(widgets->KernelAddonModulesLabel),modules_size,-1);
+ for (iter = list;iter;iter = iter->next){
+ kernel_row *row = g_object_get_data(G_OBJECT(iter->data),"kernel_row");
+ gtk_widget_set_size_request(GTK_WIDGET(row->InstallCheck),install_size,-1);
+ gtk_widget_set_size_request(row->NameLabel,name_size,-1);
+ gtk_widget_set_size_request(row->ModulesLabel,modules_size,-1);
+ }
+ g_list_free(list);
+}
+
+void yon_kernel_setup(main_window *widgets){
+ GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->KernelListBox));
+ GList *iter;
+ for (iter = list; iter; iter = iter->next){
+ kernel_row *row = g_object_get_data(G_OBJECT(iter->data),"kernel_row");
+ if (row){
+ if (row->name) free(row->name);
+ if (!yon_char_is_empty(row->modules)) free(row->modules);
+ free(row);
+ gtk_widget_destroy(GTK_WIDGET(iter->data));
+ }
+ }
+ g_list_free(list);
+
+ char *modules = config(modules_extra_parameter);
+ char *enabled = config(KERNEL_BOOT_parameter);
+
+ int modules_size;
+ config_str modules_parsed = NULL;
+ if (!yon_char_is_empty(modules)){
+ modules_parsed = yon_char_parse(modules,&modules_size," ");
+ }
+
+ int size;
+ config_str kernels = yon_resource_open_file(kernel_list_path,&size);
+ gtk_size_group_add_widget(widgets->KernelSizeGroup,widgets->KernelTagsLabel);
+
+ for (int i=1;iKernelListBox),row->row,-1);
+ gtk_size_group_add_widget(widgets->KernelSizeGroup,row->TagsBox);
+
+ gtk_radio_button_join_group(GTK_RADIO_BUTTON(row->EnableRadio),GTK_RADIO_BUTTON(main_config.kernel_unchosen_radio));
+
+ yon_kernel_row_setup(row,name,modules,package,tags,description);
+
+ if (yon_char_parsed_check_exist(modules_parsed,modules_size,parsed[1])>-1){
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(row->InstallCheck),1);
+ } else {
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(row->InstallCheck),0);
+ }
+ if (!yon_char_is_empty(enabled)&&!strcmp(package,enabled)){
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(row->EnableRadio),1);
+ }
+ yon_char_parsed_free(parsed,parsed_size);
+ }
+ yon_kernel_resize(widgets);
+
+ yon_char_parsed_free(kernels,size);
+
+ yon_char_parsed_free(modules_parsed,modules_size);
+}
+
+void yon_kernel_addon_setup(main_window *widgets){
+ GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->KernelAddonListBox));
+ GList *iter;
+ for (iter = list; iter; iter = iter->next){
+ kernel_row *row = g_object_get_data(G_OBJECT(iter->data),"kernel_row");
+ if (row){
+ if (row->name) free(row->name);
+ if (!yon_char_is_empty(row->modules)) free(row->modules);
+ free(row);
+ gtk_widget_destroy(GTK_WIDGET(iter->data));
+ }
+ }
+ g_list_free(list);
+
+ char *modules = config(modules_extra_parameter);
+
+ int modules_size;
+ config_str modules_parsed = NULL;
+ if (!yon_char_is_empty(modules)){
+ modules_parsed = yon_char_parse(modules,&modules_size," ");
+ }
+
+ int size;
+ config_str kernels = yon_resource_open_file(kernel_list_addon_path,&size);
+
+ for (int i=1;iKernelAddonListBox),row->row,-1);
+ gtk_size_group_add_widget(widgets->KernelSizeGroup,row->TagsBox);
+ gtk_widget_destroy(row->TagsBox);
+ gtk_widget_destroy(row->TagsSeparator);
+ gtk_widget_destroy(row->EnableRadio);
+ gtk_widget_destroy(row->EnableSeparator);
+
+ yon_kernel_row_setup(row,name,modules,package,tags,description);
+
+ if (yon_char_parsed_check_exist(modules_parsed,modules_size,parsed[1])>-1){
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(row->InstallCheck),1);
+ } else {
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(row->InstallCheck),0);
+ }
+ yon_char_parsed_free(parsed,parsed_size);
+ }
+ yon_kernel_addon_resize(widgets);
+
+ yon_char_parsed_free(kernels,size);
+
+
+}
\ No newline at end of file
diff --git a/source/ubinstall-gtk-keyboard.c b/source/ubinstall-gtk-keyboard.c
new file mode 100644
index 0000000..277a395
--- /dev/null
+++ b/source/ubinstall-gtk-keyboard.c
@@ -0,0 +1,335 @@
+#include "ubinstall-gtk.h"
+
+void on_layout_toggle_button_switch(GtkWidget *self, main_window *widgets){
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(self))){
+ gtk_widget_set_sensitive(widgets->DefaultLayoutRadio,1);
+ gtk_widget_set_sensitive(widgets->ManualLayoutRadio,1);
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->ManualLayoutRadio))){
+ gtk_widget_set_sensitive(widgets->LayoutTree,1);
+ gtk_widget_set_sensitive(widgets->AddButton,1);
+ gtk_widget_set_sensitive(widgets->RemoveButton,1);
+ } else {
+ gtk_widget_set_sensitive(widgets->LayoutTree,0);
+ gtk_widget_set_sensitive(widgets->AddButton,0);
+ gtk_widget_set_sensitive(widgets->RemoveButton,0);
+ }
+ } else {
+ gtk_widget_set_sensitive(widgets->DefaultLayoutRadio,0);
+ gtk_widget_set_sensitive(widgets->ManualLayoutRadio,0);
+ gtk_widget_set_sensitive(widgets->LayoutTree,0);
+ gtk_widget_set_sensitive(widgets->AddButton,0);
+ gtk_widget_set_sensitive(widgets->RemoveButton,0);
+
+ }
+}
+
+int yon_keyboard_save(main_window *widgets){
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->ManualLayoutRadio))){
+ GtkTreeIter iter;
+ if (!gtk_tree_model_get_iter_first(GTK_TREE_MODEL(widgets->LayoutList),&iter)){
+ yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),LAYOUTS_CHOSEN_BUT_EMPTY_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
+ yon_ubl_status_highlight_incorrect(widgets->ManualLayoutRadio);
+ yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->LayoutTree));
+ return 0;
+ }
+ }
+ char *layouts_list="";
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->ManualLayoutRadio))&>k_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->LayoutSensitiveCheck))){
+ GtkTreeModel *layouts_model=GTK_TREE_MODEL(widgets->LayoutList);
+ GtkTreeIter iter;
+ char *cur_layout=NULL;
+ for_iter(layouts_model,&iter){
+ int chosen=0;
+ gtk_tree_model_get(layouts_model,&iter,0,&cur_layout,3,&chosen,-1);
+ if (chosen)
+ layouts_list = yon_char_unite(layouts_list,yon_char_is_empty(layouts_list)?"":",",cur_layout,NULL);
+ }
+ }
+
+ if (yon_char_is_empty(layouts_list)&>k_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->LayoutSensitiveCheck)))
+ yon_config_register(xkblayout_parameter,xkblayout_parameter_command,layouts_list);
+ else
+ yon_config_remove_by_key(xkblayout_parameter);
+
+ if (gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->KeyboardModelCombo))&>k_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->KeyboardModelSensitiveCheck))){
+ char *model = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(widgets->KeyboardModelCombo));
+ if (!yon_char_is_empty(model))
+ yon_config_register(xkbmodel_parameter,xkbmodel_parameter_command,model);
+ } else{
+ yon_config_remove_by_key(xkbmodel_parameter);
+ }
+
+ if (gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->LayoutBindingCombo))&>k_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->OptionsSensitiveCheck))){
+ char *options = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(widgets->LayoutBindingCombo));
+ if (options){};
+ yon_config_register(xkboptions_parameter,xkboptions_parameter_command,options);
+ } else {
+ yon_config_remove_by_key(xkboptions_parameter);
+ }
+ return 1;
+}
+
+ubinstall_keyboard_window *yon_ubinstall_keyboard_new(){
+void on_additional_software_toggled();
+ ubinstall_keyboard_window *window = malloc(sizeof(ubinstall_keyboard_window));
+ GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_ubinstall_keyboard);
+ window->MainWindow=yon_gtk_builder_get_widget(builder,"MainWindow");
+ window->StatusBox=yon_gtk_builder_get_widget(builder,"StatusBox");
+ window->headerBar=yon_gtk_builder_get_widget(builder,"headerBar");
+ window->CancelButton=yon_gtk_builder_get_widget(builder,"CancelButton");
+ window->SaveButton=yon_gtk_builder_get_widget(builder,"SaveButton");
+ window->LayoutsTree=yon_gtk_builder_get_widget(builder,"LayoutsTree");
+ window->ActiveToggle = GTK_CELL_RENDERER(gtk_builder_get_object(builder,"ActiveToggle"));
+
+ g_signal_connect(G_OBJECT(window->CancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL);
+
+return window;
+}
+
+void on_keyboard_removed(GtkWidget *, main_window *widgets){
+ GtkTreeModel *model;
+ GtkTreeIter iter, childiter;
+ if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->LayoutTree)),&model,&iter)){
+ gtk_tree_model_filter_convert_iter_to_child_iter(GTK_TREE_MODEL_FILTER(widgets->LayoutsFilter),&childiter,&iter);
+ gtk_tree_store_set(widgets->LayoutList,&childiter,3,0,-1);
+ }
+}
+
+void yon_language_selection_changed(GtkCellRenderer *, char *path, ubinstall_language_window *window){
+ GtkTreeIter iter;
+ int state;
+
+ if (gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(window->liststore1),&iter,path)){
+ gtk_tree_model_get(GTK_TREE_MODEL(window->liststore1),&iter,0,&state,-1);
+ gtk_list_store_set(window->liststore1,&iter,0,!state,-1);
+ }
+}
+
+void on_language_window_accept(GtkWidget *,dictionary *dict){
+ main_window *widgets= yon_dictionary_get_data(dict->first,main_window*);
+ ubinstall_language_window *window = yon_dictionary_get_data(dict->first->next,ubinstall_language_window*);
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->DefaultCheck))){
+ gtk_entry_set_text(GTK_ENTRY(widgets->AvailableLanguagesEntry),"");
+ GtkTreeIter iter;
+ int size;
+ config_str lang_parsed = default_langs(&size);
+
+ char *final = "";
+ for_iter(widgets->LanguagesList,&iter){
+ char *code, *labl;
+ gtk_tree_model_get(GTK_TREE_MODEL(widgets->LanguagesList),&iter,1,&labl,2,&code,-1);
+ if (yon_char_parsed_check_exist(lang_parsed,size,code)!=-1){
+ gtk_list_store_set(widgets->LanguagesList,&iter,0,1,-1);
+ char *tmp = yon_char_unite(final,!yon_char_is_empty(final)?";":"",labl,NULL);
+ if (!yon_char_is_empty(final)) free(final);
+ final = tmp;
+ } else
+ gtk_list_store_set(widgets->LanguagesList,&iter,0,0,-1);
+ }
+ if (!yon_char_is_empty(final)){
+ gtk_entry_set_text(GTK_ENTRY(widgets->AvailableLanguagesEntry),final);
+ }
+ gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->LanguagesCombo),-1);
+ gtk_tree_model_filter_refilter(GTK_TREE_MODEL_FILTER(widgets->LanguagesFilter));
+ } else {
+ yon_gtk_list_store_copy_full(widgets->LanguagesList,window->liststore1);
+ gtk_tree_model_filter_refilter(GTK_TREE_MODEL_FILTER(widgets->LanguagesFilter));
+ config_str parsed = NULL;
+ int size;
+ GtkTreeIter iter;
+ for_iter(GTK_TREE_MODEL(window->liststore1),&iter){
+ char *current;
+ int status;
+ gtk_tree_model_get(GTK_TREE_MODEL(window->liststore1),&iter,0,&status,1,¤t,-1);
+ if (status)
+ yon_char_parsed_add_or_create_if_exists(parsed,&size,current);
+ }
+ if (parsed){
+ char *final = yon_char_parsed_to_string(parsed,size,"; ");
+ gtk_entry_set_text(GTK_ENTRY(widgets->AvailableLanguagesEntry),!yon_char_is_empty(final)?final:"");
+ if (yon_char_is_empty(final)) {
+ gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->LanguagesCombo),-1);
+ }
+ if (final) free(final);
+ yon_char_parsed_free(parsed,size);
+ } else
+ gtk_entry_set_text(GTK_ENTRY(widgets->AvailableLanguagesEntry),"");
+
+ }
+ on_subwindow_close(window->MainWindow);
+ free(window);
+}
+
+ubinstall_language_window *yon_ubinstall_language_new(){
+ ubinstall_language_window *window = malloc(sizeof(ubinstall_language_window));
+ GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_ubinstall_language);
+ window->liststore1=GTK_LIST_STORE(gtk_builder_get_object(builder,"liststore1"));
+ window->MainWindow=yon_gtk_builder_get_widget(builder,"MainWindow");
+ window->StatusBox=yon_gtk_builder_get_widget(builder,"StatusBox");
+ window->DefaultCheck=yon_gtk_builder_get_widget(builder,"DefaultCheck");
+ window->LanguagesTree=yon_gtk_builder_get_widget(builder,"LanguagesTree");
+ window->headerBar=yon_gtk_builder_get_widget(builder,"headerBar");
+ window->CancelButton=yon_gtk_builder_get_widget(builder,"CancelButton");
+ window->SaveButton=yon_gtk_builder_get_widget(builder,"SaveButton");
+ window->ToggleRenderer=GTK_CELL_RENDERER(gtk_builder_get_object(builder,"ToggleRenderer"));
+
+ g_signal_connect(G_OBJECT(window->DefaultCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),window->LanguagesTree);
+ g_signal_connect(G_OBJECT(window->ToggleRenderer),"toggled",G_CALLBACK(yon_language_selection_changed),window);
+ g_signal_connect(G_OBJECT(window->CancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL);
+return window;
+}
+
+void on_language_clicked(GtkWidget *, main_window *widgets){
+ ubinstall_language_window *window = yon_ubinstall_language_new();
+ g_object_ref(G_OBJECT(window->liststore1));
+ gtk_tree_view_set_model(GTK_TREE_VIEW(window->LanguagesTree),NULL);
+ yon_gtk_list_store_copy_full(window->liststore1,widgets->LanguagesList);
+ gtk_tree_view_set_model(GTK_TREE_VIEW(window->LanguagesTree),GTK_TREE_MODEL(window->liststore1));
+ yon_gtk_window_setup(GTK_WINDOW(window->MainWindow),GTK_WINDOW(widgets->MainWindow),TITLE_LABEL,icon_path,"language-chooser-window");
+
+ if (yon_char_is_empty(gtk_entry_get_text(GTK_ENTRY(widgets->AvailableLanguagesEntry)))){
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->DefaultCheck),1);
+ }
+
+ int size;
+ int found=0;
+ int statusfound=0;
+ config_str langs = default_langs(&size);
+ GtkTreeIter iter;
+ for_iter(widgets->LanguagesList,&iter){
+ char *cur;
+ int status;
+ gtk_tree_model_get(GTK_TREE_MODEL(widgets->LanguagesList),&iter,0,&status,2,&cur,-1);
+ if (status){
+ statusfound++;
+ if (yon_char_parsed_check_exist(langs,size,cur)>-1)
+ found++;
+ }
+ }
+ if ((found==size)&&statusfound==size){
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->DefaultCheck),1);
+ }
+
+ 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->SaveButton),"clicked",G_CALLBACK(on_language_window_accept),dict);
+ gtk_widget_show(window->MainWindow);
+
+}
+
+
+void on_layout_toggle(GtkCellRendererToggle*, gchar* path, ubinstall_keyboard_window *window){
+ GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(window->LayoutsTree));
+ GtkTreeIter iter;
+ if (gtk_tree_model_get_iter_from_string(model,&iter,path)){
+ int status=0;
+ gtk_tree_model_get(model,&iter,3,&status,-1);
+ gtk_tree_store_set(GTK_TREE_STORE(model),&iter,3,!status,-1);
+ }
+}
+
+
+void on_keyboard_accept(GtkWidget *self,main_window *widgets){
+ gtk_tree_model_filter_refilter(GTK_TREE_MODEL_FILTER(widgets->LayoutsFilter));
+ on_subwindow_close(self);
+}
+
+
+void on_keyboard_clicked (GtkWidget *, main_window *widgets){
+ ubinstall_keyboard_window *window = yon_ubinstall_keyboard_new();
+ yon_gtk_window_setup(GTK_WINDOW(window->MainWindow),GTK_WINDOW(widgets->MainWindow),KEYBOARD_TITLE_LABEL,icon_path,"keyboard-window");
+ gtk_tree_view_set_model(GTK_TREE_VIEW(window->LayoutsTree),GTK_TREE_MODEL(widgets->LayoutList));
+
+ g_signal_connect(G_OBJECT(window->ActiveToggle),"toggled",G_CALLBACK(on_layout_toggle),window);
+ g_signal_connect(G_OBJECT(window->SaveButton),"clicked",G_CALLBACK(on_keyboard_accept),widgets);
+ gtk_widget_show(window->MainWindow);
+}
+
+void yon_layout_build(char *key, GHashTable *value, main_window *widgets){
+ GtkTreeIter parent;
+ GtkTreeIter iter;
+ gtk_tree_store_append(widgets->LayoutList,&parent,NULL);
+ gtk_tree_store_set(widgets->LayoutList,&parent,0,key,1,_((char*)g_hash_table_lookup(value,"")),2,1,3,0,-1);
+
+ GList *list = g_hash_table_get_keys(value);
+ GList *iterator = NULL;
+ for (iterator=list;iterator;iterator=iterator->next){
+ if (!yon_char_is_empty((char*)iterator->data)){
+ gtk_tree_store_append(widgets->LayoutList,&iter,&parent);
+ gtk_tree_store_set(widgets->LayoutList,&iter,0,(char*)iterator->data,1,_((char*)g_hash_table_lookup(value,iterator->data)),2,1,3,0,-1);
+ }
+ }
+}
+
+void yon_keyboard_init(main_window *widgets){
+ int size;
+ config_str parsed = NULL;
+ parsed = yon_config_load(yon_debug_output("%s\n",get_layouts_command),&size);
+ GHashTable *table = g_hash_table_new(g_str_hash,g_str_equal);
+ for (int i=0;iKeyboardModelCombo),models[i],_(models[i+1]));
+ }
+ if (size) yon_char_parsed_free(models,size);
+
+ char *keyboard = config(xkbmodel_parameter);
+ char *option_parameter = config(xkboptions_parameter);
+ char *layouts = config(xkblayout_parameter);
+
+ if (!yon_char_is_empty(keyboard)){
+ gtk_combo_box_set_active_id(GTK_COMBO_BOX(widgets->KeyboardModelCombo),keyboard);
+ } else {
+ gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->KeyboardModelCombo),0);
+ }
+
+ if (!yon_char_is_empty(option_parameter)){
+ gtk_combo_box_set_active_id(GTK_COMBO_BOX(widgets->LayoutBindingCombo),option_parameter);
+ } else{
+ gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->LayoutBindingCombo),0);
+ }
+
+ if (!yon_char_is_empty(layouts)){
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->LayoutSensitiveCheck),1);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->ManualLayoutRadio),1);
+ int parsed_size;
+ config_str parsed = yon_char_parse(layouts,&parsed_size,",");
+
+ GtkTreeIter iter;
+ GtkTreeModel *model = GTK_TREE_MODEL(widgets->LayoutList);
+ for_iter(model,&iter){
+ char *target;
+ gtk_tree_model_get(model,&iter,0,&target,-1);
+ if (yon_char_parsed_check_exist(parsed,parsed_size,target)>-1){
+ gtk_tree_store_set(widgets->LayoutList,&iter,2,1,3,1,-1);
+ } else {
+ gtk_tree_store_set(widgets->LayoutList,&iter,3,0,-1);
+ }
+ }
+ } else {
+
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->LayoutSensitiveCheck),0);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->DefaultLayoutRadio),1);
+ }
+}
\ No newline at end of file
diff --git a/source/ubinstall-gtk-log.c b/source/ubinstall-gtk-log.c
new file mode 100644
index 0000000..5de4a71
--- /dev/null
+++ b/source/ubinstall-gtk-log.c
@@ -0,0 +1,118 @@
+#include "ubinstall-gtk.h"
+
+
+void on_log_closed(GtkWidget *, log_window *window){
+ main_window *widgets = g_object_get_data(G_OBJECT(window->Window),"widgets");
+
+ 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");
+ window->monitor = NULL;
+ gtk_widget_show(window->Window);
+ return window;
+}
+
+void yon_read_log(GFileMonitor *,GFile *,GFile *,GFileMonitorEvent ,log_window *window){
+ 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;
+ } 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 ;
+}
+
+void on_process_log_view(GtkWidget *,main_window *widgets){
+ log_window *window = yon_log_window_new();
+ g_object_set_data(G_OBJECT(window->Window),"widgets",widgets);
+ g_signal_connect(G_OBJECT(window->Window),"destroy",G_CALLBACK(on_log_closed),window);
+ 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);
+ GFile *file = g_file_new_for_path(window->command);
+ window->monitor = g_file_monitor_file(file,G_FILE_MONITOR_NONE,NULL,NULL);
+ g_signal_connect(G_OBJECT(window->monitor),"changed",G_CALLBACK(yon_read_log),window);
+ g_object_unref(file);
+ yon_read_log(NULL,NULL,NULL,G_FILE_MONITOR_EVENT_CHANGED,window);
+}
+
+void on_summary_log_view(GtkWidget *,main_window *widgets){
+ log_window *window = yon_log_window_new();
+ g_object_set_data(G_OBJECT(window->Window),"widgets",widgets);
+ g_signal_connect(G_OBJECT(window->Window),"destroy",G_CALLBACK(on_log_closed),window);
+ 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);
+ GFile *file = g_file_new_for_path(window->command);
+ window->monitor = g_file_monitor_file(file,G_FILE_MONITOR_NONE,NULL,NULL);
+ g_signal_connect(G_OBJECT(window->monitor),"changed",G_CALLBACK(yon_read_log),window);
+ g_object_unref(file);
+ yon_read_log(NULL,NULL,NULL,G_FILE_MONITOR_EVENT_CHANGED,window);
+}
+
+void yon_installation_progress_update(GFileMonitor *,GFile *,GFile *,GFileMonitorEvent ,main_window *widgets) {
+ 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);
+ }
+}
diff --git a/source/ubinstall-gtk-network.c b/source/ubinstall-gtk-network.c
new file mode 100644
index 0000000..24a0e8b
--- /dev/null
+++ b/source/ubinstall-gtk-network.c
@@ -0,0 +1,331 @@
+#include "ubinstall-gtk.h"
+
+void on_autohostname_check(GtkWidget *, main_window *widgets){
+ gtk_switch_set_active(GTK_SWITCH(widgets->HostnameSensitiveSwitch),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 *, int status, main_window *widgets){
+ if (status){
+ 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_switch_set_active(GTK_SWITCH(widgets->HostnameSensitiveSwitch),1);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->AutoHostnameCheck),0);
+}
+
+void on_type_changed(GtkComboBox *self,network_info *info){
+ gtk_combo_box_text_remove_all(GTK_COMBO_BOX_TEXT(info->ConnectionCombo));
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(info->ConnectionCombo),DEFAULT_LABEL);
+ const char *id = gtk_combo_box_get_active_id(self);
+ GHashTable *table = g_hash_table_lookup(main_config.network_types,id);
+ if (table){
+ GList *list = g_hash_table_get_keys(table);
+ GList *iter;
+ for (iter=list;iter;iter=iter->next){
+ gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(info->ConnectionCombo),iter->data,iter->data);
+ }
+ g_list_free(list);
+ }
+}
+
+network_info *yon_network_info_new(){
+ network_info *info = new(network_info);
+ GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_network_info);
+ info->MainBox = yon_gtk_builder_get_widget(builder,"MainBox");
+ info->TypeCombo = yon_gtk_builder_get_widget(builder,"TypeCombo");
+ info->ConnectionCombo = yon_gtk_builder_get_widget(builder,"ConnectionCombo");
+ info->ConnectionEntry = yon_gtk_builder_get_widget(builder,"ConnectionEntry");
+ info->EnabledSwitch = yon_gtk_builder_get_widget(builder,"EnabledSwitch");
+ info->RemoveButton = yon_gtk_builder_get_widget(builder,"RemoveButton");
+ info->AutoGetIPSwitch = yon_gtk_builder_get_widget(builder,"AutoGetIPSwitch");
+ info->IpRevealer = yon_gtk_builder_get_widget(builder,"IpRevealer");
+ info->IpAdressEntry = yon_gtk_builder_get_widget(builder,"IpAdressEntry");
+ info->GatewayEntry = yon_gtk_builder_get_widget(builder,"GatewayEntry");
+ info->MaskEntry = yon_gtk_builder_get_widget(builder,"MaskEntry");
+ info->DNSEntry = yon_gtk_builder_get_widget(builder,"DNSEntry");
+
+ g_object_set_data(G_OBJECT(info->RemoveButton),"network_info",info);
+ g_object_set_data(G_OBJECT(info->MainBox),"network_info",info);
+
+ yon_on_entry_set_allowed_symbols(GTK_ENTRY(info->IpAdressEntry),"01234567890.");
+ yon_on_entry_set_allowed_symbols(GTK_ENTRY(info->MaskEntry),"01234567890.");
+ yon_on_entry_set_allowed_symbols(GTK_ENTRY(info->GatewayEntry),"01234567890.");
+ yon_on_entry_set_allowed_symbols(GTK_ENTRY(info->DNSEntry),"01234567890.");
+
+ yon_entry_set_pattern(GTK_ENTRY(info->IpAdressEntry),"^(\\d{0,3})(\\.(\\d{0,3}))?(\\.(\\d{0,3}))?(\\.(\\d{0,3}))?$");
+ yon_entry_set_pattern(GTK_ENTRY(info->MaskEntry),"^(\\d{0,3})(\\.(\\d{0,3}))?(\\.(\\d{0,3}))?(\\.(\\d{0,3}))?$");
+ yon_entry_set_pattern(GTK_ENTRY(info->GatewayEntry),"^(\\d{0,3})(\\.(\\d{0,3}))?(\\.(\\d{0,3}))?(\\.(\\d{0,3}))?$");
+ yon_entry_set_pattern(GTK_ENTRY(info->DNSEntry),"^(\\d{0,3})(\\.(\\d{0,3}))?(\\.(\\d{0,3}))?(\\.(\\d{0,3}))?$");
+
+ g_signal_connect(G_OBJECT(info->AutoGetIPSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch_inversed),info->IpAdressEntry);
+ g_signal_connect(G_OBJECT(info->AutoGetIPSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch_inversed),info->GatewayEntry);
+ g_signal_connect(G_OBJECT(info->AutoGetIPSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch_inversed),info->MaskEntry);
+ g_signal_connect(G_OBJECT(info->AutoGetIPSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch_inversed),info->DNSEntry);
+ g_signal_connect(G_OBJECT(info->TypeCombo),"changed",G_CALLBACK(on_type_changed),info);
+
+ yon_gtk_revealer_set_from_switch_inversed(GTK_REVEALER(info->IpRevealer),GTK_SWITCH(info->AutoGetIPSwitch));
+
+ GList *list = g_hash_table_get_keys(main_config.network_types);
+ GList *iter;
+ for (iter=list;iter;iter=iter->next){
+ gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(info->TypeCombo),iter->data,iter->data);
+ }
+ g_list_free(list);
+
+ gtk_widget_show(info->MainBox);
+ return info;
+}
+
+void on_ntp_sync(GtkWidget *, main_window *widgets){
+ int mode = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->NetworkNTPCombo));
+ gtk_widget_set_sensitive(widgets->NetworkNTPEntry,0);
+ switch(mode){
+ case 0:
+ gtk_entry_set_text(GTK_ENTRY(widgets->NetworkNTPEntry),"");
+ gtk_entry_set_placeholder_text(GTK_ENTRY(widgets->NetworkNTPEntry),"");
+ break;
+ case 2:{
+ int size;
+ config_str parsed = yon_config_load(get_ntp_default_command,&size);
+ if (size&&!yon_char_is_empty(parsed[0])&&strcmp(parsed[0],"(null)\n")){
+ free(yon_char_divide_search(parsed[0],"=",-1));
+ yon_char_remove_last_symbol(parsed[0],'\n');
+ yon_char_remove_brackets(parsed[0]);
+ gtk_entry_set_placeholder_text(GTK_ENTRY(widgets->NetworkNTPEntry),parsed[0]);
+ yon_char_parsed_free(parsed,size);
+ gtk_entry_set_text(GTK_ENTRY(widgets->NetworkNTPEntry),"");
+ }
+ }
+ break;
+ case 3:{
+ int size;
+ config_str parsed = yon_config_load(get_ntp_ru_command,&size);
+ if (size&&!yon_char_is_empty(parsed[0])&&strcmp(parsed[0],"(null)\n")){
+ free(yon_char_divide_search(parsed[0],"=",-1));
+ yon_char_remove_last_symbol(parsed[0],'\n');
+ yon_char_remove_brackets(parsed[0]);
+ gtk_entry_set_placeholder_text(GTK_ENTRY(widgets->NetworkNTPEntry),parsed[0]);
+ yon_char_parsed_free(parsed,size);
+ gtk_entry_set_text(GTK_ENTRY(widgets->NetworkNTPEntry),"");
+ }
+ }
+ break;
+ case 1:
+ gtk_entry_set_placeholder_text(GTK_ENTRY(widgets->NetworkNTPEntry),"DHCP");
+ gtk_entry_set_text(GTK_ENTRY(widgets->NetworkNTPEntry),"");
+ break;
+ case 5:
+ gtk_entry_set_placeholder_text(GTK_ENTRY(widgets->NetworkNTPEntry),"");
+ gtk_entry_set_text(GTK_ENTRY(widgets->NetworkNTPEntry),"");
+ break;
+ case 4:
+ gtk_widget_set_sensitive(widgets->NetworkNTPEntry,1);
+ gtk_entry_set_placeholder_text(GTK_ENTRY(widgets->NetworkNTPEntry),"");
+ gtk_entry_set_text(GTK_ENTRY(widgets->NetworkNTPEntry),"");
+ break;
+ }
+}
+
+void on_connection_add(GtkWidget *,main_window *widgets){
+ network_info *info = yon_network_info_new();
+ gtk_box_pack_start(GTK_BOX(widgets->NetworkConnectionsBox),info->MainBox,0,0,0);
+ gtk_widget_show(info->MainBox);
+}
+
+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));
+ if (yon_char_is_empty(domain_name)){
+ yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),EMPTY_IMPORTANT_LABEL,5,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_spawn(GTK_CONTAINER(widgets->StatusBox),EMPTY_IMPORTANT_LABEL,5,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_spawn(GTK_CONTAINER(widgets->StatusBox),ENCRYPT_ERROR_LABEL,5,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))){
+
+ int mode = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->NetworkNTPCombo));
+ switch(mode){
+ case 0:yon_config_remove_by_key(NTPSERVERS_parameter);
+ break;
+ case 1:yon_config_register(NTPSERVERS_parameter,NTPSERVERS_parameter_command,"dhcp");
+ break;
+ case 2:yon_config_register(NTPSERVERS_parameter,NTPSERVERS_parameter_command,"default");
+ break;
+ case 3:yon_config_register(NTPSERVERS_parameter,NTPSERVERS_parameter_command,"ntp-ru");
+ break;
+ case 5:yon_config_register(NTPSERVERS_parameter,NTPSERVERS_parameter_command,"disable");
+ break;
+ case 6:yon_config_register(NTPSERVERS_parameter,NTPSERVERS_parameter_command,"stop");
+ break;
+ case 4:
+ char *value = (char*)gtk_entry_get_text(GTK_ENTRY(widgets->NetworkNTPEntry));
+ if (yon_char_is_empty(value)) {
+ yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
+ yon_ubl_status_highlight_incorrect(widgets->NetworkNTPEntry);
+ return 0;
+ }
+ yon_config_register(NTPSERVERS_parameter,NTPSERVERS_parameter_command,value);
+ break;
+ }
+ } else {
+ yon_config_remove_by_key(NTPSERVERS_parameter);
+ }
+ GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->NetworkConnectionsBox));
+ GList *iter;
+ for (iter=list;iter;iter=iter->next){
+ network_info *info = g_object_get_data(G_OBJECT(iter->data),"network_info");
+ // char *type = gtk_combo_box_get_active_id(GTK_COMBO_BOX(info->TypeCombo));
+ char *connection = (char*)gtk_entry_get_text(GTK_ENTRY(info->ConnectionEntry));
+ int active = gtk_switch_get_active(GTK_SWITCH(info->EnabledSwitch));
+ int parameters_size=0;
+ config_str parameters = NULL;
+ if (!gtk_switch_get_active(GTK_SWITCH(info->AutoGetIPSwitch))){
+ char *ip = (char*)gtk_entry_get_text(GTK_ENTRY(info->IpAdressEntry));
+ char *mask = (char*)gtk_entry_get_text(GTK_ENTRY(info->MaskEntry));
+ char *gateway = (char*)gtk_entry_get_text(GTK_ENTRY(info->GatewayEntry));
+ char *dns = (char*)gtk_entry_get_text(GTK_ENTRY(info->DNSEntry));
+
+ yon_char_parsed_add_or_create_if_exists(parameters,¶meters_size,"ipv4.method manual");
+ if (!yon_ip_check(ip)){
+ yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),WRONG_IP_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
+ yon_ubl_status_highlight_incorrect(info->IpAdressEntry);
+ return 0;
+ }
+ if (!yon_ip_check(mask)){
+ yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),WRONG_IP_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
+ yon_ubl_status_highlight_incorrect(info->MaskEntry);
+ return 0;
+ } else {
+ int bitmask = yon_ip_mask_get_bits(mask);
+ mask = yon_char_from_int(bitmask);
+ char *ip_param = yon_char_unite("ipv4.addr", ip,"/",mask,NULL);
+ yon_char_parsed_add_or_create_if_exists(parameters,¶meters_size,ip_param);
+ free(ip_param);
+
+ }
+ if (yon_ip_check(gateway)){
+ char *ip_param = yon_char_append("ipv4.gateway", gateway);
+ yon_char_parsed_add_or_create_if_exists(parameters,¶meters_size,ip_param);
+ free(ip_param);
+ }
+ if (yon_ip_check(dns)){
+ char *ip_param = yon_char_append("ipv4.dns", dns);
+ yon_char_parsed_add_or_create_if_exists(parameters,¶meters_size,ip_param);
+ free(ip_param);
+ }
+ if (!active){
+ yon_char_parsed_add_or_create_if_exists(parameters,¶meters_size,"");
+ }
+
+ char *value = yon_char_parsed_to_string(parameters,parameters_size,"yes");
+ yon_config_register(NETWORK_devdown_parameter(connection),NETWORK_devdown_parameter_command(connection),value);
+ } else {
+ yon_config_register(NETWORK_parameter(connection),NETWORK_parameter_command(connection),network_value_auto);
+
+ }
+ }
+ return 1;
+}
+
+void yon_network_init(main_window *widgets){
+ int size;
+ config_str network_types = yon_resource_open_file(network_path,&size);
+ for (int i=1;iNetworkConnectionsBox),info->MainBox,0,0,0);
+ gtk_widget_show(info->MainBox);
+
+ int connection_size;
+ config_str connection = yon_char_parse(parameter,&connection_size," ");
+ for (int k=0;kAutoGetIPSwitch),0);
+ } else if (!strcmp(connection[k],"ipv4.addr")){
+ char *mask = yon_char_new(connection[++k]);
+ char *ip = yon_char_divide_search(mask,"/",-1);
+ gtk_entry_set_text(GTK_ENTRY(info->MaskEntry),mask);
+ gtk_entry_set_text(GTK_ENTRY(info->IpAdressEntry),ip);
+ free(mask);
+ free(ip);
+
+ } else if (!strcmp(connection[k],"ipv4.gateway")){
+ gtk_entry_set_text(GTK_ENTRY(info->GatewayEntry),connection[++k]);
+
+ } else if (!strcmp(connection[k],"ipv4.dns")){
+ gtk_entry_set_text(GTK_ENTRY(info->DNSEntry),connection[++k]);
+
+ }
+ }
+
+ GList *list = g_hash_table_get_keys(main_config.network_types);
+ GList *iter;
+ for (iter=list;iter;iter=iter->next){
+ if (g_hash_table_contains(g_hash_table_lookup(main_config.network_types,(char*)iter->data),key)){
+ gtk_combo_box_set_active_id(GTK_COMBO_BOX(info->TypeCombo),(char*)iter->data);
+ gtk_combo_box_set_active_id(GTK_COMBO_BOX(info->ConnectionCombo),key);
+ break;
+ }
+ }
+ }
+ }
+}
diff --git a/source/ubinstall-gtk-page-switch.c b/source/ubinstall-gtk-page-switch.c
new file mode 100644
index 0000000..59b5444
--- /dev/null
+++ b/source/ubinstall-gtk-page-switch.c
@@ -0,0 +1,384 @@
+#include "ubinstall-gtk.h"
+
+enum YON_PAGES yon_page_get_next(main_window *widgets, enum YON_PAGES page){
+ if (!yon_page_save(widgets,page)){
+ return -1;
+ }
+ switch (page){
+ case YON_PAGE_WELCOME: return YON_PAGE_LICENCE; break;
+ case YON_PAGE_LICENCE: return YON_PAGE_SECTIONS; break;
+ case YON_PAGE_SECTIONS: return yon_sections_get_next_page(widgets); break;
+ case YON_PAGE_OS_COMPONENTS: return main_config.configure_mode? YON_PAGE_KERNEL : YON_PAGE_INSTALLATION_BEGIN; break;
+ case YON_PAGE_INSTALLATION_BEGIN: return YON_PAGE_KERNEL; break;
+ case YON_PAGE_KERNEL: return YON_PAGE_KERNEL_ADDON; break;
+ case YON_PAGE_KERNEL_ADDON: return YON_PAGE_PACMAN_SOFTWARE; break;
+ case YON_PAGE_PACMAN_SOFTWARE: return YON_PAGE_REGION;
+ case YON_PAGE_SOFTWARE: return YON_PAGE_PACMAN_SOFTWARE; break;
+ case YON_PAGE_REGION: return YON_PAGE_KEYBOARD; break;
+ case YON_PAGE_KEYBOARD: return YON_PAGE_USERS; break;
+ case YON_PAGE_USERS: return YON_PAGE_STARTUP; break;
+ 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 main_config.configure_mode?YON_PAGE_KERNEL:YON_PAGE_OS_COMPONENTS; break;
+ case YON_PAGE_INSTALL_SEPARATE: return main_config.configure_mode?YON_PAGE_KERNEL:YON_PAGE_OS_COMPONENTS; break;
+ case YON_PAGE_INSTALL_SAME_PARTITION: return main_config.configure_mode?YON_PAGE_KERNEL:YON_PAGE_OS_COMPONENTS; break;
+ case YON_PAGE_INSTALL_ADVANCED: return main_config.configure_mode?YON_PAGE_KERNEL:YON_PAGE_OS_COMPONENTS; break;
+ case YON_PAGE_INSTALL_RECOVERY: return yon_recovery_get_next(widgets); 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;
+}
+
+enum YON_PAGES yon_page_get_prev(enum YON_PAGES page){
+ switch (page){
+ case YON_PAGE_WELCOME: return YON_PAGE_WELCOME; break;
+ case YON_PAGE_LICENCE: return YON_PAGE_WELCOME; break;
+ case YON_PAGE_SECTIONS: return YON_PAGE_LICENCE; break;
+ case YON_PAGE_OS_COMPONENTS: return YON_PAGE_SECTIONS; break;
+ case YON_PAGE_INSTALLATION_BEGIN: return YON_PAGE_SECTIONS; break;
+ case YON_PAGE_KERNEL: return YON_PAGE_SECTIONS; break;
+ case YON_PAGE_KERNEL_ADDON: return YON_PAGE_KERNEL; break;
+ case YON_PAGE_PACMAN_SOFTWARE: return YON_PAGE_KERNEL_ADDON; break;
+ case YON_PAGE_SOFTWARE: return YON_PAGE_PACMAN_SOFTWARE; break;
+ case YON_PAGE_REGION: return YON_PAGE_SOFTWARE; break;
+ case YON_PAGE_KEYBOARD: return YON_PAGE_REGION; break;
+ case YON_PAGE_USERS: return YON_PAGE_KEYBOARD; break;
+ case YON_PAGE_STARTUP: return YON_PAGE_USERS; break;
+ case YON_PAGE_BOOTLOADER: return YON_PAGE_STARTUP; break;
+ case YON_PAGE_NETWORK: return YON_PAGE_BOOTLOADER; break;
+ case YON_PAGE_INSTALLATION: return YON_PAGE_INSTALLATION; break;
+ case YON_PAGE_CONFIGURE_END: return YON_PAGE_CONFIGURE_END; break;
+ case YON_PAGE_INSTALL_COMMON: return YON_PAGE_SECTIONS; break;
+ case YON_PAGE_INSTALL_SEPARATE: return YON_PAGE_SECTIONS; break;
+ case YON_PAGE_INSTALL_SAME_PARTITION: return YON_PAGE_SECTIONS; break;
+ case YON_PAGE_INSTALL_ADVANCED: return YON_PAGE_SECTIONS; break;
+ case YON_PAGE_INSTALL_RECOVERY: return YON_PAGE_SECTIONS; break;
+ case YON_PAGE_RECOVERY_GRUB_INSTALL: return YON_PAGE_INSTALL_RECOVERY; break;
+ case YON_PAGE_RECOVERY_GRUB_UPDATE: return YON_PAGE_INSTALL_RECOVERY; break;
+ case YON_PAGE_RECOVERY_OS_ONLY: return YON_PAGE_INSTALL_RECOVERY; break;
+ case YON_PAGE_RECOVERY_USRDATA_ONLY: return YON_PAGE_INSTALL_RECOVERY; break;
+ default:return YON_PAGE_WELCOME;
+ }
+ return YON_PAGE_WELCOME;
+}
+
+enum YON_PAGES yon_page_get_current(GtkNotebook *target){
+ enum YON_PAGES page = gtk_notebook_get_current_page(target);
+ return page;
+}
+
+void yon_navigation_buttons_set_sensetiveness(main_window *widgets){
+ enum YON_PAGES page = yon_page_get_current(GTK_NOTEBOOK(widgets->Notebook));
+
+ switch(page){
+ case YON_PAGE_WELCOME:
+ gtk_widget_hide(widgets->BackButton);
+ gtk_widget_set_sensitive(widgets->NextButton,1);
+ break;
+ case YON_PAGE_LICENCE:
+ gtk_widget_show(widgets->BackButton);
+ gtk_widget_set_sensitive(widgets->BackButton,1);
+ gtk_widget_set_sensitive(widgets->NextButton,1);
+ gtk_widget_set_sensitive(widgets->CancelInstallButton,1);
+ break;
+ case YON_PAGE_INSTALLATION:
+ gtk_widget_set_sensitive(widgets->NextButton,0);
+ gtk_widget_set_sensitive(widgets->BackButton,0);
+ break;
+ case YON_PAGE_KERNEL:
+ gtk_widget_set_sensitive(widgets->BackButton,0);
+ break;
+ case YON_PAGE_COMPLETED:
+ case YON_PAGE_INSTALL_ERROR:
+ case YON_PAGE_CONFIGURE_SAVE:
+ case YON_PAGE_CONFIGURE_END:
+ case YON_PAGE_COMPLETION:
+ gtk_button_set_label(GTK_BUTTON(widgets->NextButton),RESTART_LABEL);
+ gtk_widget_set_sensitive(widgets->BackButton,0);
+ break;
+ default:
+ gtk_widget_set_sensitive(widgets->BackButton,1);
+ gtk_widget_set_sensitive(widgets->NextButton,1);
+ gtk_widget_set_sensitive(widgets->CancelInstallButton,1);
+ break;
+ }
+}
+
+int yon_page_save(main_window *widgets, enum YON_PAGES page){
+ switch (page){
+ case YON_PAGE_OS_COMPONENTS:
+ return yon_os_components_save(widgets);
+ break;
+ case YON_PAGE_KERNEL:
+ return yon_kernel_save(widgets);
+ break;
+ case YON_PAGE_KERNEL_ADDON:
+ return yon_kernel_addon_save(widgets);
+ break;
+ case YON_PAGE_SOFTWARE:
+ return yon_software_save(widgets);
+ break;
+ case YON_PAGE_PACMAN_SOFTWARE:
+ return yon_pacman_software_save(widgets);
+ break;
+ case YON_PAGE_REGION:
+ return yon_region_save(widgets);
+ break;
+ case YON_PAGE_KEYBOARD:
+ return yon_keyboard_save(widgets);
+ break;
+ case YON_PAGE_USERS:
+ return yon_users_save(widgets);
+ break;
+ case YON_PAGE_STARTUP:
+ return yon_startup_save(widgets);
+ break;
+ case YON_PAGE_BOOTLOADER:
+ return yon_bootloader_save(widgets);
+ break;
+ case YON_PAGE_NETWORK:
+ return yon_network_save(widgets);
+ break;
+ case YON_PAGE_INSTALL_COMMON:
+ return yon_install_common_save(widgets);
+ break;
+ case YON_PAGE_INSTALL_SEPARATE:
+ return yon_install_separate_save(widgets);
+ break;
+ case YON_PAGE_INSTALL_SAME_PARTITION:
+ return yon_install_same_partition_save(widgets);
+ break;
+ case YON_PAGE_INSTALL_ADVANCED:
+ return yon_install_advanced_save(widgets);
+ break;
+ case YON_PAGE_RECOVERY_GRUB_INSTALL:
+ return yon_grub_install_save(widgets);
+ break;
+ case YON_PAGE_RECOVERY_GRUB_UPDATE:
+ return yon_grub_update_save(widgets);
+ break;
+ case YON_PAGE_RECOVERY_OS_ONLY:
+ return yon_install_options_save(widgets->OSDevicesTree,widgets->OSSysSectionTree,"system_only",widgets);
+ break;
+ 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;
+}
+
+void yon_switch_page_render(main_window *widgets){
+ enum YON_PAGES page = yon_page_get_current(GTK_NOTEBOOK(widgets->Notebook));
+ switch(page){
+ case YON_PAGE_WELCOME:
+ page = 0;
+ break;
+ case YON_PAGE_LICENCE:
+ page = 1;
+ break;
+ case YON_PAGE_SECTIONS:
+ case YON_PAGE_OS_COMPONENTS:
+ case YON_PAGE_INSTALL_COMMON:
+ case YON_PAGE_INSTALL_SAME_PARTITION:
+ case YON_PAGE_INSTALL_SEPARATE:
+ case YON_PAGE_INSTALL_ADVANCED:
+ case YON_PAGE_INSTALL_RECOVERY:
+ case YON_PAGE_INSTALLATION_BEGIN:
+ case YON_PAGE_KERNEL:
+ case YON_PAGE_KERNEL_ADDON:
+ case YON_PAGE_SOFTWARE:
+ case YON_PAGE_PACMAN_SOFTWARE:
+ case YON_PAGE_RECOVERY_GRUB_INSTALL:
+ case YON_PAGE_RECOVERY_GRUB_UPDATE:
+ case YON_PAGE_RECOVERY_OS_ONLY:
+ case YON_PAGE_RECOVERY_USRDATA_ONLY:
+ page = 2;
+ break;
+ case YON_PAGE_REGION:
+ page = 3;
+ break;
+ case YON_PAGE_KEYBOARD:
+ page = 4;
+ break;
+ case YON_PAGE_USERS:
+ page = 5;
+ break;
+ case YON_PAGE_BOOTLOADER:
+ case YON_PAGE_STARTUP:
+ case YON_PAGE_NETWORK:
+ page = 6;
+ break;
+ case YON_PAGE_INSTALLATION:
+ page = 7;
+ break;
+ case YON_PAGE_COMPLETED:
+ case YON_PAGE_COMPLETION:
+ case YON_PAGE_INSTALL_ERROR:
+ case YON_PAGE_CONFIGURE_END:
+ case YON_PAGE_CONFIGURE_SAVE:
+ page=8;
+ break;
+ }
+
+ if (widgets){};
+ GtkContainer *parent = GTK_CONTAINER(gtk_widget_get_parent(widgets->UsersToggle));
+ GList *list = gtk_container_get_children(parent);
+ for (guint i=0;iNotebook));
+ if (page==YON_PAGE_WELCOME){
+ gtk_widget_set_sensitive(widgets->ConfigurationModeMenuItem,1);
+ } else {
+ gtk_widget_set_sensitive(widgets->ConfigurationModeMenuItem,0);
+ }
+ if (page == YON_PAGE_CONFIGURE_END){
+ gtk_widget_show(widgets->SaveButton);
+ } else {
+ gtk_widget_hide(widgets->SaveButton);
+ }
+}
+
+void yon_page_update(main_window *widgets){
+ yon_navigation_buttons_set_sensetiveness(widgets);
+ yon_switch_page_render(widgets);
+ yon_configuration_mode_check(widgets);
+}
+
+enum YON_PAGES yon_sections_get_next_page(main_window *widgets){
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->InstallationRadio)))
+ return YON_PAGE_INSTALL_COMMON;
+ else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->InstallationNearRadio)))
+ return YON_PAGE_INSTALL_SEPARATE;
+ else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->InstallationLinuxRadio)))
+ return YON_PAGE_INSTALL_SAME_PARTITION;
+ else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->InstallationWindowsRadio)))
+ return YON_PAGE_INSTALL_ADVANCED;
+ else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->InstallationOptionsRadio)))
+ return YON_PAGE_INSTALL_RECOVERY;
+ return YON_PAGE_SECTIONS;
+}
+
+enum YON_PAGES yon_recovery_get_next(main_window *widgets){
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->GrubInstallRadio)))
+ return YON_PAGE_RECOVERY_GRUB_INSTALL;
+ else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->GrubUpdateRadio)))
+ return YON_PAGE_RECOVERY_GRUB_UPDATE;
+ else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->OSRadio)))
+ return YON_PAGE_RECOVERY_OS_ONLY;
+ else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->UserDataOnlyRadio)))
+ return YON_PAGE_RECOVERY_USRDATA_ONLY;
+ return YON_PAGE_SECTIONS;
+}
+
+void yon_page_init(main_window *widgets, enum YON_PAGES page){
+ switch(page){
+ case YON_PAGE_OS_COMPONENTS:
+ yon_os_components_init(widgets);
+ break;
+ case YON_PAGE_KERNEL:
+ yon_kernel_setup(widgets);
+ break;
+ case YON_PAGE_KERNEL_ADDON:
+ yon_kernel_addon_setup(widgets);
+ break;
+ case YON_PAGE_SOFTWARE:
+ yon_software_init(widgets);
+ break;
+ case YON_PAGE_PACMAN_SOFTWARE:
+ yon_pacman_init(widgets);
+ break;
+ case YON_PAGE_REGION:
+ yon_region_init(widgets);
+ break;
+ case YON_PAGE_KEYBOARD:
+ yon_keyboard_init(widgets);
+ break;
+ case YON_PAGE_USERS:
+ yon_user_init(widgets);
+ break;
+ case YON_PAGE_STARTUP:
+ yon_startup_services_setup(widgets);
+ break;
+ case YON_PAGE_BOOTLOADER:
+ yon_bootloader_init(widgets);
+ break;
+ case YON_PAGE_NETWORK:
+ yon_network_init(widgets);
+ break;
+ case YON_PAGE_INSTALL_COMMON:
+ case YON_PAGE_INSTALL_SEPARATE:
+ case YON_PAGE_INSTALL_SAME_PARTITION:
+ case YON_PAGE_INSTALL_ADVANCED:
+ case YON_PAGE_RECOVERY_GRUB_INSTALL:
+ case YON_PAGE_RECOVERY_GRUB_UPDATE:
+ case YON_PAGE_RECOVERY_OS_ONLY:
+ case YON_PAGE_RECOVERY_USRDATA_ONLY:
+ case YON_PAGE_INSTALLATION_BEGIN:
+ yon_install_init(widgets,page);
+ break;
+ case YON_PAGE_INSTALLATION:
+ main_config.save_configured=1;
+ g_mutex_lock(&main_config.install_mutex);
+ if (main_config.install_complete){
+ g_mutex_unlock(&main_config.install_mutex);
+ g_thread_new("install_thread",(GThreadFunc)on_setup_system_configuration,widgets);
+ on_page_next_clicked(NULL,widgets);
+ } else {
+ g_mutex_unlock(&main_config.install_mutex);
+ }
+ break;
+ default: break;
+ }
+}
+
+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_init(widgets,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_cancel_clicked(GtkWidget *, main_window *widgets){
+ gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_WELCOME);
+ gtk_widget_hide(widgets->BackButton);
+ gtk_widget_hide(widgets->SourceButton);
+ gtk_widget_hide(widgets->SkipInstallationButton);
+ gtk_widget_show(widgets->NextButton);
+ gtk_widget_show(widgets->StartScenarioButton);
+ gtk_widget_set_sensitive(widgets->CancelInstallButton,0);
+ gtk_widget_set_sensitive(widgets->BackButton,1);
+ gtk_widget_set_sensitive(widgets->NextButton,1);
+
+}
\ No newline at end of file
diff --git a/source/ubinstall-gtk-password.c b/source/ubinstall-gtk-password.c
new file mode 100644
index 0000000..dfdd045
--- /dev/null
+++ b/source/ubinstall-gtk-password.c
@@ -0,0 +1 @@
+#include "ubinstall-gtk.h"
diff --git a/source/ubinstall-gtk-region.c b/source/ubinstall-gtk-region.c
new file mode 100644
index 0000000..2d7dd90
--- /dev/null
+++ b/source/ubinstall-gtk-region.c
@@ -0,0 +1,149 @@
+#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);
+ yon_ubl_status_highlight_incorrect(widgets->RegionCombo);
+ return 0;
+ } else if (gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->ZoneCombo))==-1){
+ yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),ZONE_EMPTY_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
+ yon_ubl_status_highlight_incorrect(widgets->ZoneCombo);
+ return 0;
+ }
+ char *languages = "";
+ GtkTreeIter iter;
+ GtkTreeModel *model = GTK_TREE_MODEL(widgets->LanguagesFilter);
+ char *lang_code=NULL;
+ for_iter(model,&iter){
+ gtk_tree_model_get(model,&iter,2,&lang_code,-1);
+ languages = yon_char_unite(languages,!yon_char_is_empty(languages)?",":"",lang_code,NULL);
+ }
+ if (yon_char_is_empty(languages)||!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->MainLanguageSensitiveCheck))){
+ yon_config_remove_by_key(locale_parameter);
+ } else {
+ yon_config_register(locale_parameter,locale_parameter_command,languages);
+ free(languages);
+ }
+ if (gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->LanguagesCombo))==-1||!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->LanguagesSensitiveCheck))){
+ yon_config_remove_by_key(lang_parameter);
+ } else {
+ char *language = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(widgets->LanguagesCombo));
+ yon_config_register(lang_parameter,lang_parameter_command,language);
+ }
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->RegionSensitiveCheck))){
+ char *region = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(widgets->RegionCombo));
+ char *zone = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(widgets->ZoneCombo));
+ yon_debug_output("%s",region);
+ yon_debug_output("/%s\n\n",zone);
+ yon_config_register(zone_parameter,zone_parameter_command,yon_char_unite(region,"/",zone,NULL));
+ } else {
+ yon_config_remove_by_key(zone_parameter);
+ }
+ return 1;
+}
+
+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));
+ if (yon_file_is_directory(active)){
+ config_str parsed = yon_file_ls(active,&size);
+ for (int i=0;iZoneCombo),parsed[i],_(parsed[i]));
+ }
+ if (size) yon_char_parsed_free(parsed,size);
+ gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->ZoneCombo),0);
+ }
+ free(active);
+}
+
+void yon_region_init(main_window *widgets){
+ int size;
+ config_str parsed = NULL;
+ int langsize;
+ config_str lang = default_langs(&langsize);
+
+ GtkTreeIter iter;
+ gtk_list_store_clear(widgets->LanguagesList);
+ parsed = yon_file_open(languages_path,&size);
+ for (int i=0;iLanguagesList,&iter);
+ gtk_list_store_set(widgets->LanguagesList,&iter,0,0,1,_(cur[1]),2,cur[0],-1);
+ }
+ yon_char_parsed_free(cur,cur_size);
+ }
+ yon_char_parsed_free(parsed,size);
+ if (lang)
+ yon_char_parsed_free(lang,langsize);
+
+ parsed = yon_dir_get_contents(zone_path,&size);
+ for (int i=0;iRegionCombo),parsed[i],_(parsed[i]));
+ }
+ free(path);
+ }
+ }
+ while(gtk_events_pending()) gtk_main_iteration();
+ gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->RegionCombo),0);
+ yon_char_parsed_free(parsed,size);
+
+ gtk_tree_model_filter_set_visible_column(GTK_TREE_MODEL_FILTER(widgets->LanguagesFilter),0);
+ gtk_tree_model_filter_refilter(GTK_TREE_MODEL_FILTER(widgets->LanguagesFilter));
+
+ char *zone = yon_char_new(config(zone_parameter));
+ char *locale = config(locale_parameter);
+ char *lang_param = config(lang_parameter);
+
+ if (!yon_char_is_empty(zone)){
+ char *timezone = yon_char_divide_search(zone,"/",-1);
+ gtk_combo_box_set_active_id(GTK_COMBO_BOX(widgets->RegionCombo),timezone);
+ while(gtk_events_pending()) gtk_main_iteration();
+ gtk_combo_box_set_active_id(GTK_COMBO_BOX(widgets->ZoneCombo),zone);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->RegionSensitiveCheck),1);
+ free(timezone);
+ } else {
+ gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->RegionCombo),0);
+ gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->ZoneCombo),0);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->RegionSensitiveCheck),0);
+ }
+
+ if (!yon_char_is_empty(locale)){
+ char *parameters_list = "";
+ config_str parsed = yon_char_parse(locale,&size,",");
+ GtkTreeModel *model = GTK_TREE_MODEL(widgets->LanguagesList);
+ for_iter(model,&iter){
+ char *target, *id;
+ gtk_tree_model_get(model,&iter,1,&target,2,&id,-1);
+ if (yon_char_parsed_check_exist(parsed,size,id)>-1){
+ gtk_list_store_set(widgets->LanguagesList,&iter,0,1,-1);
+ char *temp = yon_char_unite(parameters_list,!yon_char_is_empty(parameters_list)?",":"",target,NULL);
+ if (!yon_char_is_empty(parameters_list)) free(parameters_list);
+ parameters_list=temp;
+ } else {
+ gtk_list_store_set(widgets->LanguagesList,&iter,0,0,-1);
+ }
+ }
+ gtk_entry_set_text(GTK_ENTRY(widgets->AvailableLanguagesEntry),parameters_list);
+ if(!yon_char_is_empty(parameters_list)) free(parameters_list);
+
+ }
+
+ if (!yon_char_is_empty(lang_param)){
+ gtk_combo_box_set_active_id(GTK_COMBO_BOX(widgets->LanguagesCombo),lang_param);
+ }
+
+}
\ No newline at end of file
diff --git a/source/ubinstall-gtk-saving.c b/source/ubinstall-gtk-saving.c
new file mode 100644
index 0000000..ae7e979
--- /dev/null
+++ b/source/ubinstall-gtk-saving.c
@@ -0,0 +1,649 @@
+#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){
+ if (type!=YON_CONFIG_CUSTOM){
+ 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,yon_config_get_command("global"),NULL);
+ } else if (type==YON_CONFIG_LOCAL){
+ yon_config_load_config(type,yon_config_get_command("system"),NULL);
+ } else if (type==YON_CONFIG_CUSTOM){
+ textdomain(template_ui_LocaleName);
+ GtkWidget *dialog = gtk_file_chooser_dialog_new(template_app_information.app_title,NULL,GTK_FILE_CHOOSER_ACTION_SAVE,CANCEL_LABEL,GTK_RESPONSE_CANCEL,OPEN_LABEL,GTK_RESPONSE_ACCEPT,NULL);
+ textdomain(LocaleName);
+ gtk_window_set_icon_name(GTK_WINDOW(dialog),"com.ublinux.ubl-settings-services");
+ 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)){
+ main_config.config_load_path=yon_char_new(file);
+ yon_config_clean();
+ if (!yon_char_is_empty(config_get_default_command))
+ yon_config_load_config(YON_CONFIG_DEFAULT,config_get_default_command,NULL);
+ char *command = yon_config_get_command(main_config.config_load_path);
+ yon_config_load_config(type,command,NULL);
+ }
+ gtk_widget_destroy(dialog);
+ } else {
+ gtk_widget_destroy(dialog);
+ }
+ }
+}
+
+
+void on_config_local_load(GtkWidget *,main_window *widgets){
+ yon_load_proceed(YON_CONFIG_LOCAL);
+ yon_page_init(widgets,gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->Notebook)));
+ main_config.load_mode=YON_CONFIG_LOCAL;
+}
+
+void on_config_global_load(GtkWidget *,main_window *widgets){
+ yon_load_proceed(YON_CONFIG_GLOBAL);
+ yon_page_init(widgets,gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->Notebook)));
+ main_config.load_mode=YON_CONFIG_GLOBAL;
+}
+
+void on_config_custom_load(GtkWidget *,main_window *widgets){
+ yon_load_proceed(YON_CONFIG_CUSTOM);
+ yon_page_init(widgets,gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->Notebook)));
+ main_config.load_mode=YON_CONFIG_CUSTOM;
+}
+
+// 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_fs_type_parameter);
+// char *device_label = config(device_label_parameter);
+// char *format = config(part_format_parameter);
+// char *part_size = config(part_size_parameter);
+// GtkListStore *device_list = widgets->DevicesList;
+// GtkListStore *part_list=widgets->PartitionsList;
+// GtkWidget *device_tree=NULL;
+// GtkWidget *part_tree=NULL;
+// switch (page){
+// case YON_PAGE_INSTALL_COMMON:{
+// device_tree = widgets->CommonInstallationDevicesTree;
+// } break;
+//
+// case YON_PAGE_INSTALL_SEPARATE:{
+// device_tree = widgets->NextInstallationSysDevicesTree;
+// part_tree = widgets->NextInstallationSysSectionTree;
+// if (!yon_char_is_empty(part_size)){
+// gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->NextInstallationSizeSpin),atof(part_size));
+// if (part_size[strlen(part_size)-1]=='M') gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->NextInstallationSizeTypeSpin),0);
+// if (part_size[strlen(part_size)-1]=='G') gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->NextInstallationSizeTypeSpin),1);
+// if (part_size[strlen(part_size)-1]=='T') gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->NextInstallationSizeTypeSpin),2);
+// }
+// if (format&&!strcmp(format,"yes")) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->NextInstallationFormatCheck),1);
+// else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->NextInstallationFormatCheck),main_config.format_default);
+// if (!yon_char_is_empty(fs_type))
+// gtk_combo_box_set_active_id(GTK_COMBO_BOX(widgets->NextInstallationFilesystemTypeCombo),fs_type);
+// if (device_label)
+// gtk_entry_set_text(GTK_ENTRY(widgets->NextInstallationSectionNameEntry),device_label);
+// else
+// gtk_entry_set_text(GTK_ENTRY(widgets->NextInstallationSectionNameEntry),"");
+//
+// } break;
+//
+// case YON_PAGE_INSTALL_SAME_PARTITION:{
+// device_tree = widgets->SamePlaceDeviceTree;
+// part_tree = widgets->SamePlacePartTree;
+// if (!yon_char_is_empty(fs_type))
+// gtk_combo_box_set_active_id(GTK_COMBO_BOX(widgets->SameInstallationFilesystemTypeCombo),fs_type);
+// if (format&&!strcmp(format,"yes")) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->SameInstallationFormatCheck),1);
+// else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->SameInstallationFormatCheck),main_config.format_default);
+// if (device_label)
+// gtk_entry_set_text(GTK_ENTRY(widgets->SameInstallationSectionNameEntry),device_label);
+// else
+// gtk_entry_set_text(GTK_ENTRY(widgets->SameInstallationSectionNameEntry),"");
+//
+// } break;
+// case YON_PAGE_OPTIONS_GRUB_INSTALL:{
+// device_tree = widgets->GrubInstallDevicesTree;
+// } break;
+//
+// case YON_PAGE_OPTIONS_GRUB_UPDATE:{
+// device_tree = widgets->GrubUpdateDevicesTree;
+// } break;
+//
+// case YON_PAGE_OPTIONS_SEPARATE:{
+// GtkTreeIter iter;
+// device_tree = widgets->SeparateDevicesTree;
+// part_tree = widgets->SeparateSysSectionTree;
+// for_iter(GTK_TREE_MODEL(device_list),&iter){
+// char *cur_device;
+// gtk_tree_model_get(GTK_TREE_MODEL(device_list),&iter, 0,&cur_device,-1);
+// if (!strcmp(cur_device,device)){
+// gtk_tree_selection_select_iter(gtk_tree_view_get_selection(GTK_TREE_VIEW(device_tree)),&iter);
+// break;
+// }
+// }
+// on_near_installation_device_changed(device_tree,widgets);
+// for_iter(GTK_TREE_MODEL(part_list),&iter){
+// char *cur_part;
+// gtk_tree_model_get(GTK_TREE_MODEL(device_list),&iter, 0,&cur_part,-1);
+// if (!strcmp(cur_part,part)){
+// gtk_tree_selection_select_iter(gtk_tree_view_get_selection(GTK_TREE_VIEW(part_tree)),&iter);
+// }
+// }
+// } break;
+//
+// case YON_PAGE_OPTIONS_OS_ONLY:{
+// device_tree = widgets->OSDevicesTree;
+// part_tree = widgets->OSSysSectionTree;
+// } break;
+//
+// case YON_PAGE_OPTIONS_USRDATA_ONLY:{
+// device_tree = widgets->UserdataDevicesTree;
+// part_tree = widgets->UserdataSysSectionTree;
+// } break;
+//
+// default:{}break;
+// }
+// GtkTreeIter iter;
+// char *cur_device="";
+// if (page!=YON_PAGE_OPTIONS_SEPARATE && !yon_char_is_empty(device)){
+// for_iter (widgets->DevicesList,&iter){
+// gtk_tree_model_get(GTK_TREE_MODEL(widgets->DevicesList),&iter,0,&cur_device,-1);
+// if (!strcmp(device,cur_device)){
+// gtk_tree_selection_select_iter(gtk_tree_view_get_selection(GTK_TREE_VIEW(device_tree)),&iter);
+// break;
+// }
+// }
+// on_near_installation_device_changed(device_tree,widgets);
+// if (!yon_char_is_empty(part)){
+// for_iter (widgets->PartitionsList,&iter){
+// gtk_tree_model_get(GTK_TREE_MODEL(widgets->PartitionsList),&iter,0,&part,-1);
+// if (!strcmp(device,cur_device)){
+// gtk_tree_selection_select_iter(gtk_tree_view_get_selection(GTK_TREE_VIEW(part_tree)),&iter);
+// break;
+// }
+// }
+// }
+// }
+// char *system_locale = config(locale_parameter);
+// if (!yon_char_is_empty(system_locale)){
+// char *chosen_langs = "";
+// for_iter(widgets->LanguagesList,&iter){
+// char *cur=NULL, *render = NULL;
+// gtk_tree_model_get(GTK_TREE_MODEL(widgets->LanguagesList),&iter,1,&render,2,&cur,-1);
+// if (strstr(system_locale,cur)){
+// gtk_list_store_set((widgets->LanguagesList),&iter,0,1,-1);
+// chosen_langs = yon_char_unite(chosen_langs,!yon_char_is_empty(chosen_langs)?";":"",render,NULL);
+// } else {
+// gtk_list_store_set((widgets->LanguagesList),&iter,0,0,-1);
+// }
+// }
+// if (!yon_char_is_empty(chosen_langs)){
+// gtk_entry_set_text(GTK_ENTRY(widgets->AvailableLanguagesEntry),chosen_langs);
+// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->LanguagesSensitiveCheck),1);
+// free(chosen_langs);
+// } else {
+// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->LanguagesSensitiveCheck),0);
+// gtk_entry_set_text(GTK_ENTRY(widgets->AvailableLanguagesEntry),"");
+// }
+// } else {
+// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->LanguagesSensitiveCheck),0);
+// gtk_entry_set_text(GTK_ENTRY(widgets->AvailableLanguagesEntry),"");
+// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->LanguagesSensitiveCheck),0);
+// int langsize;
+// config_str lang = default_langs(&langsize);
+// for_iter(widgets->LanguagesList,&iter){
+// char *cur=NULL;
+// gtk_tree_model_get(GTK_TREE_MODEL(widgets->LanguagesList),&iter,2,&cur,-1);
+// if (lang&&yon_char_parsed_check_exist(lang,langsize,cur)>-1){
+// gtk_list_store_set(widgets->LanguagesList,&iter,0,1,-1);
+// } else {
+// gtk_list_store_set(widgets->LanguagesList,&iter,0,0,-1);
+// }
+// if (cur) free(cur);
+// }
+// if (langsize) yon_char_parsed_free(lang,langsize);
+// }
+// char *zone = config(zone_parameter);
+// char *region = NULL;
+//
+// if (!yon_char_is_empty(zone)) region = yon_char_divide_search(zone,"/",-1); else {gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->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->UserRootLoginEntry),user_name);
+// }
+// } else {
+// gtk_entry_set_text(GTK_ENTRY(widgets->UserRootLoginEntry),"");
+// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->LoginSensitiveCheck),0);
+// }
+// if (!yon_char_is_empty(user_gecos)){
+// gtk_entry_set_text(GTK_ENTRY(widgets->UserRootNameEntry),_(user_gecos));
+// } else {
+// gtk_entry_set_text(GTK_ENTRY(widgets->UserRootNameEntry),"");
+// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->UsernameSensitiveCheck),0);
+// }
+// int def_size=0;
+// config_str default_password = NULL;
+// if (!getuid()){
+// default_password = yon_config_load(yon_debug_output("%s\n",get_default_password_command), &def_size);
+// if (def_size>0&&default_password){
+// yon_char_remove_last_symbol(default_password[0],'\n');
+// }
+// }
+// if ((def_size>0&&!strcmp(default_password[0],user_password))||yon_char_is_empty(user_password)){
+// gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->UserRootPasswordCombo),0);
+// gtk_entry_set_text(GTK_ENTRY(widgets->UserRootPasswordEntry),"");
+// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->PasswordSensitiveCheck),0);
+//
+// } else if (!yon_char_is_empty(user_password)){
+// gtk_entry_set_text(GTK_ENTRY(widgets->UserRootPasswordEntry),user_password);
+// gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->UserRootPasswordCombo),1);
+// }
+// if ((def_size>0&&!strcmp(default_password[0],user_password))||yon_char_is_empty(user_password)){
+// gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->AdminPasswordCombo),0);
+// gtk_entry_set_text(GTK_ENTRY(widgets->AdminPasswordEntry),"");
+// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->RootPasswordSensitiveCheck),0);
+//
+// } else if (!yon_char_is_empty(root_password)){
+// gtk_entry_set_text(GTK_ENTRY(widgets->AdminPasswordEntry),root_password);
+// gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->AdminPasswordCombo),1);
+// }
+// if (!yon_char_is_empty(autologin)){
+// if (!strcmp(autologin,"yes"))
+// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->UserAutologinSwitch),1);
+// else
+// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->UserAutologinSwitch),0);
+// } else {
+// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->UserAutologinSwitch),main_config.autologin_default);
+// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->AutologinSensitiveCheck),0);
+// }
+// if (!yon_char_is_empty(hostname)){
+// if (strcmp(hostname,"auto")){
+// gtk_entry_set_text(GTK_ENTRY(widgets->HotnameEntry),hostname);
+// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->AutoHostnameCheck),0);
+// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->HostnameSensitiveCheck),1);
+// } else{
+// gtk_entry_set_text(GTK_ENTRY(widgets->HotnameEntry),"");
+// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->AutoHostnameCheck),1);
+// }
+// } else {
+// gtk_entry_set_text(GTK_ENTRY(widgets->HotnameEntry),"");
+// g_signal_handlers_block_by_func(G_OBJECT(widgets->AutoHostnameCheck),on_autohostname_check,widgets);
+// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->AutoHostnameCheck),1);
+// g_signal_handlers_unblock_by_func(G_OBJECT(widgets->AutoHostnameCheck),on_autohostname_check,widgets);
+// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->HostnameSensitiveCheck),0);
+// }
+// }
+
+gboolean on_install_success(main_window *widgets){
+ gtk_label_set_text(GTK_LABEL(widgets->InstallationLabel),"");
+ gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_COMPLETION);
+ 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;
+}
+
+enum INSTALL_TYPE{
+ INSTALL_COMMON,
+ INSTALL_PART,
+ INSTALL_NEXT,
+ INSTALL_ADVANCED,
+ INSTALL_GRUB_INSTALL,
+ INSTALL_GRUB_UPDATE,
+ INSTALL_SYSTEM_ONLY,
+ INSTALL_USER_ONLY,
+ INSTALL_ERROR
+};
+
+/**Функция получения текущего режима установки
+ *
+ */
+enum INSTALL_TYPE yon_ubl_get_install_mode(){
+ char *value = config(AUTOINSTALL_TYPE_INSTALL);
+ if (!strcmp(value,"fast")){
+ return INSTALL_COMMON;
+ } else if (!strcmp(value,"part")){
+ return INSTALL_PART;
+ } else if (!strcmp(value,"next")){
+ return INSTALL_NEXT;
+ } else if (!strcmp(value,"advanced")){
+ return INSTALL_ADVANCED;
+ } else if (!strcmp(value,"grub_install")){
+ return INSTALL_GRUB_INSTALL;
+ } else if (!strcmp(value,"grub_update")){
+ return INSTALL_GRUB_UPDATE;
+ } else if (!strcmp(value,"system_only")){
+ return INSTALL_SYSTEM_ONLY;
+ } else if (!strcmp(value,"data_only")){
+ return INSTALL_USER_ONLY;
+ }
+ return INSTALL_ERROR;
+}
+
+void *on_config_save(void *data){
+ main_window *widgets = (main_window*)data;
+
+ int size=0;
+ config_str parameters = NULL;
+ enum INSTALL_TYPE install_mode = yon_ubl_get_install_mode();
+ switch(install_mode){
+ case INSTALL_COMMON:
+ parameters = yon_config_get_selection_by_key_no_ignored(&size,install_common_parameters,NULL);
+ break;
+ case INSTALL_PART:
+ parameters = yon_config_get_selection_by_key_no_ignored(&size,install_part_parameters,NULL);
+ break;
+ case INSTALL_NEXT:
+ parameters = yon_config_get_selection_by_key_no_ignored(&size,install_next_parameters,NULL);
+ break;
+ case INSTALL_ADVANCED:
+ parameters = yon_config_get_selection_by_key_no_ignored(&size,install_advanced_parameters,NULL);
+ break;
+ case INSTALL_GRUB_INSTALL:
+ case INSTALL_GRUB_UPDATE:
+ parameters = yon_config_get_selection_by_key_no_ignored(&size,install_grub_install_update_parameters,NULL);
+ break;
+ case INSTALL_SYSTEM_ONLY:
+ parameters = yon_config_get_selection_by_key_no_ignored(&size,install_system_only_parameters,NULL);
+ break;
+ case INSTALL_USER_ONLY:
+ parameters = yon_config_get_selection_by_key_no_ignored(&size,install_userdata_only_parameters,NULL);
+ break;
+ default:
+ yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),ERROR_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
+ return 0;
+ }
+ FILE *file = fopen(progress_path,"w");
+ if (file){
+ fclose(file);
+ }
+ GFile *file_desc = g_file_new_for_path(progress_path);
+ widgets->install_info_monitor = g_file_monitor_file(file_desc,G_FILE_MONITOR_NONE,NULL,NULL);
+ g_signal_connect(G_OBJECT(widgets->install_info_monitor),"changed",G_CALLBACK(yon_installation_progress_update),widgets);
+ g_object_unref(file_desc);
+ gtk_widget_show(gtk_widget_get_parent(widgets->InstallationProgress));
+ 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);
+ on_page_next_clicked(NULL,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,
+ root_password_parameter,
+ autologin_parameter,
+ xkbmodel_parameter,
+ xkblayout_parameter,
+ xkbvariant_parameter,
+ xkboptions_parameter,
+ hostname_parameter,
+ zone_parameter,
+ lang_parameter,
+ locale_parameter,
+ SERVICES_ENABLE_parameter,
+ GRUB_DEFAULT_parameter,
+ GRUB_TIMEOUT_parameter,
+ AUTOLOGINUSER_parameter,
+ GRUB_SUPERUSERS_parameter,
+ DOMAIN_parameter,
+ DOMAIN_admanger_parameter,
+ NTPSERVERS_parameter,
+ modules_extra_parameter,
+ KERNEL_BOOT_parameter,
+ modules_parameter,
+ packages_parameter,
+ NULL);
+ int user_size=0;
+ config_str users = yon_config_get_all_by_key(USERADD_parameter_search,&user_size);
+ if (user_size){
+ int final_size;
+ config_str final = yon_char_parsed_merge(all_parameters,size,users,user_size,&final_size);
+ yon_char_parsed_free(users,user_size);
+ if (size) yon_char_parsed_free(all_parameters,size);
+ all_parameters = final;
+ size = final_size;
+ }
+ users = yon_config_get_all_by_key(GRUB_PASSWORD_parameter_search,&user_size);
+ if (users){
+ int final_size;
+ config_str final = yon_char_parsed_merge(all_parameters,size,users,user_size,&final_size);
+ yon_char_parsed_free(users,user_size);
+ if (size) yon_char_parsed_free(all_parameters,size);
+ all_parameters = final;
+ size = final_size;
+ }
+ int network_size;
+ config_str networks = yon_config_get_all_by_key(NETWORK_parameter_search,&network_size);
+ if (network_size){
+ int final_size;
+ config_str final = yon_char_parsed_merge(all_parameters,size,networks,network_size,&final_size);
+ yon_char_parsed_free(networks,network_size);
+ if (size) yon_char_parsed_free(all_parameters,size);
+ all_parameters = final;
+ size = final_size;
+ }
+
+ 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;
+}
diff --git a/source/ubinstall-gtk-separate.c b/source/ubinstall-gtk-separate.c
new file mode 100644
index 0000000..61a7a64
--- /dev/null
+++ b/source/ubinstall-gtk-separate.c
@@ -0,0 +1,26 @@
+#include "ubinstall-gtk.h"
+
+int yon_install_options_save(GtkWidget *device_tree, GtkWidget *part_tree,char *mode,main_window *widgets){
+ GtkTreeIter iter,itar;
+ GtkTreeModel *model,*model2;
+ if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(device_tree)),&model,&iter)){
+ yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_DEVICE_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
+ yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(device_tree));
+ return 0;
+ }
+ if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(part_tree)),&model2,&itar)){
+ yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_DEVICE_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
+ yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(part_tree));
+ return 0;
+ }
+ char *cur_device, *cur_section;
+ gtk_tree_model_get(model,&iter,0,&cur_device,-1);
+ gtk_tree_model_get(model2,&itar,0,&cur_section,-1);
+ yon_config_register(AUTOINSTALL_DEVICE,AUTOINSTALL_DEVICE_command,cur_device);
+ yon_config_register(AUTOINSTALL_TYPE_INSTALL,AUTOINSTALL_TYPE_INSTALL_command,mode);
+ yon_config_register(part_parameter,part_parameter_command,cur_section);
+
+ if(cur_section) free(cur_section);
+ if(cur_device) free(cur_device);
+ return 1;
+}
\ No newline at end of file
diff --git a/source/ubinstall-gtk-standard.c b/source/ubinstall-gtk-standard.c
new file mode 100644
index 0000000..e857c0d
--- /dev/null
+++ b/source/ubinstall-gtk-standard.c
@@ -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);
+// }
diff --git a/source/ubinstall-gtk-startup-services.c b/source/ubinstall-gtk-startup-services.c
new file mode 100644
index 0000000..aaa0fbd
--- /dev/null
+++ b/source/ubinstall-gtk-startup-services.c
@@ -0,0 +1,164 @@
+#include "ubinstall-gtk.h"
+
+
+void on_srartup_services_toggled(GtkWidget *, char *path, main_window *widgets){
+ GtkTreeIter iter;
+ int status;
+ gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(widgets->StartupList),&iter,path);
+ gtk_tree_model_get(GTK_TREE_MODEL(widgets->StartupList),&iter,0,&status,-1);
+ gtk_list_store_set(widgets->StartupList,&iter,0,!status,-1);
+}
+
+void on_startup_services_selection_changed(GtkWidget *,main_window *widgets){
+ GtkTreeIter iter;
+ GtkTreeModel *model;
+ if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->StartupServicesTree)),&model,&iter)){
+ int status;
+ gtk_tree_model_get(model,&iter,4,&status,-1);
+ if (status){
+ gtk_widget_set_sensitive(widgets->StartupServicesEditButton,1);
+ gtk_widget_set_sensitive(widgets->StartupServicesRemoveButton,1);
+ return;
+ }
+ }
+ gtk_widget_set_sensitive(widgets->StartupServicesEditButton,0);
+ gtk_widget_set_sensitive(widgets->StartupServicesRemoveButton,0);
+}
+
+void on_startup_services_remove(GtkWidget *self,main_window *widgets){
+ GtkTreeIter iter;
+ GtkTreeModel *model;
+ if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->StartupServicesTree)),&model,&iter)){
+ char *unit;
+ int deletable;
+ gtk_tree_model_get(model,&iter,2,&unit,4,&deletable,-1);
+ if (!deletable) return;
+ dialog_confirmation_data *data = yon_confirmation_dialog_data_new();
+ data->action_text = SERVICE_REMOVE_CONFIRMATION_LABEL(unit);
+ data->title = SERVICE_REMOVE_TITLE_LABEL;
+ if (yon_confirmation_dialog_call(self,data) == GTK_RESPONSE_ACCEPT){
+ gtk_list_store_remove(widgets->StartupList,&iter);
+ }
+ }
+}
+
+void yon_startup_services_setup(main_window *widgets){
+ int size;
+ config_str services = yon_resource_open_file(services_list_path,&size);
+ for (int i=1;iStartupList,&iter);
+ gtk_list_store_set(widgets->StartupList,&iter,0,1,1,parsed[0],2,yon_char_return_if_exist(parsed[1],""),3,yon_char_return_if_exist(parsed[2],""),-1);
+ }
+ }
+}
+
+void on_startup_add_accept(GtkWidget *self, main_window *widgets){
+ startup_service_window *window = g_object_get_data(G_OBJECT(self),"startup_service_window");
+ const char *unit = gtk_entry_get_text(GTK_ENTRY(window->UnitEntry));
+ const char *service = gtk_entry_get_text(GTK_ENTRY(window->ServiceEntry));
+ const char *description = gtk_entry_get_text(GTK_ENTRY(window->DescriptionEntry));
+ if (yon_char_is_empty(service)){
+ yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),_EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
+ yon_ubl_status_highlight_incorrect(window->ServiceEntry);
+ return;
+ }
+ GtkTreeIter iter;
+ gtk_list_store_append(widgets->StartupList,&iter);
+ gtk_list_store_set(widgets->StartupList,&iter,1,unit,2,service,3,description,4,1,-1);
+ on_subwindow_close(self);
+}
+
+void on_startup_edit_accept(GtkWidget *self, main_window *widgets){
+ GtkTreeIter iter;
+ GtkTreeModel *model;
+ if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->StartupServicesTree)),&model,&iter)){
+ startup_service_window *window = g_object_get_data(G_OBJECT(self),"startup_service_window");
+ const char *unit = gtk_entry_get_text(GTK_ENTRY(window->UnitEntry));
+ const char *service = gtk_entry_get_text(GTK_ENTRY(window->ServiceEntry));
+ const char *description = gtk_entry_get_text(GTK_ENTRY(window->DescriptionEntry));
+ if (yon_char_is_empty(service)){
+ yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),_EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
+ yon_ubl_status_highlight_incorrect(window->ServiceEntry);
+ return;
+ }
+ gtk_list_store_set(widgets->StartupList,&iter,1,unit,2,service,3,description,4,1,-1);
+ }
+ on_subwindow_close(self);
+}
+
+startup_service_window *yon_startup_service_window_new(){
+ startup_service_window *window = new(startup_service_window);
+
+ GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_service);
+
+ window->Window = yon_gtk_builder_get_widget(builder,"MainWindow");
+ window->StatusBox = yon_gtk_builder_get_widget(builder,"StatusBox");
+ window->AcceptButton = yon_gtk_builder_get_widget(builder,"AcceptButton");
+ window->CancelButton = yon_gtk_builder_get_widget(builder,"CancelButton");
+ window->UnitEntry = yon_gtk_builder_get_widget(builder,"UnitEntry");
+ window->ServiceEntry = yon_gtk_builder_get_widget(builder,"ServiceEntry");
+ window->DescriptionEntry = yon_gtk_builder_get_widget(builder,"DescriptionEntry");
+
+ g_signal_connect(G_OBJECT(window->CancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL);
+ g_object_set_data(G_OBJECT(window->AcceptButton),"startup_service_window",window);
+
+ return window;
+}
+
+void on_startup_service_add(GtkWidget *, main_window *widgets){
+ startup_service_window *window = yon_startup_service_window_new();
+ yon_gtk_window_setup(GTK_WINDOW(window->Window),GTK_WINDOW(widgets->MainWindow),SERVICE_ADD_TITLE_LABEL,icon_path,"service_add_window");
+ g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(on_startup_add_accept),widgets);
+ gtk_widget_show(window->Window);
+}
+
+void on_startup_service_edit(GtkWidget *, main_window *widgets){
+ GtkTreeIter iter;
+ if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->StartupServicesTree)),NULL,&iter)){
+ char *service, *unit, *description;
+ int status;
+ gtk_tree_model_get(GTK_TREE_MODEL(widgets->StartupList),&iter,1,&unit,2,&service,3,&description,4,&status,-1);
+ if (status){
+ startup_service_window *window = yon_startup_service_window_new();
+ yon_gtk_window_setup(GTK_WINDOW(window->Window),GTK_WINDOW(widgets->MainWindow),SERVICE_EDIT_TITLE_LABEL,icon_path,"service_add_window");
+ g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(on_startup_edit_accept),widgets);
+ gtk_entry_set_text(GTK_ENTRY(window->UnitEntry),unit);
+ gtk_entry_set_text(GTK_ENTRY(window->ServiceEntry),service);
+ gtk_entry_set_text(GTK_ENTRY(window->DescriptionEntry),description);
+ gtk_widget_show(window->Window);
+ }
+ }
+}
+
+int yon_startup_save(main_window *widgets){
+ GtkTreeIter iter;
+ GtkTreeModel *model = GTK_TREE_MODEL(widgets->StartupList);
+ int size = 0;
+ int list_size=0;
+ config_str modules = NULL;
+ for_iter(model,&iter){
+ list_size++;
+ char *target;
+ int status;
+ gtk_tree_model_get(model,&iter,0,&status,2,&target,-1);
+ if (status){
+ yon_char_parsed_add_or_create_if_exists(modules,&size,target);
+ }
+ }
+ if (size){
+ if (list_size==size){
+ yon_config_register(SERVICES_ENABLE_parameter,SERVICES_ENABLE_parameter_command,"auto");
+ } else {
+ char *final = yon_char_parsed_to_string(modules,size,",");
+ yon_config_register(SERVICES_ENABLE_parameter,SERVICES_ENABLE_parameter_command,final);
+ }
+ yon_char_parsed_free(modules,size);
+ } else {
+ yon_config_remove_by_key(SERVICES_ENABLE_parameter);
+ }
+ return 1;
+}
\ No newline at end of file
diff --git a/source/ubinstall-gtk-users.c b/source/ubinstall-gtk-users.c
new file mode 100644
index 0000000..d49303c
--- /dev/null
+++ b/source/ubinstall-gtk-users.c
@@ -0,0 +1,157 @@
+#include "ubinstall-gtk.h"
+
+int yon_users_save(main_window *widgets){
+ if (gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->UserRootPasswordCombo))){
+ const char *root_password = gtk_entry_get_text(GTK_ENTRY(widgets->UserRootPasswordEntry));
+ if (yon_char_is_empty(root_password)){
+ yon_ubl_status_box_spawn(GTK_CONTAINER(main_config.status_box),_EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
+ yon_ubl_status_highlight_incorrect(widgets->UserRootPasswordEntry);
+ return 0;
+ }
+ yon_config_register(root_password_parameter,root_password_parameter_command,(char*)root_password);
+ } else {
+ yon_config_remove_by_key(root_password_parameter);
+ }
+ int autologin = gtk_switch_get_active(GTK_SWITCH(widgets->UserAutologinSwitch));
+ if (autologin){
+ yon_config_register(autologin_parameter,autologin_parameter_command,"yes");
+ } else {
+ yon_config_register(autologin_parameter,autologin_parameter_command,"no");
+ }
+
+ GList *users = gtk_container_get_children(GTK_CONTAINER(widgets->UserAddBox));
+ GList *iter;
+ for (iter=users;iter;iter=iter->next){
+ yon_user_struct *user = g_object_get_data(G_OBJECT(iter->data),"yon_user_struct");
+ if (user){
+ if (!yon_user_save(user)){
+ yon_ubl_status_box_spawn(GTK_CONTAINER(main_config.status_box),_EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
+
+ return 0;
+ }
+ }
+ }
+
+ yon_debug_output("%s\n",yon_config_get_all_info());
+ return 1;
+}
+
+int yon_user_save(yon_user_struct *user){
+ char *name = (char *)gtk_entry_get_text(GTK_ENTRY(user->UsernameEntry));
+ char *login = (char *)gtk_entry_get_text(GTK_ENTRY(user->LoginEntry));
+ char *password = NULL;
+ if (yon_char_is_empty(login)){
+ yon_ubl_status_box_spawn(GTK_CONTAINER(main_config.status_box),_EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
+ yon_ubl_status_highlight_incorrect(user->LoginEntry);
+ return 0;
+ }
+ if (gtk_combo_box_get_active(GTK_COMBO_BOX(user->PasswordCombo))){
+ password = (char *)gtk_entry_get_text(GTK_ENTRY(user->PasswordEntry));
+ if (yon_char_is_empty(password)){
+ yon_ubl_status_highlight_incorrect(user->PasswordEntry);
+ return 0;
+ }
+ }
+ char *parameter = yon_char_unite(yon_char_return_if_exist(name,""),":::::",yon_char_return_if_exist(password,""),NULL);
+ yon_config_register(USERADD_parameter(login),USERADD_parameter_command(login),parameter);
+ free(parameter);
+ return 1;
+}
+
+void on_user_add(GtkWidget *,main_window *widgets){
+ yon_user_struct *user = yon_user_struct_new();
+ gtk_box_pack_start(GTK_BOX(widgets->UserAddBox),user->MainBox,0,0,0);
+}
+
+void on_user_remove_clicked(GtkWidget *,yon_user_struct *user){
+ gtk_widget_destroy(user->MainBox);
+ free(user);
+}
+
+void yon_password_root_new(GtkWidget *, main_window *widgets){
+ yon_password_window *window = yon_password_open(GTK_ENTRY(widgets->UserRootPasswordEntry));
+ gtk_widget_hide(gtk_widget_get_parent(window->EncryptionCombo));
+ gtk_widget_show(window->Window);
+}
+
+void yon_password_new(GtkWidget *, yon_user_struct *user){
+ yon_password_window *window = yon_password_open(GTK_ENTRY(user->PasswordEntry));
+ gtk_widget_hide(gtk_widget_get_parent(window->EncryptionCombo));
+ gtk_widget_show(window->Window);
+}
+
+yon_user_struct *yon_user_struct_new(){
+ yon_user_struct *user = new(yon_user_struct);
+ GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_user);
+
+ user->MainBox = yon_gtk_builder_get_widget(builder,"MainBox");
+ user->RemoveButton = yon_gtk_builder_get_widget(builder,"RemoveButton");
+ user->UsernameEntry = yon_gtk_builder_get_widget(builder,"UsernameEntry");
+ user->LoginEntry = yon_gtk_builder_get_widget(builder,"LoginEntry");
+ user->PasswordCombo = yon_gtk_builder_get_widget(builder,"PasswordCombo");
+ user->PasswordEntry = yon_gtk_builder_get_widget(builder,"PasswordEntry");
+ user->PasswordButton = yon_gtk_builder_get_widget(builder,"PasswordButton");
+
+ g_object_set_data(G_OBJECT(user->MainBox),"yon_user_struct",user);
+
+ yon_gtk_entry_set_password_visibility_icon(GTK_ENTRY(user->PasswordEntry));
+
+ g_signal_connect(G_OBJECT(user->PasswordCombo),"changed",G_CALLBACK(yon_gtk_widget_set_sensitive_from_combo_box),user->PasswordEntry);
+ g_signal_connect(G_OBJECT(user->PasswordCombo),"changed",G_CALLBACK(yon_gtk_widget_set_sensitive_from_combo_box),user->PasswordButton);
+ g_signal_connect(G_OBJECT(user->PasswordButton),"clicked",G_CALLBACK(yon_password_new),user);
+ g_signal_connect(G_OBJECT(user->RemoveButton),"clicked",G_CALLBACK(on_user_remove_clicked),user);
+ return user;
+}
+
+void yon_user_init(main_window *widgets){
+ yon_gtk_entry_set_password_visibility_icon(GTK_ENTRY(widgets->UserRootPasswordEntry));
+ char *root_password = config(root_password_parameter);
+ char *autologin = config(autologin_parameter);
+ if (!yon_char_is_empty(root_password)){
+ gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->UserRootPasswordCombo),1);
+ gtk_entry_set_text(GTK_ENTRY(widgets->UserRootPasswordEntry),root_password);
+ } else {
+ gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->UserRootPasswordCombo),0);
+ gtk_entry_set_text(GTK_ENTRY(widgets->UserRootPasswordEntry),"");
+ }
+ if (!yon_char_is_empty(autologin)&&(!strcmp(autologin,"yes")||!strcmp(autologin,"enable"))){
+ gtk_switch_set_active(GTK_SWITCH(widgets->UserAutologinSwitch),1);
+ } else {
+ gtk_switch_set_active(GTK_SWITCH(widgets->UserAutologinSwitch),0);
+ }
+
+ GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->UserAddBox));
+ GList *iter;
+ for (iter = list; iter; iter = iter->next){
+ yon_user_struct *user = g_object_get_data(G_OBJECT(iter->data),"yon_user_struct");
+ gtk_widget_destroy(user->MainBox);
+ free(user);
+ }
+ int users_size;
+ config_str users = yon_config_get_all_by_key(USERADD_parameter_search,&users_size);
+ if (!users_size){
+ yon_user_struct *user = yon_user_struct_new();
+ gtk_box_pack_start(GTK_BOX(widgets->UserAddBox),user->MainBox,0,0,0);
+ gtk_entry_set_text(GTK_ENTRY(user->UsernameEntry),ADMINISTRATOR_LABEL);
+ gtk_entry_set_text(GTK_ENTRY(user->LoginEntry),"superadmin");
+ }
+ for (int i=0;iUserAddBox),user->MainBox,0,0,0);
+
+ int parsed_size;
+ char *parameter = yon_char_new(users[i]);
+ char *parameter_name = yon_char_divide_search(parameter,"=",-1);
+ char *key = yon_config_parameter_get_key(parameter_name);
+ config_str parsed = yon_char_parse(parameter,&parsed_size,":");
+
+ gtk_entry_set_text(GTK_ENTRY(user->LoginEntry),key);
+ if (parsed_size>0)
+ gtk_entry_set_text(GTK_ENTRY(user->UsernameEntry),parsed[0]);
+ if (parsed_size>5){
+ gtk_entry_set_text(GTK_ENTRY(user->PasswordEntry),parsed[5]);
+ gtk_combo_box_set_active(GTK_COMBO_BOX(user->PasswordCombo),1);
+ }
+ gtk_widget_show(user->MainBox);
+ }
+}
\ No newline at end of file
diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c
index 0d43cb0..16e4812 100644
--- a/source/ubinstall-gtk.c
+++ b/source/ubinstall-gtk.c
@@ -2,618 +2,95 @@
config main_config;
-//functions
-
-void on_layout_toggle_button_switch(GtkWidget *self, main_window *widgets){
- if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(self))){
- gtk_widget_set_sensitive(widgets->DefaultLayoutRadio,1);
- gtk_widget_set_sensitive(widgets->ManualLayoutRadio,1);
- if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->ManualLayoutRadio))){
- gtk_widget_set_sensitive(widgets->LayoutTree,1);
- gtk_widget_set_sensitive(widgets->AddButton,1);
- gtk_widget_set_sensitive(widgets->RemoveButton,1);
- } else {
- gtk_widget_set_sensitive(widgets->LayoutTree,0);
- gtk_widget_set_sensitive(widgets->AddButton,0);
- gtk_widget_set_sensitive(widgets->RemoveButton,0);
- }
- } else {
- gtk_widget_set_sensitive(widgets->DefaultLayoutRadio,0);
- gtk_widget_set_sensitive(widgets->ManualLayoutRadio,0);
- gtk_widget_set_sensitive(widgets->LayoutTree,0);
- gtk_widget_set_sensitive(widgets->AddButton,0);
- gtk_widget_set_sensitive(widgets->RemoveButton,0);
-
- }
-}
-
-void on_toggle_button_switch_on(GtkWidget *, GtkToggleButton *toggle){
- gtk_toggle_button_set_active(toggle,1);
-}
-
-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 yon_password_set_sensitive_from_toggle(GtkWidget *self, main_window *widgets);
-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);
-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))&>k_toggle_button_get_active(GTK_TOGGLE_BUTTON(toggle))){
- gtk_widget_set_sensitive(entry,1);
- } else {
- gtk_widget_set_sensitive(entry,0);
-
- }
-}
+int cur_slide=0;
-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);
- }
-}
+// //functions
-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);
-}
-
-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);
- yon_char_parsed_free(file_return,file_save);
- free(result);
-}
-
-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);
-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 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;
- }
+void on_pacman_software_all_toggled(GtkWidget *, char *path, main_window *widgets){
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);
- }
-}
-
-void on_config_local_load(GtkWidget *,main_window *widgets);
-void on_config_local_load(GtkWidget *,main_window *widgets){
- yon_load_proceed(YON_CONFIG_LOCAL);
- yon_interface_update(widgets);
- main_config.load_mode=1;
-}
+ char *name, *type, *description;
+ gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(widgets->PacmanSoftwareAllList),&iter,path);
+ gtk_tree_model_get(GTK_TREE_MODEL(widgets->PacmanSoftwareAllList),&iter,1,&name,2,&type,3,&description,-1);
+ gtk_list_store_remove(widgets->PacmanSoftwareAllList,&iter);
+ gtk_list_store_append(widgets->PacmanSoftwareChosenList,&iter);
+ gtk_list_store_set(widgets->PacmanSoftwareChosenList,&iter,0,1,1,name,2,type,3,description,-1);
+ g_hash_table_add(widgets->pacmanchosen,yon_char_new(name));
-void on_config_global_load(GtkWidget *,main_window *);
-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 *);
-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_pacman_software_chosen_toggled(GtkWidget *, char *path, main_window *widgets){
+ GtkTreeIter iter;
+ char *name, *type, *description;
+ gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(widgets->PacmanSoftwareChosenList),&iter,path);
+ gtk_tree_model_get(GTK_TREE_MODEL(widgets->PacmanSoftwareChosenList),&iter,1,&name,2,&type,3,&description,-1);
+ gtk_list_store_remove(widgets->PacmanSoftwareChosenList,&iter);
+ gtk_list_store_append(widgets->PacmanSoftwareAllList,&iter);
+ gtk_list_store_set(widgets->PacmanSoftwareAllList,&iter,0,0,1,name,2,type,3,description,-1);
+ g_hash_table_remove(widgets->pacmanchosen,name);
}
-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);
-}
+gboolean yon_pacman_fill(struct pacman_struct *pacman){
+ main_window *widgets = pacman->widgets;
+ config_str loaded = pacman->packages;
+ int size = pacman->packages_size;
-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);
+ for (int i=0;ipacmanchosen,loaded[i])) continue;
+ char *version = yon_packages_get_version(YON_PACKAGES_SYNC,loaded[i]);
+ char *description = yon_packages_get_description(YON_PACKAGES_SYNC,loaded[i]);
+ GtkTreeIter iter;
+ gtk_list_store_append(widgets->PacmanSoftwareAllList,&iter);
+ gtk_list_store_set(widgets->PacmanSoftwareAllList,&iter,0,0,1,loaded[i],2,version,3,description,-1);
+ if (!yon_char_is_empty(version))free(version);
+ if (!yon_char_is_empty(description)) free(description);
+ }
+ yon_char_parsed_free(loaded,size);
+ gtk_widget_set_sensitive(widgets->PacmanSoftwareSearchEntry,1);
+ gtk_widget_set_sensitive(widgets->PacmanSoftwareChosenPackagesTree,1);
+ gtk_widget_set_sensitive(widgets->PacmanSoftwareStatusButton,1);
+ g_object_ref(G_OBJECT(widgets->MainSpinner));
+ gtk_container_remove(GTK_CONTAINER(widgets->PacmanLoadingOverlay),widgets->MainSpinner);
+ return G_SOURCE_REMOVE;
+}
+
+void *yon_pacman_load(struct pacman_struct *pacman){
+ const char *find_package = pacman->find_package;
+ // char *command = get_local_module_info_command(find_package);
+ pacman->packages = yon_packages_find(YON_PACKAGES_SYNC,find_package,&pacman->packages_size);
+ g_idle_add((GSourceFunc)yon_pacman_fill,pacman);
+ return NULL;
+}
+
+void on_pacman_icon_press(GtkEntry *self,GtkEntryIconPosition icon_pos,GdkEvent* ,main_window *widgets){
+ if(icon_pos != GTK_ENTRY_ICON_SECONDARY) return;
-}
+ gtk_list_store_clear(widgets->PacmanSoftwareAllList);
-void on_config_custom_save(GtkWidget *, main_window *widgets);
-void on_config_custom_save(GtkWidget *, main_window *widgets){
- char *path = NULL;
- GtkWidget *dialog = gtk_file_chooser_dialog_new(TITLE_LABEL,NULL,GTK_FILE_CHOOSER_ACTION_SAVE,CANCEL_LABEL,GTK_RESPONSE_CANCEL,SAVE_LABEL,GTK_RESPONSE_ACCEPT,NULL);
- textdomain(TITLE_LABEL);
- GtkFileFilter *filter = gtk_file_filter_new();
- gtk_window_set_icon_name(GTK_WINDOW(dialog),yon_char_append("com.ublinux.",LocaleName));
- gtk_file_filter_add_pattern(filter,"*.ini");
- gtk_file_filter_set_name(filter, "*.ini");
- gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog),filter);
- int response = gtk_dialog_run(GTK_DIALOG(dialog));
- if (response == GTK_RESPONSE_ACCEPT){
- char *file = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
- if (!yon_char_is_empty(file)){
- if (!strstr(file,".ini")) file = yon_char_append(file,".ini");
- if (access(file,0)!=F_OK){
- char *command_creation = ubconfig_file_create(file);
- int a = system(yon_debug_output("%s\n",command_creation));
- if (access(file,0)!=F_OK||a){
- yon_ubl_status_box_render(CUSTOM_CONFIG_CREATION_ERROR_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
- return;
- }
- }
- }
- path = yon_char_unite("'",file,"'",NULL);
- free(file);
- gtk_widget_destroy(dialog);
- } else {
- gtk_widget_destroy(dialog);
- return;
- }
- yon_save_proceed(path,YON_CONFIG_CUSTOM);
- if (path) free(path);
- gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_COMPLETED);
+ const char *find_package = gtk_entry_get_text(self);
+ struct pacman_struct *pacman = new (struct pacman_struct);
+ pacman->widgets=widgets;
+ pacman->find_package=find_package;
+ gtk_widget_set_sensitive(widgets->PacmanSoftwareSearchEntry,0);
+ gtk_widget_set_sensitive(widgets->PacmanSoftwareChosenPackagesTree,0);
+ gtk_widget_set_sensitive(widgets->PacmanSoftwareStatusButton,0);
+ gtk_overlay_add_overlay(GTK_OVERLAY(widgets->PacmanLoadingOverlay),widgets->MainSpinner);
+ g_thread_new("pacman_modules_get_thread",(GThreadFunc)yon_pacman_load,pacman);
}
-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 on_toggle_button_switch_on(GtkWidget *, GtkToggleButton *toggle){
+ gtk_toggle_button_set_active(toggle,1);
}
-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);
+double yon_size_long_convert_to_mod(double size, char mod){
+ int sizemod = yon_get_size_get_from_letter(mod);
+ double final_size = size;
+ for (int i=-1;iLayoutsFilter));
- on_subwindow_close(self);
-}
-
-void on_layout_toggle(GtkCellRendererToggle*, gchar* path, ubinstall_keyboard_window *window);
-void on_layout_toggle(GtkCellRendererToggle*, gchar* path, ubinstall_keyboard_window *window){
- GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(window->LayoutsTree));
- GtkTreeIter iter;
- if (gtk_tree_model_get_iter_from_string(model,&iter,path)){
- int status=0;
- gtk_tree_model_get(model,&iter,3,&status,-1);
- gtk_tree_store_set(GTK_TREE_STORE(model),&iter,3,!status,-1);
- }
-}
-
-ubinstall_keyboard_window *yon_ubinstall_keyboard_new(){
- ubinstall_keyboard_window *window = malloc(sizeof(ubinstall_keyboard_window));
- GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_ubinstall_keyboard);
- window->MainWindow=yon_gtk_builder_get_widget(builder,"MainWindow");
- window->StatusBox=yon_gtk_builder_get_widget(builder,"StatusBox");
- window->headerBar=yon_gtk_builder_get_widget(builder,"headerBar");
- window->CancelButton=yon_gtk_builder_get_widget(builder,"CancelButton");
- window->SaveButton=yon_gtk_builder_get_widget(builder,"SaveButton");
- window->LayoutsTree=yon_gtk_builder_get_widget(builder,"LayoutsTree");
- window->ActiveToggle = GTK_CELL_RENDERER(gtk_builder_get_object(builder,"ActiveToggle"));
-
- g_signal_connect(G_OBJECT(window->CancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL);
-
-return window;
-}
-
-void on_keyboard_clicked (GtkWidget *, main_window *widgets);
-void on_keyboard_clicked (GtkWidget *, main_window *widgets){
- ubinstall_keyboard_window *window = yon_ubinstall_keyboard_new();
- yon_gtk_window_setup(GTK_WINDOW(window->MainWindow),GTK_WINDOW(widgets->MainWindow),KEYBOARD_TITLE_LABEL,icon_path,"keyboard-window");
- gtk_tree_view_set_model(GTK_TREE_VIEW(window->LayoutsTree),GTK_TREE_MODEL(widgets->LayoutList));
-
- g_signal_connect(G_OBJECT(window->ActiveToggle),"toggled",G_CALLBACK(on_layout_toggle),window);
- g_signal_connect(G_OBJECT(window->SaveButton),"clicked",G_CALLBACK(on_keyboard_accept),widgets);
- gtk_widget_show(window->MainWindow);
-}
-
-void on_keyboard_removed(GtkWidget *, main_window *widgets);
-void on_keyboard_removed(GtkWidget *, main_window *widgets){
- GtkTreeModel *model;
- GtkTreeIter iter, childiter;
- if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->LayoutTree)),&model,&iter)){
- gtk_tree_model_filter_convert_iter_to_child_iter(GTK_TREE_MODEL_FILTER(widgets->LayoutsFilter),&childiter,&iter);
- gtk_tree_store_set(widgets->LayoutList,&childiter,3,0,-1);
- }
-}
-
-void yon_language_selection_changed(GtkCellRenderer *, char *path, ubinstall_language_window *window);
-void yon_language_selection_changed(GtkCellRenderer *, char *path, ubinstall_language_window *window){
- GtkTreeIter iter;
- int state;
-
- if (gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(window->liststore1),&iter,path)){
- gtk_tree_model_get(GTK_TREE_MODEL(window->liststore1),&iter,0,&state,-1);
- gtk_list_store_set(window->liststore1,&iter,0,!state,-1);
- }
-}
-
-void on_language_window_accept(GtkWidget *,dictionary *dict);
-void on_language_window_accept(GtkWidget *,dictionary *dict){
- main_window *widgets= yon_dictionary_get_data(dict->first,main_window*);
- ubinstall_language_window *window = yon_dictionary_get_data(dict->first->next,ubinstall_language_window*);
- if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->DefaultCheck))){
- gtk_entry_set_text(GTK_ENTRY(widgets->AvailableLanguagesEntry),"");
- GtkTreeIter iter;
- int size;
- config_str lang_parsed = default_langs(&size);
-
- char *final = "";
- for_iter(widgets->LanguagesList,&iter){
- char *code, *labl;
- gtk_tree_model_get(GTK_TREE_MODEL(widgets->LanguagesList),&iter,1,&labl,2,&code,-1);
- if (yon_char_parsed_check_exist(lang_parsed,size,code)!=-1){
- gtk_list_store_set(widgets->LanguagesList,&iter,0,1,-1);
- char *tmp = yon_char_unite(final,!yon_char_is_empty(final)?";":"",labl,NULL);
- if (!yon_char_is_empty(final)) free(final);
- final = tmp;
- } else
- gtk_list_store_set(widgets->LanguagesList,&iter,0,0,-1);
- }
- if (!yon_char_is_empty(final)){
- gtk_entry_set_text(GTK_ENTRY(widgets->AvailableLanguagesEntry),final);
- }
- gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->LanguagesCombo),-1);
- gtk_tree_model_filter_refilter(GTK_TREE_MODEL_FILTER(widgets->LanguagesFilter));
- } else {
- yon_gtk_list_store_copy_full(widgets->LanguagesList,window->liststore1);
- gtk_tree_model_filter_refilter(GTK_TREE_MODEL_FILTER(widgets->LanguagesFilter));
- config_str parsed = NULL;
- int size;
- GtkTreeIter iter;
- for_iter(GTK_TREE_MODEL(window->liststore1),&iter){
- char *current;
- int status;
- gtk_tree_model_get(GTK_TREE_MODEL(window->liststore1),&iter,0,&status,1,¤t,-1);
- if (status)
- yon_char_parsed_add_or_create_if_exists(parsed,&size,current);
- }
- if (parsed){
- char *final = yon_char_parsed_to_string(parsed,size,"; ");
- gtk_entry_set_text(GTK_ENTRY(widgets->AvailableLanguagesEntry),!yon_char_is_empty(final)?final:"");
- if (yon_char_is_empty(final)) {
- gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->LanguagesCombo),-1);
- }
- if (final) free(final);
- yon_char_parsed_free(parsed,size);
- } else
- gtk_entry_set_text(GTK_ENTRY(widgets->AvailableLanguagesEntry),"");
-
- }
- on_subwindow_close(window->MainWindow);
- free(window);
-}
-
-ubinstall_language_window *yon_ubinstall_language_new(){
- ubinstall_language_window *window = malloc(sizeof(ubinstall_language_window));
- GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_ubinstall_language);
- window->liststore1=GTK_LIST_STORE(gtk_builder_get_object(builder,"liststore1"));
- window->MainWindow=yon_gtk_builder_get_widget(builder,"MainWindow");
- window->StatusBox=yon_gtk_builder_get_widget(builder,"StatusBox");
- window->DefaultCheck=yon_gtk_builder_get_widget(builder,"DefaultCheck");
- window->LanguagesTree=yon_gtk_builder_get_widget(builder,"LanguagesTree");
- window->headerBar=yon_gtk_builder_get_widget(builder,"headerBar");
- window->CancelButton=yon_gtk_builder_get_widget(builder,"CancelButton");
- window->SaveButton=yon_gtk_builder_get_widget(builder,"SaveButton");
- window->ToggleRenderer=GTK_CELL_RENDERER(gtk_builder_get_object(builder,"ToggleRenderer"));
-
- g_signal_connect(G_OBJECT(window->DefaultCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),window->LanguagesTree);
- g_signal_connect(G_OBJECT(window->ToggleRenderer),"toggled",G_CALLBACK(yon_language_selection_changed),window);
- g_signal_connect(G_OBJECT(window->CancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL);
-return window;
-}
-
-void on_language_clicked(GtkWidget *, main_window *widgets);
-void on_language_clicked(GtkWidget *, main_window *widgets){
- ubinstall_language_window *window = yon_ubinstall_language_new();
- g_object_ref(G_OBJECT(window->liststore1));
- gtk_tree_view_set_model(GTK_TREE_VIEW(window->LanguagesTree),NULL);
- yon_gtk_list_store_copy_full(window->liststore1,widgets->LanguagesList);
- gtk_tree_view_set_model(GTK_TREE_VIEW(window->LanguagesTree),GTK_TREE_MODEL(window->liststore1));
- yon_gtk_window_setup(GTK_WINDOW(window->MainWindow),GTK_WINDOW(widgets->MainWindow),TITLE_LABEL,icon_path,"language-chooser-window");
-
- if (yon_char_is_empty(gtk_entry_get_text(GTK_ENTRY(widgets->AvailableLanguagesEntry)))){
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->DefaultCheck),1);
- }
-
- int size;
- int found=0;
- int statusfound=0;
- config_str langs = default_langs(&size);
- GtkTreeIter iter;
- for_iter(widgets->LanguagesList,&iter){
- char *cur;
- int status;
- gtk_tree_model_get(GTK_TREE_MODEL(widgets->LanguagesList),&iter,0,&status,2,&cur,-1);
- if (status){
- statusfound++;
- if (yon_char_parsed_check_exist(langs,size,cur)>-1)
- found++;
- }
- }
- if ((found==size)&&statusfound==size){
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->DefaultCheck),1);
- }
-
- 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->SaveButton),"clicked",G_CALLBACK(on_language_window_accept),dict);
- gtk_widget_show(window->MainWindow);
-
-}
-
-/**config_init()
- * [EN]
- *
- * [RU]
- * Функция инициализации всех параметров конфигурации
-*/
+// // standard functions
+// /**config_init()
+// * [EN]
+// *
+// * [RU]
+// * Функция инициализации всех параметров конфигурации
+// */
void config_init(){
main_config.always_open_documentation=0;
main_config.socket_id=-1;
@@ -843,1434 +139,84 @@ void config_init(){
main_config.save_done=0;
main_config.save_configured=0;
main_config.configure_mode=0;
- main_config.load_mode=-1;
+ main_config.load_mode=YON_CONFIG_LOCAL;
main_config.log_progress_buzy=0;
main_config.log_end=0;
main_config.exit_accepted=0;
-}
-
-void on_root_get_root(char *argline);
-void on_root_get_root(char *argline){
- yon_launch(argline);
-}
-
-void on_configuration_mode_switch(GtkWidget *self,main_window *widgets);
-void on_configuration_mode_switch(GtkWidget *self,main_window *widgets){
- if (getuid()) {
- if (main_config.configure_mode==1){
- char *argline = LocaleName;
- for (int i=1;iMainWindow);
- }
- }
- }
- main_config.configure_mode = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(self));
-}
-
-int cur_slide=0;
-
-int yon_image_resize_from_container(GtkImage *target, GdkPixbuf *pixbuf_unscaled);
-int yon_image_resize_from_container(GtkImage *target, GdkPixbuf *pixbuf_unscaled){
- int width = gtk_widget_get_allocated_width((gtk_widget_get_parent(GTK_WIDGET(target))));
- int height = gtk_widget_get_allocated_height((gtk_widget_get_parent(GTK_WIDGET(target))));
-
- int newImgWidthDef = (width <= 217) ? width : width - 30;
- int newImgHeightDef = (height <= 120) ? height : height - 80;
-
- int originalWidth = gdk_pixbuf_get_width(pixbuf_unscaled);
- int originalHeight = gdk_pixbuf_get_height(pixbuf_unscaled);
- int newImgHeight = (int)(originalHeight / ((double) originalWidth / newImgWidthDef));
-
- if (newImgHeight > newImgHeightDef) {
- newImgHeight = newImgHeightDef;
- newImgWidthDef = (int)(originalWidth / ((double) originalHeight / newImgHeight));
- }
- int newImageWidth = (int)(originalWidth / ((double) originalHeight / newImgHeight));
-
- GdkPixbuf *scaledPixBuf = gdk_pixbuf_scale_simple(pixbuf_unscaled, newImageWidth, newImgHeight, GDK_INTERP_BILINEAR);
- gtk_image_set_from_pixbuf(target, scaledPixBuf);
-
- g_object_unref(scaledPixBuf);
-
- return 1;
-}
-
-void on_region_resized(GtkWidget *,main_window *widgets);
-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);
-}
-
-void yon_switch_page_render(main_window *widgets, int page);
-void yon_switch_page_render(main_window *widgets, int page){
- if (widgets&&page){};
- GtkContainer *parent = GTK_CONTAINER(gtk_widget_get_parent(widgets->UsersToggle));
- GList *list = gtk_container_get_children(parent);
- for (guint i=0;iSlidesImage),(GdkPixbuf*)g_list_nth_data(widgets->slides_original,cur_slide));
- // gtk_widget_queue_draw(widgets->SlidesImage);
- if (cur_slideInstallationLabel), 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;
- }
-}
-
-void on_page_changed(GtkWidget *,GtkWidget *,int page, main_window *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_OPTIONS:
- 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);
- }
- }
-}
-
-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);
-
- 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);
- 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;
-}
-
-void on_log_closed(GtkWidget *, dictionary *dict);
-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 *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);
-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);
-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);
-
-}
-
-void yon_install_options_save(GtkWidget *device_tree, GtkWidget *part_tree,char *mode,main_window *widgets);
-void yon_install_options_save(GtkWidget *device_tree, GtkWidget *part_tree,char *mode,main_window *widgets){
- GtkTreeIter iter,itar;
- GtkTreeModel *model,*model2;
- if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(device_tree)),&model,&iter)){
- yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_DEVICE_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
- yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(device_tree));
- return;
- }
- if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(part_tree)),&model2,&itar)){
- yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_DEVICE_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
- yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(part_tree));
- return;
- }
- char *cur_device, *cur_section;
- gtk_tree_model_get(model,&iter,0,&cur_device,-1);
- gtk_tree_model_get(model2,&itar,0,&cur_section,-1);
- yon_config_register(AUTOINSTALL_DEVICE,AUTOINSTALL_DEVICE_command,cur_device);
- yon_config_register(AUTOINSTALL_TYPE_INSTALL,AUTOINSTALL_TYPE_INSTALL_command,mode);
- yon_config_register(part_parameter,part_parameter_command,cur_section);
-
- if(cur_section) free(cur_section);
- if(cur_device) free(cur_device);
- if (!main_config.configure_mode)
- gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_INSTALLATION_BEGIN);
- else
- gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_REGION);
-}
-
-void on_page_navigation_clicked(GtkWidget *self, main_window *widgets);
-void on_page_navigation_clicked(GtkWidget *self, main_window *widgets){
- int mode = self==widgets->NextButton ? 1 : self == widgets->BackButton ? -1 : self==widgets->CancelInstallButton?-2:0;
- int page = gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->Notebook));
- switch (mode){
- case 1: { // Next
- 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);
- } break;
-
- case YON_PAGE_SECTIONS:{ //sections
- int active_id=-1;
- if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->InstallationRadio)))
- active_id=0;
- else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->InstallationNearRadio)))
- active_id=1;
- else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->InstallationLinuxRadio)))
- active_id=2;
- else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->InstallationWindowsRadio)))
- active_id=3;
- else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->InstallationRadio)))
- active_id=4;
- main_config.install_mode=active_id;
- switch (active_id){
- case 0:{ // normal installation
- gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_INSTALL_COMMON);
- } break;
- case 1:
- gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_INSTALL_SEPARATE);
- break;
- case 2:
- gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_INSTALL_SAME_PARTITION);
- break;
- case 3:
- gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_INSTALL_OPTIONS);
- }
- }break;
- case YON_PAGE_REGION:{ //region
- gtk_widget_set_sensitive(widgets->BackButton,1);
- 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);
- yon_ubl_status_highlight_incorrect(widgets->RegionCombo);
- return;
- } else if (gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->ZoneCombo))==-1){
- yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),ZONE_EMPTY_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
- yon_ubl_status_highlight_incorrect(widgets->ZoneCombo);
- return;
- }
- char *languages = "";
- GtkTreeIter iter;
- GtkTreeModel *model = GTK_TREE_MODEL(widgets->LanguagesFilter);
- char *lang_code=NULL;
- for_iter(model,&iter){
- gtk_tree_model_get(model,&iter,2,&lang_code,-1);
- languages = yon_char_unite(languages,!yon_char_is_empty(languages)?",":"",lang_code,NULL);
- }
- if (yon_char_is_empty(languages)||!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->MainLanguageSensitiveCheck))){
- yon_config_remove_by_key(locale_parameter);
- } else {
- yon_config_register(locale_parameter,locale_parameter_command,languages);
- free(languages);
- }
- if (gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->LanguagesCombo))==-1||!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->LanguagesSensitiveCheck))){
- yon_config_remove_by_key(lang_parameter);
- } else {
- char *language = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(widgets->LanguagesCombo));
- yon_config_register(lang_parameter,lang_parameter_command,language);
- }
- if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->RegionSensitiveCheck))){
- char *region = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(widgets->RegionCombo));
- char *zone = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(widgets->ZoneCombo));
- yon_debug_output("%s",region);
- yon_debug_output("/%s\n\n",zone);
- yon_config_register(zone_parameter,zone_parameter_command,yon_char_unite(region,"/",zone,NULL));
- } else {
- yon_config_remove_by_key(zone_parameter);
- }
- gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),page+1);
- }break;
-
- case YON_PAGE_KEYBOARD: { //keyboard
- gtk_widget_set_sensitive(widgets->BackButton,1);
- if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->ManualLayoutRadio))){
- GtkTreeIter iter;
- if (!gtk_tree_model_get_iter_first(GTK_TREE_MODEL(widgets->LayoutList),&iter)){
- yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),LAYOUTS_CHOSEN_BUT_EMPTY_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
- yon_ubl_status_highlight_incorrect(widgets->ManualLayoutRadio);
- yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->LayoutTree));
- }
- }
- char *layouts_list="";
- if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->ManualLayoutRadio))&>k_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->LayoutSensitiveCheck))){
- GtkTreeModel *layouts_model=GTK_TREE_MODEL(widgets->LayoutList);
- GtkTreeIter iter;
- char *cur_layout=NULL;
- for_iter(layouts_model,&iter){
- int chosen=0;
- gtk_tree_model_get(layouts_model,&iter,0,&cur_layout,3,&chosen,-1);
- if (chosen)
- layouts_list = yon_char_unite(layouts_list,yon_char_is_empty(layouts_list)?"":",",cur_layout,NULL);
- }
- } else {
- yon_config_remove_by_key(xkblayout_parameter);
- }
- if (gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->KeyboardModelCombo))&>k_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->KeyboardModelSensitiveCheck))){
- char *model = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(widgets->KeyboardModelCombo));
- // char *layout_switch;
- if (!yon_char_is_empty(model))
- yon_config_register(xkbmodel_parameter,xkbmodel_parameter_command,model);
- } else{
- yon_config_remove_by_key(xkbmodel_parameter);
- }
- if (yon_char_is_empty(layouts_list)&>k_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->LayoutSensitiveCheck)))
- yon_config_register(xkblayout_parameter,xkblayout_parameter_command,layouts_list);
- else
- yon_config_remove_by_key(xkblayout_parameter);
-
- gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),page+1);
- } break;
-
- default:{ // all other pages
- gtk_widget_set_sensitive(widgets->BackButton,1);
- gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),page+1);
- }break;
-
- case YON_PAGE_INSTALL_COMMON: {
- GtkTreeModel *model;
- GtkTreeIter iter;
- if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->CommonInstallationDevicesTree)),&model,&iter)){
- yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_DEVICE_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
- 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;
- yon_config_remove_by_key(part_size_parameter);
- yon_config_remove_by_key(part_parameter);
- gtk_tree_model_get(model,&iter,0,&device,-1);
- yon_config_register(AUTOINSTALL_TYPE_INSTALL,AUTOINSTALL_TYPE_INSTALL_command,"fast");
- yon_config_register(AUTOINSTALL_DEVICE,AUTOINSTALL_DEVICE_command,device);
- if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->CommonSectionSensitiveCheck))){
- yon_config_register(device_label_parameter,device_label_parameter_command,device_name);
- } else {
- yon_config_remove_by_key(device_label_parameter);
- }
- if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->CommonFilesystemSensitiveCheck))){
- yon_config_register(part_type_parameter,part_type_parameter_command,file_system_type);
- } else {
- yon_config_remove_by_key(part_type_parameter);
- }
-
- if (!main_config.configure_mode)
- gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_INSTALLATION_BEGIN);
- else
- gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_REGION);
- }break;
-
- case YON_PAGE_INSTALL_SEPARATE:
- {
- GtkTreeModel *model;
- GtkTreeIter iter;
- if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->InstallationNearSysDevicesTree)),&model,&iter)){
- yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_DEVICE_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
- yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->CommonInstallationDevicesTree));
- return;
- }
- char *device;
- gtk_tree_model_get(model,&iter,0,&device,-1);
- if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->InstallationNearSysSectionTree)),&model,&iter)){
- yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_DEVICE_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
- yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->CommonInstallationDevicesTree));
- return;
- }
- if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->NextSizeSensitiveCheck))){
- 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);
- } else yon_config_remove_by_key(part_size_parameter);
- if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->NextLabelSensitiveCheck))){
- char *device_name = (char*)gtk_entry_get_text(GTK_ENTRY(widgets->NextInstallationSectionNameEntry));
- yon_config_register(device_label_parameter,device_label_parameter_command,device_name);
- } else {
- yon_config_remove_by_key(device_label_parameter);
- }
- char *part;
- gtk_tree_model_get(model,&iter,0,&part,-1);
- yon_config_register(AUTOINSTALL_TYPE_INSTALL,AUTOINSTALL_TYPE_INSTALL_command,"next");
- yon_config_register(AUTOINSTALL_DEVICE,AUTOINSTALL_DEVICE_command,device);
- yon_config_register(part_parameter,part_parameter_command,part);
- if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->NextFSTypeSensitiveCheck))){
- if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->NextInstallationFormatCheck))){
- yon_config_register(device_format_parameter,device_format_parameter_command,"no");
- yon_config_remove_by_key(part_type_parameter);
- } else {
- char *file_system_type = (char*)gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(widgets->NextInstallationFilesystemTypeCombo));
- yon_config_register(part_type_parameter,part_type_parameter_command,file_system_type);
- yon_config_remove_by_key(device_format_parameter);
- }
- if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->NextInstallationFormatCheck)))
- yon_config_register(device_format_parameter,device_format_parameter_command,"no");
- } else {
- yon_config_remove_by_key(part_type_parameter);
- yon_config_remove_by_key(device_format_parameter);
- }
- if (!main_config.configure_mode)
- gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_INSTALLATION_BEGIN);
- else
- gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_REGION);
- }
- break;
-
- case YON_PAGE_INSTALL_SAME_PARTITION:
- {
- GtkTreeModel *model;
- GtkTreeIter iter;
- if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->SamePlaceDeviceTree)),&model,&iter)){
- yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_DEVICE_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
- yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->CommonInstallationDevicesTree));
- return;
- }
- char *device;
- gtk_tree_model_get(model,&iter,0,&device,-1);
- if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->SamePlacePartTree)),&model,&iter)){
- yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_DEVICE_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
- yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->CommonInstallationDevicesTree));
- return;
- }
- yon_config_remove_by_key(part_size_parameter);
- char *part;
- gtk_tree_model_get(model,&iter,0,&part,-1);
- yon_config_register(AUTOINSTALL_TYPE_INSTALL,AUTOINSTALL_TYPE_INSTALL_command,"part");
- yon_config_register(AUTOINSTALL_DEVICE,AUTOINSTALL_DEVICE_command,device);
- yon_config_register(part_parameter,part_parameter_command,part);
-
- if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->SameLabelSensitiveCheck))){
- char *device_name = (char*)gtk_entry_get_text(GTK_ENTRY(widgets->SameInstallationSectionNameEntry));
- yon_config_register(device_label_parameter,device_label_parameter_command,device_name);
- } else {
- yon_config_remove_by_key(device_label_parameter);
- }
-
- if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->SameFSTypeSensitiveCheck))){
- if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->SameInstallationFormatCheck))){
- yon_config_register(device_format_parameter,device_format_parameter_command,"no");
- yon_config_remove_by_key(part_type_parameter);
- } else {
- char *file_system_type = (char*)gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(widgets->SameInstallationFilesystemTypeCombo));
- yon_config_register(part_type_parameter,part_type_parameter_command,file_system_type);
- yon_config_remove_by_key(device_format_parameter);
- }
- } else {
- yon_config_remove_by_key(device_format_parameter);
- yon_config_remove_by_key(part_type_parameter);
-
- }
-
- if (!main_config.configure_mode)
- gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_INSTALLATION_BEGIN);
- else
- gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_REGION);
- }break;
-
- case YON_PAGE_USERS:{ //users
-
- if (yon_char_is_empty(gtk_entry_get_text(GTK_ENTRY(widgets->UserNameEntry)))||!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->UsernameSensitiveCheck))){
- yon_config_remove_by_key(user_gecos_parameter);
- } else {
- char *username = (char*)gtk_entry_get_text(GTK_ENTRY(widgets->UserNameEntry));
- if (username){};
- yon_config_register(user_gecos_parameter,user_gecos_parameter_command,username);
- }
-
- if (yon_char_is_empty(gtk_entry_get_text(GTK_ENTRY(widgets->LoginEntry)))||!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->LoginSensitiveCheck))){
- yon_config_remove_by_key(user_name_parameter);
- } else {
- if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->UserRootOnlyCheck))){
- yon_config_register(user_name_parameter,user_name_parameter_command,"root");
- } else {
- char *login = (char*)gtk_entry_get_text(GTK_ENTRY(widgets->LoginEntry));
- if (login){};
- yon_config_register(user_name_parameter,user_name_parameter_command,login);
- }
- }
-
- if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->PasswordSensitiveCheck))){
- if (gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->PasswordCombo))==1){
- if (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->PasswordEntry);
- return;
- } else {
- char *password = (char*)gtk_entry_get_text(GTK_ENTRY(widgets->PasswordEntry));
- if (password){};
-
- yon_config_register(user_password_parameter,user_password_parameter_command,password);
-
- }
- } else {
- yon_config_remove_by_key(user_password_parameter);
- }
- }else {
- yon_config_remove_by_key(user_password_parameter);
-
- }
-
- if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->RootPasswordSensitiveCheck))){
- if (gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->AdminPasswordCombo))==1){
- if (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->AdminPasswordEntry);
- return;
- } else {
- char *root_password = (char*)gtk_entry_get_text(GTK_ENTRY(widgets->AdminPasswordEntry));
- if (root_password){};
- yon_config_register(root_password_parameter,root_password_parameter_command,root_password);
-
- }
- } else {
- yon_config_remove_by_key(root_password_parameter);
- }
- } else {
- yon_config_remove_by_key(root_password_parameter);
- }
-
- if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->HostnameSensitiveCheck))){
- if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->AutoHostnameCheck))){
- yon_config_register(hostname_parameter,hostname_parameter_command,"auto");
- } else {
- if (!yon_char_is_empty(gtk_entry_get_text(GTK_ENTRY(widgets->HotnameEntry)))){
- char *hostname = (char*)gtk_entry_get_text(GTK_ENTRY(widgets->HotnameEntry));
- if (hostname){};
- yon_config_register(hostname_parameter,hostname_parameter_command,hostname);
-
- } else {
- yon_config_remove_by_key(hostname_parameter);
-
- }
- }
- } else {
- yon_config_remove_by_key(hostname_parameter);
- }
-
- if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->AutologinSensitiveCheck))){
- char *autologin = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->AutologinCheck))?"yes":"no";
- if (autologin){};
- yon_config_register(autologin_parameter,autologin_parameter_command,autologin);
- } else {
- yon_config_remove_by_key(autologin_parameter);
- }
-
- if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->LayoutSensitiveCheck))){
- GtkTreeIter iter;
- if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(widgets->LayoutsFilter),&iter)){
- char *locales="";
- for_iter (GTK_TREE_MODEL(widgets->LayoutsFilter),&iter){
- char *id;
- int status;
- gtk_tree_model_get(GTK_TREE_MODEL(widgets->LayoutsFilter),&iter,0,&id,3,&status,-1);
- if (status){
- char *temp = yon_char_unite(locales,!yon_char_is_empty(locales)?",":"",id,NULL);
- locales=temp;
- }
- }
- if (!yon_char_is_empty(locales)){
- printf("%s\n",locales);
- yon_config_register(xkblayout_parameter,xkblayout_parameter_command,locales);
- } else {
- yon_config_remove_by_key(xkblayout_parameter);
- }
- }
- } else {
- yon_config_remove_by_key(xkblayout_parameter);
- }
-
- if (gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->LayoutBindingCombo))&>k_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->OptionsSensitiveCheck))){
- char *options = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(widgets->LayoutBindingCombo));
- if (options){};
- yon_config_register(xkboptions_parameter,xkboptions_parameter_command,options);
- } else {
- yon_config_remove_by_key(xkboptions_parameter);
- }
-
- if (!main_config.configure_mode){
- g_mutex_lock(&main_config.install_mutex);
- if (main_config.install_complete){
- g_mutex_unlock(&main_config.install_mutex);
- yon_debug_output("%s\n","Entered saving before installation done");
- gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_INSTALLATION);
- gtk_label_set_text(GTK_LABEL(widgets->InstallationLabel),CONFIGURATION_LABEL);
- yon_debug_output("%s\n","installation ending configuration startup");
- pthread_t tid;
- pthread_create(&tid,NULL,on_setup_system_configuration,widgets);
-
- gtk_widget_set_sensitive(widgets->CancelInstallButton,0);
- gtk_widget_set_sensitive(widgets->NextButton,0);
- gtk_widget_set_sensitive(widgets->BackButton,0);
- main_config.save_done=1;
- }
- else if (!main_config.install_complete){
- g_mutex_unlock(&main_config.install_mutex);
- gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_INSTALLATION);
-
- gtk_widget_set_sensitive(widgets->CancelInstallButton,0);
- gtk_widget_set_sensitive(widgets->NextButton,0);
- gtk_widget_set_sensitive(widgets->BackButton,0);
- main_config.save_configured=1;
- }
- } else {
- gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_CONFIGURE_END);
- }
- }break;
-
- case YON_PAGE_INSTALLATION_BEGIN:{
- g_mutex_lock(&main_config.install_mutex);
- if (!main_config.install_thread){
- pthread_attr_t attr;
- pthread_attr_init(&attr);
- pthread_t tid;
-
- pthread_create(&tid,&attr,on_config_save,widgets);
- memcpy(&main_config.install_thread,&tid,sizeof(pthread_t));
- g_mutex_unlock(&main_config.install_mutex);
- }
- gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_INSTALLATION);
- } break;
-
- case YON_PAGE_INSTALL_ERROR:
- case YON_PAGE_COMPLETION:{
- confirmation_window *window = yon_confirmation_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->AcceptButton),"clicked",G_CALLBACK(on_reboot_accepted),dict);
- gtk_window_set_transient_for(GTK_WINDOW(window->Window),GTK_WINDOW(widgets->MainWindow));
- gtk_window_set_title(GTK_WINDOW(window->Window),TITLE_LABEL);
- gtk_window_set_icon_name(GTK_WINDOW(window->Window),icon_path);
- gtk_label_set_text(GTK_LABEL(window->TextLabel),WARNING_REBOOT_TEXT_LABEL);
- gtk_label_set_text(GTK_LABEL(window->TitleLabel),WARNING_TITLE_LABEL);
- gtk_widget_show(window->Window);
- }
- break;
-
- case YON_PAGE_INSTALL_OPTIONS: {
- int mode = -1;
- if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->GrubInstallRadio))){
- mode = 0;
- } else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->GrubUpdateRadio))){
- mode = 1;
- } else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->SeparateRadio))){
- mode = 2;
- } else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->OSRadio))){
- mode = 3;
- } else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->UserDataOnlyRadio))){
- mode = 4;
- }
- switch(mode){
- case 0: gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_OPTIONS_GRUB_INSTALL);
- break;
- case 1: gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_OPTIONS_GRUB_UPDATE);
- break;
- case 2: gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_OPTIONS_SEPARATE);
- break;
- case 3: gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_OPTIONS_OS_ONLY);
- break;
- case 4: gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_OPTIONS_USRDATA_ONLY);
- break;
- }
- } break;
-
- case YON_PAGE_OPTIONS_GRUB_INSTALL:{
- GtkTreeIter iter;
- GtkTreeModel *model;
- if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->GrubInstallDevicesTree)),&model,&iter)){
- yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_DEVICE_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
- yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->GrubInstallDevicesTree));
- return;
- }
- char *cur_device;
- gtk_tree_model_get(model,&iter,0,&cur_device,-1);
- if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->GrubInstallPartitionTree)),&model,&iter)){
- yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_DEVICE_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
- yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->GrubInstallPartitionTree));
- return;
- }
- char *partition;
- gtk_tree_model_get(model,&iter,0,&partition,-1);
- 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);
- if (!main_config.configure_mode)
- gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_INSTALLATION_BEGIN);
- else
- gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_CONFIGURE_END);
-
- } break;
-
- case YON_PAGE_OPTIONS_GRUB_UPDATE:{
- GtkTreeIter iter;
- GtkTreeModel *model;
- if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->GrubUpdateDevicesTree)),&model,&iter)){
- yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_DEVICE_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
- yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->GrubUpdateDevicesTree));
- return;
- }
- char *cur_device;
- gtk_tree_model_get(model,&iter,0,&cur_device,-1);
- if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->GrubUpdatePartitionTree)),&model,&iter)){
- yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_DEVICE_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
- yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->GrubUpdatePartitionTree));
- return;
- }
- char *partition;
- gtk_tree_model_get(model,&iter,0,&partition,-1);
- 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);
- if (!main_config.configure_mode)
- gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_INSTALLATION_BEGIN);
- else
- gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_CONFIGURE_END);
- }break;
-
- case YON_PAGE_OPTIONS_SEPARATE:{
- GtkTreeModel *model;
- GtkTreeIter iter;
- if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->SeparateDevicesTree)),&model,&iter)){
- yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_DEVICE_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
- yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->SeparateDevicesTree));
- return;
- }
- if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->SeparateSysSectionTree)),&model,&iter)){
- yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_DEVICE_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
- yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->SeparateSysSectionTree));
- return;
- }
- gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_OPTIONS_SEPARATE_USRDATA);
- }break;
-
- case YON_PAGE_OPTIONS_SEPARATE_USRDATA:{
- GtkTreeIter iter,itar;
- GtkTreeModel *model,*model2;
- if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->OSSysSectionTree)),&model,&iter)){
- yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_DEVICE_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
- yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->OSSysSectionTree));
- gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_OPTIONS_OS_ONLY);
- return;
- }
- if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->SeparateUserDevicesTree)),&model2,&itar)){
- yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_DEVICE_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
- yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->SeparateUserDevicesTree));
- return;
- }
- if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->SeparateUserSysSectionTree)),&model2,&itar)){
- yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_DEVICE_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
- yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->SeparateUserSysSectionTree));
- return;
- }
- char *cur_device, *system_section, *user_section;
- gtk_tree_model_get(model,&iter,0,&cur_device,-1);
- gtk_tree_model_get(model2,&itar,0,&system_section,-1);
-
- gtk_tree_model_get(model2,&itar,0,&user_section,-1);
- yon_config_register(AUTOINSTALL_DEVICE,AUTOINSTALL_DEVICE_command,cur_device);
- char *installation_parts = yon_char_unite(system_section,",",user_section,NULL);
- yon_config_register(part_parameter,part_parameter_command,installation_parts);
- free(installation_parts);
- yon_config_register(AUTOINSTALL_TYPE_INSTALL,AUTOINSTALL_TYPE_INSTALL_command,"custom");
- if (!main_config.configure_mode)
- gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_INSTALLATION_BEGIN);
- else
- gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_REGION);
-
- } break;
-
- case YON_PAGE_OPTIONS_OS_ONLY:{
- yon_install_options_save(widgets->OSDevicesTree,widgets->OSSysSectionTree,"system_only",widgets);
- gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_CONFIGURE_END);
- } break;
-
- case YON_PAGE_OPTIONS_USRDATA_ONLY:{
- yon_install_options_save(widgets->UserdataDevicesTree,widgets->UserdataSysSectionTree,"data_only",widgets);
- } break;
- }
- } break;
- case -1: { // Previous
- switch (page){
- case YON_PAGE_REGION: {
- if (!main_config.configure_mode){
- gtk_widget_set_sensitive(widgets->BackButton,0);
- gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),page-1);
- } else {
- gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_SECTIONS);
- }
- }break;
-
- case YON_PAGE_INSTALL_COMMON:
- case YON_PAGE_INSTALL_SEPARATE:
- case YON_PAGE_INSTALL_SAME_PARTITION:
- case YON_PAGE_INSTALL_OPTIONS:
- {
- gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_SECTIONS);
- } break;
-
- case YON_PAGE_OPTIONS_GRUB_INSTALL:
- case YON_PAGE_OPTIONS_GRUB_UPDATE:
- case YON_PAGE_OPTIONS_SEPARATE:
- case YON_PAGE_OPTIONS_OS_ONLY:
- case YON_PAGE_OPTIONS_USRDATA_ONLY:
- gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_INSTALL_OPTIONS);
- break;
-
- case YON_PAGE_INSTALLATION_BEGIN:
- gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_SECTIONS);
- break;
-
- case YON_PAGE_CONFIGURE_END:{
- if (main_config.install_mode==3&&(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->GrubInstallRadio))||gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->GrubUpdateRadio))||gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->OSRadio)))){
- gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_INSTALL_OPTIONS);
- gtk_widget_set_sensitive(widgets->BackButton,1);
- gtk_widget_set_sensitive(widgets->NextButton,1);
- gtk_widget_set_sensitive(widgets->CancelInstallButton,1);
-
- } else { //||||gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->UserDataOnlyRadio))
- 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);
- }
- }
-
- } break;
- case -2: { // Cancel/repeat
- switch (page){
- case YON_PAGE_COMPLETION:
- case YON_PAGE_INSTALL_ERROR:{
- gtk_main_quit();
- }break;
- default:{
- gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),0);
- }
- }
- }break;
- }
-}
-
-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));
- if (yon_file_is_directory(active)){
- config_str parsed = yon_file_ls(active,&size);
- for (int i=0;iZoneCombo),parsed[i],_(parsed[i]));
- }
- if (size) yon_char_parsed_free(parsed,size);
- gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->ZoneCombo),0);
- }
- free(active);
-}
-
-void on_locale_changed(GtkWidget *,main_window *);
-void on_locale_changed(GtkWidget *,main_window *){
-
-}
-
-void on_additional_software_toggled();
-void on_additional_software_toggled(){
-
-}
-
-void yon_set_max_size_from_partition(GtkTreeView *table, GtkSpinButton *spin_size, GtkComboBox *size_type);
-void yon_set_max_size_from_partition(GtkTreeView *table, GtkSpinButton *spin_size, GtkComboBox *size_type){
- GtkTreeModel *model;
+ main_config.config_load_path = NULL;
+ main_config.config_save_path = NULL;
+ yon_packages_init();
+ main_config.network_types = g_hash_table_new(g_str_hash,g_str_equal);
+}
+
+// void on_root_get_root(char *argline){
+// yon_launch(argline);
+// }
+
+// int yon_image_resize_from_container(GtkImage *target, GdkPixbuf *pixbuf_unscaled){
+// int width = gtk_widget_get_allocated_width((gtk_widget_get_parent(GTK_WIDGET(target))));
+// int height = gtk_widget_get_allocated_height((gtk_widget_get_parent(GTK_WIDGET(target))));
+//
+// int newImgWidthDef = (width <= 217) ? width : width - 30;
+// int newImgHeightDef = (height <= 120) ? height : height - 80;
+//
+// int originalWidth = gdk_pixbuf_get_width(pixbuf_unscaled);
+// int originalHeight = gdk_pixbuf_get_height(pixbuf_unscaled);
+// int newImgHeight = (int)(originalHeight / ((double) originalWidth / newImgWidthDef));
+//
+// if (newImgHeight > newImgHeightDef) {
+// newImgHeight = newImgHeightDef;
+// newImgWidthDef = (int)(originalWidth / ((double) originalHeight / newImgHeight));
+// }
+// int newImageWidth = (int)(originalWidth / ((double) originalHeight / newImgHeight));
+//
+// GdkPixbuf *scaledPixBuf = gdk_pixbuf_scale_simple(pixbuf_unscaled, newImageWidth, newImgHeight, GDK_INTERP_BILINEAR);
+// gtk_image_set_from_pixbuf(target, scaledPixBuf);
+//
+// g_object_unref(scaledPixBuf);
+//
+// return 1;
+// }
+
+// gboolean on_image_slide(void *data){
+// main_window *widgets = (main_window*)data;
+// int size;
+// config_str target = yon_char_parsed_new(&size,slide_repeat_path);
+// if (size)
+// yon_char_parsed_free(target,size);
+// gtk_image_set_from_pixbuf(GTK_IMAGE(widgets->SlidesImage),(GdkPixbuf*)g_list_nth_data(widgets->slides_original,cur_slide));
+// // gtk_widget_queue_draw(widgets->SlidesImage);
+// if (cur_slide0){
- for (int i=0;iAdditionalSoftwareList),&iter,path);
+ gtk_tree_model_get(GTK_TREE_MODEL(widgets->AdditionalSoftwareList),&iter,0,&status,-1);
+ gtk_list_store_set(widgets->AdditionalSoftwareList,&iter,0,!status,-1);
}
-void on_partition_changed(GtkWidget *self, main_window *widgets);
-void on_partition_changed(GtkWidget *self, main_window *widgets){
- if (self==widgets->InstallationNearSysSectionTree)
- 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);
-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 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, *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;i1024;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_near_installation_device_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 parsed;
- parsed = yon_config_load((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, *fstype, *fsused, *label;
-
- 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, "label", &label);
- 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;i1024;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_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);
- 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),4,json_object_get_string(label),-1);
- }
- yon_char_parsed_free(parsed,size);
- }
-}
-
-void on_same_installation_device_changed(GtkWidget *, main_window *widgets);
-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);
- }
-}
-
-void on_gparted_open();
void on_gparted_open(){
yon_launch_app_with_arguments(open_gparted_command,NULL);
}
-gboolean on_yon_exit(GtkWidget *,GdkEvent*, main_window *widgets);
-void on_reboot_accepted(GtkWidget *,dictionary *dict){
- main_window *widgets = yon_dictionary_get_data(dict->first,main_window*);
- confirmation_window *window = yon_dictionary_get_data(dict->first->next,confirmation_window*);
+void on_reboot_accepted(main_window *widgets){
g_mutex_lock(&main_config.install_mutex);
if (main_config.install_thread){
pthread_cancel((pthread_t)main_config.install_thread);
@@ -2278,61 +224,38 @@ void on_reboot_accepted(GtkWidget *,dictionary *dict){
}
main_config.exit_accepted=1;
g_signal_emit_by_name(G_OBJECT(widgets->MainWindow),"delete-event");
- free(window);
- yon_dictionary_free_all(dict,NULL);
- free(dict);
+ while(gtk_events_pending()) gtk_main_iteration();
if (system("reboot")){};
}
-void on_exit_accepted(GtkWidget *,dictionary *dict);
-void on_exit_accepted(GtkWidget *,dictionary *dict){
- main_window *widgets = yon_dictionary_get_data(dict->first,main_window*);
- confirmation_window *window = yon_dictionary_get_data(dict->first->next,confirmation_window*);
+void on_exit_accepted(main_window *widgets){
g_mutex_lock(&main_config.install_mutex);
if (main_config.install_thread){
pthread_cancel((pthread_t)main_config.install_thread);
g_mutex_unlock(&main_config.install_mutex);
}
main_config.exit_accepted=1;
- g_signal_emit_by_name(G_OBJECT(widgets->MainWindow),"delete-event");
- free(window);
- yon_dictionary_free_all(dict,NULL);
- free(dict);
+ // g_signal_emit_by_name(G_OBJECT(widgets->MainWindow),"delete-event");
+ while(gtk_events_pending()) gtk_main_iteration();
gtk_widget_destroy(widgets->MainWindow);
}
-confirmation_window *yon_confirmation_window_new(){
- confirmation_window *window = malloc(sizeof(confirmation_window));
- GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_confirmation);
- window->Window = yon_gtk_builder_get_widget(builder,"MainWindow");
- window->TitleLabel = yon_gtk_builder_get_widget(builder,"TitleLabel");
- window->TextLabel = yon_gtk_builder_get_widget(builder,"TextLabel");
- window->AcceptButton = yon_gtk_builder_get_widget(builder,"AcceptButton");
- window->CancelButton = yon_gtk_builder_get_widget(builder,"CancelButton");
- g_signal_connect(G_OBJECT(window->CancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL);
- return window;
-}
-
gboolean on_yon_exit(GtkWidget *,GdkEvent*, main_window *widgets){
if (!main_config.exit_accepted||(main_config.save_done&&main_config.install_complete)){
if (widgets){};
- confirmation_window *window = yon_confirmation_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->AcceptButton),"clicked",G_CALLBACK(on_exit_accepted),dict);
- gtk_window_set_transient_for(GTK_WINDOW(window->Window),GTK_WINDOW(widgets->MainWindow));
- gtk_window_set_title(GTK_WINDOW(window->Window),TITLE_LABEL);
- gtk_window_set_icon_name(GTK_WINDOW(window->Window),icon_path);
- gtk_label_set_text(GTK_LABEL(window->TextLabel),WARNING_TEXT_LABEL);
- gtk_label_set_text(GTK_LABEL(window->TitleLabel),WARNING_TITLE_LABEL);
- gtk_widget_show(window->Window);
+ dialog_confirmation_data *data = yon_confirmation_dialog_data_new();
+ data->action_text=WARNING_TEXT_LABEL;
+ data->title=WARNING_TITLE_LABEL;
+ if (yon_confirmation_dialog_call(widgets->MainWindow,data)==GTK_RESPONSE_ACCEPT ){
+ on_exit_accepted(widgets);
+ gtk_main_quit();
+ return 1;
+ }
- return 1;
}
- return 0;
+ return 1;
}
/**yon_main_window_complete(main_window *widgets)
@@ -2349,168 +272,266 @@ main_window *yon_main_window_complete(){
gtk_builder_add_callback_symbol(builder,"on_toggle_button_switch_on",G_CALLBACK(on_toggle_button_switch_on));
// Custom widgets configuration
widgets->builder = builder;
+ gtk_builder_set_translation_domain(builder,template_ui_LocaleName);
+ {
widgets->DevicesList=GTK_LIST_STORE(gtk_builder_get_object(builder,"DevicesList"));
widgets->LanguagesList=GTK_LIST_STORE(gtk_builder_get_object(builder,"LanguagesList"));
+
+ widgets->PartitionsList = GTK_LIST_STORE(gtk_builder_get_object(builder,"PartitionsList"));
+
+ main_config.kernel_unchosen_radio = yon_gtk_builder_get_widget(builder,"KernelUnchosenRadio");
+
widgets->MainWindow=yon_gtk_builder_get_widget(builder,"MainWindow");
+ widgets->StatusBox = yon_gtk_builder_get_widget(builder,"StatusBox");
+ widgets->Notebook = yon_gtk_builder_get_widget(builder,"Notebook");
+ widgets->MainSpinner=yon_gtk_builder_get_widget(builder,"MainSpinner");
+
+ widgets->DocumentationMenuItem = yon_ubl_menu_item_documentation_new(DOCUMENTATION_LABEL);
+ widgets->AboutMenuItem = yon_ubl_menu_item_about_new(ABOUT_LABEL);
+
+ 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->SlidesImage = yon_gtk_builder_get_widget(builder,"SlidesImage");
+
+ widgets->LicenceLabel = yon_gtk_builder_get_widget(builder,"LicenceLabel");
+
+ widgets->menu1=yon_gtk_builder_get_widget(builder,"menu1");
+ widgets->menu2=yon_gtk_builder_get_widget(builder,"menu2");
+ widgets->ConfigurationModeMenuItem = yon_gtk_builder_get_widget(builder,"ConfigurationModeMenuItem");
+
+ widgets->CancelInstallButton=yon_gtk_builder_get_widget(builder,"CancelInstallButton");
+ widgets->BackButton=yon_gtk_builder_get_widget(builder,"BackButton");
+ widgets->NextButton=yon_gtk_builder_get_widget(builder,"NextButton");
+
widgets->WelcomeToggle=yon_gtk_builder_get_widget(builder,"WelcomeToggle");
widgets->LicenceToggle=yon_gtk_builder_get_widget(builder,"LicenceToggle");
widgets->LocationToggle=yon_gtk_builder_get_widget(builder,"LocationToggle");
widgets->KeyboardToggle=yon_gtk_builder_get_widget(builder,"KeyboardToggle");
widgets->SectionsToggle=yon_gtk_builder_get_widget(builder,"SectionsToggle");
- widgets->UsersToggle=yon_gtk_builder_get_widget(builder,"USersToggle");
+ widgets->UsersToggle=yon_gtk_builder_get_widget(builder,"UsersToggle");
widgets->SummaryToggle=yon_gtk_builder_get_widget(builder,"SummaryToggle");
widgets->CompletionToggle=yon_gtk_builder_get_widget(builder,"CompletionToggle");
widgets->InstallationToggle=yon_gtk_builder_get_widget(builder,"InstallationToggle");
- widgets->LanguageCombo=yon_gtk_builder_get_widget(builder,"LanguageCombo");
- widgets->RegionCombo=yon_gtk_builder_get_widget(builder,"RegionCombo");
- widgets->ZoneCombo=yon_gtk_builder_get_widget(builder,"ZoneCombo");
- widgets->AvailableLanguagesEntry=yon_gtk_builder_get_widget(builder,"AvailableLanguagesEntry");
- widgets->AvailableLanguagesButton=yon_gtk_builder_get_widget(builder,"AvailableLanguagesButton");
- widgets->LanguagesCombo=yon_gtk_builder_get_widget(builder,"LanguagesCombo");
- widgets->KeyboardModelCombo=yon_gtk_builder_get_widget(builder,"KeyboardModelCombo");
- widgets->LayoutBindingCombo=yon_gtk_builder_get_widget(builder,"LayoutBindingCombo");
- widgets->DefaultLayoutRadio=yon_gtk_builder_get_widget(builder,"DefaultLayoutRadio");
- widgets->ManualLayoutRadio=yon_gtk_builder_get_widget(builder,"ManualLayoutRadio");
- widgets->LayoutTree=yon_gtk_builder_get_widget(builder,"LayoutTree");
- widgets->AddButton=yon_gtk_builder_get_widget(builder,"AddButton");
- widgets->RemoveButton=yon_gtk_builder_get_widget(builder,"RemoveButton");
+
+ widgets->StartScenarioButton=yon_gtk_builder_get_widget(builder,"StartScenarioButton");
+
+ widgets->SourceButton=yon_gtk_builder_get_widget(builder,"SourceButton");
+ widgets->SkipInstallationButton=yon_gtk_builder_get_widget(builder,"SkipInstallationButton");
+
widgets->InstallationRadio=yon_gtk_builder_get_widget(builder,"InstallationRadio");
widgets->InstallationNearRadio=yon_gtk_builder_get_widget(builder,"InstallationNearRadio");
widgets->InstallationLinuxRadio=yon_gtk_builder_get_widget(builder,"InstallationLinuxRadio");
widgets->InstallationWindowsRadio=yon_gtk_builder_get_widget(builder,"InstallationWindowsRadio");
widgets->InstallationOptionsRadio=yon_gtk_builder_get_widget(builder,"InstallationOptionsRadio");
- widgets->UserNameEntry=yon_gtk_builder_get_widget(builder,"UserNameEntry");
- widgets->LoginEntry=yon_gtk_builder_get_widget(builder,"LoginEntry");
- widgets->PasswordCombo=yon_gtk_builder_get_widget(builder,"PasswordCombo");
- widgets->PasswordEntry=yon_gtk_builder_get_widget(builder,"PasswordEntry");
- widgets->PasswordButton=yon_gtk_builder_get_widget(builder,"PasswordButton");
- widgets->AutologinCheck=yon_gtk_builder_get_widget(builder,"AutologinCheck");
- widgets->AdminPasswordCombo=yon_gtk_builder_get_widget(builder,"AdminPasswordCombo");
- widgets->AdminPasswordEntry=yon_gtk_builder_get_widget(builder,"AdminPasswordEntry");
- widgets->AdminPasswordButton=yon_gtk_builder_get_widget(builder,"AdminPasswordButton");
- widgets->HotnameEntry=yon_gtk_builder_get_widget(builder,"HotnameEntry");
- widgets->AutoHostnameCheck=yon_gtk_builder_get_widget(builder,"AutoHostnameCheck");
- widgets->CancelInstallButton=yon_gtk_builder_get_widget(builder,"CancelInstallButton");
- widgets->BackButton=yon_gtk_builder_get_widget(builder,"BackButton");
- widgets->NextButton=yon_gtk_builder_get_widget(builder,"NextButton");
- widgets->mainSettingsButton=yon_gtk_builder_get_widget(builder,"mainSettingsButton");
- widgets->menu1=yon_gtk_builder_get_widget(builder,"menu1");
- widgets->menu2=yon_gtk_builder_get_widget(builder,"menu2");
- widgets->RegionImage = yon_gtk_builder_get_widget(builder,"RegionImage");
- widgets->RegionBox = yon_gtk_builder_get_widget(builder,"RegionBox");
- widgets->RegionAspect = yon_gtk_builder_get_widget(builder,"RegionAspect");
- widgets->KeyboardImage = yon_gtk_builder_get_widget(builder,"KeyboardImage");
- widgets->KeyboardBox = yon_gtk_builder_get_widget(builder,"KeyboardBox");
- widgets->Notebook = yon_gtk_builder_get_widget(builder,"Notebook");
- widgets->LicenceLabel = yon_gtk_builder_get_widget(builder,"LicenceLabel");
- widgets->SlidesImage = yon_gtk_builder_get_widget(builder,"SlidesImage");
+ widgets->GrubInstallRadio = yon_gtk_builder_get_widget(builder,"GrubInstallRadio");
+ widgets->GrubUpdateRadio = yon_gtk_builder_get_widget(builder,"GrubUpdateRadio");
+ widgets->SeparateRadio = yon_gtk_builder_get_widget(builder,"SeparateRadio");
+ widgets->OSRadio = yon_gtk_builder_get_widget(builder,"OSRadio");
+ widgets->UserDataOnlyRadio = yon_gtk_builder_get_widget(builder,"UserDataOnlyRadio");
+
widgets->CommonInstallationDevicesTree = yon_gtk_builder_get_widget(builder,"CommonInstallationDevicesTree");
- widgets->AdditionalSoftwareTree = yon_gtk_builder_get_widget(builder,"AdditionalSoftwareTree");
+ widgets->CommonInstallationFilesystemTypeCombo = yon_gtk_builder_get_widget(builder,"CommonInstallationFilesystemTypeCombo");
+ widgets->CommonInstallationSectionNameEntry = yon_gtk_builder_get_widget(builder,"CommonInstallationSectionNameEntry");
+ widgets->CommonFormatSwitch = yon_gtk_builder_get_widget(builder,"CommonFormatSwitch");
+ widgets->GpartedCommonButton = yon_gtk_builder_get_widget(builder,"GpartedCommonButton");
widgets->SamePlaceDeviceTree = yon_gtk_builder_get_widget(builder,"SamePlaceDeviceTree");
widgets->SamePlacePartTree = yon_gtk_builder_get_widget(builder,"SamePlacePartTree");
-
- widgets->InstallationNearSysDevicesTree = yon_gtk_builder_get_widget(builder,"InstallationNearSysDevicesTree");
- widgets->InstallationNearSysSectionTree = yon_gtk_builder_get_widget(builder,"InstallationNearSysSectionTree");
- widgets->InstallationNearSizeSpin = yon_gtk_builder_get_widget(builder,"InstallationNearSizeSpin");
- widgets->InstallationNearSizeTypeSpin = yon_gtk_builder_get_widget(builder,"InstallationNearSizeTypeSpin");
-
- widgets->InstallationProgress = yon_gtk_builder_get_widget(builder,"InstallationProgress");
- widgets->InstallationLabel = yon_gtk_builder_get_widget(builder,"InstallationLabel");
- widgets->ReadShortLogButton = yon_gtk_builder_get_widget(builder,"ReadShortLogButton");
- widgets->PackageInstallationProgress = yon_gtk_builder_get_widget(builder,"PackageInstallationProgress");
- widgets->PackageInstallationLabel = yon_gtk_builder_get_widget(builder,"PackageInstallationLabel");
- widgets->ReadFullLogButton = yon_gtk_builder_get_widget(builder,"ReadFullLogButton");
-
+ widgets->SameInstallationFormatSwitch = yon_gtk_builder_get_widget(builder,"SameInstallationFormatSwitch");
+ widgets->SameInstallationFormatRevealer = yon_gtk_builder_get_widget(builder,"SameInstallationFormatRevealer");
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->GpartedCommonButton = yon_gtk_builder_get_widget(builder,"GpartedCommonButton");
- widgets->GpartedNearButton = yon_gtk_builder_get_widget(builder,"GpartedNearButton");
widgets->GpartedSameButton = yon_gtk_builder_get_widget(builder,"GpartedSameButton");
- widgets->ConfigurationModeMenuItem = yon_gtk_builder_get_widget(builder,"ConfigurationModeMenuItem");
- widgets->DocumentationMenuItem = yon_ubl_menu_item_documentation_new(DOCUMENTATION_LABEL);
- widgets->AboutMenuItem = yon_ubl_menu_item_about_new(ABOUT_LABEL);
-
- widgets->StatusBox = yon_gtk_builder_get_widget(builder,"StatusBox");
- widgets->AdditionalSoftwareCell = GTK_CELL_RENDERER(gtk_builder_get_object(builder,"AdditionalSoftwareCell"));
-
- widgets->GrubInstallRadio = yon_gtk_builder_get_widget(builder,"GrubInstallRadio");
- widgets->GrubUpdateRadio = yon_gtk_builder_get_widget(builder,"GrubUpdateRadio");
- widgets->SeparateRadio = yon_gtk_builder_get_widget(builder,"SeparateRadio");
- widgets->OSRadio = yon_gtk_builder_get_widget(builder,"OSRadio");
- widgets->UserDataOnlyRadio = yon_gtk_builder_get_widget(builder,"UserDataOnlyRadio");
+ widgets->NextInstallationFilesystemTypeCombo = yon_gtk_builder_get_widget(builder,"NextInstallationFilesystemTypeCombo");
+ widgets->NextInstallationFormatSwitch = yon_gtk_builder_get_widget(builder,"NextInstallationFormatSwitch");
+ widgets->NextInstallationFormatRevealer = yon_gtk_builder_get_widget(builder,"NextInstallationFormatRevealer");
+ widgets->NextInstallationSectionNameEntry = yon_gtk_builder_get_widget(builder,"NextInstallationSectionNameEntry");
+ widgets->NextInstallationSizeSpin = yon_gtk_builder_get_widget(builder,"NextInstallationFormatSizeSpin");
+ widgets->NextInstallationSizeTypeSpin = yon_gtk_builder_get_widget(builder,"NextInstallationFormatSizeCombo");
+ widgets->NextInstallationSysDevicesTree = yon_gtk_builder_get_widget(builder,"NextInstallationSysDevicesTree");
+ widgets->NextInstallationSysSectionTree = yon_gtk_builder_get_widget(builder,"NextInstallationSysSectionTree");
+ widgets->GpartedNextInstallationButton = yon_gtk_builder_get_widget(builder,"GpartedNextInstallationButton");
+
+ widgets->AdvancedDeviceChosenCell = GTK_CELL_RENDERER(gtk_builder_get_object(builder,"AdvancedDeviceChosenCell"));
+ widgets->AdvancedPartChosenCell = GTK_CELL_RENDERER(gtk_builder_get_object(builder,"AdvancedPartChosenCell"));
+ widgets->AdvancedDeviceTree = yon_gtk_builder_get_widget(builder,"AdvancedDeviceTree");
+ widgets->AdvancedVirtualDeviceCombo = yon_gtk_builder_get_widget(builder,"AdvancedVirtualDeviceCombo");
+ widgets->AdvancedPartitionTree = yon_gtk_builder_get_widget(builder,"AdvancedPartitionTree");
+ widgets->AdvancedPartitionAddBox = yon_gtk_builder_get_widget(builder,"AdvancedPartitionAddBox");
+ widgets->AdvancedAddButton = yon_gtk_builder_get_widget(builder,"AdvancedAddButton");
+ widgets->AdvancedLoadTypeSwitch = yon_gtk_builder_get_widget(builder,"AdvancedLoadTypeSwitch");
+ widgets->AdvancedBiosSectorSwitch = yon_gtk_builder_get_widget(builder,"AdvancedBiosSectorSwitch");
+ widgets->AdvancedEFISwitch = yon_gtk_builder_get_widget(builder,"AdvancedEFISwitch");
+ widgets->AdvancedSwapSwitch = yon_gtk_builder_get_widget(builder,"AdvancedSwapSwitch");
+ widgets->AdvancedSwapAutoSwitch = yon_gtk_builder_get_widget(builder,"AdvancedSwapAutoSwitch");
+ widgets->AdvancedSwapRamSwitch = yon_gtk_builder_get_widget(builder,"AdvancedSwapRamSwitch");
+ widgets->AdvancedSwapFixedSwitch = yon_gtk_builder_get_widget(builder,"AdvancedSwapFixedSwitch");
+ widgets->AdvancedSwapFixedSpin = yon_gtk_builder_get_widget(builder,"AdvancedSwapFixedSpin");
+ widgets->advanced_partition_order = g_sequence_new(NULL);
- widgets->GpartedGrubInstallButton = yon_gtk_builder_get_widget(builder,"GpartedGrubInstallButton");
widgets->GrubInstallDevicesTree = yon_gtk_builder_get_widget(builder,"GrubInstallDevicesTree");
widgets->GrubInstallPartitionTree = yon_gtk_builder_get_widget(builder,"GrubInstallPartitionTree");
+ widgets->GpartedGrubInstallButton = yon_gtk_builder_get_widget(builder,"GpartedGrubInstallButton");
- widgets->GpartedGrubUpdateButton = yon_gtk_builder_get_widget(builder,"GpartedGrubUpdateButton");
widgets->GrubUpdateDevicesTree = yon_gtk_builder_get_widget(builder,"GrubUpdateDevicesTree");
widgets->GrubUpdatePartitionTree = yon_gtk_builder_get_widget(builder,"GrubUpdatePartitionTree");
+ widgets->GpartedGrubUpdateButton = yon_gtk_builder_get_widget(builder,"GpartedGrubUpdateButton");
- widgets->GpartedSeparateButton = yon_gtk_builder_get_widget(builder,"GpartedSeparateButton");
- widgets->SeparateDevicesTree = yon_gtk_builder_get_widget(builder,"SeparateDevicesTree");
- widgets->SeparateSysSectionTree = yon_gtk_builder_get_widget(builder,"SeparateSysSectionTree");
- widgets->GpartedSeparateUserButton = yon_gtk_builder_get_widget(builder,"GpartedSeparateUserButton");
- widgets->SeparateUserDevicesTree = yon_gtk_builder_get_widget(builder,"SeparateUserDevicesTree");
- widgets->SeparateUserSysSectionTree = yon_gtk_builder_get_widget(builder,"SeparateUserSysSectionTree");
-
- widgets->GpartedOSButton = yon_gtk_builder_get_widget(builder,"GpartedOSButton");
widgets->OSDevicesTree = yon_gtk_builder_get_widget(builder,"OSDevicesTree");
widgets->OSSysSectionTree = yon_gtk_builder_get_widget(builder,"OSSysSectionTree");
+ widgets->GpartedOSButton = yon_gtk_builder_get_widget(builder,"GpartedOSButton");
+ widgets->OSFormatSwitch = yon_gtk_builder_get_widget(builder,"OSFormatSwitch");
+ widgets->OSFormatSizeSpin = yon_gtk_builder_get_widget(builder,"OSFormatSizeSpin");
+ widgets->OSFormatSizeCombo = yon_gtk_builder_get_widget(builder,"OSFormatSizeCombo");
+ widgets->OSFormatPartitionEntry = yon_gtk_builder_get_widget(builder,"OSFormatPartitionEntry");
+ widgets->OSFilesystemTypeCombo = yon_gtk_builder_get_widget(builder,"OSFilesystemTypeCombo");
+ widgets->OSFormatFSMarkEntry = yon_gtk_builder_get_widget(builder,"OSFormatFSMarkEntry");
+ widgets->OSFormatEncryptionCombo = yon_gtk_builder_get_widget(builder,"OSFormatEncryptionCombo");
+ widgets->OSFormatEncryptionEntry = yon_gtk_builder_get_widget(builder,"OSFormatEncryptionEntry");
- widgets->GpartedUserdataButton = yon_gtk_builder_get_widget(builder,"GpartedUserdataButton");
widgets->UserdataDevicesTree = yon_gtk_builder_get_widget(builder,"UserdataDevicesTree");
widgets->UserdataSysSectionTree = yon_gtk_builder_get_widget(builder,"UserdataSysSectionTree");
+ widgets->GpartedUserdataButton = yon_gtk_builder_get_widget(builder,"UserdataGpartedButton");
+ widgets->UserdataFormatSwitch = yon_gtk_builder_get_widget(builder,"UserdataFormatSwitch");
+ widgets->UserdataFormatSizeSpin = yon_gtk_builder_get_widget(builder,"UserdataFormatSizeSpin");
+ widgets->UserdataFormatSizeCombo = yon_gtk_builder_get_widget(builder,"UserdataFormatSizeCombo");
+ widgets->UserdataFormatPartitionEntry = yon_gtk_builder_get_widget(builder,"UserdataFormatPartitionEntry");
+ widgets->UserdataFilesystemTypeCombo = yon_gtk_builder_get_widget(builder,"UserdataFilesystemTypeCombo");
+ widgets->UserdataFormatFSMarkEntry = yon_gtk_builder_get_widget(builder,"UserdataFormatFSMarkEntry");
+ widgets->UserdataFormatEncryptionCombo = yon_gtk_builder_get_widget(builder,"UserdataFormatEncryptionCombo");
+ widgets->UserdataFormatEncryptionEntry = yon_gtk_builder_get_widget(builder,"UserdataFormatEncryptionEntry");
- 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"));
widgets->LayoutList = GTK_TREE_STORE(gtk_builder_get_object(builder,"LayoutList"));
- widgets->AdditionalSoftwareList = GTK_LIST_STORE(gtk_builder_get_object(builder,"AdditionalSoftwareList"));
- widgets->PartitionsList = GTK_LIST_STORE(gtk_builder_get_object(builder,"PartitionsList"));
-
+ widgets->LanguageCombo=yon_gtk_builder_get_widget(builder,"LanguageCombo");
+ widgets->RegionCombo=yon_gtk_builder_get_widget(builder,"RegionCombo");
+ widgets->ZoneCombo=yon_gtk_builder_get_widget(builder,"ZoneCombo");
+ widgets->AvailableLanguagesEntry=yon_gtk_builder_get_widget(builder,"AvailableLanguagesEntry");
+ widgets->AvailableLanguagesButton=yon_gtk_builder_get_widget(builder,"AvailableLanguagesButton");
+ widgets->LanguagesCombo=yon_gtk_builder_get_widget(builder,"LanguagesCombo");
+ widgets->KeyboardModelCombo=yon_gtk_builder_get_widget(builder,"KeyboardModelCombo");
+ widgets->LayoutBindingCombo=yon_gtk_builder_get_widget(builder,"LayoutBindingCombo");
+ widgets->DefaultLayoutRadio=yon_gtk_builder_get_widget(builder,"DefaultLayoutRadio");
+ widgets->ManualLayoutRadio=yon_gtk_builder_get_widget(builder,"ManualLayoutRadio");
+ widgets->LayoutTree=yon_gtk_builder_get_widget(builder,"LayoutTree");
+ widgets->AddButton=yon_gtk_builder_get_widget(builder,"AddButton");
+ widgets->RemoveButton=yon_gtk_builder_get_widget(builder,"RemoveButton");
widgets->RegionSensitiveCheck = yon_gtk_builder_get_widget(builder,"RegionSensitiveCheck");
widgets->LanguagesSensitiveCheck = yon_gtk_builder_get_widget(builder,"LanguagesSensitiveCheck");
widgets->MainLanguageSensitiveCheck = yon_gtk_builder_get_widget(builder,"MainLanguageSensitiveCheck");
widgets->KeyboardModelSensitiveCheck = yon_gtk_builder_get_widget(builder,"KeyboardModelSensitiveCheck");
widgets->OptionsSensitiveCheck = yon_gtk_builder_get_widget(builder,"OptionsSensitiveCheck");
widgets->LayoutSensitiveCheck = yon_gtk_builder_get_widget(builder,"LayoutSensitiveCheck");
- widgets->UsernameSensitiveCheck = yon_gtk_builder_get_widget(builder,"UsernameSensitiveCheck");
- widgets->LoginSensitiveCheck = yon_gtk_builder_get_widget(builder,"LoginSensitiveCheck");
- widgets->UserRootOnlyCheck = yon_gtk_builder_get_widget(builder,"UserRootOnlyCheck");
- widgets->PasswordSensitiveCheck = yon_gtk_builder_get_widget(builder,"PasswordSensitiveCheck");
- widgets->AutologinSensitiveCheck = yon_gtk_builder_get_widget(builder,"AutologinSensitiveCheck");
- widgets->RootPasswordSensitiveCheck = yon_gtk_builder_get_widget(builder,"RootPasswordSensitiveCheck");
- widgets->HostnameSensitiveCheck = yon_gtk_builder_get_widget(builder,"HostnameSensitiveCheck");
- widgets->CommonFilesystemSensitiveCheck = yon_gtk_builder_get_widget(builder,"CommonFilesystemSensitiveCheck");
- widgets->CommonSectionSensitiveCheck = yon_gtk_builder_get_widget(builder,"CommonSectionSensitiveCheck");
- widgets->NextSizeSensitiveCheck = yon_gtk_builder_get_widget(builder,"NextSizeSensitiveCheck");
- widgets->NextFSTypeSensitiveCheck = yon_gtk_builder_get_widget(builder,"NextFSTypeSensitiveCheck");
- widgets->NextLabelSensitiveCheck = yon_gtk_builder_get_widget(builder,"NextLabelSensitiveCheck");
- widgets->SameFSTypeSensitiveCheck = yon_gtk_builder_get_widget(builder,"SameFSTypeSensitiveCheck");
- widgets->SameLabelSensitiveCheck = yon_gtk_builder_get_widget(builder,"SameLabelSensitiveCheck");
+ widgets->UserRootNameEntry=yon_gtk_builder_get_widget(builder,"UserRootNameEntry");
+ widgets->UserRootLoginEntry=yon_gtk_builder_get_widget(builder,"UserRootLoginEntry");
+ widgets->UserRootPasswordCombo=yon_gtk_builder_get_widget(builder,"UserRootPasswordCombo");
+ widgets->UserRootPasswordEntry=yon_gtk_builder_get_widget(builder,"UserRootPasswordEntry");
+ widgets->UserRootPasswordButton=yon_gtk_builder_get_widget(builder,"UserRootPasswordButton");
+ widgets->UserAutologinSwitch=yon_gtk_builder_get_widget(builder,"UserAutologinSwitch");
+ widgets->UserAddBox=yon_gtk_builder_get_widget(builder,"UserAddBox");
+ widgets->UserAddButton=yon_gtk_builder_get_widget(builder,"UserAddButton");
+
+ widgets->HotnameEntry=yon_gtk_builder_get_widget(builder,"HotnameEntry");
+ widgets->mainSettingsButton=yon_gtk_builder_get_widget(builder,"mainSettingsButton");
+ widgets->RegionImage = yon_gtk_builder_get_widget(builder,"RegionImage");
+ widgets->RegionBox = yon_gtk_builder_get_widget(builder,"RegionBox");
+ widgets->RegionAspect = yon_gtk_builder_get_widget(builder,"RegionAspect");
+ widgets->KeyboardImage = yon_gtk_builder_get_widget(builder,"KeyboardImage");
+ widgets->KeyboardBox = yon_gtk_builder_get_widget(builder,"KeyboardBox");
+
+ widgets->AdditionalSoftwareList = GTK_LIST_STORE(gtk_builder_get_object(builder,"AdditionalSoftwareList"));
+ widgets->AdditionalSoftwareTree = yon_gtk_builder_get_widget(builder,"AdditionalSoftwareTree");
+ widgets->AdditionalSoftwareCell = GTK_CELL_RENDERER(gtk_builder_get_object(builder,"AdditionalSoftwareCell"));
+
+
+ widgets->InstallationProgress = yon_gtk_builder_get_widget(builder,"InstallationProgress");
+ widgets->InstallationLabel = yon_gtk_builder_get_widget(builder,"InstallationLabel");
+ widgets->ReadShortLogButton = yon_gtk_builder_get_widget(builder,"ReadShortLogButton");
+ widgets->PackageInstallationProgress = yon_gtk_builder_get_widget(builder,"PackageInstallationProgress");
+ widgets->PackageInstallationLabel = yon_gtk_builder_get_widget(builder,"PackageInstallationLabel");
+ widgets->ReadFullLogButton = yon_gtk_builder_get_widget(builder,"ReadFullLogButton");
+
+ widgets->KernelListBox = yon_gtk_builder_get_widget(builder,"KernelListBox");
+ widgets->KernelInstallLabel = yon_gtk_builder_get_widget(builder,"KernelInstallLabel");
+ widgets->KernelEnableLabel = yon_gtk_builder_get_widget(builder,"KernelEnableLabel");
+ widgets->KernelNameLabel = yon_gtk_builder_get_widget(builder,"KernelNameLabel");
+ widgets->KernelTagsLabel = yon_gtk_builder_get_widget(builder,"KernelTagsLabel");
+ widgets->KernelModulesLabel = yon_gtk_builder_get_widget(builder,"KernelModulesLabel");
+ widgets->KernelDescriptionLabel = yon_gtk_builder_get_widget(builder,"KernelDescriptionLabel");
+ widgets->KernelSizeGroup = GTK_SIZE_GROUP(gtk_builder_get_object(builder,"TagsSizeGroup"));
+
+ widgets->KernelAddonListBox = yon_gtk_builder_get_widget(builder,"KernelAddonListBox");
+ widgets->KernelAddonInstallLabel = yon_gtk_builder_get_widget(builder,"KernelAddonInstallLabel");
+ widgets->KernelAddonNameLabel = yon_gtk_builder_get_widget(builder,"KernelAddonNameLabel");
+ widgets->KernelAddonModulesLabel = yon_gtk_builder_get_widget(builder,"KernelAddonModulesLabel");
+ widgets->KernelAddonDescriptionLabel = yon_gtk_builder_get_widget(builder,"KernelAddonDescriptionLabel");
+
+ widgets->OSSoftwareListBox = yon_gtk_builder_get_widget(builder,"OSSoftwareListBox");
+ widgets->OSSoftwareInstallLabel = yon_gtk_builder_get_widget(builder,"OSSoftwareInstallLabel");
+ widgets->OSSoftwareNameLabel = yon_gtk_builder_get_widget(builder,"OSSoftwareNameLabel");
+ widgets->OSSoftwareTagsLabel = yon_gtk_builder_get_widget(builder,"OSSoftwareTagsLabel");
+ widgets->OSSoftwareDescriptionLabel = yon_gtk_builder_get_widget(builder,"OSSoftwareDescriptionLabel");
+
+ widgets->PacmanSoftwareSearchEntry = yon_gtk_builder_get_widget(builder,"PacmanSoftwareSearchEntry");
+ widgets->PacmanSoftwareStatusImage = yon_gtk_builder_get_widget(builder,"PacmanSoftwareStatusImage");
+ widgets->PacmanSoftwareStatusLabel = yon_gtk_builder_get_widget(builder,"PacmanSoftwareStatusLabel");
+ widgets->PacmanSoftwareStatusButton = yon_gtk_builder_get_widget(builder,"PacmanSoftwareStatusButton");
+
+ widgets->PacmanLoadingOverlay = yon_gtk_builder_get_widget(builder,"PacmanLoadingOverlay");
+ widgets->PacmanSoftwareAllPackagesTree = yon_gtk_builder_get_widget(builder,"PacmanSoftwareAllPackagesTree");
+ widgets->PacmanSoftwareAllList = GTK_LIST_STORE(gtk_builder_get_object(builder,"PacmanSoftwareAllList"));
+ widgets->PacmanSoftwareAllCell = GTK_CELL_RENDERER(gtk_builder_get_object(builder,"PacmanSoftwareAllCell"));
+
+ widgets->PacmanSoftwareChosenPackagesTree = yon_gtk_builder_get_widget(builder,"PacmanSoftwareChosenPackagesTree");
+ widgets->PacmanSoftwareChosenList = GTK_LIST_STORE(gtk_builder_get_object(builder,"PacmanSoftwareChosenList"));
+ widgets->PacmanSoftwareChosenCell = GTK_CELL_RENDERER(gtk_builder_get_object(builder,"PacmanSoftwareChosenCell"));
+
+ widgets->StartupServicesTree = yon_gtk_builder_get_widget(builder,"StartupServicesTree");
+ widgets->StartupServicesAddButton = yon_gtk_builder_get_widget(builder,"StartupServicesAddButton");
+ widgets->StartupServicesEditButton = yon_gtk_builder_get_widget(builder,"StartupServicesEditButton");
+ widgets->StartupServicesRemoveButton = yon_gtk_builder_get_widget(builder,"StartupServicesRemoveButton");
+ widgets->StartupChosenCell = GTK_CELL_RENDERER(gtk_builder_get_object(builder,"StartupChosenCell"));
+ widgets->StartupList = GTK_LIST_STORE(gtk_builder_get_object(builder,"StartupList"));
+
+ widgets->BootloadTimerSwitch = yon_gtk_builder_get_widget(builder,"BootloadTimerSwitch");
+ widgets->BootloadTimerSpin = yon_gtk_builder_get_widget(builder,"BootloadTimerSpin");
+ widgets->BootloadDefaultOSEntry = yon_gtk_builder_get_widget(builder,"BootloadDefaultOSEntry");
+ widgets->BootloadDefaulOSButton = yon_gtk_builder_get_widget(builder,"BootloadDefaulOSButton");
+ widgets->BootloadNoPasswordSwitch = yon_gtk_builder_get_widget(builder,"BootloadNoPasswordSwitch");
+ widgets->BootloadUserTree = yon_gtk_builder_get_widget(builder,"BootloadUserTree");
+ widgets->BootloadUserAddButton = yon_gtk_builder_get_widget(builder,"BootloadUserAddButton");
+ widgets->BootloadUserRemoveButton = yon_gtk_builder_get_widget(builder,"BootloadUserRemoveButton");
+ widgets->BootloadUsersList = GTK_LIST_STORE(gtk_builder_get_object(builder,"BootloadUsersList"));
+
+ widgets->NetworkDomainSwitch = yon_gtk_builder_get_widget(builder,"NetworkDomainSwitch");
+ widgets->NetworkDomainNameEntry = yon_gtk_builder_get_widget(builder,"NetworkDomainNameEntry");
+ widgets->NetworkDomainAdminEntry = yon_gtk_builder_get_widget(builder,"NetworkDomainAdminEntry");
+ widgets->NetworkDomainPasswordEntry = yon_gtk_builder_get_widget(builder,"NetworkDomainPasswordEntry");
+ widgets->NetworkNTPServerSwitch = yon_gtk_builder_get_widget(builder,"NetworkNTPServerSwitch");
+ widgets->NetworkNTPCombo = yon_gtk_builder_get_widget(builder,"NetworkNTPCombo");
+ widgets->NetworkNTPEntry = yon_gtk_builder_get_widget(builder,"NetworkNTPEntry");
+ widgets->NetworkConnectionsBox = yon_gtk_builder_get_widget(builder,"NetworkConnectionsBox");
+ widgets->NetworkConnectionsAddButton = yon_gtk_builder_get_widget(builder,"NetworkConnectionsAddButton");
+ widgets->HostnameSensitiveSwitch = yon_gtk_builder_get_widget(builder,"HostnameSensitiveSwitch");
+ widgets->AutoHostnameCheck=yon_gtk_builder_get_widget(builder,"AutoHostnameCheck");
+ widgets->network_connections = NULL;
+ widgets->pacmanchosen = g_hash_table_new_full(g_str_hash,g_str_equal,free,NULL);
+
+ main_config.status_box = widgets->StatusBox;
+ }
g_signal_connect(G_OBJECT(widgets->MainWindow),"delete-event",G_CALLBACK(on_yon_exit),widgets);
GtkWidget *menu = yon_gtk_builder_get_widget(builder,"menu2");
gtk_style_context_add_class(gtk_widget_get_style_context(widgets->DocumentationMenuItem),"menuitemmiddle");
@@ -2518,329 +539,190 @@ main_window *yon_main_window_complete(){
gtk_menu_shell_append(GTK_MENU_SHELL(menu),widgets->DocumentationMenuItem);
gtk_menu_shell_append(GTK_MENU_SHELL(menu),widgets->AboutMenuItem);
- 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->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->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);
g_signal_connect(G_OBJECT(widgets->GpartedCommonButton),"clicked",G_CALLBACK(on_gparted_open),NULL);
g_signal_connect(G_OBJECT(widgets->GpartedSameButton),"clicked",G_CALLBACK(on_gparted_open),NULL);
- g_signal_connect(G_OBJECT(widgets->GpartedNearButton),"clicked",G_CALLBACK(on_gparted_open),NULL);
+ g_signal_connect(G_OBJECT(widgets->GpartedNextInstallationButton),"clicked",G_CALLBACK(on_gparted_open),NULL);
- g_signal_connect(G_OBJECT(widgets->Notebook),"switch-page",G_CALLBACK(on_page_changed),widgets);
- g_signal_connect(G_OBJECT(widgets->MainWindow),"check-resize",G_CALLBACK(on_region_resized),widgets);
- g_signal_connect(G_OBJECT(widgets->BackButton),"clicked",G_CALLBACK(on_page_navigation_clicked),widgets);
- g_signal_connect(G_OBJECT(widgets->NextButton),"clicked",G_CALLBACK(on_page_navigation_clicked),widgets);
- g_signal_connect(G_OBJECT(widgets->CancelInstallButton),"clicked",G_CALLBACK(on_page_navigation_clicked),widgets);
+ // g_signal_connect(G_OBJECT(widgets->MainWindow),"check-resize",G_CALLBACK(on_region_resized),widgets);
+ g_signal_connect(G_OBJECT(widgets->NextButton),"clicked",G_CALLBACK(on_page_next_clicked),widgets);
+ g_signal_connect(G_OBJECT(widgets->BackButton),"clicked",G_CALLBACK(on_page_prev_clicked),widgets);
+ g_signal_connect(G_OBJECT(widgets->CancelInstallButton),"clicked",G_CALLBACK(on_page_cancel_clicked),widgets);
g_signal_connect(G_OBJECT(widgets->AvailableLanguagesButton),"clicked",G_CALLBACK(on_language_clicked),widgets);
g_signal_connect(G_OBJECT(widgets->RegionCombo),"changed",G_CALLBACK(on_region_changed),widgets);
g_signal_connect(G_OBJECT(widgets->LayoutSensitiveCheck),"toggled",G_CALLBACK(on_layout_toggle_button_switch),widgets);
g_signal_connect(G_OBJECT(widgets->AddButton),"clicked",G_CALLBACK(on_keyboard_clicked),widgets);
g_signal_connect(G_OBJECT(widgets->RemoveButton),"clicked",G_CALLBACK(on_keyboard_removed),widgets);
- g_signal_connect(G_OBJECT(widgets->GrubInstallDevicesTree),"cursor-changed",G_CALLBACK(on_separate_installation_changed),widgets);
- g_signal_connect(G_OBJECT(widgets->GrubUpdateDevicesTree),"cursor-changed",G_CALLBACK(on_separate_installation_changed),widgets);
- g_signal_connect(G_OBJECT(widgets->InstallationNearSysDevicesTree),"cursor-changed",G_CALLBACK(on_near_installation_device_changed),widgets);
- g_signal_connect(G_OBJECT(widgets->SamePlaceDeviceTree),"cursor-changed",G_CALLBACK(on_near_installation_device_changed),widgets);
- g_signal_connect(G_OBJECT(widgets->UserdataDevicesTree),"cursor-changed",G_CALLBACK(on_near_installation_device_changed),widgets);
- g_signal_connect(G_OBJECT(widgets->OSDevicesTree),"cursor-changed",G_CALLBACK(on_near_installation_device_changed),widgets);
- g_signal_connect(G_OBJECT(widgets->SeparateDevicesTree),"cursor-changed",G_CALLBACK(on_separate_installation_changed),widgets);
+ g_signal_connect(G_OBJECT(widgets->GrubInstallDevicesTree),"cursor-changed",G_CALLBACK(on_device_selection_changed),widgets);
+ g_signal_connect(G_OBJECT(widgets->GrubUpdateDevicesTree),"cursor-changed",G_CALLBACK(on_device_selection_changed),widgets);
+ g_signal_connect(G_OBJECT(widgets->NextInstallationSysDevicesTree),"cursor-changed",G_CALLBACK(on_device_selection_changed),widgets);
+ g_signal_connect(G_OBJECT(widgets->SamePlaceDeviceTree),"cursor-changed",G_CALLBACK(on_device_selection_changed),widgets);
+ g_signal_connect(G_OBJECT(widgets->UserdataDevicesTree),"cursor-changed",G_CALLBACK(on_device_selection_changed),widgets);
+ g_signal_connect(G_OBJECT(widgets->OSDevicesTree),"cursor-changed",G_CALLBACK(on_device_selection_changed),widgets);
g_signal_connect(G_OBJECT(widgets->ConfigurationModeMenuItem),"toggled",G_CALLBACK(on_configuration_mode_switch),widgets);
- g_signal_connect(G_OBJECT(widgets->DocumentationMenuItem),"activate",G_CALLBACK(on_open_documentation_confirmation),widgets);
- g_signal_connect(G_OBJECT(widgets->AboutMenuItem),"activate",G_CALLBACK(on_about),widgets);
+ // g_signal_connect(G_OBJECT(widgets->DocumentationMenuItem),"activate",G_CALLBACK(on_open_documentation_confirmation),widgets);
+ // g_signal_connect(G_OBJECT(widgets->AboutMenuItem),"activate",G_CALLBACK(on_about),widgets);
g_signal_connect(G_OBJECT(widgets->SamePlacePartTree),"cursor-changed",G_CALLBACK(on_partition_changed),widgets);
- g_signal_connect(G_OBJECT(widgets->InstallationNearSysSectionTree),"cursor-changed",G_CALLBACK(on_partition_changed),widgets);
+ g_signal_connect(G_OBJECT(widgets->NextInstallationSysSectionTree),"cursor-changed",G_CALLBACK(on_partition_changed),widgets);
+ g_signal_connect(G_OBJECT(widgets->NextInstallationSizeTypeSpin),"changed",G_CALLBACK(on_partition_changed),widgets);
+
+ g_signal_connect(G_OBJECT(widgets->UserRootPasswordCombo),"changed",G_CALLBACK(yon_gtk_widget_set_sensitive_from_combo_box),widgets->UserRootPasswordEntry);
+ g_signal_connect(G_OBJECT(widgets->UserRootPasswordCombo),"changed",G_CALLBACK(yon_gtk_widget_set_sensitive_from_combo_box),widgets->UserRootPasswordButton);
+ g_signal_connect(G_OBJECT(widgets->UserAddButton),"clicked",G_CALLBACK(on_user_add),widgets);
+ g_signal_connect(G_OBJECT(widgets->UserRootPasswordButton),"clicked",G_CALLBACK(yon_password_root_new),widgets);
+ g_signal_connect(G_OBJECT(widgets->BootloadDefaulOSButton),"clicked",G_CALLBACK(yon_menu_window_open),widgets);
gtk_tree_model_filter_set_visible_column(GTK_TREE_MODEL_FILTER(widgets->LayoutsFilter),3);
- g_signal_connect(G_OBJECT(widgets->LanguageCombo),"changed",G_CALLBACK(on_locale_changed),widgets);
+ // g_signal_connect(G_OBJECT(widgets->LanguageCombo),"changed",G_CALLBACK(on_locale_changed),widgets);
g_signal_connect(G_OBJECT(widgets->AdditionalSoftwareCell),"toggled",G_CALLBACK(on_additional_software_toggled),widgets);
+ g_signal_connect(G_OBJECT(widgets->StartupChosenCell),"toggled",G_CALLBACK(on_srartup_services_toggled),widgets);
+
+ g_signal_connect(G_OBJECT(widgets->StartupServicesTree),"cursor-changed",G_CALLBACK(on_startup_services_selection_changed),widgets);
+ g_signal_connect(G_OBJECT(widgets->StartupServicesAddButton),"clicked",G_CALLBACK(on_startup_service_add),widgets);
+ g_signal_connect(G_OBJECT(widgets->StartupServicesEditButton),"clicked",G_CALLBACK(on_startup_service_edit),widgets);
+ g_signal_connect(G_OBJECT(widgets->StartupServicesRemoveButton),"clicked",G_CALLBACK(on_startup_services_remove),widgets);
g_signal_connect(G_OBJECT(widgets->ManualLayoutRadio),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button),gtk_widget_get_parent(gtk_widget_get_parent(widgets->AddButton)));
g_signal_connect(G_OBJECT(widgets->AutoHostnameCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),widgets->HotnameEntry);
- g_signal_connect(G_OBJECT(widgets->NextInstallationFormatCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button),widgets->NextInstallationFilesystemTypeCombo);
- g_signal_connect(G_OBJECT(widgets->SameInstallationFormatCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button),widgets->SameInstallationFilesystemTypeCombo);
- g_signal_connect(G_OBJECT(widgets->HostnameSensitiveCheck),"toggled",G_CALLBACK(on_autohostname_sensitiveness_check),widgets);
+ yon_gtk_revealer_set_from_switch(GTK_REVEALER(widgets->NextInstallationFormatRevealer),GTK_SWITCH(widgets->NextInstallationFormatSwitch));
+ yon_gtk_revealer_set_from_switch(GTK_REVEALER(widgets->SameInstallationFormatRevealer),GTK_SWITCH(widgets->SameInstallationFormatSwitch));
+
+ g_signal_connect(G_OBJECT(widgets->PacmanSoftwareAllCell),"toggled",G_CALLBACK(on_pacman_software_all_toggled),widgets);
+ g_signal_connect(G_OBJECT(widgets->PacmanSoftwareChosenCell),"toggled",G_CALLBACK(on_pacman_software_chosen_toggled),widgets);
+ g_signal_connect(G_OBJECT(widgets->PacmanSoftwareSearchEntry),"icon-press",G_CALLBACK(on_pacman_icon_press),widgets);
+ g_signal_connect(G_OBJECT(widgets->BootloadUserAddButton),"clicked",G_CALLBACK(on_bootloader_user_add),widgets);
+
+ g_signal_connect(G_OBJECT(widgets->BootloadTimerSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch),widgets->BootloadTimerSpin);
+ g_signal_connect(G_OBJECT(widgets->BootloadNoPasswordSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch_inversed),widgets->BootloadUserRemoveButton);
+ g_signal_connect(G_OBJECT(widgets->BootloadNoPasswordSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch_inversed),widgets->BootloadUserAddButton);
+ g_signal_connect(G_OBJECT(widgets->BootloadNoPasswordSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch_inversed),widgets->BootloadUserTree);
+
+ g_signal_connect(G_OBJECT(widgets->NetworkDomainSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch),widgets->NetworkDomainNameEntry);
+ g_signal_connect(G_OBJECT(widgets->NetworkDomainSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch),widgets->NetworkDomainAdminEntry);
+ g_signal_connect(G_OBJECT(widgets->NetworkDomainSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch),widgets->NetworkDomainPasswordEntry);
+ g_signal_connect(G_OBJECT(widgets->NetworkNTPServerSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch),widgets->NetworkNTPCombo);
+ g_signal_connect(G_OBJECT(widgets->NetworkNTPServerSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch),widgets->NetworkNTPEntry);
+ g_signal_connect(G_OBJECT(widgets->HostnameSensitiveSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch),widgets->HotnameEntry);
+ g_signal_connect(G_OBJECT(widgets->HostnameSensitiveSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch),widgets->AutoHostnameCheck);
+ g_signal_connect(G_OBJECT(widgets->HostnameSensitiveSwitch),"state-set",G_CALLBACK(on_autohostname_sensitiveness_check),widgets);
g_signal_connect(G_OBJECT(widgets->AutoHostnameCheck),"toggled",G_CALLBACK(on_autohostname_check),widgets);
g_signal_connect(G_OBJECT(widgets->HotnameEntry),"changed",G_CALLBACK(on_hostname_entry_changed),widgets);
+ g_signal_connect(G_OBJECT(widgets->NetworkConnectionsAddButton),"clicked",G_CALLBACK(on_connection_add),widgets);
+ g_signal_connect(G_OBJECT(widgets->NetworkNTPCombo),"changed",G_CALLBACK(on_ntp_sync),widgets);
- g_signal_connect(G_OBJECT(widgets->PasswordCombo),"changed",G_CALLBACK(yon_password_combo_set_sensitive),widgets);
- g_signal_connect(G_OBJECT(widgets->AdminPasswordCombo),"changed",G_CALLBACK(yon_password_combo_set_sensitive),widgets);
- g_signal_connect(G_OBJECT(widgets->RootPasswordSensitiveCheck),"toggled",G_CALLBACK(yon_password_set_sensitive_from_toggle),widgets);
- g_signal_connect(G_OBJECT(widgets->PasswordSensitiveCheck),"toggled",G_CALLBACK(yon_password_set_sensitive_from_toggle),widgets);
- yon_gtk_entry_set_password_visibility_icon(GTK_ENTRY(widgets->PasswordEntry));
- yon_gtk_entry_set_password_visibility_icon(GTK_ENTRY(widgets->AdminPasswordEntry));
-
- if (main_config.lock_load_global == 1){
- gtk_widget_set_sensitive(widgets->LoadGlobalConfigurationMenuItem,0);
- }
- if (main_config.lock_save_global == 1){
- gtk_widget_set_sensitive(widgets->SaveGlobalConfigurationMenuItem,0);
- gtk_widget_set_sensitive(widgets->SaveGlobalLocalConfigurationMenuItem,0);
- }
- if (main_config.lock_save_local == 1){
- gtk_widget_set_sensitive(widgets->SaveLocalConfigurationMenuItem,0);
- gtk_widget_set_sensitive(widgets->SaveGlobalLocalConfigurationMenuItem,0);
- }
- if (getuid()){
- gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(widgets->ConfigurationModeMenuItem),1);
- }
-
- gtk_tree_model_filter_set_visible_column(GTK_TREE_MODEL_FILTER(widgets->LanguagesFilter),0);
- gtk_tree_model_filter_refilter(GTK_TREE_MODEL_FILTER(widgets->LanguagesFilter));
-
- gtk_window_set_title(GTK_WINDOW(widgets->MainWindow),TITLE_LABEL);
- gtk_window_set_icon_name(GTK_WINDOW(widgets->MainWindow),icon_path);
-
- int size;
- config_str parsed = NULL;
- parsed = yon_file_open(licence_path,&size);
- if (size){
- char *licence = yon_char_parsed_to_string(parsed,size,"");
- gtk_label_set_text(GTK_LABEL(widgets->LicenceLabel),licence);
- free(licence);
- yon_char_parsed_free(parsed,size);
- }
+ g_signal_connect(G_OBJECT(widgets->AdvancedAddButton),"clicked",G_CALLBACK(on_install_advanced_add_new),widgets);
+ g_signal_connect(G_OBJECT(widgets->AdvancedDeviceChosenCell),"toggled",G_CALLBACK(on_install_advanced_device_chosen),widgets);
+ g_signal_connect(G_OBJECT(widgets->AdvancedPartChosenCell),"toggled",G_CALLBACK(on_install_advanced_partition_chosen),widgets);
+ // g_signal_connect(G_OBJECT(widgets->AdvancedPartitionAddBox),"add",G_CALLBACK(on_advanced_parts_added),widgets);
+ // g_signal_connect(G_OBJECT(widgets->AdvancedPartitionAddBox),"remove",G_CALLBACK(on_advanced_parts_removed),widgets);
+ g_signal_connect(G_OBJECT(widgets->StartScenarioButton),"clicked",G_CALLBACK(yon_quick_install),widgets);
- config_str slides = yon_char_parsed_new(&size,slide_repeat_path);
- widgets->regions_original = gdk_pixbuf_new_from_resource(regions_path,NULL);
- widgets->keyboard_original = gdk_pixbuf_new_from_resource(keyboard_path,NULL);
- widgets->slides_original = NULL;
- widgets->slides_original = g_list_prepend(widgets->slides_original,gdk_pixbuf_new_from_resource(slide_0_path,NULL));
- for (int i=1;islides_original = g_list_prepend(widgets->slides_original,gdk_pixbuf_new_from_resource(slides[i-1],NULL));
- }
- widgets->slides_original = g_list_reverse(widgets->slides_original);
- yon_char_parsed_free(slides,size);
- int width = gdk_pixbuf_get_width(widgets->regions_original);
- int height = gdk_pixbuf_get_height(widgets->regions_original);
- widgets->region_height_mult = (float)height/width;
- GdkPixbuf *pix = gdk_pixbuf_scale_simple(widgets->regions_original,600,400,GDK_INTERP_BILINEAR);
- gtk_image_set_from_pixbuf(GTK_IMAGE(widgets->RegionImage),pix);
- g_object_unref(pix);
- pix = gdk_pixbuf_scale_simple(widgets->keyboard_original,600,400,GDK_INTERP_BILINEAR);
- gtk_image_set_from_pixbuf(GTK_IMAGE(widgets->KeyboardImage),pix);
- g_object_unref(pix);
- pix = gdk_pixbuf_scale_simple((GdkPixbuf*)g_list_nth_data(widgets->slides_original,0),600,400,GDK_INTERP_BILINEAR);
- gtk_image_set_from_pixbuf(GTK_IMAGE(widgets->SlidesImage),pix);
- g_object_unref(pix);
-
- int langsize;
- config_str lang = default_langs(&langsize);
+ {
- GtkTreeIter iter;
- gtk_list_store_clear(widgets->LanguagesList);
- parsed = yon_file_open(languages_path,&size);
- for (int i=0;iLanguagesList,&iter);
- gtk_list_store_set(widgets->LanguagesList,&iter,0,0,1,_(cur[1]),2,cur[0],-1);
+ if (main_config.lock_load_global == 1){
+ gtk_widget_set_sensitive(widgets->LoadGlobalConfigurationMenuItem,0);
}
- yon_char_parsed_free(cur,cur_size);
- }
- yon_char_parsed_free(parsed,size);
- if (lang)
- yon_char_parsed_free(lang,langsize);
-
- parsed = yon_dir_get_contents(zone_path,&size);
- for (int i=0;iRegionCombo),parsed[i],_(parsed[i]));
- }
- free(path);
+ if (main_config.lock_save_global == 1){
+ gtk_widget_set_sensitive(widgets->SaveGlobalConfigurationMenuItem,0);
+ gtk_widget_set_sensitive(widgets->SaveGlobalLocalConfigurationMenuItem,0);
}
- }
- gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->RegionCombo),0);
- yon_char_parsed_free(parsed,size);
- parsed = yon_config_load(yon_debug_output("%s\n",get_layouts_command),&size);
- GtkTreeIter itar;
- for (int i=0;iLayoutList,&iter,NULL);
- gtk_tree_store_set(widgets->LayoutList,&iter,0,layout[0],1,_(layout[1]),2,1,-1);
- yon_char_parsed_free(layout,layout_size);
- char *command = get_layouts_local_command(layout_id);
- config_str layout_local = yon_config_load(yon_debug_output("%s\n",command),&layout_size);
- free(command);
- free(layout_id);
- for (int j=0;jLayoutList,&itar,&iter);
- gtk_tree_store_set(widgets->LayoutList,&itar,0,layouts_parsed[0],1,_(layouts_parsed[1]),2,1,3,0,-1);
- yon_char_parsed_free(layouts_parsed,parsed_size);
- }
- }
- if (layout_size==-1) {
- gtk_tree_store_set(widgets->LayoutList,&iter,2,1,-1);
- }
- yon_char_parsed_free(layout_local,layout_size);
+ if (main_config.lock_save_local == 1){
+ gtk_widget_set_sensitive(widgets->SaveLocalConfigurationMenuItem,0);
+ gtk_widget_set_sensitive(widgets->SaveGlobalLocalConfigurationMenuItem,0);
+ }
+ if (getuid()){
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(widgets->ConfigurationModeMenuItem),1);
}
+
+
+ gtk_window_set_title(GTK_WINDOW(widgets->MainWindow),TITLE_LABEL);
+ gtk_window_set_icon_name(GTK_WINDOW(widgets->MainWindow),icon_path);
}
- yon_char_parsed_free(parsed,size);
{
- parsed = yon_config_load(yon_debug_output("%s\n",get_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);
- free(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 *path, *size, *model, *vendor, *serial;
-
- json_object_object_get_ex(device, "path", &path);
- 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->DevicesList,&iter);
- gtk_list_store_set(widgets->DevicesList,&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);
-
+ int size;
+ config_str parsed = NULL;
+ parsed = yon_file_open(licence_path,&size);
+ if (size){
+ char *licence = yon_char_parsed_to_string(parsed,size,"");
+ gtk_label_set_text(GTK_LABEL(widgets->LicenceLabel),licence);
+ free(licence);
+ yon_char_parsed_free(parsed,size);
}
- yon_char_parsed_free(parsed,size);
}
-
- parsed = yon_resource_open_file(additional_software_path,&size);
- for (int i=1;iAdditionalSoftwareList,&iter);
- gtk_list_store_set(widgets->AdditionalSoftwareList,&iter,0,1,1,module_parsed[0],3,module_parsed[1],-1); //2,module_parsed[2]
- yon_char_parsed_free(module_parsed,module_size);
+ {
+ int size;
+ config_str slides = yon_char_parsed_new(&size,slide_repeat_path);
+ widgets->regions_original = gdk_pixbuf_new_from_resource(regions_path,NULL);
+ widgets->keyboard_original = gdk_pixbuf_new_from_resource(keyboard_path,NULL);
+ widgets->slides_original = NULL;
+ widgets->slides_original = g_list_prepend(widgets->slides_original,gdk_pixbuf_new_from_resource(slide_0_path,NULL));
+ for (int i=1;islides_original = g_list_prepend(widgets->slides_original,gdk_pixbuf_new_from_resource(slides[i-1],NULL));
}
+ widgets->slides_original = g_list_reverse(widgets->slides_original);
+ yon_char_parsed_free(slides,size);
+ int width = gdk_pixbuf_get_width(widgets->regions_original);
+ int height = gdk_pixbuf_get_height(widgets->regions_original);
+ widgets->region_height_mult = (float)height/width;
+ GdkPixbuf *pix = gdk_pixbuf_scale_simple(widgets->regions_original,600,400,GDK_INTERP_BILINEAR);
+ gtk_image_set_from_pixbuf(GTK_IMAGE(widgets->RegionImage),pix);
+ g_object_unref(pix);
+ pix = gdk_pixbuf_scale_simple(widgets->keyboard_original,600,400,GDK_INTERP_BILINEAR);
+ gtk_image_set_from_pixbuf(GTK_IMAGE(widgets->KeyboardImage),pix);
+ g_object_unref(pix);
+ pix = gdk_pixbuf_scale_simple((GdkPixbuf*)g_list_nth_data(widgets->slides_original,0),600,400,GDK_INTERP_BILINEAR);
+ gtk_image_set_from_pixbuf(GTK_IMAGE(widgets->SlidesImage),pix);
+ g_object_unref(pix);
}
- if (size) yon_char_parsed_free(parsed,size);
-
- config_str models = yon_config_load(yon_debug_output("%s\n",get_models_command),&size);
- for (int i=0;iKeyboardModelCombo),models[i],_(models[i+1]));
- }
- if (size) yon_char_parsed_free(models,size);
gtk_builder_connect_signals(builder,NULL);
- yon_load_proceed(YON_CONFIG_DEFAULT);
- yon_interface_update(widgets);
+ yon_load_proceed(YON_CONFIG_LOCAL);
+ // yon_interface_update(widgets);
return widgets;
}
-
+
int main(int argc, char *argv[]){
- local=setlocale(LC_ALL, "");
- textdomain (LocaleName);
- config_init();
- int option_index=0;
- int show_help=0;
- {
- struct option long_options[] = {
- {"help", 0, 0, 'h'},
- {"version", 0, 0, 'V'},
- {"lock-help", 0,0, 1},
- {"lock-save", 0,0, 2},
- {"lock-save-local", 0,0, 3},
- {"lock-save-global", 0,0, 4},
- {"lock-load-global", 0,0, 5},
- {"socket-id", 1, 0, 's'},
- {"socket-ext-id", 1,0, 'e'},
- {"socket-trd-id", 1,0, 't'},
- {"clear-config", 0,0, 'c'},
- {"debug", 0,0, 'd'},
- { NULL, 0, NULL, 0 }
- };
- for (int i=0;iMainWindow));
- char *window_config_path = config_path;
- yon_window_config_load(window_config_path);
- free(window_config_path);
+ yon_window_config_load(path);
+ main_config.launch_arguments=yon_char_parsed_copy(argv,argc);
+ main_config.launch_size=argc;
GtkCssProvider *css=gtk_css_provider_new();
gtk_css_provider_load_from_resource(css,CssPath);
gtk_style_context_add_provider_for_screen(gdk_screen_get_default(),
GTK_STYLE_PROVIDER(css),
-1);
- gtk_main();
- free(widgets);
+ if (getuid()!=0){
+ textdomain(template_ui_LocaleName);
+ yon_ubl_status_box_render(ROOT_WARNING_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
+ textdomain(LocaleName);
+ }
+ gtk_main();
+ return 0;
}
\ No newline at end of file
diff --git a/source/ubinstall-gtk.h b/source/ubinstall-gtk.h
index d538577..25ee006 100755
--- a/source/ubinstall-gtk.h
+++ b/source/ubinstall-gtk.h
@@ -11,6 +11,7 @@
#include
#include
#include
+#include
#ifdef WEBKIT_FOUND
#include
#endif
@@ -23,10 +24,16 @@
#define glade_path "/com/ublinux/ui/ubinstall-gtk.glade"
#define glade_path_ubinstall_keyboard "/com/ublinux/ui/ubinstall-gtk-keyboard.glade"
#define glade_path_ubinstall_language "/com/ublinux/ui/ubinstall-gtk-language.glade"
+#define glade_path_network_info "/com/ublinux/ui/ubinstall-gtk-network-box.glade"
#define glade_path_log_view "/com/ublinux/ui/ubinstall-gtk-log-view.glade"
-#define ui_glade_path_about "/com/ublinux/ui/ubinstall-gtk-about.glade"
-#define ui_glade_path_documentation "/com/ublinux/ui/ubinstall-gtk-documentation.glade"
-#define glade_path_confirmation "/com/ublinux/ui/ubinstall-gtk-warning.glade"
+#define glade_path_user "/com/ublinux/ui/ubinstall-gtk-user.glade"
+#define glade_path_menu_window "/com/ublinux/ui/ubinstall-gtk-menu.glade"
+#define glade_path_menu_item "/com/ublinux/ui/ubinstall-gtk-menu-item.glade"
+#define glade_path_kernel_row "/com/ublinux/ui/ubinstall-gtk-kernel-row.glade"
+#define glade_path_os_row "/com/ublinux/ui/ubinstall-gtk-os-row.glade"
+#define glade_path_service "/com/ublinux/ui/ubinstall-gtk-service-window.glade"
+#define glade_path_bootloader_user "/com/ublinux/ui/ubinstall-gtk-bootloader-user.glade"
+#define glade_path_advanced_part "/com/ublinux/ui/ubinstall-gtk-advanced-box.glade"
#define CssPath "/com/ublinux/css/ubinstall-gtk.css"
#define config_path yon_char_unite(yon_ubl_user_get_home_directory(),"/.config/",LocaleName,"/",LocaleName,".conf",NULL)
@@ -48,7 +55,13 @@
#define zone_path "/usr/share/zoneinfo/"
+#define system_base_modules_path "/memory/data/from/0/ublinux/base"
+#define system_modules_path "/memory/data/from/0/ublinux/modules"
#define additional_software_path "resource:///com/ublinux/csv/modules.csv"
+#define kernel_list_path "resource:///com/ublinux/csv/kernel-list.csv"
+#define kernel_list_addon_path "resource:///com/ublinux/csv/kernel-list-addon.csv"
+#define services_list_path "resource:///com/ublinux/csv/services-list.csv"
+#define network_path "resource:///com/ublinux/csv/network-list.csv"
#define slide_0_path "/com/ublinux/images/slide-0.png"
@@ -66,14 +79,45 @@
"/com/ublinux/images/slide-12.png", \
NULL
+#define get_modules_command "pacman --color never -Ss ^ubm- | sed -Enr -e 'N;s/\\n/ ;/' -e \"s/^([^\\/]+)\\/([^[:blank:]]+)[[:blank:]]+([^[:blank:]]+)[[:blank:]]+(\\(([^\\)]+)\\)[^\\;]+|[^\\;]*);[[:blank:]]*(.*)/\\2;\\3;\\5;\\6/p\""
+
+#define get_local_module_info_command(target) yon_char_unite("pacman --color never -Sp $(pacman -Ssq '",target,"') --print-format '%n;%v;%d' | grep -v \"^::\"",NULL);
+
+#define get_menus_entry_command "/usr/lib/ublinux/scripts/grub-functions exec_get_all_menuentry"
+
+#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"
+
#define get_models_command "sed '/<\\/modelList>/q' /usr/share/X11/xkb/rules/base.xml | grep -E '^ {8,8}|^ {8,8}'|sed -e 's/ *//g' -e 's,,,g' -e 's/ *//g' -e 's,,,g'"
#define check_is_password_hash(password) system(yon_char_unite("/lib/ublinux/functions is_hash_password '", password,"'",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 network_value(ip,mask,gateway, dns) g_strdup_printf("ipv4.method manual ipv4.addr %s/%s ipv4.gateway %s ipv4.dns %s",ip,mask,gateway,dns)
+#define network_value_auto "ipv4.method auto"
+
+#define get_layouts_command "xkbcli list --load-exotic | awk \"\
+layout && /description:/ {\
+ match(\\$0, /: *(.*)/, matches);\
+ description = matches[1];\
+ printf \\\"%s|%s|%s\\\\n\\\", layout, variant, description;\
+ layout = \\\"\\\"; variant = \\\"\\\";\
+}\
+/layout:/ {\
+ match(\\$0, /: *'([^']+)'/, matches);\
+ l = matches[1];\
+ layout = layouts[l] = l;\
+}\
+/variant:/ {\
+ match(\\$0, /: *'([^']+)'/, matches);\
+ variant = matches[1];\
+}\
+\" | 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]"
@@ -84,40 +128,96 @@ NULL
#define part_parameter "AUTOINSTALL[part]"
#define part_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[part]"
-#define user_name_parameter "AUTOINSTALL[user_name]"
-#define user_name_parameter_command "ubconfig --source global --conarg get [autoinstall] AUTOINSTALL[user_name]"
-#define user_gecos_parameter "AUTOINSTALL[user_gecos]"
-#define user_gecos_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[user_gecos]"
-#define user_password_parameter "AUTOINSTALL[user_password]"
-#define user_password_parameter_command "ubconfig --source global --conarg get [autoinstall] AUTOINSTALL[user_password]"
-#define root_password_parameter "AUTOINSTALL[root_password]"
-#define root_password_parameter_command "ubconfig --source global --conarg get [autoinstall] AUTOINSTALL[root_password]"
-#define autologin_parameter "AUTOINSTALL[autologin]"
-#define autologin_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[autologin]"
-#define xkbmodel_parameter "AUTOINSTALL[xkbmodel]"
-#define xkbmodel_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[xkbmodel]"
-#define xkblayout_parameter "AUTOINSTALL[xkblayout]"
-#define xkblayout_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[xkblayout]"
-#define xkbvariant_parameter "AUTOINSTALL[xkbvariant]"
-#define xkbvariant_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[xkbvariant]"
-#define xkboptions_parameter "AUTOINSTALL[xkboptions]"
-#define xkboptions_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[xkboptions]"
-#define hostname_parameter "AUTOINSTALL[hostname]"
-#define hostname_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[hostname]"
-#define zone_parameter "AUTOINSTALL[zone]"
-#define zone_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[zone]"
-#define lang_parameter "AUTOINSTALL[lang]"
-#define lang_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[lang]"
-#define locale_parameter "AUTOINSTALL[locale]"
-#define locale_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[locale]"
-#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[part_label]"
-#define device_label_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[part_label]"
+#define modules_parameter "AUTOINSTALL[modules]"
+#define modules_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[modules]"
+
+#define modules_extra_parameter "AUTOINSTALL[modules_extra]"
+#define modules_extra_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[modules_extra]"
+
+/*------------------------------------------------------------*/
+// #define user_name_parameter "AUTOINSTALL[user_name]"
+// #define user_name_parameter_command "ubconfig --source global --conarg get [autoinstall] AUTOINSTALL[user_name]"
+// #define user_gecos_parameter "AUTOINSTALL[user_gecos]"
+// #define user_gecos_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[user_gecos]"
+// #define user_password_parameter "AUTOINSTALL[user_password]"
+// #define user_password_parameter_command "ubconfig --source global --conarg get [autoinstall] AUTOINSTALL[user_password]"
+#define root_password_parameter "AUTOINSTALL[ubconfig set [users] DEFAULTROOTPASSWD]"
+#define root_password_parameter_command "ubconfig --source global --conarg get [autoinstall] AUTOINSTALL['ubconfig set [users] DEFAULTROOTPASSWD']"
+#define autologin_parameter "AUTOINSTALL[ubconfig set [desktop] AUTOLOGINUSER]"
+#define autologin_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL['ubconfig set [desktop] AUTOLOGINUSER']"
+#define xkbmodel_parameter "AUTOINSTALL[ubconfig set [keyboard] XKBMODEL]"
+#define xkbmodel_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL['ubconfig set [keyboard] XKBMODEL']"
+#define xkblayout_parameter "AUTOINSTALL[ubconfig set [keyboard] XKBLAYOUT]"
+#define xkblayout_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL['ubconfig set [keyboard] XKBLAYOUT']"
+#define xkbvariant_parameter "AUTOINSTALL[ubconfig set [keyboard] XKBVARIANT]"
+#define xkbvariant_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL['ubconfig set [keyboard] XKBVARIANT']"
+#define xkboptions_parameter "AUTOINSTALL[ubconfig set [keyboard] XKBOPTIONS]"
+#define xkboptions_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL['ubconfig set [keyboard] XKBOPTIONS']"
+#define hostname_parameter "AUTOINSTALL[ubconfig set [system] HOSTNAME]"
+#define hostname_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL['ubconfig set [system] HOSTNAME']"
+#define zone_parameter "AUTOINSTALL[ubconfig set [clock] ZONE]"
+#define zone_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL['ubconfig set [clock] ZONE']"
+#define lang_parameter "AUTOINSTALL[ubconfig set [locale] LANG]"
+#define lang_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL['ubconfig set [locale] LANG']"
+#define locale_parameter "AUTOINSTALL[ubconfig set [locale] LOCALE]"
+#define locale_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL['ubconfig set [locale] LOCALE']"
+/*------------------------------------------------------------*/
+
#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_fs_type]"
-#define part_type_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[part_fs_type]"
+#define part_fs_type_parameter "AUTOINSTALL[part_fs_type]"
+#define part_fs_type_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[part_fs_type]"
+#define part_format_parameter "AUTOINSTALL[part_format]"
+#define part_format_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[part_format]"
+#define part_label_parameter "AUTOINSTALL[part_label]"
+#define part_label_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[part_label]"
+#define part_fs_label_parameter "AUTOINSTALL[part_fs_label]"
+#define part_fs_label_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[part_fs_label]"
+#define part_crypt_parameter "AUTOINSTALL[part_crypt]"
+#define part_crypt_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[part_crypt]"
+#define swap_parameter "AUTOINSTALL[swap]"
+#define swap_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[swap]"
+#define swap_size_parameter "AUTOINSTALL[swap_size]"
+#define swap_size_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[swap_size]"
+#define boot_parameter "AUTOINSTALL[boot]"
+#define boot_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[boot]"
+#define packages_parameter "AUTOINSTALL[packages]"
+#define packages_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[packages]"
+#define device_typevfs_parameter "AUTOINSTALL[device_typevfs]"
+#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 USERADD_parameter_all "AUTOINSTALL[ubconfig set [users] USERADD[*]]"
+#define USERADD_parameter_search "AUTOINSTALL[ubconfig set [users] USERADD["
+#define USERADD_parameter(target) yon_char_unite("AUTOINSTALL[ubconfig set [users] USERADD[",target,"]']",NULL)
+#define USERADD_parameter_command(target) yon_char_unite("ubconfig --source global get autoinstall AUTOINSTALL['ubconfig set [users] USERADD[",target,"]']",NULL)
+#define KERNEL_BOOT_parameter "AUTOINSTALL[ubconfig set [boot] KERNEL_BOOT]"
+#define KERNEL_BOOT_parameter_command "ubconfig --source global get autoinstall AUTOINSTALL['ubconfig set [boot] KERNEL_BOOT']"
+#define SERVICES_ENABLE_parameter "AUTOINSTALL[ubconfig set [boot] SERVICES_ENABLE]"
+#define SERVICES_ENABLE_parameter_command "ubconfig get autoinstall AUTOINSTALL['ubconfig set [boot] SERVICES_ENABLE']"
+#define GRUB_SUPERUSERS_parameter "AUTOINSTALL[ubconfig set [boot] GRUB_SUPERUSERS]"
+#define GRUB_SUPERUSERS_parameter_command "ubconfig get autoinstall AUTOINSTALL['ubconfig set [boot] GRUB_SUPERUSERS']"
+#define GRUB_TIMEOUT_parameter "AUTOINSTALL[ubconfig set [boot] GRUB_TIMEOUT]"
+#define GRUB_TIMEOUT_parameter_command "ubconfig get autoinstall AUTOINSTALL['ubconfig set [boot] GRUB_TIMEOUT']"
+#define GRUB_DEFAULT_parameter "AUTOINSTALL[ubconfig set [boot] GRUB_DEFAULT]"
+#define GRUB_DEFAULT_parameter_command "ubconfig get autoinstall AUTOINSTALL['ubconfig set [boot] GRUB_DEFAULT']"
+#define GRUB_PASSWORD_parameter_search "AUTOINSTALL[ubconfig set [boot] GRUB_PASSWORD["
+#define GRUB_PASSWORD_parameter_all "AUTOINSTALL[ubconfig set [boot] GRUB_PASSWORD[*]]"
+#define GRUB_PASSWORD_parameter(target) yon_char_unite("AUTOINSTALL[ubconfig set [boot] GRUB_PASSWORD[",target,"]]",NULL)
+#define GRUB_PASSWORD_parameter_command_all "ubconfig get autoinstall AUTOINSTALL['ubconfig set [boot] GRUB_PASSWORD[*]']"
+#define GRUB_PASSWORD_parameter_command(target) yon_char_unite("ubconfig get autoinstall AUTOINSTALL['ubconfig set [boot] GRUB_PASSWORD[",target,"]']",NULL)
+#define AUTOLOGINUSER_parameter "AUTOINSTALL[ubconfig set [desktop] AUTOLOGINUSER]"
+#define AUTOLOGINUSER_parameter_command "ubconfig get autoinstall AUTOINSTALL['ubconfig set [boot] AUTOLOGINUSER']"
+#define NETWORK_parameter_search "AUTOINSTALL[ubconfig set [network] NETWORK["
+#define NETWORK_parameter(target) yon_char_unite("AUTOINSTALL[ubconfig set [network] NETWORK[",target,"@connmod]']",NULL)
+#define NETWORK_devdown_parameter(target) yon_char_unite("AUTOINSTALL[ubconfig set [network] NETWORK[",target,"@devdown]']",NULL)
+#define NETWORK_parameter_command(target) yon_char_unite("ubconfig get autoinstall AUTOINSTALL['ubconfig set [network] NETWORK[",target,"@connmod]']",NULL)
+#define NETWORK_devdown_parameter_command(target) yon_char_unite("ubconfig get autoinstall AUTOINSTALL['ubconfig set [network] NETWORK[",target,"@devdown]']",NULL)
+#define NETWORK(target) yon_char_unite("NETWORK[",target,"@connmod]",NULL)
#define save_config_command(parameters) yon_char_unite("ubconfig --target system set [autoinstall] AUTOINSTALL[log]=yes ",parameters, "; nice ubinstall2 --debug autoinstall", NULL)
@@ -141,10 +241,9 @@ NULL
#define full_log_path "/var/log/ubinstall.log"
-#define yon_config_get_custom_command(target) yon_char_unite("ubconfig --source ",target," --conarg get [autoinstall] AUTOINSTALL[installer_lang] AUTOINSTALL[install_type] AUTOINSTALL[device] AUTOINSTALL[part] AUTOINSTALL[part_size] AUTOINSTALL[part_label] AUTOINSTALL[part_fs_type] AUTOINSTALL[part_format] UTOINSTALL[locale] AUTOINSTALL[lang] AUTOINSTALL[zone] AUTOINSTALL[user_name] AUTOINSTALL[user_gecos] AUTOINSTALL[user_password] AUTOINSTALL[root_password] AUTOINSTALL[autologin] AUTOINSTALL[xkbmodel] AUTOINSTALL[xkblayout] AUTOINSTALL[xkbvariant] AUTOINSTALL[xkboptions] AUTOINSTALL[hostname] AUTOINSTALL[modules] AUTOINSTALL[modules_extra] AUTOINSTALL[device_label] AUTOINSTALL[locale]",NULL)
-#define config_get_local_command "ubconfig --source system --conarg get [autoinstall] AUTOINSTALL[installer_lang] AUTOINSTALL[install_type] AUTOINSTALL[device] AUTOINSTALL[part] AUTOINSTALL[part_size] AUTOINSTALL[part_label] AUTOINSTALL[part_fs_type] AUTOINSTALL[part_format] UTOINSTALL[locale] AUTOINSTALL[lang] AUTOINSTALL[zone] AUTOINSTALL[user_name] AUTOINSTALL[user_gecos] AUTOINSTALL[user_password] AUTOINSTALL[root_password] AUTOINSTALL[autologin] AUTOINSTALL[xkbmodel] AUTOINSTALL[xkblayout] AUTOINSTALL[xkbvariant] AUTOINSTALL[xkboptions] AUTOINSTALL[hostname] AUTOINSTALL[modules] AUTOINSTALL[modules_extra] AUTOINSTALL[device_label] AUTOINSTALL[locale]"
-#define config_get_global_command yon_char_new("ubconfig --source global --conarg get [autoinstall] AUTOINSTALL[installer_lang] AUTOINSTALL[install_type] AUTOINSTALL[device] AUTOINSTALL[part] AUTOINSTALL[part_size] AUTOINSTALL[part_label] AUTOINSTALL[part_fs_type] AUTOINSTALL[part_format] UTOINSTALL[locale] AUTOINSTALL[lang] AUTOINSTALL[zone] AUTOINSTALL[user_name] AUTOINSTALL[user_gecos] AUTOINSTALL[user_password] AUTOINSTALL[root_password] AUTOINSTALL[autologin] AUTOINSTALL[xkbmodel] AUTOINSTALL[xkblayout] AUTOINSTALL[xkbvariant] AUTOINSTALL[xkboptions] AUTOINSTALL[hostname] AUTOINSTALL[modules] AUTOINSTALL[modules_extra] AUTOINSTALL[device_label] AUTOINSTALL[locale]")
-#define config_get_default_command "ubconfig --source default --conarg get [autoinstall] AUTOINSTALL[installer_lang] AUTOINSTALL[install_type] AUTOINSTALL[device] AUTOINSTALL[part] AUTOINSTALL[part_size] AUTOINSTALL[part_label] AUTOINSTALL[part_fs_type] AUTOINSTALL[part_format] UTOINSTALL[locale] AUTOINSTALL[lang] AUTOINSTALL[zone] AUTOINSTALL[user_name] AUTOINSTALL[user_gecos] AUTOINSTALL[user_password] AUTOINSTALL[root_password] AUTOINSTALL[autologin] AUTOINSTALL[xkbmodel] AUTOINSTALL[xkblayout] AUTOINSTALL[xkbvariant] AUTOINSTALL[xkboptions] AUTOINSTALL[hostname] AUTOINSTALL[modules] AUTOINSTALL[modules_extra] AUTOINSTALL[device_label] AUTOINSTALL[locale]"
+#define yon_config_get_command(target) yon_char_unite("ubconfig --source ",target," --conarg get [autoinstall] AUTOINSTALL[*]",NULL)
+
+#define config_get_default_command "ubconfig --source default --conarg get [autoinstall] AUTOINSTALL[*]"
#define config_get_global_only_parameters ""
#define config_get_local_only_parameters ""
@@ -153,58 +252,114 @@ NULL
#define default_langs(size) yon_char_parsed_new(size,"en_US.UTF-8","ru_RU.UTF-8",NULL);
+#define install_common_parameters \
+ AUTOINSTALL_TYPE_INSTALL,\
+ AUTOINSTALL_DEVICE,\
+ part_format_parameter,\
+ part_label_parameter,\
+ part_fs_type_parameter
+
+#define install_part_parameters \
+ AUTOINSTALL_TYPE_INSTALL,\
+ AUTOINSTALL_DEVICE,\
+ part_format_parameter,\
+ part_fs_label_parameter,\
+ part_parameter,\
+ part_fs_type_parameter,\
+ part_fs_label_parameter
+
+#define install_next_parameters \
+ AUTOINSTALL_TYPE_INSTALL,\
+ AUTOINSTALL_DEVICE,\
+ part_format_parameter,\
+ part_fs_label_parameter,\
+ part_parameter,\
+ part_fs_type_parameter,\
+ part_size_parameter
+
+#define install_advanced_parameters \
+ AUTOINSTALL_TYPE_INSTALL,\
+ AUTOINSTALL_DEVICE,\
+ part_format_parameter,\
+ part_label_parameter,\
+ part_parameter,\
+ part_fs_type_parameter,\
+ part_size_parameter
+
+#define install_grub_install_update_parameters \
+ AUTOINSTALL_TYPE_INSTALL,\
+ AUTOINSTALL_DEVICE,\
+ part_parameter
+
+#define install_system_only_parameters \
+ AUTOINSTALL_TYPE_INSTALL,\
+ AUTOINSTALL_DEVICE,\
+ part_format_parameter,\
+ part_label_parameter,\
+ part_parameter,\
+ part_fs_type_parameter,\
+ part_size_parameter,\
+ part_crypt_parameter
+
+#define install_userdata_only_parameters \
+ AUTOINSTALL_TYPE_INSTALL,\
+ AUTOINSTALL_DEVICE,\
+ part_format_parameter,\
+ part_label_parameter,\
+ part_parameter,\
+ part_fs_type_parameter,\
+ part_size_parameter,\
+ part_crypt_parameter
+
typedef char* string;
+__attribute__((unused)) static \
string version_application;
-char *local;
-
+extern int cur_slide;
+
enum YON_PAGES {
YON_PAGE_WELCOME = 0,
YON_PAGE_LICENCE,
YON_PAGE_SECTIONS,
YON_PAGE_OS_COMPONENTS,
- YON_PAGE_SOFTWARE,
YON_PAGE_INSTALLATION_BEGIN,
- YON_PAGE_INSTALLATION,
+ YON_PAGE_KERNEL,
+ YON_PAGE_KERNEL_ADDON,
+ YON_PAGE_SOFTWARE,
+ YON_PAGE_PACMAN_SOFTWARE,
YON_PAGE_REGION,
YON_PAGE_KEYBOARD,
YON_PAGE_USERS,
+ YON_PAGE_STARTUP,
+ YON_PAGE_BOOTLOADER,
+ YON_PAGE_NETWORK,
+ YON_PAGE_INSTALLATION,
YON_PAGE_COMPLETION,
YON_PAGE_COMPLETED,
+ YON_PAGE_INSTALL_ERROR,
+ YON_PAGE_CONFIGURE_END,
+ YON_PAGE_CONFIGURE_SAVE,
+
YON_PAGE_INSTALL_COMMON,
YON_PAGE_INSTALL_SEPARATE,
YON_PAGE_INSTALL_SAME_PARTITION,
- YON_PAGE_INSTALL_OPTIONS,
- YON_PAGE_OPTIONS_GRUB_INSTALL,
- YON_PAGE_OPTIONS_GRUB_UPDATE,
- YON_PAGE_OPTIONS_SEPARATE,
- YON_PAGE_OPTIONS_SEPARATE_USRDATA,
- YON_PAGE_OPTIONS_OS_ONLY,
- YON_PAGE_OPTIONS_USRDATA_ONLY,
- YON_PAGE_INSTALL_ERROR,
- YON_PAGE_CONFIGURE_END
+ YON_PAGE_INSTALL_ADVANCED,
+ YON_PAGE_INSTALL_RECOVERY,
+
+ YON_PAGE_RECOVERY_GRUB_INSTALL,
+ YON_PAGE_RECOVERY_GRUB_UPDATE,
+ YON_PAGE_RECOVERY_OS_ONLY,
+ YON_PAGE_RECOVERY_USRDATA_ONLY
};
typedef struct {
- int socket_id;
- int load_socket_id;
- int save_socket_id;
-
- int lock_help;
- int lock_save_local;
- int lock_save_global;
- int lock_load_global;
-
- int always_open_documentation;
-
- int password_min_length;
-
+ template_config_fields
+ config_str launch_arguments;
+ int launch_size;
int save_done;
int save_configured;
- int load_mode;
int install_complete;
- int debug_mode;
guint slider_thread;
int install_mode;
unsigned long install_thread;
@@ -220,7 +375,25 @@ typedef struct {
int arg_size;
config_str arg_target;
+ GtkWidget *status_box;
+ GHashTable *network_types;
+ GtkWidget *kernel_unchosen_radio;
+
+ char *config_load_path;
+ char *config_save_path;
} config;
+
+extern config main_config;
+
+typedef struct {
+ GtkWidget *CommonInstallationDevicesTree;
+ GtkWidget *GpartedCommonButton;
+ GtkWidget *CommonFilesystemSensitiveCheck;
+ GtkWidget *CommonInstallationFilesystemTypeCombo;
+ GtkWidget *CommonSectionSensitiveCheck;
+ GtkWidget *CommonInstallationSectionNameEntry;
+ GtkListStore *DevicesList;
+} install_common_page;
typedef struct {
GtkBuilder *builder;
@@ -243,6 +416,11 @@ typedef struct {
GtkWidget *MainWindow;
+ GtkWidget *StartScenarioButton;
+ GtkWidget *SourceButton;
+ GtkWidget *SkipInstallationButton;
+ GtkWidget *MainSpinner;
+
GtkWidget *StatusBox;
GtkWidget *WelcomeToggle;
GtkWidget *LicenceToggle;
@@ -266,20 +444,22 @@ typedef struct {
GtkWidget *LayoutTree;
GtkWidget *AddButton;
GtkWidget *RemoveButton;
+
GtkWidget *InstallationRadio;
GtkWidget *InstallationNearRadio;
GtkWidget *InstallationLinuxRadio;
GtkWidget *InstallationWindowsRadio;
GtkWidget *InstallationOptionsRadio;
- GtkWidget *UserNameEntry;
- GtkWidget *LoginEntry;
- GtkWidget *PasswordCombo;
- GtkWidget *PasswordEntry;
- GtkWidget *PasswordButton;
- GtkWidget *AutologinCheck;
- GtkWidget *AdminPasswordCombo;
- GtkWidget *AdminPasswordEntry;
- GtkWidget *AdminPasswordButton;
+
+ GtkWidget *UserRootNameEntry;
+ GtkWidget *UserRootLoginEntry;
+ GtkWidget *UserRootPasswordCombo;
+ GtkWidget *UserRootPasswordEntry;
+ GtkWidget *UserRootPasswordButton;
+ GtkWidget *UserAutologinSwitch;
+ GtkWidget *UserAddBox;
+ GtkWidget *UserAddButton;
+
GtkWidget *HotnameEntry;
GtkWidget *AutoHostnameCheck;
GtkWidget *CancelInstallButton;
@@ -288,31 +468,40 @@ typedef struct {
GtkWidget *mainSettingsButton;
GtkWidget *menu1;
GtkWidget *menu2;
+
GtkWidget *RegionImage;
GtkWidget *RegionBox;
GtkWidget *RegionAspect;
GtkWidget *KeyboardImage;
GtkWidget *KeyboardBox;
+
GtkWidget *Notebook;
GtkWidget *LicenceLabel;
GtkWidget *SlidesImage;
- GtkWidget *SameInstallationFilesystemTypeCombo;
- GtkWidget *SameInstallationFormatCheck;
- GtkWidget *SameInstallationSectionNameEntry;
- GtkWidget *NextInstallationFilesystemTypeCombo;
- GtkWidget *NextInstallationFormatCheck;
- GtkWidget *NextInstallationSectionNameEntry;
+ GtkWidget *CommonInstallationDevicesTree;
GtkWidget *CommonInstallationFilesystemTypeCombo;
GtkWidget *CommonInstallationSectionNameEntry;
+ GtkWidget *CommonFormatSwitch;
+ GtkWidget *GpartedCommonButton;
- GtkWidget *InstallationNearSysDevicesTree;
- GtkWidget *InstallationNearSysSectionTree;
- GtkWidget *InstallationNearSizeSpin;
- GtkWidget *InstallationNearSizeTypeSpin;
+ GtkWidget *NextInstallationSysDevicesTree;
+ GtkWidget *NextInstallationSysSectionTree;
+ GtkWidget *NextInstallationFormatSwitch;
+ GtkWidget *NextInstallationFormatRevealer;
+ GtkWidget *NextInstallationSizeSpin;
+ GtkWidget *NextInstallationSizeTypeSpin;
+ GtkWidget *NextInstallationFilesystemTypeCombo;
+ GtkWidget *NextInstallationSectionNameEntry;
+ GtkWidget *GpartedNextInstallationButton;
GtkWidget *SamePlaceDeviceTree;
GtkWidget *SamePlacePartTree;
+ GtkWidget *SameInstallationFormatSwitch;
+ GtkWidget *SameInstallationFormatRevealer;
+ GtkWidget *SameInstallationFilesystemTypeCombo;
+ GtkWidget *SameInstallationSectionNameEntry;
+ GtkWidget *GpartedSameButton;
GtkWidget *InstallationProgress;
GtkWidget *InstallationLabel;
@@ -321,9 +510,6 @@ typedef struct {
GtkWidget *PackageInstallationLabel;
GtkWidget *ReadFullLogButton;
- GtkWidget *GpartedCommonButton;
- GtkWidget *GpartedNearButton;
- GtkWidget *GpartedSameButton;
GtkWidget *ConfigurationModeMenuItem;
GtkWidget *AboutMenuItem;
@@ -331,7 +517,6 @@ typedef struct {
GtkCellRenderer *AdditionalSoftwareCell;
- GtkWidget *CommonInstallationDevicesTree;
GtkWidget *AdditionalSoftwareTree;
GtkWidget *GrubInstallRadio;
@@ -348,20 +533,29 @@ typedef struct {
GtkWidget *GrubUpdateDevicesTree;
GtkWidget *GrubUpdatePartitionTree;
- GtkWidget *GpartedSeparateButton;
- GtkWidget *SeparateDevicesTree;
- GtkWidget *SeparateSysSectionTree;
- GtkWidget *GpartedSeparateUserButton;
- GtkWidget *SeparateUserDevicesTree;
- GtkWidget *SeparateUserSysSectionTree;
-
GtkWidget *GpartedOSButton;
GtkWidget *OSDevicesTree;
GtkWidget *OSSysSectionTree;
+ GtkWidget *OSFormatSwitch;
+ GtkWidget *OSFormatSizeSpin;
+ GtkWidget *OSFormatSizeCombo;
+ GtkWidget *OSFormatPartitionEntry;
+ GtkWidget *OSFilesystemTypeCombo;
+ GtkWidget *OSFormatFSMarkEntry;
+ GtkWidget *OSFormatEncryptionCombo;
+ GtkWidget *OSFormatEncryptionEntry;
GtkWidget *GpartedUserdataButton;
GtkWidget *UserdataDevicesTree;
GtkWidget *UserdataSysSectionTree;
+ GtkWidget *UserdataFormatSwitch;
+ GtkWidget *UserdataFormatSizeSpin;
+ GtkWidget *UserdataFormatSizeCombo;
+ GtkWidget *UserdataFormatPartitionEntry;
+ GtkWidget *UserdataFilesystemTypeCombo;
+ GtkWidget *UserdataFormatFSMarkEntry;
+ GtkWidget *UserdataFormatEncryptionCombo;
+ GtkWidget *UserdataFormatEncryptionEntry;
GtkTreeModel *LanguagesFilter;
GtkTreeModel *LayoutsFilter;
@@ -380,20 +574,126 @@ typedef struct {
GtkWidget *UsernameSensitiveCheck;
GtkWidget *LoginSensitiveCheck;
GtkWidget *UserRootOnlyCheck;
- GtkWidget *PasswordSensitiveCheck;
GtkWidget *AutologinSensitiveCheck;
- GtkWidget *RootPasswordSensitiveCheck;
- GtkWidget *HostnameSensitiveCheck;
- GtkWidget *CommonFilesystemSensitiveCheck;
- GtkWidget *CommonSectionSensitiveCheck;
- GtkWidget *NextSizeSensitiveCheck;
- GtkWidget *NextFSTypeSensitiveCheck;
- GtkWidget *NextLabelSensitiveCheck;
- GtkWidget *SameFSTypeSensitiveCheck;
- GtkWidget *SameLabelSensitiveCheck;
+ GtkWidget *HostnameSensitiveSwitch;
+
+ GtkWidget *KernelListBox;
+ GtkWidget *KernelInstallLabel;
+ GtkWidget *KernelEnableLabel;
+ GtkWidget *KernelNameLabel;
+ GtkWidget *KernelTagsLabel;
+ GtkWidget *KernelModulesLabel;
+ GtkWidget *KernelDescriptionLabel;
+ GtkSizeGroup *KernelSizeGroup;
+
+ GtkWidget *KernelAddonListBox;
+ GtkWidget *KernelAddonInstallLabel;
+ GtkWidget *KernelAddonNameLabel;
+ GtkWidget *KernelAddonModulesLabel;
+ GtkWidget *KernelAddonDescriptionLabel;
+
+ GtkWidget *OSSoftwareListBox;
+ GtkWidget *OSSoftwareInstallLabel;
+ GtkWidget *OSSoftwareNameLabel;
+ GtkWidget *OSSoftwareTagsLabel;
+ GtkWidget *OSSoftwareDescriptionLabel;
+
+ GtkWidget *PacmanSoftwareSearchEntry;
+ GtkWidget *PacmanSoftwareStatusImage;
+ GtkWidget *PacmanSoftwareStatusLabel;
+ GtkWidget *PacmanSoftwareStatusButton;
+
+ GtkWidget *PacmanLoadingOverlay;
+ GtkWidget *PacmanSoftwareAllPackagesTree;
+ GtkListStore *PacmanSoftwareAllList;
+ GtkCellRenderer *PacmanSoftwareAllCell;
+ GHashTable *pacmanchosen;
+
+ GtkWidget *PacmanSoftwareChosenPackagesTree;
+ GtkListStore *PacmanSoftwareChosenList;
+ GtkCellRenderer *PacmanSoftwareChosenCell;
+
+ GtkWidget *StartupServicesTree;
+ GtkWidget *StartupServicesAddButton;
+ GtkWidget *StartupServicesEditButton;
+ GtkWidget *StartupServicesRemoveButton;
+ GtkCellRenderer *StartupChosenCell;
+ GtkListStore *StartupList;
+
+ GtkWidget *BootloadTimerSwitch;
+ GtkWidget *BootloadTimerSpin;
+ GtkWidget *BootloadDefaultOSEntry;
+ GtkWidget *BootloadDefaulOSButton;
+ GtkWidget *BootloadNoPasswordSwitch;
+ GtkWidget *BootloadUserAddButton;
+ GtkWidget *BootloadUserRemoveButton;
+ GtkWidget *BootloadUserTree;
+ GtkListStore *BootloadUsersList;
+
+ GtkWidget *NetworkDomainSwitch;
+ GtkWidget *NetworkDomainNameEntry;
+ GtkWidget *NetworkDomainAdminEntry;
+ GtkWidget *NetworkDomainPasswordEntry;
+ GtkWidget *NetworkNTPServerSwitch;
+ GtkWidget *NetworkNTPCombo;
+ GtkWidget *NetworkNTPEntry;
+ GtkWidget *NetworkConnectionsBox;
+ GtkWidget *NetworkConnectionsAddButton;
+ GHashTable *network_connections;
+
+ GtkCellRenderer *AdvancedDeviceChosenCell;
+ GtkCellRenderer *AdvancedPartChosenCell;
+ GtkWidget *AdvancedDeviceTree;
+ GtkWidget *AdvancedVirtualDeviceCombo;
+ GtkWidget *AdvancedPartitionTree;
+ GtkWidget *AdvancedPartitionAddBox;
+ GtkWidget *AdvancedAddButton;
+ GtkWidget *AdvancedLoadTypeSwitch;
+ GtkWidget *AdvancedBiosSectorSwitch;
+ GtkWidget *AdvancedEFISwitch;
+ GtkWidget *AdvancedSwapSwitch;
+ GtkWidget *AdvancedSwapAutoSwitch;
+ GtkWidget *AdvancedSwapRamSwitch;
+ GtkWidget *AdvancedSwapFixedSpin;
+ GtkWidget *AdvancedSwapFixedSwitch;
+ GtkWidget *AdvancedSwapFixedSizeSwitch;
+ dictionary *advanced_sections;
+ GSequence *advanced_partition_order;
+
+
+ GFile *install_progress_file;
+ GFileMonitor *install_progress_monitor;
+ GFile *install_info_file;
+ GFileMonitor *install_info_monitor;
} main_window;
+enum ADVANCED_PART_TYPE {
+ ADVANCED_PART_NEW,
+ ADVANCED_PART_EXISTING
+};
+
+typedef struct {
+ GtkWidget *MainBox;
+ GtkWidget *SectionLabel;
+ GtkWidget *SystemSectionToggle;
+ GtkWidget *UserDataSectionToggle;
+ GtkWidget *RemoveButton;
+ GtkWidget *FormatSwitch;
+ GtkWidget *FormatRevealer;
+ GtkWidget *SizeSpin;
+ GtkWidget *SizeCombo;
+ GtkWidget *SectionMarkEntry;
+ GtkWidget *FileSystemTypeCombo;
+ GtkWidget *FileSystemMarkentry;
+ GtkWidget *EncryptionCombo;
+ GtkWidget *EncryptionEntry;
+ GtkWidget *EncryptionButton;
+ GSequenceIter *order_iter;
+
+ enum ADVANCED_PART_TYPE part_type;
+ char *part;
+} advanced_partition;
typedef struct {
GtkWidget *Window;
@@ -432,7 +732,7 @@ typedef struct{
GtkWidget *StatusBox;
GtkWidget *UserCancelButton;
GtkWidget *UserOkButton;
- GtkWidget *PasswordEntry;
+ GtkWidget *UserRootPasswordEntry;
GtkWidget *RepeatPasswordEntry;
GtkWidget *PasswordHashEntry;
GtkWidget *HashBox;
@@ -447,6 +747,8 @@ typedef struct {
GtkWidget *HeadLabel;
GtkWidget *LogLabel;
GtkWidget *ScrollToEndCheck;
+ GFileMonitor *monitor;
+
char *command;
} log_window;
@@ -458,25 +760,143 @@ typedef struct {
GtkWidget *CancelButton;
} confirmation_window;
+typedef struct {
+ GtkWidget *MainBox;
+ GtkWidget *TypeCombo;
+ GtkWidget *ConnectionCombo;
+ GtkWidget *ConnectionEntry;
+ GtkWidget *EnabledSwitch;
+ GtkWidget *RemoveButton;
+ GtkWidget *AutoGetIPSwitch;
+ GtkWidget *IpRevealer;
+ GtkWidget *IpAdressEntry;
+ GtkWidget *GatewayEntry;
+ GtkWidget *MaskEntry;
+ GtkWidget *DNSEntry;
+} network_info;
+
+typedef struct {
+ GtkWidget *MainBox;
+ GtkWidget *RemoveButton;
+ GtkWidget *UsernameEntry;
+ GtkWidget *LoginEntry;
+ GtkWidget *PasswordCombo;
+ GtkWidget *PasswordEntry;
+ GtkWidget *PasswordButton;
+} yon_user_struct;
+
+
+typedef struct {
+ GtkWidget *MenuWindow;
+ GtkWidget *BackButton;
+ GtkWidget *ItemsRevealer;
+ GtkWidget *ItemsListBox;
+ GtkWidget *ChildrenRevealer;
+ GtkWidget *ChildrenListBox;
+
+ int seat_grab;
+ dictionary *menu_items;
+ char *cur_selection;
+ int button_pos_x;
+ int button_pos_y;
+} yon_menu_window;
+
+typedef struct {
+ GtkWidget *MenuItemBox;
+ GtkWidget *MenuButton;
+ GtkWidget *MenuTextLabel;
+ GtkWidget *NextIconButton;
+
+ char *target;
+
+ main_window *widgets;
+ yon_menu_window *window;
+
+ dictionary *children;
+
+} yon_menu_item;
+
+typedef struct {
+ GtkWidget *row;
+ GtkWidget *RowBox;
+ GtkWidget *TagsBox;
+ GtkWidget *InstallCheck;
+ GtkWidget *EnableRadio;
+ GtkWidget *EnableSeparator;
+ GtkWidget *TagsSeparator;
+ GtkWidget *NameLabel;
+ GtkWidget *DescriptionLabel;
+ GtkWidget *ModulesLabel;
+
+ char *name;
+ char *modules;
+ char *package;
+} kernel_row;
+
+typedef struct {
+ GtkWidget *row;
+ GtkWidget *RowBox;
+ GtkWidget *TagsBox;
+ GtkWidget *InstallCheck;
+ GtkWidget *NameLabel;
+ GtkWidget *VersionLabel;
+ GtkWidget *DescriptionLabel;
+
+ char *name;
+ char *modules;
+ char *version;
+} os_row;
+
+typedef struct {
+ GtkWidget *Window;
+ GtkWidget *StatusBox;
+ GtkWidget *UnitEntry;
+ GtkWidget *ServiceEntry;
+ GtkWidget *DescriptionEntry;
+ GtkWidget *CancelButton;
+ GtkWidget *AcceptButton;
+} startup_service_window;
+
+struct pacman_struct{
+ main_window *widgets;
+ const char *find_package;
+ gsize packages_size;
+ config_str packages;
+};
+
+typedef struct {
+ GtkWidget *Window;
+ GtkWidget *StatusBox;
+ GtkWidget *TitleLabel;
+
+ GtkWidget *AdminCheck;
+ GtkWidget *UsernameEntry;
+ GtkWidget *PasswordEntry;
+ GtkWidget *PasswordButton;
+
+ GtkWidget *CancelButton;
+ GtkWidget *AcceptButton;
+
+ char *prev_name;
+} bootloader_user_window;
+
void config_init();
main_window *yon_main_window_complete();
ubinstall_language_window *yon_ubinstall_language_new();
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);
-char* yon_debug_output(char *pattern,char*text);
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);
-void on_autohostname_sensitiveness_check(GtkWidget *, main_window *widgets);
+void on_autohostname_sensitiveness_check(GtkWidget *, int status, main_window *widgets);
void on_autohostname_check(GtkWidget *, main_window *widgets);
void on_hostname_entry_changed (GtkWidget *, main_window *widgets);
@@ -484,8 +904,163 @@ gboolean on_install_success(main_window *widgets);
gboolean on_install_error(main_window *widgets);
-confirmation_window *yon_confirmation_window_new();
-
-void on_reboot_accepted(GtkWidget *,dictionary *dict);
-
-void on_layout_toggle_button_switch(GtkWidget *self, main_window *widgets);
\ No newline at end of file
+// confirmation_window *yon_confirmation_window_new();
+
+void on_reboot_accepted(main_window *widgets);
+
+void on_keyboard_clicked (GtkWidget *, main_window *widgets);
+void on_keyboard_accept(GtkWidget *self,main_window *widgets);
+void on_layout_toggle(GtkCellRendererToggle*, gchar* path, ubinstall_keyboard_window *window);
+void on_language_clicked(GtkWidget *, main_window *widgets);
+void yon_language_selection_changed(GtkCellRenderer *, char *path, ubinstall_language_window *window);
+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_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);
+gboolean on_yon_exit(GtkWidget *,GdkEvent*, main_window *widgets);
+void on_locale_changed(GtkWidget *,main_window *);
+void on_region_changed(GtkComboBox *self, main_window *widgets);
+void on_page_cancel_clicked(GtkWidget *, main_window *widgets);
+int yon_install_options_save(GtkWidget *device_tree, GtkWidget *part_tree,char *mode,main_window *widgets);
+void on_process_log_view(GtkWidget *,main_window *widgets);
+void yon_read_log(GFileMonitor *,GFile *,GFile *,GFileMonitorEvent ,log_window *window);
+log_window *yon_log_window_new();
+void on_log_closed(GtkWidget *, log_window *window);
+void on_page_changed(GtkWidget *,GtkWidget *,int page, main_window *widgets);
+void yon_installation_progress_update(GFileMonitor *,GFile *,GFile *,GFileMonitorEvent ,main_window *widgets);
+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);
+void on_config_local_save(GtkWidget *,main_window *widgets);
+void on_config_global_local_save(GtkWidget *,main_window *widgets);
+void on_config_custom_load(GtkWidget *,main_window *);
+void on_config_global_load(GtkWidget *,main_window *);
+void on_config_local_load(GtkWidget *,main_window *widgets);
+// void yon_save_proceed(char *path, YON_CONFIG_TYPE type);
+void on_page_next_clicked(GtkWidget *, main_window *widgets);
+void on_page_prev_clicked(GtkWidget *, main_window *widgets);
+void yon_load_proceed(YON_CONFIG_TYPE type);
+void _yon_saving_threaded(char *final_command);
+void on_layout_toggle_button_switch(GtkWidget *self, main_window *widgets);
+enum YON_PAGES yon_page_get_next(main_window *widgets,enum YON_PAGES page);
+enum YON_PAGES yon_page_get_prev(enum YON_PAGES page);
+enum YON_PAGES yon_sections_get_next_page(main_window *widgets);
+enum YON_PAGES yon_recovery_get_next(main_window *widgets);
+enum YON_PAGES yon_page_get_current(GtkNotebook *target);
+void yon_switch_page_render(main_window *widgets);
+void yon_page_update(main_window *);
+void yon_navigation_buttons_set_sensetiveness(main_window *widgets);
+int yon_region_save(main_window *widgets);
+int yon_keyboard_save(main_window *widgets);
+int yon_install_common_save(main_window *widgets);
+int yon_install_separate_save(main_window *widgets);
+int yon_install_same_partition_save(main_window *widgets);
+int yon_grub_install_save(main_window *widgets);
+int yon_grub_update_save(main_window *widgets);
+int yon_os_components_save(main_window *widgets);
+int yon_software_save(main_window *widgets);
+int yon_kernel_save(main_window *widgets);
+int yon_page_save(main_window *widgets, enum YON_PAGES page);
+int yon_users_save(main_window *widgets);
+int yon_bootloader_save(main_window *widgets);
+int yon_startup_save(main_window *widgets);
+network_info *yon_network_info_new();
+int yon_install_advanced_save(main_window *widgets);
+int yon_network_save(main_window *widgets);
+void on_connection_add(GtkWidget *,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 *_yon_installation_start(main_window *widgets);
+int yon_installation_start(main_window *widgets);
+enum INSTALL_TYPE yon_ubl_get_install_mode();
+int yon_user_save(yon_user_struct *user);
+void on_user_add(GtkWidget *,main_window *widgets);
+yon_user_struct *yon_user_struct_new();
+void on_user_remove_clicked(GtkWidget *,yon_user_struct *user);
+void yon_password_new(GtkWidget *, yon_user_struct *user);
+void yon_password_root_new(GtkWidget *, main_window *widgets);
+yon_menu_item *yon_menu_item_new();
+ yon_menu_window *yon_menu_window_new();
+void on_menu_window_size_reallocated(GtkWidget *self,GtkAllocation *,yon_menu_window *window);
+void on_children_clean(GtkWidget*, yon_menu_window *window);
+gboolean yon_on_revealer_switched (yon_menu_window *window);
+gboolean on_menu_clicked(GtkWidget *, GdkEventButton *event, yon_menu_window *window);
+yon_menu_window *yon_menu_window_open(GtkWidget *, main_window *widgets);
+void on_submenu_open(GtkWidget *,yon_menu_item *item);
+void on_menu_chosen(GtkWidget *, yon_menu_item *item);
+void yon_kernel_setup(main_window *widgets);
+void yon_kernel_row_setup(kernel_row *row, char *name, char *modules,char *package, char *tags, char *description);
+void yon_kernel_row_setup_tags(kernel_row *row, char *tags);
+int yon_tag_add(GtkBox *target,char *tag_label, char *tag_style, char *icon_name);
+kernel_row *yon_kernel_row_new();
+void yon_kernel_resize(main_window *widgets);
+void on_additional_software_toggled(GtkWidget *, char *path, main_window *widgets);
+void yon_kernel_addon_setup(main_window *widgets);
+void yon_kernel_addon_resize(main_window *widgets);
+void yon_startup_services_setup(main_window *widgets);
+void on_srartup_services_toggled(GtkWidget *, char *path, main_window *widgets);
+void on_startup_service_edit(GtkWidget *, main_window *widgets);
+void on_startup_service_add(GtkWidget *, main_window *widgets);
+startup_service_window *yon_startup_service_window_new();
+void on_startup_edit_accept(GtkWidget *, main_window *widgets);
+void on_startup_add_accept(GtkWidget *, main_window *widgets);
+void yon_startup_services_setup(main_window *widgets);
+void on_startup_services_remove(GtkWidget *self,main_window *widgets);
+void on_startup_services_selection_changed(GtkWidget *,main_window *widgets);
+void on_pacman_software_all_toggled(GtkWidget *, char *path, main_window *widgets);
+void on_pacman_software_chosen_toggled(GtkWidget *, char *path, main_window *widgets);
+int yon_pacman_software_save(main_window *widgets);
+void on_pacman_icon_press(GtkEntry *self,GtkEntryIconPosition icon_pos,GdkEvent* event,main_window *widgets);
+gboolean yon_pacman_fill(struct pacman_struct *pacman);
+void *yon_pacman_load(struct pacman_struct *pacman);
+int yon_kernel_addon_save(main_window *widgets);
+void yon_password_change(GtkWidget *, bootloader_user_window *window);
+bootloader_user_window *yon_bootloader_user_window_new();
+void on_bootloader_user_add(GtkWidget *, main_window *widgets);
+void on_bootloader_user_accept(GtkWidget *, bootloader_user_window *window);
+void yon_bootloader_interface_update(main_window *widgets);
+void on_type_changed(GtkComboBox *self,network_info *info);
+void yon_network_init(main_window *widgets);
+void yon_page_init(main_window *widgets, enum YON_PAGES page);
+void yon_bootloader_init(main_window *widgets);
+void on_kernel_install_enabled(GtkWidget *, kernel_row *row);
+void yon_user_init(main_window *widgets);
+void yon_region_init(main_window *widgets);
+void yon_keyboard_init(main_window *widgets);
+void yon_install_init(main_window *widgets, enum YON_PAGES page);
+void yon_install_advanced_init(main_window *widgets);
+void yon_os_components_init(main_window *widgets);
+void yon_pacman_init(main_window *widgets);
+void yon_software_init(main_window *widgets);
+void on_install_advanced_add_new(GtkWidget *, main_window *widgets);
+void on_install_advanced_device_chosen(GtkCellRenderer*, gchar *path, main_window *widgets);
+void on_install_advanced_partition_chosen(GtkCellRenderer*, gchar *path, main_window *widgets);
+void yon_devices_setup(main_window *widgets);
+void on_advanced_password_clicked(GtkWidget *, advanced_partition *part);
+advanced_partition *yon_advanced_partition_new();
+void yon_advanced_partition_setup(advanced_partition *part,main_window *widgets);
+void on_advanced_part_remove(GtkWidget *self, main_window *widgets);
+int yon_advanced_get_part_size(main_window *widgets);
+void yon_advanced_set_part_sensitivity(main_window *widgets, gboolean state);
+void yon_advanced_set_device_sensitivity(main_window *widgets, gboolean state);
+void on_advanced_parts_removed(GtkWidget *,GtkWidget*,main_window *widgets);
+void on_advanced_parts_added(GtkWidget *,GtkWidget*,main_window *widgets);
+void yon_advanced_partition_clear(main_window *widgets);
+void yon_layout_build(char *key, GHashTable *value, main_window *widgets);
+void yon_os_row_setup(os_row *row, char *name, char *version,char *tags, char *description);
+os_row *yon_os_row_new();
+void yon_quick_install(GtkWidget *, main_window *widgets);
\ No newline at end of file
diff --git a/source/ubl-strings.h b/source/ubl-strings.h
index 11c6e08..65e5c25 100644
--- a/source/ubl-strings.h
+++ b/source/ubl-strings.h
@@ -1,5 +1,3 @@
-#define VERSION_LABEL yon_char_unite(_("Version:")," ",!yon_char_is_empty(version_application)?version_application:"","\n",NULL)
-#define HELP_LABEL(rest) yon_char_unite(LocaleName,_(" version:")," ", !yon_char_is_empty(version_application)?version_application:"","\n",TITLE_LABEL,"\n",_("Usage:"), " ",LocaleName," ",_("[OPTIONS]"),"\n",_("Options:"),"\n\t--help, -h\t\t\t",_("Show this help"),"\n\t--version, -V\t\t\t",_("Show package version"),"\n\t--lock-help\t\t\t",_("Lock this help menu"),"\n\t--lock-save\t\t\t",_("Lock configuration saving"),"\n\t--lock-save-local\t\t",_("Lock local configration saving"),"\n\t--lock-save-global\t\t",_("Lock global configration saving"),"\n\t--lock-load-global\t\t",_("Lock global configration loading"),"\n\t--clear-config\t\t\t",_("Reset application settings"),"\n",!yon_char_is_empty(rest)?rest:NULL,NULL)
#define TITLE_LABEL _("UBLinux installation")
@@ -102,12 +100,11 @@
#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")
-#define SUCCESS_LABEL _("You have UBLinux installed on your computer.\nYou can reboot and use your new system\nor continue working in the UBLinux Live environment.")
+#define INSTALL_SUCCESS_LABEL _("You have UBLinux installed on your computer.\nYou can reboot and use your new system\nor continue working in the UBLinux Live environment.")
#define LANGUAGES_TITLE_LABEL _("Available languages in the system")
#define LAYOUTS_TITLE_LABEL _("Keyboard layout language")
@@ -185,4 +182,28 @@
#define WARNING_TITLE_LABEL _("Warning")
#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?")
\ No newline at end of file
+#define WARNING_REBOOT_TEXT_LABEL _("Are you sure want to reboot system?")
+
+#define DEFAULT_BOOTLOAD_MENU_ITEM_LABEL _("Default (Use last succeeded)")
+#define ENCRYPT_ERROR_LABEL _("Password encryption error")
+
+#define DEFAULT_MENU_ITEM_LABEL _("Default (Use last succeeded)")
+
+#define LAUNCH_LABEL _("Launch")
+#define LTS_TAG _("LTS")
+#define REACTIVE_TAG _("Reactive")
+#define RECOMENDED_TAG _("Recomended")
+#define HARDENED_TAG _("Hardened")
+#define REALTIME_TAG _("RealTime")
+#define STABLE_TAG _("Stable")
+
+#define SERVICE_REMOVE_CONFIRMATION_LABEL(target) yon_char_unite(_("Are you sure want to remove service")," ",target," ",_("from the list"),"?",NULL)
+#define SERVICE_ADD_TITLE_LABEL _("Add service")
+#define SERVICE_EDIT_TITLE_LABEL _("Edit service")
+#define SERVICE_REMOVE_TITLE_LABEL _("Remove service")
+#define BOOTLOADER_USER_EXIST_LABEL(target) yon_char_unite(_("User")," ", target," ", _("is already exists. Do you really want to save user")," ",target,"?",NULL)
+#define GRUB_PASSWORD(target) yon_char_unite("GRUB_PASSWORD[",target,"]",NULL)
+
+#define WRONG_IP_LABEL _("Ip adress is incorrect")
+
+#define ENABLED_KERNEL_MISSING_LABEL _("No kernel was enabled")
\ No newline at end of file
diff --git a/ubinstall-gtk-advanced-box.glade b/ubinstall-gtk-advanced-box.glade
new file mode 100644
index 0000000..ead6d05
--- /dev/null
+++ b/ubinstall-gtk-advanced-box.glade
@@ -0,0 +1,415 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ubinstall-gtk-bootloader-user.glade b/ubinstall-gtk-bootloader-user.glade
new file mode 100644
index 0000000..44e507a
--- /dev/null
+++ b/ubinstall-gtk-bootloader-user.glade
@@ -0,0 +1,222 @@
+
+
+
+
+
+
+ True
+ False
+ com.ublinux.libublsettingsui-gtk3.edit-symbolic
+
+
+ True
+ False
+ com.ublinux.libublsettingsui-gtk3.cancel-symbolic
+
+
+ True
+ False
+ com.ublinux.libublsettingsui-gtk3.accept-symbolic
+
+
+ 450
+ 250
+ False
+ False
+ True
+ 450
+ com.ublinux.ubl-settings-usergroups
+
+
+ True
+ False
+ 5
+ vertical
+ 5
+
+
+ True
+ False
+ vertical
+
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ vertical
+ 5
+
+
+ Administrator
+ True
+ True
+ False
+ True
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+
+
+ True
+ False
+ User name:
+ 0
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+
+
+ True
+ True
+ 1
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ 5
+
+
+ True
+ False
+ User password:
+ 0
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ False
+ *
+
+
+ True
+ True
+ 1
+
+
+
+
+ True
+ True
+ True
+ image1
+
+
+ False
+ True
+ 2
+
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ubinstall-gtk-kernel-row.glade b/ubinstall-gtk-kernel-row.glade
new file mode 100644
index 0000000..7a5bd27
--- /dev/null
+++ b/ubinstall-gtk-kernel-row.glade
@@ -0,0 +1,185 @@
+
+
+
+
+
+
+ True
+ False
+ 1
+ vertical
+
+
+ True
+ False
+ 5
+ 7
+
+
+ True
+ True
+ False
+ 5
+ True
+
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ True
+ False
+ center
+ 5
+ True
+
+
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ False
+
+
+ False
+ True
+ 3
+
+
+
+
+ True
+ False
+ Name
+ True
+ False
+ 0
+
+
+ False
+ True
+ 4
+
+
+
+
+ True
+ False
+
+
+ False
+ True
+ 5
+
+
+
+
+ True
+ False
+ start
+ 5
+ 5
+ vertical
+ 2
+ True
+
+
+
+
+
+ False
+ True
+ 6
+
+
+
+
+ True
+ False
+
+
+ False
+ True
+ 7
+
+
+
+
+ True
+ False
+ 5
+ label
+ 0
+
+
+ False
+ True
+ 8
+
+
+
+
+ True
+ False
+ 5
+ 0
+
+
+ True
+ True
+ end
+ 9
+
+
+
+
+ True
+ False
+
+
+ False
+ True
+ 10
+
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+
diff --git a/ubinstall-gtk-menu-item.glade b/ubinstall-gtk-menu-item.glade
new file mode 100644
index 0000000..c9d988a
--- /dev/null
+++ b/ubinstall-gtk-menu-item.glade
@@ -0,0 +1,73 @@
+
+
+
+
+
+
+
+
diff --git a/ubinstall-gtk-menu.glade b/ubinstall-gtk-menu.glade
new file mode 100644
index 0000000..a4205a7
--- /dev/null
+++ b/ubinstall-gtk-menu.glade
@@ -0,0 +1,203 @@
+
+
+
+
+
+
+ 450
+ 250
+ False
+ False
+ True
+ 450
+ com.ublinux.ubl-settings-bootloader
+ True
+ True
+ False
+
+
+ True
+ False
+ 0
+ in
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+
+
+ True
+ False
+ none
+ True
+
+
+ True
+ True
+ never
+ 50
+ 200
+
+
+ True
+ False
+
+
+ True
+ False
+ none
+
+
+ True
+ False
+ OS options were not found
+
+
+
+
+
+
+
+
+
+
+
+
+ True
+ True
+ 0
+
+
+
+
+ False
+ none
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ True
+ True
+
+
+ True
+ False
+ 5
+
+
+
+ False
+ True
+ 0
+
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+ never
+ 50
+ 175
+
+
+ True
+ False
+
+
+ True
+ False
+ none
+
+
+ True
+ False
+ Children options were not found
+
+
+
+
+
+
+
+
+ True
+ True
+ 1
+
+
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ubinstall-gtk-network-box.glade b/ubinstall-gtk-network-box.glade
new file mode 100644
index 0000000..82ad023
--- /dev/null
+++ b/ubinstall-gtk-network-box.glade
@@ -0,0 +1,347 @@
+
+
+
+
+
+
+ True
+ False
+ com.ublinux.libublsettingsui-gtk3.trash-symbolic
+
+
+ True
+ False
+ vertical
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ vertical
+ 5
+
+
+ True
+ False
+ 5
+
+
+ True
+ False
+ Connection type:
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 0
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ 0
+ True
+
+ - Default
+
+
+
+ True
+ Default
+
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ False
+ Enabled:
+
+
+ False
+ True
+ 3
+
+
+
+
+ True
+ True
+
+
+ False
+ True
+ 4
+
+
+
+
+ True
+ True
+ True
+ image1
+
+
+
+ False
+ True
+ end
+ 5
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+
+
+ True
+ True
+ True
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ Automatically get IP adress with DHCP
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ False
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+
+
+ True
+ False
+ IP adress:
+ 0
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+ 192.168.0.1
+
+
+ True
+ True
+ 1
+
+
+
+
+ True
+ False
+ Gateway:
+ 0
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ True
+ 192.168.0.254
+
+
+ True
+ True
+ 3
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ 5
+
+
+ True
+ False
+ Mask:
+ 0
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+ 24
+
+
+ True
+ True
+ 1
+
+
+
+
+ True
+ False
+ DNS-server:
+ 0
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ True
+ 192.168.0.254
+
+
+ True
+ True
+ 3
+
+
+
+
+ False
+ True
+ 2
+
+
+
+
+
+
+ False
+ True
+ 3
+
+
+
+
+ True
+ True
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ubinstall-gtk-os-row.glade b/ubinstall-gtk-os-row.glade
new file mode 100644
index 0000000..6bde8c2
--- /dev/null
+++ b/ubinstall-gtk-os-row.glade
@@ -0,0 +1,135 @@
+
+
+
+
+
+
+ True
+ False
+ 11
+
+
+ True
+ True
+ False
+ True
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 1
+ vertical
+ 1
+
+
+ True
+ False
+ 7
+
+
+ True
+ False
+ Name
+ 0
+ False
+ 0
+
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ Version
+ True
+ 15
+ False
+ 0
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ start
+ 3
+ 5
+ 2
+
+
+
+
+
+ False
+ True
+ 6
+
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 2
+ Description
+ 0
+ 0
+
+
+ True
+ True
+ end
+ 1
+
+
+
+
+ True
+ False
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ True
+ 1
+
+
+
+
+
diff --git a/ubinstall-gtk-service-window.glade b/ubinstall-gtk-service-window.glade
new file mode 100644
index 0000000..a369131
--- /dev/null
+++ b/ubinstall-gtk-service-window.glade
@@ -0,0 +1,219 @@
+
+
+
+
+
+
+ True
+ False
+ com.ublinux.libublsettingsui-gtk3.cancel-symbolic
+
+
+ True
+ False
+ com.ublinux.libublsettingsui-gtk3.accept-symbolic
+
+
+ 500
+ 250
+ False
+ True
+
+
+ True
+ False
+ vertical
+
+
+ True
+ False
+ vertical
+
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ vertical
+ 5
+
+
+ True
+ False
+ 5
+
+
+ True
+ False
+ Unit:
+ 0
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+
+
+ True
+ True
+ 1
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+
+
+ True
+ False
+ Service:
+ 0
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+
+
+ True
+ True
+ 1
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ 5
+
+
+ True
+ False
+ Description:
+ 0
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+
+
+ True
+ True
+ 1
+
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ True
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ubinstall-gtk-user.glade b/ubinstall-gtk-user.glade
new file mode 100644
index 0000000..a8ddf45
--- /dev/null
+++ b/ubinstall-gtk-user.glade
@@ -0,0 +1,219 @@
+
+
+
+
+
+
+ True
+ False
+ com.ublinux.libublsettingsui-gtk3.trash-symbolic
+
+
+ True
+ False
+ com.ublinux.libublsettingsui-gtk3.edit-symbolic
+
+
+ True
+ False
+ vertical
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ vertical
+ 5
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+ 5
+
+
+ True
+ False
+ Account name:
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+ Administrator
+
+
+ True
+ True
+ 1
+
+
+
+
+ True
+ True
+ True
+ image1
+
+
+
+ False
+ True
+ 3
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+
+
+ True
+ False
+ Login:
+ 0
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+ superadmin
+
+
+ True
+ True
+ 1
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ 5
+
+
+ True
+ False
+ Password:
+ 0
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 0
+
+ - Default
+ - Set a password
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ False
+ False
+ ●
+ ublinux
+ password
+
+
+ True
+ True
+ 2
+
+
+
+
+ True
+ False
+ True
+ True
+ image22
+
+
+
+ False
+ True
+ 3
+
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ False
+ True
+ 2
+
+
+
+
+
diff --git a/ubinstall-gtk.css b/ubinstall-gtk.css
index 6d28543..3950870 100644
--- a/ubinstall-gtk.css
+++ b/ubinstall-gtk.css
@@ -5,6 +5,11 @@
.noborder {
border:none;
}
+.borders *{
+ border-width:0.5px;
+ border-style: solid;
+
+}
.nobackground {
background:transparent;
}
@@ -16,6 +21,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;
@@ -217,4 +230,88 @@ treeview row:nth-child(even) { background-color: #ffffff; }
}
.menubox *{
color:@theme_base_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);
+}
+
+.tag_red{
+ border-radius: 2px;
+ border-width: 0.5px;
+ border-style: solid;
+ padding:2px 5px;
+ color:#660000;
+ border-color: #cf2a27;
+
+ background-color:#ea9999
+}
+.tag_blue{
+ border-radius: 2px;
+ border-width: 0.5px;
+ border-style: solid;
+ padding:2px 5px;
+ color:#073763;
+ border-color: #2b78e4;
+
+ background-color:#9fc5f8
+}
+.tag_purple{
+ border-radius: 2px;
+ border-width: 0.5px;
+ border-style: solid;
+ padding:2px 5px;
+ color:#073763;
+ border-color: #9900ff;
+
+ background-color:#b4a7d6
+}
+.tag_orange{
+ border-radius: 2px;
+ border-width: 0.5px;
+ border-style: solid;
+ padding:2px 5px;
+ color:#783f04;
+ border-color: #ff9900;
+
+ background-color:#f9cb9c
+}
+.tag_yellow{
+ border-radius: 2px;
+ border-width: 0.5px;
+ border-style: solid;
+ padding:2px 5px;
+ color:#7f6000;
+ border-color: #bf9000;
+
+ background-color:#ffe599
+}
+.tag_green{
+ border-radius: 2px;
+ border-width: 0.5px;
+ border-style: solid;
+ padding:2px 5px;
+ border-color: #009e0f;
+ background-color:#b6d7a8;
+ color:#274e13;
+}
+.tag_grey{
+ border-radius: 2px;
+ border-width: 0.5px;
+ border-style: solid;
+ padding:2px 5px;
+ color:#5f5f5f;
+ border-color: #777777;
+
+ background-color:#999999
+}
+
+.tableborderbottom {
+ border-bottom:0.5px;
+ border-style: solid;
+ border-color: @theme_fg_color;
+
}
\ No newline at end of file
diff --git a/ubinstall-gtk.glade b/ubinstall-gtk.glade
index 2ad950d..3d461df 100644
--- a/ubinstall-gtk.glade
+++ b/ubinstall-gtk.glade
@@ -15,17 +15,62 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 60
+ 1
+ 10
+
-
+
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+ True
+ False
+ True
+ False
+ center
+ 5
+ True
+ True
+
+
+
+
+
+
+
+
-
+
-
+
@@ -57,33 +102,90 @@
LayoutList
-
+
+ True
+ False
+ True
+
+
-
+
+
+
-
+
-
+
+
+
+
+
+
+
+
+
-
+
-
+
-
- True
- False
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
+
999999
16
1
10
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
True
False
@@ -92,7 +194,7 @@
True
False
- com.ublinux.libublsettingsui-gtk3.properties-symbolic
+ com.ublinux.libublsettingsui-gtk3.edit-symbolic
True
@@ -124,11 +226,56 @@
False
com.ublinux.ubinstall.properties-symbolic
+
+ True
+ False
+ com.ublinux.libublsettingsui-gtk3.increase-symbolic
+
+
+ True
+ False
+ com.ublinux.libublsettingsui-gtk3.trash-symbolic
+
+
+ True
+ False
+ com.ublinux.libublsettingsui-gtk3.settings-symbolic
+
True
False
com.ublinux.libublsettingsui-gtk3.properties-symbolic
+
+ True
+ False
+ com.ublinux.libublsettingsui-gtk3.properties-symbolic
+
+
+ True
+ False
+ com.ublinux.libublsettingsui-gtk3.edit-symbolic
+
+
+ True
+ False
+ com.ublinux.libublsettingsui-gtk3.trash-symbolic
+
+
+ True
+ False
+ com.ublinux.libublsettingsui-gtk3.edit-symbolic
+
+
+ True
+ False
+ com.ublinux.libublsettingsui-gtk3.increase-symbolic
+
+
+ True
+ False
+ com.ublinux.libublsettingsui-gtk3.sync-symbolic
+
True
False
@@ -142,7 +289,7 @@
True
False
- com.ublinux.libublsettingsui-gtk3.properties-symbolic
+ com.ublinux.libublsettingsui-gtk3.edit-symbolic
True
@@ -352,7 +499,7 @@
False
True
- 1
+ 0
@@ -377,11 +524,11 @@ agreement
False
True
- 2
+ 1
-
+
True
False
False
@@ -390,7 +537,7 @@ agreement
True
False
- Sections
+ Preparation
0
@@ -401,11 +548,11 @@ agreement
False
True
- 2
+ 3
-
+
True
False
False
@@ -414,7 +561,7 @@ agreement
True
False
- Installation
+ Location
0
@@ -425,11 +572,11 @@ agreement
False
True
- 3
+ 4
-
+
True
False
False
@@ -438,7 +585,7 @@ agreement
True
False
- Location
+ Keyboard
0
@@ -449,11 +596,11 @@ agreement
False
True
- 4
+ 5
-
+
True
False
False
@@ -462,7 +609,7 @@ agreement
True
False
- Keyboard
+ Users
0
@@ -473,11 +620,11 @@ agreement
False
True
- 5
+ 6
-
+
True
False
False
@@ -486,7 +633,7 @@ agreement
True
False
- Users
+ Additional
0
@@ -497,7 +644,31 @@ agreement
False
True
- 6
+ 7
+
+
+
+
+ True
+ False
+ False
+ True
+
+
+ True
+ False
+ Installation
+ 0
+
+
+
+
+
+ False
+ True
+ 8
@@ -560,7 +731,6 @@ agreement
5
5
left
- False
True
@@ -1007,6 +1177,7 @@ and help you install UBLinux on your computer
+ True
True
False
True
@@ -1083,6 +1254,7 @@ and help you install UBLinux on your computer
+ True
True
False
True
@@ -1233,55 +1405,31 @@ and help you install UBLinux on your computer
True
in
-
+
True
- True
- AdditionalSoftwareList
- 0
-
-
-
-
-
- Chosen
-
-
-
- 0
-
-
-
-
-
-
- Module name
-
-
-
- 1
-
-
-
-
-
-
- Tag
-
-
-
- 2
-
-
-
-
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
-
- Description
+
+ True
+ False
+ vertical
-
-
- 3
-
+
+ True
+ False
+ none
+
+
+ True
+ True
+ 1
+
@@ -1331,109 +1479,33 @@ and help you install UBLinux on your computer
True
False
- Installation completion
+ end
+ Installation configuration has ended
-
-
+
- False
+ True
True
- 0
+ 1
-
+
True
False
- 0.019999999552965164
- in
-
-
- True
- False
- 5
- 5
- 5
- 5
-
-
- True
- True
- in
-
-
- True
- True
- AdditionalSoftwareList
- 0
-
-
-
-
-
- Chosen
-
-
-
- 0
-
-
-
-
-
-
- Module name
-
-
-
- 1
-
-
-
-
-
-
- Tag
-
-
-
- 2
-
-
-
-
-
-
- Description
-
-
-
- 3
-
-
-
-
-
-
-
-
-
-
-
-
- True
- False
- Selecting additional software to install from the repository via the Internet
-
-
+ start
+ UBLinux OS installation is about to begin
+
+
+
True
True
- 1
+ 2
@@ -1445,7 +1517,7 @@ and help you install UBLinux on your computer
True
False
- Additional software
+ Configuration end
4
@@ -1462,28 +1534,236 @@ and help you install UBLinux on your computer
True
False
- end
- Installation configuration has ended
+ Choose system kernel
-
+
+
- True
+ False
True
- 1
+ 0
-
+
True
False
- start
- UBLinux OS installation is about to begin
-
-
-
+ 0.019999999552965164
+ in
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+
+
+ True
+ False
+ vertical
+
+
+ True
+ True
+ in
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+
+
+ True
+ False
+ vertical
+
+
+ True
+ False
+ 2
+ 7
+
+
+ True
+ False
+ Install
+ 0
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ Enable
+ 0
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ False
+
+
+ False
+ True
+ 3
+
+
+
+
+ True
+ False
+ Name
+ 0
+
+
+ False
+ True
+ 4
+
+
+
+
+ True
+ False
+
+
+ False
+ True
+ 5
+
+
+
+
+ True
+ False
+ Tags
+ 0
+
+
+ False
+ True
+ 6
+
+
+
+
+ True
+ False
+
+
+ False
+ True
+ 7
+
+
+
+
+ True
+ False
+ Modules
+ 0
+
+
+ False
+ True
+ 8
+
+
+
+
+ True
+ False
+
+
+ False
+ True
+ 9
+
+
+
+
+ True
+ False
+ Description
+ 0
+
+
+ True
+ True
+ 10
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ none
+
+
+ True
+ True
+ 1
+
+
+
+
+
+
+
+
+ True
+ True
+ 1
+
+
+
+
+
+
+
+
+ True
+ False
+ Selecting additional software to install from the repository via the Internet
+
+
True
@@ -1500,7 +1780,7 @@ and help you install UBLinux on your computer
True
False
- page 6
+ Kernel
5
@@ -1517,7 +1797,7 @@ and help you install UBLinux on your computer
True
False
- Installation
+ Choose system kernel
@@ -1531,14 +1811,182 @@ and help you install UBLinux on your computer
-
+
True
False
+ 0.019999999552965164
+ in
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+
+
+ True
+ False
+ vertical
+
+
+ True
+ True
+ in
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+
+
+ True
+ False
+ vertical
+
+
+ True
+ False
+ 2
+ 2
+ 7
+
+
+ True
+ False
+ Install
+ 0
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+
+
+ False
+ True
+ 3
+
+
+
+
+ True
+ False
+ Name
+ 0
+
+
+ False
+ True
+ 4
+
+
+
+
+ True
+ False
+
+
+ False
+ True
+ 7
+
+
+
+
+ True
+ False
+ Modules
+ 0
+
+
+ False
+ True
+ 8
+
+
+
+
+ True
+ False
+
+
+ False
+ True
+ 9
+
+
+
+
+ True
+ False
+ Description
+ 0
+
+
+ True
+ True
+ 10
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ none
+
+
+ True
+ True
+ 1
+
+
+
+
+
+
+
+
+ True
+ True
+ 1
+
+
+
+
+
+
+
+
+ True
+ False
+ Selecting additional software to install from the repository via the Internet
+
+
- False
+ True
True
- 1
+ 2
@@ -1550,7 +1998,7 @@ and help you install UBLinux on your computer
True
False
- Installation
+ Kernel addons
6
@@ -1567,10 +2015,9 @@ and help you install UBLinux on your computer
True
False
- Location
+ Choose additional components
-
@@ -1582,19 +2029,88 @@ and help you install UBLinux on your computer
-
+
True
False
- 0
- none
+ 0.019999999552965164
+ in
-
+
True
False
+ 5
+ 5
+ 5
+ 5
+
+
+ True
+ True
+ in
+
+
+ True
+ True
+ AdditionalSoftwareList
+ 0
+
+
+
+
+
+
+
+
+ 0
+
+
+
+
+
+
+ Module name
+
+
+
+ 1
+
+
+
+
+
+
+ Type
+
+
+
+ 2
+
+
+
+
+
+
+ Description
+
+
+
+ 3
+
+
+
+
+
+
+
+
-
-
+
+
+ True
+ False
+ Selecting additional software to install from the repository via the Internet
+
@@ -1603,57 +2119,87 @@ and help you install UBLinux on your computer
1
+
+
+ 7
+
+
+
+
+ True
+ False
+ Additional components
+
+
+ 7
+ False
+
+
+
+
+ True
+ False
+ vertical
+ 5
-
+
True
False
- vertical
- 5
-
-
- True
- False
- center
- 10
- 5
-
-
- True
- False
- False
- True
-
-
-
-
- True
- True
- Region:
-
-
-
-
- False
- True
- 0
-
-
+ Choose additional components
+
+
+
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 0.019999999552965164
+ in
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
True
False
+ vertical
5
True
False
- 15
5
-
+
+ True
+ False
+ Package name:
+
+
+ False
+ True
+ 0
+
+
+
+
True
- False
True
+ com.ublinux.libublsettingsui-gtk3.zoom-symbolic
False
@@ -1661,214 +2207,268 @@ and help you install UBLinux on your computer
1
-
-
- True
- False
- 0
-
-
-
-
- True
- False
- 15
- 5
-
+
+ True
+ True
+ True
+ image26
+
+
+
+ False
+ True
+ end
+ 2
+
+
+
+
True
False
- Zone:
+ Accessed
False
True
- 0
+ end
+ 3
-
+
True
- False
- True
+ False
+
False
True
- 1
+ end
+ 4
+
+
+
+
+ True
+ False
+ Repository status:
+
+
+ False
+ True
+ end
+ 5
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+
+
+ True
+ True
+ in
+
+
+ True
+ True
+ PacmanSoftwareAllList
+ 0
+
+
+
+
+
+
+
+
+ 0
+
+
+
+
+
+
+ Module name
+
+
+
+ 1
+
+
+
+
+
+
+ Type
+
+
+
+ 2
+
+
+
+
+
+
+ Description
+
+
+
+ 3
+
+
+
+
+
+
+
+
+ -1
True
- False
+ True
1
-
- False
- True
- 3
-
-
- False
- True
- 0
-
-
-
+
+
True
False
+ Selecting additional software to install from the repository via the Internet
-
- False
- True
- 1
-
+
+
+ True
+ True
+ 1
+
+
+
+
+ True
+ False
+ 0.019999999552965164
+ in
-
+
True
False
- 5
+ 5
+ 5
+ 5
+ 5
-
+
True
True
- False
- True
-
-
+ in
-
+
True
- False
- Available languages in the system:
-
-
-
-
- False
- True
- 0
-
-
-
-
- True
- False
- False
- English, U.S.A.; Russian, Russia
-
-
-
- True
- True
- 2
-
-
-
-
- True
- False
- True
- True
- image6
-
+ True
+ PacmanSoftwareChosenList
+ 0
+
+
+
+
+
+
+
+
+ 0
+
+
+
+
+
+
+ Module name
+
+
+
+ 1
+
+
+
+
+
+
+ Type
+
+
+
+ 2
+
+
+
+
+
+
+ Description
+
+
+
+ 3
+
+
+
+
+
+
-
- False
- True
- 3
-
-
- False
- True
- 2
-
-
-
+
+
True
False
- 5
-
-
- True
- True
- False
- True
-
-
-
- True
- False
- Language:
-
-
-
-
- False
- True
- 0
-
-
-
-
- True
- False
- True
- LanguagesFilter
- 2
-
-
-
-
- 1
-
-
-
-
- True
- True
- 2
-
-
+ Selecting additional software to install from the repository via the Internet
-
- False
- True
- 3
-
- False
+ True
True
2
- 7
+ 8
True
False
- Region
+ Pacman software
- 7
+ 8
False
@@ -1882,7 +2482,7 @@ and help you install UBLinux on your computer
True
False
- Keyboard
+ Location
@@ -1897,13 +2497,13 @@ and help you install UBLinux on your computer
-
+
True
False
0
none
-
+
True
False
@@ -1928,21 +2528,13 @@ and help you install UBLinux on your computer
True
False
+ center
+ 10
5
-
+
True
True
- False
- True
-
-
-
- True
- False
- Keyboard model:
-
-
False
@@ -1951,20 +2543,89 @@ and help you install UBLinux on your computer
-
+
True
- False
True
- 0
-
- - Default (Regular 105-key)
-
-
+ Region:
- True
+ False
True
- 2
+ 1
+
+
+
+
+ True
+ False
+ 5
+
+
+ True
+ False
+ 15
+ 5
+
+
+ True
+ False
+ True
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ 0
+
+
+
+
+ True
+ False
+ 15
+ 5
+
+
+ True
+ False
+ Zone:
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ True
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ 1
+
+
+
+
+ False
+ True
+ 3
@@ -1974,25 +2635,27 @@ and help you install UBLinux on your computer
0
+
+
+ True
+ False
+
+
+ False
+ True
+ 1
+
+
True
False
5
-
+
True
- True
- False
- True
-
-
-
- True
- False
- Layout changing:
-
-
+ False
+ Available languages in the system:
False
@@ -2001,80 +2664,41 @@ and help you install UBLinux on your computer
-
+
+ True
+ False
+ False
+ English, U.S.A.; Russian, Russia
+
+
+
+ True
+ True
+ 2
+
+
+
+
True
False
True
- 0
-
- - Default (L_Alt + L_Shift)
- - Left Alt
- - Caps Lock
- - Shift + Caps Lock
- - Alt + Caps Lock
- - Alt + Shift
- - Ctrl + Shift
- - Both Shift together
- - Both Alt together
- - Both Ctrl together
- - Left Ctrl+Left Shift
- - Right Ctrl+Right Shift
- - Alt+Ctrl
- - Left Alt+Left Shift
- - Alt+Space
-
- - Left Win
- - Win+Space
- - Right Win
- - Left Shift
- - Right Shift
- - Left Ctrl
- - Right Ctrl
- - Scroll Lock
- - Left Ctrl+Left Win
-
-
+ True
+ image6
+
- True
+ False
True
- 2
+ 3
False
True
- 1
-
-
-
-
- False
- True
- 2
-
-
-
-
- True
- False
- vertical
- 5
-
-
- True
- True
- False
- True
-
-
-
-
-
- False
- True
- 1
+ 2
@@ -2083,48 +2707,10 @@ and help you install UBLinux on your computer
False
5
-
+
True
False
- vertical
- 5
-
-
- Default layout (ru)
- True
- False
- True
- False
- True
- True
-
-
-
- False
- True
- 0
-
-
-
-
- Define
- True
- False
- True
- False
- True
- DefaultLayoutRadio
-
-
-
-
-
-
- False
- True
- 1
-
-
+ Language:
False
@@ -2133,139 +2719,53 @@ and help you install UBLinux on your computer
-
+
True
- False
- 5
-
-
- True
- True
- in
-
-
- True
- False
- True
- LayoutsFilter
- 0
-
-
-
-
-
- Layout
-
-
-
- 0
-
-
-
-
-
-
- Designation
-
-
-
- 1
-
-
-
-
-
-
-
-
- True
- True
- 0
-
-
+ False
+ True
+ LanguagesFilter
+ 2
+
-
- True
- False
- vertical
- 5
-
-
- True
- False
- True
- True
- Add layouts
- image13
-
-
-
- False
- True
- 0
-
-
-
-
- True
- False
- True
- True
- Remove layout
- image14
-
-
-
- False
- True
- 1
-
-
-
-
- False
- True
- 1
-
+
+
+ 1
+
True
True
- 1
+ 2
False
True
- 2
+ 3
False
True
- 3
+ 2
- 8
+ 9
True
False
- Keyboard
+ Region
- 8
+ 9
False
@@ -2279,7 +2779,7 @@ and help you install UBLinux on your computer
True
False
- Settings
+ Keyboard
@@ -2300,7 +2800,7 @@ and help you install UBLinux on your computer
0
none
-
+
True
False
@@ -2310,7 +2810,7 @@ and help you install UBLinux on your computer
- False
+ True
True
1
@@ -2327,20 +2827,10 @@ and help you install UBLinux on your computer
False
5
-
+
True
- True
- False
- True
-
-
-
- True
- False
- Account name:
- 0
-
-
+ False
+ Keyboard model:
False
@@ -2349,12 +2839,15 @@ and help you install UBLinux on your computer
-
+
True
False
True
- Administrator
-
+ 0
+
+ - Default (Regular 105-key)
+
+
True
@@ -2375,20 +2868,10 @@ and help you install UBLinux on your computer
False
5
-
+
True
- True
- False
- True
-
-
-
- True
- False
- Login:
- 0
-
-
+ False
+ Layout changing:
False
@@ -2397,31 +2880,44 @@ and help you install UBLinux on your computer
-
- Root only
+
True
+ False
True
- False
- True
+ 0
+
+ - Default (L_Alt + L_Shift)
+ - Left Alt
+ - Caps Lock
+ - Shift + Caps Lock
+ - Alt + Caps Lock
+ - Alt + Shift
+ - Ctrl + Shift
+ - Both Shift together
+ - Both Alt together
+ - Both Ctrl together
+ - Left Ctrl+Left Shift
+ - Right Ctrl+Right Shift
+ - Alt+Ctrl
+ - Left Alt+Left Shift
+ - Alt+Space
+
+ - Left Win
+ - Win+Space
+ - Right Win
+ - Left Shift
+ - Right Shift
+ - Left Ctrl
+ - Right Ctrl
+ - Scroll Lock
+ - Left Ctrl+Left Win
+
+
- False
+ True
True
- 1
-
-
-
-
- True
- False
- True
- superadmin
-
-
-
- True
- True
- 2
+ 2
@@ -2431,214 +2927,92 @@ and help you install UBLinux on your computer
1
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ False
+ 5
-
+
True
- False
- 5
+ True
+ in
+ 128
-
+
True
+ False
True
- False
- True
+ LayoutsFilter
+ 0
-
- True
- False
- Password:
- 0
+
+ column
+
+
+ True
+
+
+ 3
+
+
-
-
- False
- True
- 0
-
-
-
-
- True
- False
- True
- 0
-
- - Default
- - Set a password
-
-
-
-
- False
- True
- 2
-
-
-
-
- True
- False
- True
- False
- ●
- ublinux
- password
-
-
- True
- True
- 3
-
-
-
-
- False
- True
- 2
-
-
-
-
- True
- False
- 5
-
-
- True
- True
- False
- True
-
-
+
+ Layout
+
+
+
+ 0
+
+
+
-
-
- False
- True
- 0
-
-
-
-
- Automatic login without password prompt
- True
- False
- True
- False
- True
-
-
- False
- True
- 1
-
-
-
-
- False
- True
- 3
-
-
-
-
- True
- False
- 5
-
-
- True
- True
- False
- True
-
- True
- False
- Administrator password (root):
- 0
+
+ Designation
+
+
+
+ 1
+
+
-
- False
- True
- 0
-
-
-
-
- True
- False
- True
- 0
-
- - Default
- - Set a password
-
-
-
-
- False
- True
- 2
-
-
-
-
- True
- False
- True
- False
- ●
- ublinux
- password
-
-
- True
- True
- 3
-
- False
- True
- 4
-
-
-
-
- True
- False
-
-
- False
+ True
True
- 5
+ 0
True
False
+ vertical
5
-
+
True
+ False
True
- False
- True
-
-
- True
- False
- Host name:
- 0
-
-
+ True
+ Add layouts
+ image13
+
False
@@ -2647,60 +3021,50 @@ and help you install UBLinux on your computer
-
- True
- False
- True
- auto
-
-
- True
- True
- 2
-
-
-
-
- Automatically
+
True
False
True
- False
- True
+ True
+ Remove layout
+ image14
+
False
True
- 3
+ 1
False
True
- 6
+ 1
False
True
- 2
+ 3
- 9
+ 10
True
False
- Users
+ Keyboard
- 9
+ 10
False
@@ -2714,7 +3078,7 @@ and help you install UBLinux on your computer
True
False
- Installation completion
+ Settings
@@ -2729,176 +3093,62 @@ and help you install UBLinux on your computer
-
+
+ True
False
+ 0
+ none
+
+
+ True
+ False
+
+
+
+
+
- True
+ False
True
1
-
+
True
False
- end
- Success
-
-
-
-
-
-
- True
- True
- 2
-
-
-
-
- True
- False
- start
- You have UBLinux installed on your computer.
-You can reboot and use your new system
-or continue working in the UBLinux Live environment.
- center
- True
-
-
-
-
-
- True
- True
- 3
-
-
-
-
- 10
-
-
-
-
- True
- False
- Completion
-
-
- 10
- False
-
-
-
-
- True
- False
- vertical
- 5
-
-
- True
- False
- Completion
-
-
-
-
-
-
+ 5
+
+
+ True
+ True
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ Automatic login without password prompt
+
+
+ False
+ True
+ 1
+
+
False
True
- 0
-
-
-
-
- False
-
-
- True
- True
- 1
-
-
-
-
- True
- False
- end
- Configuration has been saved
-
-
-
-
-
-
- True
- True
2
-
-
- True
- False
- start
- You can safely exit configurator or return and create new configuration file.
- center
- True
-
-
-
-
-
- True
- True
- 3
-
-
-
-
- 11
-
-
-
-
- True
- False
- Completed
-
-
- 11
- False
-
-
-
-
- True
- False
- vertical
- 5
-
-
- True
- False
- Installation parameters
-
-
-
-
-
-
-
- False
- True
- 0
-
-
True
@@ -2908,6 +3158,7 @@ or continue working in the UBLinux Live environment.
True
False
10
+ 5
5
@@ -2920,24 +3171,18 @@ or continue working in the UBLinux Live environment.
True
False
vertical
- 5
True
False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ vertical
5
-
-
- True
- False
- /com/ublinux/images/clear_install_disk.png
-
-
- False
- True
- 0
-
-
True
@@ -2945,14 +3190,36 @@ or continue working in the UBLinux Live environment.
vertical
5
-
+
True
False
- Installation
- 0
-
-
-
+ 5
+
+
+ True
+ False
+ Account name:
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ True
+ root
+ Administrator
+
+
+ True
+ True
+ 3
+
+
False
@@ -2961,11 +3228,37 @@ or continue working in the UBLinux Live environment.
-
+
True
False
- Deleting all data on the selected disk and then installing the UBLinux system
- 0
+ 5
+
+
+ True
+ False
+ Login:
+ 0
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ True
+ root
+ superadmin
+
+
+ True
+ True
+ 1
+
+
False
@@ -2973,199 +3266,113 @@ or continue working in the UBLinux Live environment.
1
-
-
- True
- True
- 1
-
-
-
-
- False
- True
- 0
-
-
-
-
- True
- False
- 5
-
-
- True
- False
- Select device:
- 0
-
-
- False
- True
- 0
-
-
-
-
- True
- True
- True
- Start GParted
- image5
-
-
-
- False
- True
- end
- 1
-
-
-
-
- False
- True
- 1
-
-
-
-
- True
- True
- in
- 105
-
-
- True
- True
- DevicesList
- 0
-
-
-
-
-
- Device
-
-
-
- 0
-
-
-
-
-
- Description
+
+ True
+ False
+ 5
-
-
- 1
-
+
+ True
+ False
+ Administrator password (root):
+ 0
+
+
+ False
+ True
+ 0
+
-
-
-
-
- Label
-
-
- 2
-
+
+ True
+ False
+ 0
+
+ - Default
+ - Set a password
+
+
+
+ False
+ True
+ 1
+
-
-
-
-
- Size
-
-
- 3
-
+
+ True
+ False
+ False
+ False
+ ●
+ ublinux
+ password
+
+
+ True
+ True
+ 2
+
-
-
-
-
- Serial
-
-
- 4
-
+
+ True
+ False
+ True
+ True
+ image21
+
+
+
+ False
+ True
+ 3
+
+
+ False
+ True
+ end
+ 2
+
+
+ False
+ True
+ 0
+
- True
+ False
True
2
+
- True
+ False
True
0
-
+
True
False
+ vertical
5
-
- True
- True
- False
- True
-
-
-
- True
- False
- Choose file system type for the section:
-
-
-
-
- False
- True
- 0
-
-
-
-
- True
- False
- True
- 1
-
- - ext3
- - ext4
- - fat16
- - fat32
- - exfat
- - riserfs
- - udf
- - xfs
- - zfs
-
-
-
-
- True
- True
- 2
-
+
@@ -3175,44 +3382,11 @@ or continue working in the UBLinux Live environment.
-
+
+ +
True
- False
- 5
-
-
- True
- True
- False
- True
-
-
-
- True
- False
- Section name:
-
-
-
-
- False
- True
- 0
-
-
-
-
- True
- False
- True
-
-
-
- True
- True
- 2
-
-
+ True
+ True
False
@@ -3228,22 +3402,22 @@ or continue working in the UBLinux Live environment.
True
True
- 1
+ 6
- 12
+ 11
True
False
- Common Installation
+ Users
- 12
+ 11
False
@@ -3257,9 +3431,10 @@ or continue working in the UBLinux Live environment.
True
False
- Installation parameters
+ Startup services
+
@@ -3271,56 +3446,1915 @@ or continue working in the UBLinux Live environment.
-
+
True
- True
+ False
+ 0
+ none
-
+
True
False
- 10
- 5
-
-
- True
- False
- vertical
- 5
-
-
- True
- False
- vertical
- 5
-
-
- True
- False
- 5
-
-
- True
- False
- /com/ublinux/images/near_install_disk.png
-
-
- False
- True
- 0
-
-
-
-
- True
- False
- vertical
- 5
-
-
- True
- False
- Installation next to another system
- 0
+
+
+
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ 5
+
+
+ Add
+ True
+ True
+ True
+ Add service
+ image24
+
+
+ False
+ True
+ 0
+
+
+
+
+ Edit
+ True
+ False
+ True
+ True
+ Edit service
+ image23
+
+
+ False
+ True
+ 1
+
+
+
+
+ Remove
+ True
+ False
+ True
+ True
+ Remove service
+ image22
+
+
+ False
+ True
+ 2
+
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ True
+ in
+
+
+ True
+ True
+ StartupList
+ both
+
+
+
+
+
+ Autostart
+
+
+
+ 0
+
+
+
+
+
+
+ Unit
+
+
+
+ 1
+
+
+
+
+
+
+ Service
+
+
+
+ 2
+
+
+
+
+
+
+ Description
+
+
+ word
+ 450
+
+
+ 3
+
+
+
+
+
+
+
+
+ True
+ True
+ 3
+
+
+
+
+ 12
+
+
+
+
+ True
+ False
+ Startup configuration
+
+
+ 12
+ False
+
+
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+ Boot load
+
+
+
+
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 0
+ none
+
+
+ True
+ False
+
+
+
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+ 5
+
+
+ True
+ True
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ Boot selection menu timer:
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ True
+ BootloaderTimer
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ False
+ seconds
+
+
+ False
+ True
+ 3
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+
+
+ True
+ False
+ Default OS:
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+
+
+ True
+ True
+ 1
+
+
+
+
+ True
+ True
+ True
+ image19
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ 5
+
+
+ True
+ True
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ Login without password request
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ False
+ 0.019999999552965164
+ in
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+
+
+ True
+ False
+ 5
+
+
+ True
+ True
+ in
+ 128
+ 256
+
+
+ True
+ True
+ BootloadUsersList
+
+
+
+
+
+ Administrator
+
+
+
+ 0
+
+
+
+
+
+
+ Username
+
+
+
+ 1
+
+
+
+
+
+
+ Password
+
+
+
+ 3
+
+
+
+
+
+
+
+
+ True
+ True
+ 0
+
+
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ True
+ True
+ image17
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+ True
+ image18
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+
+
+
+
+ True
+ False
+ Bootloader menu users
+
+
+
+
+ False
+ True
+ 3
+
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ 13
+
+
+
+
+ True
+ False
+ Bootloader
+
+
+ 13
+ False
+
+
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+ Network
+
+
+
+
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 0
+ none
+
+
+ True
+ False
+
+
+
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+ 5
+
+
+ True
+ True
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ Domain name:
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ True
+ 10
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ False
+ Domain administrator:
+
+
+ False
+ True
+ 3
+
+
+
+
+ True
+ False
+ True
+ 10
+
+
+ False
+ True
+ 4
+
+
+
+
+ True
+ False
+ Password:
+
+
+ False
+ True
+ 5
+
+
+
+
+ True
+ False
+ True
+ False
+ *
+ 10
+
+
+ False
+ True
+ 6
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+
+
+ True
+ True
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ NTP Server:
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ False
+ 0
+
+ - Default
+ - DHCP
+ - NTP (ntp.org)
+ - NTP (vniiftri.ru)
+ - Manual
+ - Do not configure
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ False
+ True
+
+
+ True
+ True
+ 3
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ 5
+
+
+ True
+ True
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ Host name:
+ 0
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ True
+ auto
+
+
+ True
+ True
+ 2
+
+
+
+
+ Automatically
+ True
+ False
+ True
+ False
+ True
+
+
+ False
+ True
+ 3
+
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ False
+ 0.019999999552965164
+ in
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+ vertical
+ 5
+
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ +
+ True
+ True
+ True
+
+
+
+ False
+ True
+ end
+ 1
+
+
+
+
+
+
+
+
+ True
+ False
+ Net interfaces
+
+
+
+
+ False
+ True
+ 3
+
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ 14
+
+
+
+
+ True
+ False
+ Network
+
+
+ 14
+ False
+
+
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+ Installation
+
+
+
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+
+
+ False
+ True
+ 1
+
+
+
+
+ 15
+
+
+
+
+ True
+ False
+ Installation process
+
+
+ 15
+ False
+
+
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+ Installation completion
+
+
+
+
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ False
+
+
+ True
+ True
+ 1
+
+
+
+
+ True
+ False
+ end
+ Success
+
+
+
+
+
+
+ True
+ True
+ 2
+
+
+
+
+ True
+ False
+ start
+ You have UBLinux installed on your computer.
+You can reboot and use your new system
+or continue working in the UBLinux Live environment.
+ center
+ True
+
+
+
+
+
+ True
+ True
+ 3
+
+
+
+
+ 16
+
+
+
+
+ True
+ False
+ Completion
+
+
+ 16
+ False
+
+
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+ Completion
+
+
+
+
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ False
+
+
+ True
+ True
+ 1
+
+
+
+
+ True
+ False
+ end
+ Configuration has been saved
+
+
+
+
+
+
+ True
+ True
+ 2
+
+
+
+
+ True
+ False
+ start
+ You can safely exit configurator or return and create new configuration file.
+ center
+ True
+
+
+
+
+
+ True
+ True
+ 3
+
+
+
+
+ 17
+
+
+
+
+ True
+ False
+ Completed
+
+
+ 17
+ False
+
+
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+ Installation error
+
+
+
+
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ False
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ end
+ Error
+
+
+
+
+
+
+ True
+ True
+ 2
+
+
+
+
+ True
+ False
+ start
+ Error has occured while installation process
+ center
+ True
+
+
+
+
+
+ True
+ True
+ 3
+
+
+
+
+ 18
+
+
+
+
+ True
+ False
+ Configuration error
+
+
+ 18
+ False
+
+
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+ Configuration
+
+
+
+
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ False
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ end
+ Installer configuration has been finished
+
+
+
+
+
+
+ True
+ True
+ 2
+
+
+
+
+ True
+ False
+ start
+ Choose a save option on the header bar
+ center
+ True
+
+
+
+
+
+ True
+ True
+ 3
+
+
+
+
+ 19
+
+
+
+
+ True
+ False
+ Configuration end
+
+
+ 19
+ False
+
+
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+ Configuration
+
+
+
+
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ False
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ end
+ Configuration has been saved
+
+
+
+
+
+
+ True
+ True
+ 2
+
+
+
+
+ True
+ False
+ start
+ You can safely exit configurator or return and create new configuration file.
+ center
+ True
+
+
+
+
+
+ True
+ True
+ 3
+
+
+
+
+ 20
+
+
+
+
+ True
+ False
+ Configuration saved
+
+
+ 20
+ False
+
+
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+ Installation parameters
+
+
+
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+
+
+ True
+ False
+ 10
+ 5
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+ 5
+
+
+ True
+ False
+ /com/ublinux/images/clear_install_disk.png
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+ Installation
+ 0
+
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ Deleting all data on the selected disk and then installing the UBLinux system
+ 0
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ True
+ 1
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+
+
+ True
+ False
+ Select device:
+ 0
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+ True
+ Start GParted
+ image5
+
+
+
+ False
+ True
+ end
+ 1
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ True
+ in
+ 105
+ 350
+
+
+ True
+ True
+ DevicesList
+ 0
+
+
+
+
+
+ Device
+
+
+
+ 0
+
+
+
+
+
+
+ Description
+
+
+
+ 1
+
+
+
+
+
+
+ Label
+
+
+
+ 2
+
+
+
+
+
+
+ Size
+
+
+
+ 3
+
+
+
+
+
+
+ Serial
+
+
+
+ 4
+
+
+
+
+
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ vertical
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ vertical
+ 5
+
+
+ True
+ False
+ 5
+
+
+ True
+ False
+ True
+ True
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ Format
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ none
+ True
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+ 5
+
+
+ True
+ False
+ Device label:
+
+
+ False
+ True
+ 3
+
+
+
+
+ True
+ True
+
+
+ True
+ True
+ 4
+
+
+
+
+ True
+ False
+ File system type:
+
+
+ False
+ True
+ 5
+
+
+
+
+ True
+ False
+ 1
+
+ - ext3
+ - ext4
+ - fat16
+ - fat32
+ - exfat
+ - riserfs
+ - udf
+ - xfs
+ - zfs
+
+
+
+ True
+ True
+ 6
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ False
+ True
+ 2
+
+
+
+
+
+ False
+ True
+ 3
+
+
+
+
+
+
+
+
+ True
+ True
+ 1
+
+
+
+
+ 21
+
+
+
+
+ True
+ False
+ Common Installation
+
+
+ 21
+ False
+
+
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+ Installation parameters
+
+
+
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+
+
+ True
+ False
+ 10
+ 5
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+ 5
+
+
+ True
+ False
+ /com/ublinux/images/near_install_disk.png
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+ Installation next to another system
+ 0
@@ -3413,7 +5447,7 @@ installed.
-
+
True
True
True
@@ -3443,8 +5477,9 @@ installed.
True
in
105
+ 350
-
+
True
True
DevicesList
@@ -3511,14 +5546,14 @@ installed.
- True
+ False
True
1
- True
+ False
True
0
@@ -3532,7 +5567,7 @@ installed.
True
False
- Choose a section:
+ Choose a partition:
0
@@ -3547,8 +5582,9 @@ installed.
True
in
128
+ 350
-
+
True
True
PartitionsList
@@ -3615,210 +5651,286 @@ installed.
- True
+ False
True
1
- True
+ False
True
1
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ vertical
True
False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ vertical
5
-
+
True
- True
- False
- True
-
-
+ False
+ 5
+
+
+ True
+ False
+ Partition:
+ 0
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ label
+ 0
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+
+
+ True
+ True
+
+
+ False
+ True
+ 0
+
+
True
False
- Specify the size of the new partition for UBLinux OS:
+ Format
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+ 5
+
+
+ True
+ False
+ Size:
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+ 16
+ PartitionSize
+ 16
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ 1
+
+ - Mb
+ - Gb
+ - Tb
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ False
+ Partition mark:
+
+
+ False
+ True
+ 3
+
+
+
+
+ True
+ True
+
+
+ False
+ True
+ 4
+
+
+
+
+ True
+ False
+ File system type:
+
+
+ False
+ True
+ 5
+
+
+
+
+ True
+ False
+ 1
+
+ - ext3
+ - ext4
+ - fat16
+ - fat32
+ - exfat
+ - riserfs
+ - udf
+ - xfs
+ - zfs
+
+
+
+ True
+ True
+ 6
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+
+ False
+ True
+ 1
+
-
- False
- True
- 0
-
-
-
-
- True
- False
- True
- 0,0
- adjustment1
- 1
-
False
True
2
-
-
- True
- False
- True
- 1
-
- - Mb
- - Gb
- - Tb
-
-
-
-
- False
- True
- 3
-
-
-
-
- False
- True
- 2
-
-
-
-
- True
- True
- 1
-
-
-
-
- True
- False
- 5
-
-
- True
- True
- False
- True
-
-
-
- True
- True
- Choose file system type for the section:
-
-
-
-
- False
- True
- 0
-
-
-
-
- True
- False
- True
- 1
-
- - ext3
- - ext4
- - fat16
- - fat32
- - exfat
- - riserfs
- - udf
- - xfs
- - zfs
-
-
-
-
- True
- True
- 2
-
-
-
-
- Format
- True
- False
- True
- False
- True
-
-
- False
- True
- 3
-
-
-
-
- False
- True
- 2
-
-
-
-
- True
- False
- 5
-
-
- True
- True
- False
- True
-
-
-
- True
- False
- Section name:
-
-
False
True
- 0
-
-
-
-
- True
- False
- True
-
-
-
- True
- True
2
+
False
True
- 3
+ 4
@@ -3834,7 +5946,7 @@ installed.
- 13
+ 22
@@ -3844,7 +5956,7 @@ installed.
Installation next to system
- 13
+ 22
False
@@ -3891,6 +6003,10 @@ installed.
True
False
+ center
+ center
+ 20
+ 20
vertical
5
@@ -4132,7 +6248,7 @@ installed.
True
False
- Choose a section:
+ Choose a partition:
0
@@ -4229,7 +6345,7 @@ installed.
- True
+ False
True
1
@@ -4238,120 +6354,220 @@ installed.
True
False
- 5
+ vertical
-
+
True
- True
- False
- True
-
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ vertical
+ 5
-
+
True
False
- Choose file system type for the section:
+ 5
+
+
+ True
+ False
+ Partition:
+ 0
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ label
+ 0
+
+
+ False
+ True
+ 1
+
+
+
+ False
+ True
+ 0
+
-
-
- False
- True
- 0
-
-
-
-
- True
- False
- True
- 1
-
- - ext3
- - ext4
- - fat16
- - fat32
- - exfat
- - riserfs
- - udf
- - xfs
- - zfs
-
-
-
-
- True
- True
- 2
-
-
-
-
- Format
- True
- False
- True
- False
- True
-
-
-
- False
- True
- 3
-
-
-
-
- False
- True
- 2
-
-
-
-
- True
- False
- 5
-
-
- True
- True
- False
- True
-
-
+
+ True
+ False
+ 5
+
+
+ True
+ True
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ Format
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
True
False
- Section name:
+ vertical
+ 5
+
+
+ True
+ False
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+ 5
+
+
+ True
+ False
+ Partition label:
+
+
+ False
+ True
+ 3
+
+
+
+
+ True
+ True
+
+
+ True
+ True
+ 4
+
+
+
+
+ True
+ False
+ File system type:
+
+
+ False
+ True
+ 5
+
+
+
+
+ True
+ False
+ 1
+
+ - ext3
+ - ext4
+ - fat16
+ - fat32
+ - exfat
+ - riserfs
+ - udf
+ - xfs
+ - zfs
+
+
+
+ True
+ True
+ 6
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+
+
+ False
+ True
+ 1
+
+
+
+ False
+ True
+ 2
+
False
True
- 0
-
-
-
-
- True
- False
- True
-
-
-
- True
- True
2
+
False
True
- 3
+ 4
@@ -4367,7 +6583,7 @@ installed.
- 14
+ 23
@@ -4377,7 +6593,7 @@ installed.
Installation on same partition
- 14
+ 23
False
@@ -4391,7 +6607,7 @@ installed.
True
False
- Installation options
+ Installation parameters
@@ -4404,6 +6620,99 @@ installed.
0
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+ 5
+
+
+ True
+ False
+ /com/ublinux/images/manual_install_disk.png
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ vertical
+
+
+ True
+ False
+ Advanced installation mode
+ 0
+
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ Installing OS files, user data on different partitions, creating RAID, etc.
+ 0
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ True
+ 1
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ <b>Attention!</b> The selected OS UBLinux components will be installed
+separately into the selected partition.
+ True
+ 0
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 1
+
+
True
@@ -4417,6 +6726,7 @@ installed.
True
False
vertical
+ 5
True
@@ -4429,10 +6739,11 @@ installed.
False
5
-
+
True
False
- /com/ublinux/images/manual_install_disk.png
+ Select device:
+ 0
False
@@ -4441,62 +6752,115 @@ installed.
-
+
True
- False
- vertical
+ True
+ True
+ image20
+
+
+
+ False
+ True
+ end
+ 1
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+ in
+ 105
+
+
+ True
+ True
+ DevicesList
+ 0
+
+
+ none
+
+
-
- True
- False
- Advanced installation mode
- 0
-
-
-
+
+
+
+
+ 6
+ 5
+
+
-
- False
- True
- 0
-
-
- True
- False
- Installing OS files, user data on different partitions, creating RAID, etc.
- 0
+
+ Device
+
+
+
+ 0
+
+
+
+
+
+
+ Description
+
+
+
+ 1
+
+
+
+
+
+
+ Label
+
+
+
+ 2
+
+
+
+
+
+
+ Size
+
+
+
+ 3
+
+
+
+
+
+
+ Serial
+
+
+
+ 4
+
+
-
- False
- True
- 1
-
-
- True
- True
- 1
-
-
- False
- True
- 0
-
-
-
-
- True
- False
- <b>Attention!</b> The selected OS UBLinux components will be installed
-separately into the selected partition.
- True
- 0
-
False
True
@@ -4507,84 +6871,20 @@ separately into the selected partition.
False
True
- 1
+ 0
True
False
- vertical
5
-
+
True
- True
- False
- True
- True
-
-
- True
- False
- 5
-
-
- True
- False
- gtk-missing-image
-
-
- False
- True
- 0
-
-
-
-
- True
- False
- vertical
- 5
-
-
- True
- False
- GRUB install
- 0
-
-
-
-
-
-
- False
- True
- 0
-
-
-
-
- True
- False
- Install the GRUB bootloader
- 0
-
-
- False
- True
- 1
-
-
-
-
- True
- True
- 1
-
-
-
-
+ False
+ Virtual device type:
+ 0
False
@@ -4593,75 +6893,21 @@ separately into the selected partition.
-
+
True
- True
- False
- True
- True
- GrubInstallRadio
-
-
- True
- False
- 5
-
-
- True
- False
- gtk-missing-image
-
-
- False
- True
- 0
-
-
-
-
- True
- False
- vertical
- 5
-
-
- True
- False
- GRUB update
- 0
-
-
-
-
-
-
- False
- True
- 0
-
-
-
-
- True
- False
- Update (reinstall) the GRUB bootloader
- 0
-
-
- False
- True
- 1
-
-
-
-
- True
- True
- 1
-
-
-
-
+ False
+ False
+ 0
+
+ - No
+ - RAID0
+ - RAID1
+ - DAID4
+ - RAID5
+ - RAID6
+ - LVM
+ - LVM_DYNAMIC
+
False
@@ -4669,227 +6915,114 @@ separately into the selected partition.
1
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ vertical
+ 5
-
+
True
- True
- False
- True
- True
- GrubInstallRadio
-
-
- True
- False
- 5
-
-
- True
- False
- gtk-missing-image
-
-
- False
- True
- 0
-
-
-
-
- True
- False
- vertical
- 5
-
-
- True
- False
- Separate installation
- 0
-
-
-
-
-
-
- False
- True
- 0
-
-
-
-
- True
- False
- Installing OS components and user data on different disk partitions
- 0
-
-
- False
- True
- 1
-
-
-
-
- True
- True
- 1
-
-
-
-
+ False
+ Select partiton:
+ 0
False
True
- 2
+ 0
-
- True
- True
- False
- True
- True
- GrubInstallRadio
+
+ True
+ True
+ in
+ 140
-
+
True
- False
- 5
+ True
+ PartitionsList
+ 0
+
+
+ none
+
+
-
- True
- False
- gtk-missing-image
+
+
+
+
+ 8
+ 7
+
+
-
- False
- True
- 0
-
-
- True
- False
- vertical
- 5
+
+ Section
-
- True
- False
- OS only
- 0
-
-
-
-
-
-
- False
- True
- 0
-
+
+
+ 0
+
+
+
+
+
+ Capacity
-
- True
- False
- Installing only OS components without user data
- 0
-
-
- False
- True
- 1
-
+
+
+ 1
+
-
- True
- True
- 1
-
-
-
-
-
- False
- True
- 3
-
-
-
-
- True
- True
- False
- True
- True
- GrubInstallRadio
-
-
- True
- False
- 5
-
- True
- False
- gtk-missing-image
+
+ Free space
+
+
+
+ 2
+
+
-
- False
- True
- 0
-
-
- True
- False
- vertical
- 5
+
+ File system
-
- True
- False
- User data only
- 0
-
-
-
-
-
-
- False
- True
- 0
-
+
+
+ 3
+
+
+
+
+
+ Label
-
- True
- False
- Installing only user data without OS components
- 0
-
-
- False
- True
- 1
-
+
+
+ 4
+
-
- True
- True
- 1
-
@@ -4897,7 +7030,7 @@ separately into the selected partition.
False
True
- 4
+ 1
@@ -4907,114 +7040,84 @@ separately into the selected partition.
2
-
-
-
-
-
-
- True
- True
- 3
-
-
-
-
- 15
-
-
-
-
- True
- False
- Advanced installation
-
-
- 15
- False
-
-
-
-
- True
- False
- vertical
- 5
-
-
- True
- False
- vertical
- 5
-
-
- True
- False
- Installation parameters
-
-
-
-
-
-
-
- False
- True
- 0
-
-
-
-
- True
- True
-
-
- True
- False
True
False
- vertical
+ vertical
+ 5
+
+
+ True
+ False
+ vertical
+ 5
+
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ +
+ True
+ False
+ True
+ True
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ False
+ True
+ 3
+
+
+
+
+ True
+ False
5
-
+
True
False
- vertical
- 5
+ start
+ 0
+ none
True
False
+ 5
+ 5
+ 5
+ 5
+ vertical
5
-
-
- True
- False
- /com/ublinux/images/clear_install_disk.png
-
-
- False
- True
- 0
-
-
True
False
- vertical
5
True
False
- GRUB install
- 0
-
-
-
+ Load type
False
@@ -5023,43 +7126,39 @@ separately into the selected partition.
-
+
False
True
+ end
1
-
-
- True
- True
- 1
-
-
-
-
- False
- True
- 0
-
-
-
-
- True
- False
- 5
-
-
- True
- False
- Select device:
- 0
+
+
+ True
+ True
+
+
+ False
+ True
+ end
+ 2
+
+
False
@@ -5068,250 +7167,463 @@ separately into the selected partition.
-
- True
- True
- True
- image2
-
-
-
- False
- True
- end
- 1
-
-
-
-
- False
- True
- 1
-
-
-
-
- True
- True
- in
- 128
-
-
+
True
- True
- DevicesList
- 0
-
-
-
-
-
- Device
-
-
-
- 0
-
-
-
-
+ False
+ none
+ True
-
- Description
+
+ True
+ False
+ vertical
+ 5
-
-
- 1
-
+
+ True
+ False
+
+
+ False
+ True
+ 0
+
-
-
-
-
- Mark
-
-
- 2
-
+
+ True
+ False
+ 5
+
+
+ True
+ False
+ BIOS Boot sector
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+
+
+ False
+ True
+ end
+ 2
+
+
+
+
+ False
+ True
+ 1
+
-
-
-
-
- Size
-
-
- 3
-
+
+ True
+ False
+
+
+ False
+ True
+ 2
+
-
-
-
-
- Free
-
-
- 4
-
+
+ True
+ False
+ 5
+
+
+ True
+ False
+ EFI section
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+
+
+ False
+ True
+ end
+ 2
+
+
+
+
+ False
+ True
+ 4
+
+
+ False
+ True
+ 1
+
-
- False
- True
- 2
-
+
+
+
+
- False
+ True
True
0
-
+
True
False
- vertical
+ 0
+ none
-
+
True
False
- Choose a section:
- 0
-
-
- False
- True
- 0
-
-
-
-
- True
- True
- in
- 128
+ 5
+ 5
+ 5
+ 5
+ vertical
+ 5
-
+
True
- True
- PartitionsList
- 0
-
-
+ False
+ 5
+
+
+ True
+ False
+ Swap file
+
+
+ False
+ True
+ 0
+
-
- Section
+
+
+ False
+ True
+ end
+ 1
+
+
+
+
+ True
+ True
+
+
+ False
+ True
+ end
+ 2
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ none
+ True
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+
+
+ True
+ False
+ Automatically
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+
+
+ False
+ True
+ end
+ 2
+
+
+
+
+ False
+ True
+ 1
+
-
-
-
-
- Capacity
-
-
- 1
-
+
+ True
+ False
+
+
+ False
+ True
+ 2
+
-
-
-
-
- Free space
-
-
- 2
-
+
+ True
+ False
+ 5
+
+
+ True
+ False
+ Corresponds to RAM size
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+
+
+ False
+ True
+ end
+ 2
+
+
+
+
+ False
+ True
+ 3
+
-
-
-
-
- File system
-
-
- 3
-
+
+ True
+ False
+
+
+ False
+ True
+ 4
+
-
-
-
-
- Mark
-
-
- 4
-
+
+ True
+ False
+ 5
+
+
+ True
+ False
+ Fixed size:
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ True
+
+
+ False
+ True
+ end
+ 2
+
+
+
+
+ True
+ False
+ Mb
+
+
+ False
+ True
+ 3
+
+
+
+
+ True
+ True
+
+
+ False
+ True
+ 4
+
+
+
+
+ True
+ False
+ Gb
+
+
+ False
+ True
+ 5
+
+
+
+
+ False
+ True
+ 5
+
+
+ False
+ True
+ 1
+
-
- False
- True
- 1
-
+
+
+
+
- False
+ True
True
1
+
+ False
+ True
+ 4
+
-
- True
- True
- 1
-
True
True
- 1
+ 2
- 16
+ 24
True
False
- GRUB install
+ Advanced section
- 16
+ 24
False
@@ -5325,7 +7637,7 @@ separately into the selected partition.
True
False
- Installation parameters
+ Installation options
@@ -5351,7 +7663,6 @@ separately into the selected partition.
True
False
vertical
- 5
True
@@ -5367,7 +7678,7 @@ separately into the selected partition.
True
False
- /com/ublinux/images/clear_install_disk.png
+ /com/ublinux/images/manual_install_disk.png
False
@@ -5380,12 +7691,11 @@ separately into the selected partition.
True
False
vertical
- 5
True
False
- GRUB update
+ Advanced installation mode
0
@@ -5401,63 +7711,202 @@ separately into the selected partition.
True
False
- Update (reinstall) the GRUB bootloader
+ Installing OS files, user data on different partitions, creating RAID, etc.
0
- False
+ False
+ True
+ 1
+
+
+
+
+ True
+ True
+ 1
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ <b>Attention!</b> The selected OS UBLinux components will be installed
+separately into the selected partition.
+ True
+ 0
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ True
+ False
+ True
+ True
+
+
+ True
+ False
+ 5
+
+
+ True
+ False
+ gtk-missing-image
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+ GRUB install
+ 0
+
+
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ Install the GRUB bootloader
+ 0
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ True
+ 1
+
+
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+ False
+ True
+ True
+ GrubInstallRadio
+
+
+ True
+ False
+ 5
+
+
+ True
+ False
+ gtk-missing-image
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+ GRUB update
+ 0
+
+
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ Update (reinstall) the GRUB bootloader
+ 0
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
True
1
-
- True
- True
- 1
-
-
-
-
- False
- True
- 0
-
-
-
-
- True
- False
- 5
-
-
- True
- False
- Select device:
- 0
-
-
- False
- True
- 0
-
-
-
-
- True
- True
- True
- image3
-
-
-
- False
- True
- end
- 1
-
@@ -5467,74 +7916,72 @@ separately into the selected partition.
-
+
True
True
- in
- 128
+ False
+ True
+ True
+ GrubInstallRadio
-
+
True
- True
- DevicesList
- 0
-
-
-
-
-
- Device
-
-
-
- 0
-
-
-
-
-
-
- Description
-
-
-
- 1
-
-
-
-
+ False
+ 5
-
- Mark
-
-
-
- 2
-
-
+
+ True
+ False
+ gtk-missing-image
+
+ False
+ True
+ 0
+
-
- Size
+
+ True
+ False
+ vertical
+ 5
-
-
- 3
-
+
+ True
+ False
+ OS only
+ 0
+
+
+
+
+
+
+ False
+ True
+ 0
+
-
-
-
-
- Free
-
-
- 4
-
+
+ True
+ False
+ Installing only OS components without user data
+ 0
+
+
+ False
+ True
+ 1
+
+
+ True
+ True
+ 1
+
@@ -5542,103 +7989,76 @@ separately into the selected partition.
False
True
- 2
-
-
-
-
- False
- True
- 0
-
-
-
-
- True
- False
- vertical
-
-
- True
- False
- Choose a section:
- 0
-
-
- False
- True
- 0
+ 3
-
+
True
True
- in
- 128
+ False
+ True
+ True
+ GrubInstallRadio
-
+
True
- True
- PartitionsList
- 0
-
-
-
-
-
- Section
-
-
-
- 0
-
-
-
-
-
-
- Capacity
-
-
-
- 1
-
-
-
-
-
-
- Free space
-
-
-
- 2
-
-
-
-
+ False
+ 5
-
- File system
-
-
-
- 3
-
-
+
+ True
+ False
+ gtk-missing-image
+
+ False
+ True
+ 0
+
-
- Mark
+
+ True
+ False
+ vertical
+ 5
-
-
- 4
-
+
+ True
+ False
+ User data only
+ 0
+
+
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ Installing only user data without OS components
+ 0
+
+
+ False
+ True
+ 1
+
+
+ True
+ True
+ 1
+
@@ -5646,14 +8066,14 @@ separately into the selected partition.
False
True
- 1
+ 4
False
True
- 1
+ 2
@@ -5664,22 +8084,22 @@ separately into the selected partition.
True
True
- 1
+ 3
- 17
+ 25
True
False
- GRUB update
+ Recovery section
- 17
+ 25
False
@@ -5690,36 +8110,36 @@ separately into the selected partition.
vertical
5
-
+
True
False
- Installation parameters
-
-
-
-
-
-
-
- False
- True
- 0
-
-
-
-
- True
- True
+ vertical
+ 5
-
+
True
False
+ Installation parameters
+
+
+
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
-
+
True
False
- vertical
- 5
True
@@ -5730,12 +8150,67 @@ separately into the selected partition.
True
False
+ vertical
5
-
+
True
False
- /com/ublinux/images/clear_install_disk.png
+ 5
+
+
+ True
+ False
+ /com/ublinux/images/clear_install_disk.png
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+ GRUB install
+ 0
+
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ Install the GRUB bootloader
+ 0
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ True
+ 1
+
+
False
@@ -5747,17 +8222,13 @@ separately into the selected partition.
True
False
- vertical
5
True
False
- Separate installation
+ Select device:
0
-
-
-
False
@@ -5766,23 +8237,106 @@ separately into the selected partition.
-
+
True
- False
- Installing OS components and user data on different disk partitions
- 0
+ True
+ True
+ image2
+
+
+
+ False
+ True
+ end
+ 1
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ True
+ in
+ 128
+
+
+ True
+ True
+ DevicesList
+ 0
+
+
+
+
+
+ Device
+
+
+
+ 0
+
+
+
+
+
+
+ Description
+
+
+
+ 1
+
+
+
+
+
+
+ Mark
+
+
+
+ 2
+
+
+
+
+
+
+ Size
+
+
+
+ 3
+
+
+
+
+
+
+ Free
+
+
+
+ 4
+
+
+
+
-
- False
- True
- 1
-
- True
+ False
True
- 1
+ 2
@@ -5796,12 +8350,12 @@ separately into the selected partition.
True
False
- 5
+ vertical
True
False
- Select device:
+ Choose a partition:
0
@@ -5811,204 +8365,83 @@ separately into the selected partition.
-
- True
- True
- True
- image4
-
-
-
- False
- True
- end
- 1
-
-
-
-
- False
- True
- 1
-
-
-
-
- True
- True
- in
- 128
-
-
+
True
True
- DevicesList
- 0
-
-
-
-
-
- Device
-
-
-
- 0
-
-
-
-
-
-
- Description
-
-
-
- 1
-
-
-
-
-
-
- Mark
-
-
-
- 2
-
-
-
-
-
-
- Size
-
-
-
- 3
-
-
-
-
+ in
+ 128
-
- Free
-
-
-
- 4
-
+
+ True
+ True
+ PartitionsList
+ 0
+
+
-
-
-
-
-
-
- False
- True
- 2
-
-
-
-
- False
- True
- 0
-
-
-
-
- True
- False
- vertical
-
-
- True
- False
- Choose a section:
- 0
-
-
- False
- True
- 0
-
-
-
-
- True
- True
- in
- 128
-
-
- True
- True
- PartitionsList
- 0
-
-
-
-
-
- Section
-
-
- 0
-
+
+ Section
+
+
+
+ 0
+
+
+
-
-
-
-
- Capacity
-
-
- 1
-
+
+ Capacity
+
+
+
+ 1
+
+
+
-
-
-
-
- Free space
-
-
- 2
-
+
+ Free space
+
+
+
+ 2
+
+
+
-
-
-
-
- File system
-
-
- 3
-
+
+ File system
+
+
+
+ 3
+
+
+
-
-
-
-
- Mark
-
-
- 4
-
+
+ Mark
+
+
+
+ 4
+
+
+
+
+ False
+ True
+ 1
+
@@ -6018,15 +8451,15 @@ separately into the selected partition.
-
- False
- True
- 1
-
+
+ True
+ True
+ 1
+
@@ -6037,17 +8470,17 @@ separately into the selected partition.
- 18
+ 26
True
False
- Separate installation
+ GRUB install
- 18
+ 26
False
@@ -6121,7 +8554,7 @@ separately into the selected partition.
True
False
- Separate installation
+ GRUB update
0
@@ -6137,7 +8570,7 @@ separately into the selected partition.
True
False
- Installing OS components and user data on different disk partitions
+ Update (reinstall) the GRUB bootloader
0
@@ -6179,11 +8612,11 @@ separately into the selected partition.
-
+
True
True
True
- image10
+ image3
@@ -6209,9 +8642,8 @@ separately into the selected partition.
in
128
-
+
True
- False
True
DevicesList
0
@@ -6298,7 +8730,7 @@ separately into the selected partition.
True
False
- Choose a section:
+ Choose a partition:
0
@@ -6314,7 +8746,7 @@ separately into the selected partition.
in
128
-
+
True
True
PartitionsList
@@ -6406,17 +8838,17 @@ separately into the selected partition.
- 19
+ 27
True
False
- Separate installation - userdata
+ GRUB update
- 19
+ 27
False
@@ -6666,7 +9098,7 @@ separately into the selected partition.
True
False
- Choose a section:
+ Choose a partition:
0
@@ -6761,6 +9193,365 @@ separately into the selected partition.
1
+
+
+ True
+ False
+ vertical
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ vertical
+ 5
+
+
+ True
+ False
+ 5
+
+
+ True
+ False
+ Partition:
+ 0
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ label
+ 0
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+
+
+ True
+ True
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ Format
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ none
+ True
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+ 5
+
+
+ True
+ False
+ Size:
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+ PartitionSize
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ 1
+
+ - Mb
+ - Gb
+ - Tb
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ False
+ Partition mark:
+
+
+ False
+ True
+ 3
+
+
+
+
+ True
+ True
+
+
+ False
+ True
+ 4
+
+
+
+
+ True
+ False
+ File system type:
+
+
+ False
+ True
+ 5
+
+
+
+
+ True
+ False
+ False
+ 1
+
+ - ext3
+ - ext4
+ - fat16
+ - fat32
+ - exfat
+ - riserfs
+ - udf
+ - xfs
+ - zfs
+
+
+
+ True
+ True
+ 6
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+
+
+ True
+ False
+ File system mark:
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ Encryption:
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ False
+
+
+ False
+ True
+ 3
+
+
+
+
+ True
+ False
+ Encryption password:
+
+
+ False
+ True
+ 4
+
+
+
+
+ True
+ True
+
+
+ False
+ True
+ 5
+
+
+
+
+ True
+ True
+ True
+ image4
+
+
+
+ False
+ True
+ 6
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ False
+ True
+ 2
+
+
+
+
+
+ False
+ True
+ 2
+
+
@@ -6774,7 +9565,7 @@ separately into the selected partition.
- 20
+ 28
@@ -6784,7 +9575,7 @@ separately into the selected partition.
OS only
- 20
+ 28
False
@@ -6916,7 +9707,7 @@ separately into the selected partition.
-
+
True
True
True
@@ -7034,7 +9825,7 @@ separately into the selected partition.
True
False
- Choose a section:
+ Choose a partition:
0
@@ -7081,333 +9872,441 @@ separately into the selected partition.
-
- Free space
-
-
-
- 2
-
-
+
+ Free space
+
+
+
+ 2
+
+
+
+
+
+
+ File system
+
+
+
+ 3
+
+
+
+
+
+
+ Mark
+
+
+
+ 4
+
+
+
+
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ vertical
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ vertical
+ 5
+
+
+ True
+ False
+ 5
+
+
+ True
+ False
+ Partition:
+ 0
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ label
+ 0
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+
+
+ True
+ True
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ Format
+
+ False
+ True
+ 1
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ vertical
+ 5
-
- File system
-
-
-
- 3
-
-
+
+ True
+ False
+
+ False
+ True
+ 0
+
-
- Mark
+
+ True
+ False
+ none
+ True
-
-
- 4
-
-
-
-
-
-
-
-
- False
- True
- 1
-
-
-
-
- False
- True
- 1
-
-
-
-
-
-
-
-
- True
- True
- 1
-
-
-
-
- 21
-
-
-
-
- True
- False
- User data only
-
-
- 21
- False
-
-
-
-
- True
- False
- vertical
- 5
-
-
- True
- False
- Installation error
-
-
-
-
-
-
-
-
- False
- True
- 0
-
-
-
-
- False
-
-
- False
- True
- 1
-
-
-
-
- True
- False
- end
- Error
-
-
-
-
-
-
- True
- True
- 2
-
-
-
-
- True
- False
- start
- Error has occured while installation process
- center
- True
-
-
-
-
-
- True
- True
- 3
-
-
-
-
- 22
-
-
-
-
- True
- False
- Installation error
-
-
- 22
- False
-
-
-
-
- True
- False
- vertical
- 5
-
-
- True
- False
- Configuration
-
-
-
-
-
-
-
-
- False
- True
- 0
-
-
-
-
- False
-
-
- False
- True
- 1
-
-
-
-
- True
- False
- end
- Installer configuration has been finished
-
-
-
-
-
-
- True
- True
- 2
-
-
-
-
- True
- False
- start
- Choose a save option on the header bar
- center
- True
-
-
-
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+ 5
+
+
+ True
+ False
+ Size:
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+ 16
+ PartitionSize
+ 16
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ 1
+
+ - Mb
+ - Gb
+ - Tb
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ False
+ Partition label:
+
+
+ False
+ True
+ 3
+
+
+
+
+ True
+ True
+
+
+ False
+ True
+ 4
+
+
+
+
+ True
+ False
+ File system type:
+
+
+ False
+ True
+ 5
+
+
+
+
+ True
+ False
+ False
+ 1
+
+ - ext3
+ - ext4
+ - fat16
+ - fat32
+ - exfat
+ - riserfs
+ - udf
+ - xfs
+ - zfs
+
+
+
+ True
+ True
+ 6
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+
+
+ True
+ False
+ File system mark:
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ Encryption:
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ False
+
+
+ False
+ True
+ 3
+
+
+
+
+ True
+ False
+ Encryption password:
+
+
+ False
+ True
+ 4
+
+
+
+
+ True
+ True
+
+
+ False
+ True
+ 5
+
+
+
+
+ True
+ True
+ True
+ image10
+
+
+
+ False
+ True
+ 6
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ False
+ True
+ 2
+
+
+
+
+
+ False
+ True
+ 2
+
+
+
+
+
+
True
True
- 3
-
-
-
-
- 23
-
-
-
-
- True
- False
- Configuration ended
-
-
- 23
- False
-
-
-
-
- True
- False
- vertical
- 5
-
-
- True
- False
- Configuration
-
-
-
-
-
-
-
-
- False
- True
- 0
-
-
-
-
- False
-
-
- False
- True
1
-
-
- True
- False
- end
- Configuration has been saved
-
-
-
-
-
-
- True
- True
- 2
-
-
-
-
- True
- False
- start
- You can safely exit configurator or return and create new configuration file.
- center
- True
-
-
-
-
-
- True
- True
- 3
-
-
- 24
+ 29
True
False
- Configuration saved
+ User data only
- 24
+ 29
False
@@ -7422,64 +10321,6 @@ separately into the selected partition.
0
-
-
- True
- False
- center
- 5
-
-
- Cancel
- True
- False
- True
- True
- image7
-
-
- False
- True
- 0
-
-
-
-
- Back
- True
- False
- True
- True
- image8
-
-
- False
- True
- 1
-
-
-
-
- Next
- True
- True
- True
- image9
-
-
- False
- True
- 2
-
-
-
-
- False
- True
- end
- 1
-
-
True
@@ -7615,6 +10456,115 @@ separately into the selected partition.
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ 5
+
+
+ True
+ False
+ center
+ 5
+
+
+ Cancel
+ True
+ False
+ True
+ True
+ image7
+
+
+ False
+ True
+ 0
+
+
+
+
+ Back
+ False
+ True
+ True
+ image8
+
+
+ False
+ True
+ 1
+
+
+
+
+ Next
+ True
+ True
+ True
+ image9
+
+
+ False
+ True
+ 2
+
+
+
+
+ False
+ True
+ end
+ 3
+
+
+
+
+ Start installation scenario
+ True
+ True
+ True
+
+
+ False
+ True
+ 0
+
+
+
+
+ Source
+ True
+ True
+ True
+
+
+ False
+ True
+ 1
+
+
+
+
+ Skip installation
+ True
+ True
+ True
+
+
+ False
+ True
+ end
+ 2
+
+
+
False
True