|
|
|
|
@ -1,7 +1,12 @@
|
|
|
|
|
#include "ubinstall-gtk.h"
|
|
|
|
|
|
|
|
|
|
int yon_configuration_hub_save(main_window *){
|
|
|
|
|
|
|
|
|
|
int yon_configuration_hub_save(main_window *widgets){
|
|
|
|
|
char *finish_button = (char *)gtk_combo_box_get_active_id(GTK_COMBO_BOX(widgets->ConfigHubRebootCombo));
|
|
|
|
|
if (!yon_char_is_empty(finish_button)){
|
|
|
|
|
yon_config_register(finish_parameter,finish_parameter_command,finish_button);
|
|
|
|
|
} else {
|
|
|
|
|
yon_config_remove_by_key(finish_parameter);
|
|
|
|
|
}
|
|
|
|
|
if (!main_config.configure_mode){
|
|
|
|
|
int size;
|
|
|
|
|
config_str parameters = yon_config_get_save_parameters_by_key(&size,modules_parameter,
|
|
|
|
|
@ -32,6 +37,7 @@ int yon_configuration_hub_save(main_window *){
|
|
|
|
|
GRUB_TIMEOUT_parameter,
|
|
|
|
|
GRUB_DEFAULT_parameter,
|
|
|
|
|
AUTOLOGINUSER_parameter,
|
|
|
|
|
finish_parameter,
|
|
|
|
|
NULL);
|
|
|
|
|
if (parameters){
|
|
|
|
|
char *command_parameters = yon_char_parsed_to_string(parameters,size," -- ");
|
|
|
|
|
@ -170,6 +176,18 @@ void yon_flow_box_clear(GtkFlowBox *target){
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void yon_configuration_hub_init(main_window *widgets){
|
|
|
|
|
gtk_combo_box_text_remove_all(GTK_COMBO_BOX_TEXT(widgets->ConfigHubRebootCombo));
|
|
|
|
|
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(widgets->ConfigHubRebootCombo),NULL,DEFAULT_LABEL);
|
|
|
|
|
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(widgets->ConfigHubRebootCombo),"reboot",REBOOT_LABEL);
|
|
|
|
|
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(widgets->ConfigHubRebootCombo),"shutdown",SHUTDOWN_LABEL);
|
|
|
|
|
char *finish_string = config(finish_parameter);
|
|
|
|
|
if (!yon_char_is_empty(finish_string)){
|
|
|
|
|
gtk_combo_box_set_active_id(GTK_COMBO_BOX(widgets->ConfigHubRebootCombo),finish_string);
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->ConfigHubRebootCombo),0);
|
|
|
|
|
}
|
|
|
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->ConfigHubRebootCombo),0);
|
|
|
|
|
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->HubPackagesListBox));
|
|
|
|
|
|