diff --git a/source/controler.c b/source/controler.c index 35b01e1..f444f85 100644 --- a/source/controler.c +++ b/source/controler.c @@ -601,5 +601,11 @@ int main(int argc, char *argv[]){ tree_view_select_group(NULL); tree_view_select_project(NULL); tree_view_select_device(NULL); + + GList *list = gtk_tree_view_get_columns(GTK_TREE_VIEW(cfg_custom_gui.treeViewGeneral)); + for (int i = 0; i < g_list_length(list); i++){ + // yon_window_config_add_listener(g_list_nth_data(list,i),yon_char_append("general_tree",yon_char_from_int(i)),"fixed-width",YON_TYPE_INT); + yon_gtk_column_minimal_fixed_size_set((GtkTreeViewColumn*)g_list_nth_data(list,i)); + } gtk_main(); } \ No newline at end of file diff --git a/source/model/ubl-utils.c b/source/model/ubl-utils.c index ac34d72..7b2c610 100644 --- a/source/model/ubl-utils.c +++ b/source/model/ubl-utils.c @@ -1709,6 +1709,11 @@ int yon_gtk_combo_box_text_find(GtkWidget *combo_box, char *text_to_find){ } return -1; } +void yon_gtk_column_minimal_fixed_size_set(GtkTreeViewColumn *column){ + int width= gtk_tree_view_column_get_width(column); + gtk_tree_view_column_set_min_width(column,width); +} + /**yon_dictionary_gtk_pack_start_multiple_widgets(GtkBox *destination, gboolean expand, gboolean fill, int padding, ...) * [EN] * diff --git a/source/model/ubl-utils.h b/source/model/ubl-utils.h index 841561f..7c9599f 100644 --- a/source/model/ubl-utils.h +++ b/source/model/ubl-utils.h @@ -262,6 +262,8 @@ int yon_gtk_combo_box_fill(GtkWidget *combo, char **parameters,int size); int yon_gtk_combo_box_text_find(GtkWidget *combo_box, char *text_to_find); +void yon_gtk_column_minimal_fixed_size_set(GtkTreeViewColumn *column); + int yon_gtk_icon_view_hide_empty(dictionary *icon_view_segment); int yon_dictionary_gtk_pack_start_multiple_widgets(GtkBox *destination, gboolean expand, gboolean fill, int padding, ...); diff --git a/source/ubl-settings-diskquota.c b/source/ubl-settings-diskquota.c index 65cfc92..134ec20 100644 --- a/source/ubl-settings-diskquota.c +++ b/source/ubl-settings-diskquota.c @@ -239,12 +239,12 @@ custom_window *setup_window_custom(custom_window* custom_widgets, GtkBuilder *bu custom_widgets->device.Update = yon_gtk_builder_get_widget(builder,"btnUpdateDevices"); custom_widgets->device.liststore = GTK_LIST_STORE(gtk_builder_get_object(builder, "liststoreDevice")); + GList *list = gtk_tree_view_get_columns(GTK_TREE_VIEW(custom_widgets->treeViewGeneral)); for (int i = 0; i < g_list_length(list); i++){ yon_window_config_add_listener(g_list_nth_data(list,i),yon_char_append("general_tree",yon_char_from_int(i)),"fixed-width",YON_TYPE_INT); } g_list_free(list); - list = gtk_tree_view_get_columns(GTK_TREE_VIEW(custom_widgets->device.tree_view)); for (int i = 0; i < g_list_length(list); i++){ yon_window_config_add_listener(g_list_nth_data(list,i),yon_char_append("device_tree",yon_char_from_int(i)),"fixed-width",YON_TYPE_INT);