Mercurial > dwindows
comparison gtk3/dw.c @ 830:43e6282463fa
Implemented dw_container_set_column_width().
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sun, 27 Mar 2011 03:24:56 +0000 |
parents | 19a632499344 |
children | 82072ff08513 |
comparison
equal
deleted
inserted
replaced
829:f7b6c88bac47 | 830:43e6282463fa |
---|---|
5985 * column: Zero based column of width being set. | 5985 * column: Zero based column of width being set. |
5986 * width: Width of column in pixels. | 5986 * width: Width of column in pixels. |
5987 */ | 5987 */ |
5988 void dw_container_set_column_width(HWND handle, int column, int width) | 5988 void dw_container_set_column_width(HWND handle, int column, int width) |
5989 { | 5989 { |
5990 GtkWidget *cont; | |
5991 int _locked_by_me = FALSE; | |
5992 | |
5993 DW_MUTEX_LOCK; | |
5994 cont = (GtkWidget *)g_object_get_data(G_OBJECT(handle), "_dw_user"); | |
5995 | |
5996 /* Handle filesystem */ | |
5997 if(g_object_get_data(G_OBJECT(handle), "_dw_cont_extra")) | |
5998 { | |
5999 column++; | |
6000 } | |
6001 | |
6002 /* Make sure it is the correct tree type */ | |
6003 if(cont && GTK_IS_TREE_VIEW(cont) && g_object_get_data(G_OBJECT(cont), "_dw_tree_type") == GINT_TO_POINTER(_DW_TREE_TYPE_CONTAINER)) | |
6004 { | |
6005 GtkTreeViewColumn *col = gtk_tree_view_get_column(GTK_TREE_VIEW(cont), column); | |
6006 | |
6007 if(col && GTK_IS_TREE_VIEW_COLUMN(col)) | |
6008 { | |
6009 gtk_tree_view_column_set_fixed_width(GTK_TREE_VIEW_COLUMN(col), width); | |
6010 } | |
6011 } | |
6012 DW_MUTEX_UNLOCK; | |
5990 } | 6013 } |
5991 | 6014 |
5992 /* Internal version for both */ | 6015 /* Internal version for both */ |
5993 void _dw_container_set_row_title(HWND handle, void *pointer, int row, char *title) | 6016 void _dw_container_set_row_title(HWND handle, void *pointer, int row, char *title) |
5994 { | 6017 { |
6404 | 6427 |
6405 /* Make sure it is the correct tree type */ | 6428 /* Make sure it is the correct tree type */ |
6406 if(cont && GTK_IS_TREE_VIEW(cont) && g_object_get_data(G_OBJECT(cont), "_dw_tree_type") == GINT_TO_POINTER(_DW_TREE_TYPE_CONTAINER)) | 6429 if(cont && GTK_IS_TREE_VIEW(cont) && g_object_get_data(G_OBJECT(cont), "_dw_tree_type") == GINT_TO_POINTER(_DW_TREE_TYPE_CONTAINER)) |
6407 gtk_tree_view_columns_autosize(GTK_TREE_VIEW(cont)); | 6430 gtk_tree_view_columns_autosize(GTK_TREE_VIEW(cont)); |
6408 DW_MUTEX_UNLOCK; | 6431 DW_MUTEX_UNLOCK; |
6409 | |
6410 } | 6432 } |
6411 | 6433 |
6412 /* | 6434 /* |
6413 * Inserts an icon into the taskbar. | 6435 * Inserts an icon into the taskbar. |
6414 * Parameters: | 6436 * Parameters: |