diff --git a/source/ubinstall-gtk-config-hub.c b/source/ubinstall-gtk-config-hub.c index 0d7a642..4e3d292 100644 --- a/source/ubinstall-gtk-config-hub.c +++ b/source/ubinstall-gtk-config-hub.c @@ -70,7 +70,6 @@ void on_configuration_hub_selected(GtkWidget* self, main_window *widgets){ GList *list = NULL; list = g_list_prepend(list,widgets->HubPackagesListBox); list = g_list_prepend(list,widgets->HubSystemListBox); - list = g_list_prepend(list,widgets->HubHardwareListBox); list = g_list_prepend(list,widgets->HubPersonalListBox); list = g_list_reverse(list); GList *iter; @@ -118,11 +117,9 @@ void yon_configuration_hub_resize(main_window *widgets){ int max_width=0; int max_height=0; yon_configuration_hub_section_get_max_size(GTK_FLOW_BOX(widgets->HubPersonalListBox),&max_width,&max_height); - yon_configuration_hub_section_get_max_size(GTK_FLOW_BOX(widgets->HubHardwareListBox),&max_width,&max_height); yon_configuration_hub_section_get_max_size(GTK_FLOW_BOX(widgets->HubSystemListBox),&max_width,&max_height); yon_configuration_hub_section_get_max_size(GTK_FLOW_BOX(widgets->HubPackagesListBox),&max_width,&max_height); yon_configuration_hub_section_set_max_size(GTK_FLOW_BOX(widgets->HubPersonalListBox),max_width,max_height); - yon_configuration_hub_section_set_max_size(GTK_FLOW_BOX(widgets->HubHardwareListBox),max_width,max_height); yon_configuration_hub_section_set_max_size(GTK_FLOW_BOX(widgets->HubSystemListBox),max_width,max_height); yon_configuration_hub_section_set_max_size(GTK_FLOW_BOX(widgets->HubPackagesListBox),max_width,max_height); } @@ -175,13 +172,7 @@ void yon_flow_box_clear(GtkFlowBox *target){ void yon_configuration_hub_init(main_window *widgets){ yon_flow_box_clear(GTK_FLOW_BOX(widgets->HubPersonalListBox)); yon_flow_box_clear(GTK_FLOW_BOX(widgets->HubSystemListBox)); - yon_flow_box_clear(GTK_FLOW_BOX(widgets->HubHardwareListBox)); yon_flow_box_clear(GTK_FLOW_BOX(widgets->HubPackagesListBox)); - yon_configuration_hub_add(GTK_FLOW_BOX(widgets->HubPackagesListBox),KERNEL_LABEL,kernel_icon_path,YON_PAGE_KERNEL); - yon_configuration_hub_add(GTK_FLOW_BOX(widgets->HubPackagesListBox),KERNEL_ADDON_LABEL,kernel_icon_path,YON_PAGE_KERNEL_ADDON); - yon_configuration_hub_add(GTK_FLOW_BOX(widgets->HubPackagesListBox),SOFTWARE_LABEL,"com.ublinux.ubl-settings-update",YON_PAGE_SOFTWARE); - yon_configuration_hub_add(GTK_FLOW_BOX(widgets->HubPackagesListBox),PACMAN_SOFTWARE_LABEL,"com.ublinux.ubl-settings-repomanager",YON_PAGE_PACMAN_SOFTWARE); - yon_configuration_hub_add(GTK_FLOW_BOX(widgets->HubPackagesListBox),PACKAGES_SECTION_LABEL,"com.ublinux.ubl-settings-repomanager",YON_PAGE_PACKAGES); yon_configuration_hub_add(GTK_FLOW_BOX(widgets->HubPersonalListBox),REGION_ICON_LABEL,"com.ublinux.ubl-settings-system",YON_PAGE_REGION); yon_configuration_hub_add(GTK_FLOW_BOX(widgets->HubPersonalListBox),LOCALE_LANGUAGE_LABEL,"com.ublinux.ubl-settings-system",YON_PAGE_LANGUAGE); yon_configuration_hub_add(GTK_FLOW_BOX(widgets->HubPersonalListBox),KEYBOARD_TAB_LABEL,"com.ublinux.ubl-settings-keyboard",YON_PAGE_KEYBOARD); @@ -189,5 +180,10 @@ void yon_configuration_hub_init(main_window *widgets){ yon_configuration_hub_add(GTK_FLOW_BOX(widgets->HubSystemListBox),STARTUP_LABEL,"com.ublinux.ubl-settings-info",YON_PAGE_STARTUP); yon_configuration_hub_add(GTK_FLOW_BOX(widgets->HubSystemListBox),BOOTLOADER_LABEL,"com.ublinux.ubl-settings-bootloader",YON_PAGE_BOOTLOADER); yon_configuration_hub_add(GTK_FLOW_BOX(widgets->HubSystemListBox),NETWORK_LABEL,"com.ublinux.ubl-settings-multiseat",YON_PAGE_NETWORK); + yon_configuration_hub_add(GTK_FLOW_BOX(widgets->HubPackagesListBox),KERNEL_LABEL,kernel_icon_path,YON_PAGE_KERNEL); + yon_configuration_hub_add(GTK_FLOW_BOX(widgets->HubPackagesListBox),KERNEL_ADDON_LABEL,kernel_icon_path,YON_PAGE_KERNEL_ADDON); + yon_configuration_hub_add(GTK_FLOW_BOX(widgets->HubPackagesListBox),PACKAGES_SECTION_LABEL,"com.ublinux.ubl-settings-repomanager",YON_PAGE_PACKAGES); + yon_configuration_hub_add(GTK_FLOW_BOX(widgets->HubPackagesListBox),SOFTWARE_LABEL,"com.ublinux.ubl-settings-update",YON_PAGE_SOFTWARE); + yon_configuration_hub_add(GTK_FLOW_BOX(widgets->HubPackagesListBox),PACMAN_SOFTWARE_LABEL,"com.ublinux.ubl-settings-repomanager",YON_PAGE_PACMAN_SOFTWARE); yon_configuration_hub_resize(widgets); } \ No newline at end of file diff --git a/source/ubinstall-gtk-decorations.c b/source/ubinstall-gtk-decorations.c index a87fa85..e83c4ec 100644 --- a/source/ubinstall-gtk-decorations.c +++ b/source/ubinstall-gtk-decorations.c @@ -137,7 +137,7 @@ void yon_install_slider_init(main_window *widgets){ yon_install_slider_update(widgets); gtk_overlay_add_overlay(GTK_OVERLAY(widgets->InstallationSliderArrowsOverlay),widgets->NextInstallationSliderImage); gtk_overlay_add_overlay(GTK_OVERLAY(widgets->InstallationSliderArrowsOverlay),widgets->PrevInstallationSliderImage); - g_timeout_add_seconds(10,(GSourceFunc)on_install_slider_slide,widgets); + g_timeout_add_seconds(5,(GSourceFunc)on_install_slider_slide,widgets); } gboolean on_install_slider_slide_proceed(main_window *widgets){ diff --git a/source/ubinstall-gtk-page-switch.c b/source/ubinstall-gtk-page-switch.c index 0aa7e48..db62c71 100644 --- a/source/ubinstall-gtk-page-switch.c +++ b/source/ubinstall-gtk-page-switch.c @@ -120,6 +120,7 @@ void yon_navigation_buttons_set_sensetiveness(main_window *widgets){ case YON_PAGE_INSTALLATION: gtk_widget_set_sensitive(widgets->NextButton,0); gtk_widget_set_sensitive(widgets->BackButton,0); + gtk_widget_set_sensitive(widgets->CancelInstallButton,1); break; case YON_PAGE_CONFIGURE_END: gtk_button_set_label(GTK_BUTTON(widgets->NextButton),SAVE_AND_EXIT_LABEL); diff --git a/source/ubinstall-gtk-source.c b/source/ubinstall-gtk-source.c index f507f3c..fe0adfd 100644 --- a/source/ubinstall-gtk-source.c +++ b/source/ubinstall-gtk-source.c @@ -31,10 +31,16 @@ source_element *yon_source_element_new(){ g_signal_connect(G_OBJECT(element->PathButton),"clicked",G_CALLBACK(on_source_choose),element); g_signal_connect(G_OBJECT(element->TypeCombo),"changed",G_CALLBACK(on_source_changed),element); g_object_set_data(G_OBJECT(element->PathButton),"combo",element->TypeCombo); + g_object_set_data(G_OBJECT(element->MainBox),"source_element",element); g_object_set_data(G_OBJECT(element->PathButton),"target_combo",element->TypeCombo); g_object_set_data(G_OBJECT(element->TypeCombo),"target",element->DeviceCombo); g_object_set_data(G_OBJECT(element->TypeCombo),"button",element->PathButton); g_object_set_data(G_OBJECT(element->TypeCombo),"combo",element->PathEntry); + gtk_widget_set_sensitive(element->DeviceCombo,0); + gtk_widget_set_sensitive(element->TypeCombo,0); + gtk_widget_set_sensitive(element->PathEntry,0); + gtk_widget_set_sensitive(element->PathButton,0); + gtk_widget_hide(element->PathButton); int size; config_str parts = yon_config_load(get_parts_and_devices_command, &size); for (int i=0;iStatusBox),SOURCE_CREATE_ONGOING_ERROR_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); } + char *sources_list = NULL; + GList *list = gtk_container_get_children(GTK_CONTAINER(window->AddBox)); + GList *iter; + for (iter=list;iter;iter=iter->next){ + source_element *element = NULL; + element = g_object_get_data(G_OBJECT(iter->data),"source_element"); + switch(gtk_combo_box_get_active(GTK_COMBO_BOX(element->TypeCombo))){ + case 0:{ + char *cur = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(element->DeviceCombo)); + if (yon_char_check_element(sources_list,cur,",")){ + yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),VALUE_REPEAT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); + yon_ubl_status_highlight_incorrect(element->DeviceCombo); + return; + } + char *temp = yon_char_append_element(sources_list,cur,","); + if (!yon_char_is_empty(sources_list)) free(sources_list); + sources_list = temp; + } break; + case 1:{ + char *cur = (char*)gtk_entry_get_text(GTK_ENTRY(element->PathEntry)); + if (yon_char_check_element(sources_list,cur,",")){ + yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),VALUE_REPEAT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); + yon_ubl_status_highlight_incorrect(element->DeviceCombo); + return; + } + char *temp = yon_char_append_element(sources_list,cur,","); + if (!yon_char_is_empty(sources_list)) free(sources_list); + sources_list = temp; + } break; + case 2:{ + char *cur = (char*)gtk_entry_get_text(GTK_ENTRY(element->PathEntry)); + if (yon_char_check_element(sources_list,cur,",")){ + yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),VALUE_REPEAT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); + yon_ubl_status_highlight_incorrect(element->DeviceCombo); + return; + } + char *temp = yon_char_append_element(sources_list,cur,","); + if (!yon_char_is_empty(sources_list)) free(sources_list); + sources_list = temp; + } break; + } + } + if (!yon_char_is_empty(sources_list)){ + yon_config_register(source_parameter,source_parameter_command,sources_list); + } else { + yon_config_remove_by_key(source_parameter); + } int size; config_str paths = NULL; dictionary *dict; @@ -161,7 +214,6 @@ void on_source_accept(GtkWidget *,source_window *window){ return; } char *parameter_string = yon_char_parsed_to_string(paths,(int)size,","); - yon_config_register(source_parameter,source_parameter_command,parameter_string); free(parameter_string); on_subwindow_close(window->Window); @@ -208,7 +260,19 @@ source_window *yon_source_window_new(){ g_object_set_data(G_OBJECT(window->TypeCombo),"target",window->DeviceCombo); g_object_set_data(G_OBJECT(window->TypeCombo),"button",window->PathButton); g_object_set_data(G_OBJECT(window->TypeCombo),"combo",window->PathEntry); - int size; + { + char *config_parameter = config(source_parameter); + if (window->sources){ + yon_dictionary_free_all(window->sources,NULL); + } + int size; + config_str parsed = yon_char_parse(config_parameter,&size,","); + for (int i=0;isources,parsed[i],NULL); + } + yon_char_parsed_free(parsed,size); + } + int size; config_str parts = yon_config_load(get_parts_and_devices_command, &size); for (int i=0;iAutoSwitch),0); - int size; - config_str parsed = yon_char_parse(sources,&size,","); - for (int i=0;isources,parsed[i],NULL); - } - yon_char_parsed_free(parsed,size); - } g_object_set_data(G_OBJECT(window->Window),"widgets",widgets); yon_source_update(window); gtk_widget_show(window->Window); diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index bda27e4..e847944 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -853,7 +853,6 @@ void yon_main_window_create(main_window *widgets){ widgets->PackagesList = GTK_TREE_STORE(gtk_builder_get_object(builder,"Packages")); widgets->HubPersonalListBox = yon_gtk_builder_get_widget(builder,"HubPersonalListBox"); - widgets->HubHardwareListBox = yon_gtk_builder_get_widget(builder,"HubHardwareListBox"); widgets->HubSystemListBox = yon_gtk_builder_get_widget(builder,"HubSystemListBox"); widgets->HubPackagesListBox = yon_gtk_builder_get_widget(builder,"HubPackagesListBox"); @@ -991,11 +990,9 @@ void yon_main_window_create(main_window *widgets){ g_signal_connect(G_OBJECT(widgets->PackagesChosenCell),"toggled",G_CALLBACK(yon_on_packages_chosen),widgets); g_signal_connect(G_OBJECT(widgets->HubPersonalListBox),"child-activated",G_CALLBACK(on_configuration_hub_open),widgets); - g_signal_connect(G_OBJECT(widgets->HubHardwareListBox),"child-activated",G_CALLBACK(on_configuration_hub_open),widgets); g_signal_connect(G_OBJECT(widgets->HubSystemListBox),"child-activated",G_CALLBACK(on_configuration_hub_open),widgets); g_signal_connect(G_OBJECT(widgets->HubPackagesListBox),"child-activated",G_CALLBACK(on_configuration_hub_open),widgets); g_signal_connect(G_OBJECT(widgets->HubPersonalListBox),"selected-children-changed",G_CALLBACK(on_configuration_hub_selected),widgets); - g_signal_connect(G_OBJECT(widgets->HubHardwareListBox),"selected-children-changed",G_CALLBACK(on_configuration_hub_selected),widgets); g_signal_connect(G_OBJECT(widgets->HubSystemListBox),"selected-children-changed",G_CALLBACK(on_configuration_hub_selected),widgets); g_signal_connect(G_OBJECT(widgets->HubPackagesListBox),"selected-children-changed",G_CALLBACK(on_configuration_hub_selected),widgets); diff --git a/source/ubinstall-gtk.h b/source/ubinstall-gtk.h index f31d507..c8dfb16 100755 --- a/source/ubinstall-gtk.h +++ b/source/ubinstall-gtk.h @@ -48,6 +48,7 @@ #define kernel_icon_path "com.ublinux.ubl-settings-kernel" #define untoggled_icon_path "com.ublinux.libublsettingsui-gtk3.untoggled-symbolic" #define toggled_icon_path "com.ublinux.libublsettingsui-gtk3.toggled-symbolic" +#define add_icon_path "com.ublinux.libublsettingsui-gtk3.increase-symbolic" #define LocalePath "/usr/share/locale" #define LocaleName "ubinstall-gtk" @@ -739,7 +740,6 @@ typedef struct { // Configuration hub slide section GtkWidget *HubPersonalListBox; - GtkWidget *HubHardwareListBox; GtkWidget *HubSystemListBox; GtkWidget *HubPackagesListBox; diff --git a/source/ubl-strings.h b/source/ubl-strings.h index 72f4ee0..fe09696 100644 --- a/source/ubl-strings.h +++ b/source/ubl-strings.h @@ -260,7 +260,7 @@ NULL) #define AVAILABLE_LOCALES_LABEL _("Available locales in the system:") #define SYSTEM_LOCALE_LABEL _("System locale") #define LOCALE_LABEL _("Locale") -#define LOCALE_LANGUAGE_LABEL _("Language") +#define LOCALE_LANGUAGE_LABEL _("System language") #define TERRITORY_LABEL _("Territory") #define LANGUAGE_TITLE_INFO_LABEL _("Specify your preferred system languages") #define REMOVE_LOCALE_TOOLTIP_LABEL _("Remove locale") @@ -268,12 +268,12 @@ NULL) #define PERSONAL_SECTION_LABEL _("Personal") #define HARDWARE_SECTION_LABEL _("Hardware") #define SYSTEM_SECTION_LABEL _("System") -#define PACKAGES_SECTION_LABEL _("Packages") +#define PACKAGES_SECTION_LABEL _("Installing Modules") #define KERNEL_LABEL _("Kernel") #define KERNEL_ADDON_LABEL _("Kernel addons") -#define SOFTWARE_LABEL _("Choose additional components") -#define PACMAN_SOFTWARE_LABEL _("Choose additional components") -#define REGION_ICON_LABEL _("Region") +#define SOFTWARE_LABEL _("Installing software by groups") +#define PACMAN_SOFTWARE_LABEL _("Installing Packages") +#define REGION_ICON_LABEL _("Location") #define STARTUP_LABEL _("Startup services") #define BOOTLOADER_LABEL _("Boot load") #define NETWORK_LABEL _("Network") diff --git a/ubinstall-gtk-source.glade b/ubinstall-gtk-source.glade index ac022cc..d73bd62 100644 --- a/ubinstall-gtk-source.glade +++ b/ubinstall-gtk-source.glade @@ -47,8 +47,8 @@ 5 5 5 - 15 - 15 + 5 + 5 vertical 5 @@ -139,6 +139,89 @@ 0 + + + True + False + 5 + + + True + False + 0 + + Device + Folder + ISO-image + + + + False + True + 0 + + + + + True + + + True + True + 1 + + + + + True + False + 0 + + + True + True + 2 + + + + + True + True + image1 + + + + False + True + 3 + + + + + True + True + True + image2 + + + + False + True + 4 + + + + + False + True + end + 1 + + True @@ -166,89 +249,6 @@ False vertical 5 - - - True - False - 5 - - - True - False - 0 - - Device - Folder - ISO-image - - - - False - True - 0 - - - - - True - - - True - True - 1 - - - - - True - False - 0 - - - True - True - 2 - - - - - True - True - image1 - - - - False - True - 3 - - - - - True - True - True - image2 - - - - False - True - 4 - - - - - False - True - end - 0 - - True diff --git a/ubinstall-gtk.glade b/ubinstall-gtk.glade index 57abc70..324ea77 100644 --- a/ubinstall-gtk.glade +++ b/ubinstall-gtk.glade @@ -758,7 +758,6 @@ agreement 5 5 left - False True @@ -1999,7 +1998,7 @@ agreement True False - Configuring the system + Setting the system True 0 @@ -2129,54 +2128,6 @@ agreement 0 - - - True - False - vertical - 5 - - - True - False - Hardware - 0 - - - - - - - False - True - 0 - - - - - True - False - True - 5 - 5 - 150 - False - - - False - True - 1 - - - - - False - True - 1 - - True @@ -2235,7 +2186,7 @@ agreement True False - Packages + Modules and packages 0 @@ -2824,7 +2775,7 @@ agreement True False - Selecting additional installation components + Installing Modules True 0 @@ -2844,7 +2795,7 @@ agreement True False - Selecting software from the installation media + Selecting software modules to install from the repository. Internet access is required center True 0 @@ -3014,7 +2965,7 @@ agreement True False - Selecting additional components and software + Installing Packages True 0 @@ -3034,7 +2985,7 @@ agreement True False - Search and select the software you need to install by package name. Internet access required + Selecting software packages to install from the repository. Internet access is required center True 0 @@ -6155,7 +6106,7 @@ agreement True False - Additional system components + Installing software by groups True 0 @@ -6175,7 +6126,7 @@ agreement True False - Configuring the installation of additional components + Selecting the software group to install from the repository. Internet access is required center True 0