vaccinewars

be a doctor and try to vaccinate the world
git clone git://src.adamsgaard.dk/vaccinewars # fast
git clone https://src.adamsgaard.dk/vaccinewars.git # slow
Log | Files | Refs | README | LICENSE Back to index

commit bb56cfb8e9e21dfe39ac6819b2276389814fbd7f
parent 54a39cd5c301e2e26be8cd0b9899aeaaab54176b
Author: Ben Webb <ben@salilab.org>
Date:   Mon, 26 Aug 2002 12:45:44 +0000

Store the correct data in clist rows, so that gtk_clist_sort works again; pass
dummy data to LB_INSERTSTRING and LB_ADDSTRING so that there is never any
chance of passing NULL.


Diffstat:
Msrc/gtkport/clist.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/gtkport/clist.c b/src/gtkport/clist.c @@ -193,7 +193,7 @@ void gtk_clist_realize(GtkWidget *widget) for (rows = clist->rowdata; rows; rows = g_slist_next(rows)) { row = (GtkCListRow *)rows->data; if (row) { - SendMessage(widget->hWnd, LB_ADDSTRING, 0, (LPARAM)row->data); + SendMessage(widget->hWnd, LB_ADDSTRING, 0, 1); } } @@ -385,7 +385,7 @@ gint gtk_clist_insert(GtkCList *clist, gint row, gchar *text[]) if (GTK_WIDGET_REALIZED(widget)) { hWnd = widget->hWnd; - SendMessage(hWnd, LB_INSERTSTRING, (WPARAM)row, (LPARAM)new_row->data); + SendMessage(hWnd, LB_INSERTSTRING, (WPARAM)row, 1); } return row; @@ -647,7 +647,7 @@ void gtk_clist_set_row_data(GtkCList *clist, gint row, gpointer data) if (row >= 0 && row < clist->rows) { list_row = (GtkCListRow *)g_slist_nth_data(clist->rowdata, row); if (list_row) - list_row->data = data + 1; + list_row->data = data; } } @@ -658,7 +658,7 @@ gpointer gtk_clist_get_row_data(GtkCList *clist, gint row) if (row >= 0 && row < clist->rows) { list_row = (GtkCListRow *)g_slist_nth_data(clist->rowdata, row); if (list_row) - return list_row->data - 1; + return list_row->data; } return NULL; }