changeset 312:ff8f23594b15

Make sure itemdata is NULL for container callbacks.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Mon, 31 Mar 2003 10:20:08 +0000
parents 24c1dfffe97e
children a3dee031d27e
files dwtest.c gtk/dw.c win/dw.c
diffstat 3 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/dwtest.c	Mon Mar 31 09:57:45 2003 +0000
+++ b/dwtest.c	Mon Mar 31 10:20:08 2003 +0000
@@ -521,12 +521,12 @@
 	foldericon = dw_icon_load_from_file( FOLDER_ICON_NAME );
 	fileicon = dw_icon_load_from_file( FILE_ICON_NAME  );
 
-	t1 = dw_tree_insert(tree, "tree folder 1", foldericon, NULL, NULL );
-	t2 = dw_tree_insert(tree, "tree folder 2", foldericon, NULL, NULL );
-	t3 = dw_tree_insert(tree, "tree file 1", fileicon, t1, NULL );
-	t4 = dw_tree_insert(tree, "tree file 2", fileicon, t1, NULL );
-	t5 = dw_tree_insert(tree, "tree file 3", fileicon, t2, NULL );
-	t6 = dw_tree_insert(tree, "tree file 4", fileicon, t2, NULL );
+	t1 = dw_tree_insert(tree, "tree folder 1", foldericon, NULL, (void *)1 );
+	t2 = dw_tree_insert(tree, "tree folder 2", foldericon, NULL, (void *)2 );
+	t3 = dw_tree_insert(tree, "tree file 1", fileicon, t1, (void *)3 );
+	t4 = dw_tree_insert(tree, "tree file 2", fileicon, t1, (void *)4 );
+	t5 = dw_tree_insert(tree, "tree file 3", fileicon, t2, (void *)5 );
+	t6 = dw_tree_insert(tree, "tree file 4", fileicon, t2, (void *)6 );
 
 	/* set up our signal trappers... */
 	dw_signal_connect(tree, DW_SIGNAL_ITEM_CONTEXT, DW_SIGNAL_FUNC(item_context_cb), (void *)tree_status);
--- a/gtk/dw.c	Mon Mar 31 09:57:45 2003 +0000
+++ b/gtk/dw.c	Mon Mar 31 10:20:08 2003 +0000
@@ -404,14 +404,14 @@
 	{
 		if(event->button == 3)
 		{
-			int (*contextfunc)(HWND, char *, int, int, void *) = work->func;
+			int (*contextfunc)(HWND, char *, int, int, void *, void *) = work->func;
 			char *text;
 			int row, col;
 
 			gtk_clist_get_selection_info(GTK_CLIST(widget), event->x, event->y, &row, &col);
 
 			text = (char *)gtk_clist_get_row_data(GTK_CLIST(widget), row);
-			retval = contextfunc(work->window, text, event->x, event->y, work->data);
+			retval = contextfunc(work->window, text, event->x, event->y, work->data, NULL);
 		}
 	}
 	return retval;
--- a/win/dw.c	Mon Mar 31 09:57:45 2003 +0000
+++ b/win/dw.c	Mon Mar 31 10:20:08 2003 +0000
@@ -2373,7 +2373,7 @@
 			{
 				if(tmp->message == NM_RCLICK && tmp->window == hWnd)
 				{
-					int (*containercontextfunc)(HWND, char *, int, int, void *) = tmp->signalfunction;
+					int (*containercontextfunc)(HWND, char *, int, int, void *, void *) = tmp->signalfunction;
 					LONG x,y;
 					LV_ITEM lvi;
 					int iItem;
@@ -2403,7 +2403,7 @@
 					if(lvi.lParam < 100)
 						lvi.lParam = 0;
 
-					containercontextfunc(tmp->window, (char *)lvi.lParam, x, y, tmp->data);
+					containercontextfunc(tmp->window, (char *)lvi.lParam, x, y, tmp->data, NULL);
 					tmp = NULL;
 				}
 				if(tmp)