From: <kr_...@us...> - 2003-07-10 21:51:04
|
Update of /cvsroot/htoolkit/port/src/cbits/GTK In directory sc8-pr-cvs1:/tmp/cvs-serv14931/src/cbits/GTK Modified Files: ListBox.c Log Message: bugfix Index: ListBox.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/ListBox.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ListBox.c 10 Jul 2003 19:39:56 -0000 1.6 --- ListBox.c 10 Jul 2003 20:49:08 -0000 1.7 *************** *** 132,140 **** void osSetListBoxSingleSelection(WindowHandle listbox, int index) { ! GtkTreeSelection *selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(GTK_BIN(listbox)->child)); if (index > 0) { GtkTreePath *path = gtk_tree_path_new_from_indices (index, -1); gtk_tree_selection_select_path(selection, path); gtk_tree_path_free(path); --- 132,142 ---- void osSetListBoxSingleSelection(WindowHandle listbox, int index) { ! GtkWidget *lbox = GTK_BIN(listbox)->child; ! GtkTreeSelection *selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(lbox)); if (index > 0) { GtkTreePath *path = gtk_tree_path_new_from_indices (index, -1); + gtk_tree_view_set_cursor(GTK_TREE_VIEW(lbox), path, NULL, TRUE); gtk_tree_selection_select_path(selection, path); gtk_tree_path_free(path); *************** *** 170,172 **** else return -1; ! } \ No newline at end of file --- 172,174 ---- else return -1; ! } |