Mercurial > dwindows
comparison gtk3/dw.c @ 1211:70dca53cb071
Updated GTK3 with the behavior change just commited for Mac.
Also updated the comments in all the source files to reflect the change.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sat, 08 Oct 2011 20:47:34 +0000 |
parents | 423da07c8f05 |
children | 1255ba41adad |
comparison
equal
deleted
inserted
replaced
1210:5a016a5a7412 | 1211:70dca53cb071 |
---|---|
5972 /* | 5972 /* |
5973 * Sets the alternating row colors for container window (widget) handle. | 5973 * Sets the alternating row colors for container window (widget) handle. |
5974 * Parameters: | 5974 * Parameters: |
5975 * handle: The window (widget) handle. | 5975 * handle: The window (widget) handle. |
5976 * oddcolor: Odd row background color in DW_RGB format or a default color index. | 5976 * oddcolor: Odd row background color in DW_RGB format or a default color index. |
5977 * DW_CLR_DEFAULT will disable coloring odd rows. | |
5978 * evencolor: Even row background color in DW_RGB format or a default color index. | 5977 * evencolor: Even row background color in DW_RGB format or a default color index. |
5979 * DW_CLR_DEFAULT will disable coloring even rows. | 5978 * DW_RGB_TRANSPARENT will disable coloring rows. |
5979 * DW_CLR_DEFAULT will use the system default alternating row colors. | |
5980 */ | 5980 */ |
5981 void API dw_container_set_row_bg(HWND handle, unsigned long oddcolor, unsigned long evencolor) | 5981 void API dw_container_set_row_bg(HWND handle, unsigned long oddcolor, unsigned long evencolor) |
5982 { | 5982 { |
5983 GtkWidget *cont; | 5983 GtkWidget *cont; |
5984 int _locked_by_me = FALSE; | 5984 int _locked_by_me = FALSE; |
5986 cont = (GtkWidget *)g_object_get_data(G_OBJECT(handle), "_dw_user"); | 5986 cont = (GtkWidget *)g_object_get_data(G_OBJECT(handle), "_dw_user"); |
5987 | 5987 |
5988 /* Make sure it is the correct tree type */ | 5988 /* Make sure it is the correct tree type */ |
5989 if(cont && GTK_IS_TREE_VIEW(cont) && g_object_get_data(G_OBJECT(cont), "_dw_tree_type") == GINT_TO_POINTER(_DW_TREE_TYPE_CONTAINER)) | 5989 if(cont && GTK_IS_TREE_VIEW(cont) && g_object_get_data(G_OBJECT(cont), "_dw_tree_type") == GINT_TO_POINTER(_DW_TREE_TYPE_CONTAINER)) |
5990 { | 5990 { |
5991 if(oddcolor == DW_CLR_DEFAULT && evencolor == DW_CLR_DEFAULT) | 5991 if(oddcolor == DW_RGB_TRANSPARENT && evencolor == DW_RGB_TRANSPARENT) |
5992 gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(cont), FALSE); | 5992 gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(cont), FALSE); |
5993 else | 5993 else |
5994 gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(cont), TRUE); | 5994 gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(cont), TRUE); |
5995 } | 5995 } |
5996 DW_MUTEX_UNLOCK; | 5996 DW_MUTEX_UNLOCK; |