diff --git a/source/ubl-settings-resourcequota.c b/source/ubl-settings-resourcequota.c index f4f5b53..27dd0c9 100644 --- a/source/ubl-settings-resourcequota.c +++ b/source/ubl-settings-resourcequota.c @@ -709,6 +709,7 @@ void wrapper_edit_show() { char* str_iter = gtk_tree_model_get_string_from_iter(model, &iter); int index = atoi(str_iter); 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_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]); @@ -726,10 +727,6 @@ void main_edit_btn_save() { if (tree_view_edit(main_config.size_tree_view)) { add_on_destroy_subwindow(get_widget_edit()->Window); } - else { - - } - } void tree_view_del_line() { diff --git a/source/ubl-settings-resourcequota.h b/source/ubl-settings-resourcequota.h index 4cb3ddc..a9a0e21 100755 --- a/source/ubl-settings-resourcequota.h +++ b/source/ubl-settings-resourcequota.h @@ -94,6 +94,7 @@ typedef struct int *i_o_limit_read_size; int *i_o_limit_write_size; int size_tree_view; + dictionary *load_global_cfg; dictionary *load_system_cfg; dictionary *save_cfg_gui; diff --git a/source/view_edit.c b/source/view_edit.c index 6b0a57f..62bd21f 100644 --- a/source/view_edit.c +++ b/source/view_edit.c @@ -197,8 +197,9 @@ char* edit_get_limit_swap() { } // ================================================================= -void edit_set_select_device(char* str_value, int pow_mem) { - puts(str_value); +void edit_set_select_device(char* 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) { edit_temp_set(str_value,pow_mem, edit_widgets->chbEditRead, diff --git a/source/view_edit.h b/source/view_edit.h index 155f5e6..83e6052 100644 --- a/source/view_edit.h +++ b/source/view_edit.h @@ -65,7 +65,7 @@ char* edit_get_limit_cpu(); char* edit_get_limit_swap(); void edit_generate_cmd(); 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_write_device(char* str_value, int pow_mem); void edit_set_soft(char* str_value, int pow_mem);