# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1301196296 0 # Node ID 43e6282463fae5eeced824a7ab917d2b4e8360f7 # Parent f7b6c88bac4766f91f6820ebd15ff39100d1304a Implemented dw_container_set_column_width(). diff -r f7b6c88bac47 -r 43e6282463fa gtk3/dw.c --- a/gtk3/dw.c Sun Mar 27 02:42:45 2011 +0000 +++ b/gtk3/dw.c Sun Mar 27 03:24:56 2011 +0000 @@ -5987,6 +5987,29 @@ */ void dw_container_set_column_width(HWND handle, int column, int width) { + GtkWidget *cont; + int _locked_by_me = FALSE; + + DW_MUTEX_LOCK; + cont = (GtkWidget *)g_object_get_data(G_OBJECT(handle), "_dw_user"); + + /* Handle filesystem */ + if(g_object_get_data(G_OBJECT(handle), "_dw_cont_extra")) + { + column++; + } + + /* Make sure it is the correct tree type */ + if(cont && GTK_IS_TREE_VIEW(cont) && g_object_get_data(G_OBJECT(cont), "_dw_tree_type") == GINT_TO_POINTER(_DW_TREE_TYPE_CONTAINER)) + { + GtkTreeViewColumn *col = gtk_tree_view_get_column(GTK_TREE_VIEW(cont), column); + + if(col && GTK_IS_TREE_VIEW_COLUMN(col)) + { + gtk_tree_view_column_set_fixed_width(GTK_TREE_VIEW_COLUMN(col), width); + } + } + DW_MUTEX_UNLOCK; } /* Internal version for both */ @@ -6406,7 +6429,6 @@ if(cont && GTK_IS_TREE_VIEW(cont) && g_object_get_data(G_OBJECT(cont), "_dw_tree_type") == GINT_TO_POINTER(_DW_TREE_TYPE_CONTAINER)) gtk_tree_view_columns_autosize(GTK_TREE_VIEW(cont)); DW_MUTEX_UNLOCK; - } /*