Mercurial > dwindows
diff gtk3/dw.c @ 820:19a632499344
GTK2/3 changes for similar dw_container_set_item() and dw_container_change_item() misbehavior.
Also implemented dw_container_change_row_title() for GTK2/3.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sat, 26 Mar 2011 12:52:35 +0000 |
parents | c17634e2b303 |
children | 43e6282463fa |
line wrap: on
line diff
--- a/gtk3/dw.c Sat Mar 26 12:49:59 2011 +0000 +++ b/gtk3/dw.c Sat Mar 26 12:52:35 2011 +0000 @@ -5844,7 +5844,7 @@ if(GTK_IS_TREE_VIEW(tree)) { - _dw_container_set_item(handle, NULL, column, row, data); + _dw_container_set_item(handle, pointer, column, row, data); } } @@ -5989,16 +5989,10 @@ { } -/* - * Sets the title of a row in the container. - * Parameters: - * pointer: Pointer to the allocated memory in dw_container_alloc(). - * row: Zero based row of data being set. - * title: String title of the item. - */ -void dw_container_set_row_title(void *pointer, int row, char *title) -{ - GtkWidget *cont = pointer; +/* Internal version for both */ +void _dw_container_set_row_title(HWND handle, void *pointer, int row, char *title) +{ + GtkWidget *cont = handle; GtkListStore *store = NULL; int _locked_by_me = FALSE; @@ -6027,6 +6021,30 @@ /* * Sets the title of a row in the container. * Parameters: + * pointer: Pointer to the allocated memory in dw_container_alloc(). + * row: Zero based row of data being set. + * title: String title of the item. + */ +void dw_container_set_row_title(void *pointer, int row, char *title) +{ + _dw_container_set_row_title(pointer, pointer, row, title); +} + +/* + * Changes the title of a row already inserted in the container. + * Parameters: + * handle: Handle to window (widget) of container. + * row: Zero based row of data being set. + * title: String title of the item. + */ +void dw_container_change_row_title(HWND handle, int row, char *title) +{ + _dw_container_set_row_title(handle, NULL, row, title); +} + +/* + * Sets the title of a row in the container. + * Parameters: * handle: Handle to the container window (widget). * pointer: Pointer to the allocated memory in dw_container_alloc(). * rowcount: The number of rows to be inserted.