/* Apply Function */ static void _apply(E_Config_Dialog_Data *cfdata) { Eco_Option *value; int val; e_widget_slider_value_int_get(o_opacity, &val); int sel = e_widget_ilist_selected_get(o_matches); value = eco_config_option_list_nth(cfg_screen, "opacity_values", sel); if (value) value->intValue = val; eco_config_group_apply("core"); }
/* * Store changes to the configuration made in the dialog. * These go back to the main config object. */ static int _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata) { Xplanet_Config *xplanet_config; int config_ok; // Pull out the value from the source ilist config_ok = parse_config_gui(cfdata); if (config_ok) { printf("Applying config\n"); printf("Delay %d\n",cfdata->delay); printf("Label text: %s\n", cfdata->local_xplanet.label_text); eplanet_conf->delay = cfdata->delay; eplanet_conf->startDelay = cfdata->startDelay; eplanet_conf->taskPriority = cfdata->taskPriority; eplanet_conf->loadLimit = cfdata->loadLimit; eplanet_conf->minRamLimit = cfdata->minRamLimit; eplanet_conf->disableOnBattery = cfdata->disableOnBattery; xplanet_config = eina_list_nth(eplanet_conf->xplanet_configs, cfdata->current_config); xplanet_config->body = cfdata->local_xplanet.body; xplanet_config->source_type = cfdata->local_xplanet.source_type; xplanet_config->origin = cfdata->local_xplanet.origin; xplanet_config->projection = cfdata->local_xplanet.projection; xplanet_config->viewpos_type = cfdata->local_xplanet.viewpos_type; xplanet_config->viewpos_lat = cfdata->local_xplanet.viewpos_lat; xplanet_config->viewpos_lon = cfdata->local_xplanet.viewpos_lon; xplanet_config->use_localtime = cfdata->local_xplanet.use_localtime; e_widget_slider_value_int_get(cfdata->gui.o_localtime, &(xplanet_config->localtime)); xplanet_config->viewpos_file = cfdata->local_xplanet.viewpos_file; xplanet_config->show_label = cfdata->local_xplanet.show_label; xplanet_config->label_text = strdup(cfdata->local_xplanet.label_text); xplanet_config->label_time = cfdata->local_xplanet.label_time; xplanet_config->label_pos = cfdata->local_xplanet.label_pos; xplanet_config->label_pos_other = strdup(cfdata->local_xplanet.label_pos_other); xplanet_config->use_config = cfdata->local_xplanet.use_config; xplanet_config->config_name = strdup(cfdata->local_xplanet.config_name); xplanet_config->extra_options = strdup(cfdata->local_xplanet.extra_options); e_config_save_queue(); cfdata->config_updated = 1; } return config_ok; }