tStore the correct data in clist rows, so that gtk_clist_sort works again; pass… | |
git clone git://src.adamsgaard.dk/vaccinewars | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit bb56cfb8e9e21dfe39ac6819b2276389814fbd7f | |
parent 54a39cd5c301e2e26be8cd0b9899aeaaab54176b | |
Author: Ben Webb <[email protected]> | |
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: | |
M src/gtkport/clist.c | 8 ++++---- | |
1 file changed, 4 insertions(+), 4 deletions(-) | |
--- | |
diff --git a/src/gtkport/clist.c b/src/gtkport/clist.c | |
t@@ -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); | |
} | |
} | |
t@@ -385,7 +385,7 @@ gint gtk_clist_insert(GtkCList *clist, gint row, gchar *te… | |
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; | |
t@@ -647,7 +647,7 @@ void gtk_clist_set_row_data(GtkCList *clist, gint row, gpo… | |
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; | |
} | |
} | |
t@@ -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; | |
} |