Mercurial > dwindows
changeset 423:c1c75e363a91
Hopefully fixed dw_listbox_selected() on GTK 2.x.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 15 May 2003 17:36:04 +0000 |
parents | 3269c10bc243 |
children | 5cc81d3c2bca |
files | gtk/dw.c |
diffstat | 1 files changed, 16 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/gtk/dw.c Thu May 15 16:32:54 2003 +0000 +++ b/gtk/dw.c Thu May 15 17:36:04 2003 +0000 @@ -7078,10 +7078,23 @@ int counter = 0; GList *list = GTK_LIST(handle2)->children; #if GTK_MAJOR_VERSION > 1 - GList *selection = GTK_LIST(handle2)->undo_unselection; + + while(list) + { + GtkItem *item = (GtkItem *)list->data; + + if(item && item->bin.container.widget.state == GTK_STATE_SELECTED) + { + retval = counter; + break; + } + + list = list->next; + counter++; + } #else GList *selection = GTK_LIST(handle2)->selection; -#endif + if(selection) { while(list) @@ -7096,6 +7109,7 @@ counter++; } } +#endif } DW_MUTEX_UNLOCK; return retval;