Добавлена установка значения в окне редактирование виджета устройства

pull/4/head
Igor Belitskiy 2 years ago
parent 95920b81a1
commit d0cc71035c

@ -709,6 +709,7 @@ void wrapper_edit_show() {
char* str_iter = gtk_tree_model_get_string_from_iter(model, &iter); char* str_iter = gtk_tree_model_get_string_from_iter(model, &iter);
int index = atoi(str_iter); int index = atoi(str_iter);
edit_show(NULL, glade_path); edit_show(NULL, glade_path);
edit_set_select_device(main_config.disk[index]);
edit_set_hard(main_config.hard_raw_limit[index], main_config.hard_raw_limit_size[index]); edit_set_hard(main_config.hard_raw_limit[index], main_config.hard_raw_limit_size[index]);
edit_set_limit_cpu(main_config.cpu_limit[index], main_config.cpu_limit_size[index]); edit_set_limit_cpu(main_config.cpu_limit[index], main_config.cpu_limit_size[index]);
edit_set_soft(main_config.soft_raw_limit[index], main_config.soft_raw_limit_size[index]); edit_set_soft(main_config.soft_raw_limit[index], main_config.soft_raw_limit_size[index]);
@ -726,10 +727,6 @@ void main_edit_btn_save() {
if (tree_view_edit(main_config.size_tree_view)) { if (tree_view_edit(main_config.size_tree_view)) {
add_on_destroy_subwindow(get_widget_edit()->Window); add_on_destroy_subwindow(get_widget_edit()->Window);
} }
else {
}
} }
void tree_view_del_line() { void tree_view_del_line() {

@ -94,6 +94,7 @@ typedef struct
int *i_o_limit_read_size; int *i_o_limit_read_size;
int *i_o_limit_write_size; int *i_o_limit_write_size;
int size_tree_view; int size_tree_view;
dictionary *load_global_cfg; dictionary *load_global_cfg;
dictionary *load_system_cfg; dictionary *load_system_cfg;
dictionary *save_cfg_gui; dictionary *save_cfg_gui;

@ -197,8 +197,9 @@ char* edit_get_limit_swap() {
} }
// ================================================================= // =================================================================
void edit_set_select_device(char* str_value, int pow_mem) { void edit_set_select_device(char* str_value) {
puts(str_value); int index = yon_gtk_combo_box_text_find(edit_widgets->cbtEditDevice,str_value);
gtk_combo_box_set_active(GTK_COMBO_BOX(edit_widgets->cbtEditDevice), index);
} }
void edit_set_read_device(char* str_value, int pow_mem) { void edit_set_read_device(char* str_value, int pow_mem) {
edit_temp_set(str_value,pow_mem, edit_widgets->chbEditRead, edit_temp_set(str_value,pow_mem, edit_widgets->chbEditRead,

@ -65,7 +65,7 @@ char* edit_get_limit_cpu();
char* edit_get_limit_swap(); char* edit_get_limit_swap();
void edit_generate_cmd(); void edit_generate_cmd();
void wrapper_edit_show(); void wrapper_edit_show();
void edit_set_select_device(char* str_value, int pow_mem); void edit_set_select_device(char* str_value);
void edit_set_read_device(char* str_value, int pow_mem); void edit_set_read_device(char* str_value, int pow_mem);
void edit_set_write_device(char* str_value, int pow_mem); void edit_set_write_device(char* str_value, int pow_mem);
void edit_set_soft(char* str_value, int pow_mem); void edit_set_soft(char* str_value, int pow_mem);

Loading…
Cancel
Save