|
|
|
@ -53,13 +53,26 @@ void device_disk_parsed() {
|
|
|
|
|
philos_free_string_array(&responce, size);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void device_fill_disk(GtkWidget *combo_box_text)
|
|
|
|
|
{
|
|
|
|
|
if (vec_disk.vectorList.total > 0) {
|
|
|
|
|
for (int index = 0; index < vec_disk.vectorList.total; index++)
|
|
|
|
|
void device_fill_disk(GtkWidget *combo_box_text, vector* vec_filt)
|
|
|
|
|
{
|
|
|
|
|
vector vec;
|
|
|
|
|
vector_init(&vec);
|
|
|
|
|
vec.pfVectorCopy(&vec, &vec_disk);
|
|
|
|
|
for (int i = 0; i < vec_filt->vectorList.total; i++) {
|
|
|
|
|
disk_status* _config_disk_remove = (disk_status*)vec_filt->pfVectorGet(vec_filt, i);
|
|
|
|
|
for (int index = 0; index < vec.vectorList.total; index++) {
|
|
|
|
|
device_config* _config_disk = (device_config*)vec.pfVectorGet(&vec, index);
|
|
|
|
|
if (strstr(_config_disk->name_disk, _config_disk_remove->device)) {
|
|
|
|
|
vec.pfVectorDelete(&vec, index);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (vec.vectorList.total > 0) {
|
|
|
|
|
for (int index = 0; index < vec.vectorList.total; index++)
|
|
|
|
|
{
|
|
|
|
|
device_config* obj_device_config = (device_config*)vec_disk.pfVectorGet(&vec_disk, index);
|
|
|
|
|
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo_box_text), yon_char_new(obj_device_config->description_disk));
|
|
|
|
|
device_config* _config_disk_remove = (device_config*)vec.pfVectorGet(&vec, index);
|
|
|
|
|
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo_box_text), yon_char_new(_config_disk_remove->description_disk));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|