diff --git a/source/ubl-settings-services.c b/source/ubl-settings-services.c index 0a6a203..82f2b80 100644 --- a/source/ubl-settings-services.c +++ b/source/ubl-settings-services.c @@ -1427,48 +1427,19 @@ void yon_service_update(main_window *widgets){ } void* yon_interface_update(main_window *widgets){ - // dictionary *dict = yon_systemd_get_list(); - // if (dict){} if (widgets){ g_idle_add((GSourceFunc)yon_interface_list_models_disconnect,widgets); int system_size; config_str system_services = yon_config_load(load_services_command,&system_size); - // int system_units_size; - // config_str system_units = yon_config_load(load_system_units_command,&system_units_size); int user_size; config_str user_services = yon_config_load(load_user_units_command,&user_size); - // int user_units_size; - // config_str user_units = yon_config_load(load_user_units_command,&user_units_size); int config_size; config_str config_files = yon_config_load(get_config_files_command,&config_size); int timers_size; config_str timers = yon_config_load(get_timers_command,&timers_size); struct json_object *jsobject = json_tokener_parse(timers[0]); - // int launched_size; - // config_str launched = yon_config_load(load_launched_command,&launched_size); - // for (int i=0;idata)->name); - // struct system_services_data *data = malloc(sizeof(struct system_services_data)); - // { - // data->widgets=widgets; - // data->SystemAutostart=((systemd_struct*)dact->data)->enable; - // data->SystemLaunched=((systemd_struct*)dact->data)->active; - // data->Name=((systemd_struct*)dact->data)->name; - // data->Descr=((systemd_struct*)dact->data)->description; - // data->Type = type; - // data->Loaded=((systemd_struct*)dact->data)->load; - // data->Active=((systemd_struct*)dact->data)->active; - // data->State=((systemd_struct*)dact->data)->state; - // } - // g_idle_add((GSourceFunc)yon_system_set,data); - // } - for (int i=0; iSystemList,&iter); - // enum YON_UNIT_TYPE type = yon_get_unit_type(system_units[i]); - // gtk_list_store_set(widgets->SystemList,&iter,0,0,1,0,2,0,3,0,4,0,5,system_units[i],6,"",7,type,8,0,9,0,10,0,11,_("disabled"),13,"disabled",-1); - - // } - // } - - // for (int i=0; iwidgets=widgets; - // data->SystemAutostart=0;//loaded; - // data->SystemLaunched=0;//active; - // data->Name=yon_char_new(parsed[0]); - // data->Descr=yon_char_new(parsed[4]); - // data->Type = type; - // data->Loaded=strcmp(parsed[1],"loaded")?0:1; - // data->Active=strcmp(parsed[2],"active")?0:1; - // data->State=yon_char_new(_(parsed[3])); - // } - // g_idle_add((GSourceFunc)yon_user_set,data); - // } - // yon_char_parsed_free(parsed,size); - // } - for (int i=0; iUserList,&iter); - // enum YON_UNIT_TYPE type = yon_get_unit_type(user_units[i]); - // gtk_list_store_set(widgets->UserList,&iter,0,0,1,0,2,0,3,0,4,0,5,user_units[i],6,"",7,type,8,0,9,0,10,0,11,_("disabled"),13,"disabled",-1); - - // } - // } - int descr_size; config_str config_descr = yon_resource_open_file(systemd_config_path,&descr_size); for (int i=0; i