On Wed, Dec 7, 2016 at 12:28 PM, Luca Olivetti via Lazarus <lazarus@lists.lazarus-ide.org> wrote: > Maybe the function could be simplified to > > lisFocused: > begin > //gtk2 iter has no focus?? > Path := gtk_tree_path_new_from_string(PChar(IntToStr(AIndex))); > if GTK_IS_TREE_VIEW(MainView) then > gtk_tree_view_set_cursor(PGtkTreeView(MainView), Path, nil, > False) > else > if GTK_IS_ICON_VIEW(MainView) then > gtk_icon_view_set_cursor(PGtkIconView(MainView), Path, nil, > False); > gtk_tree_path_free(Path); > end;
Yes, I believe so, too. LCL-GTK2 is full of historical remains. Many of them come from GTK1 times, the sources were just copied. This piece of code however was not from there. According to documentation the API has not changed. Why should the code be different? > Should I file a bug report? No need. I changed it in r53590. Please test. If somebody finds an old GTK version where it does NOT work then we will scratch our heads more, but I doubt it. Juha -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus