mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-05 19:46:01 +02:00
LCL-Gtk2: Simplify TGtk2WSCustomListView.ItemSetState. Nil as Path param does not work for old GTK versions. Reported by Luca Olivetti.
git-svn-id: trunk@53590 -
This commit is contained in:
parent
a339b5b1a9
commit
3ca728a0e7
@ -1499,17 +1499,7 @@ begin
|
|||||||
//gtk2 iter has no focus??
|
//gtk2 iter has no focus??
|
||||||
Path := gtk_tree_path_new_from_string(PChar(IntToStr(AIndex)));
|
Path := gtk_tree_path_new_from_string(PChar(IntToStr(AIndex)));
|
||||||
if GTK_IS_TREE_VIEW(MainView) then
|
if GTK_IS_TREE_VIEW(MainView) then
|
||||||
begin
|
gtk_tree_view_set_cursor(PGtkTreeView(MainView), Path, nil, False)
|
||||||
if AIsSet then
|
|
||||||
gtk_tree_view_set_cursor(PGtkTreeView(MainView), Path, nil, False)
|
|
||||||
else
|
|
||||||
begin
|
|
||||||
if (gtk_major_version = 2) and (gtk_minor_version < 14) then
|
|
||||||
gtk_tree_view_set_cursor(PGtkTreeView(MainView), nil, nil, False)
|
|
||||||
else
|
|
||||||
gtk_tree_view_set_cursor(PGtkTreeView(MainView), Path, nil, False);
|
|
||||||
end;
|
|
||||||
end
|
|
||||||
else
|
else
|
||||||
if GTK_IS_ICON_VIEW(MainView) then
|
if GTK_IS_ICON_VIEW(MainView) then
|
||||||
gtk_icon_view_set_cursor(PGtkIconView(MainView), Path, nil, False);
|
gtk_icon_view_set_cursor(PGtkIconView(MainView), Path, nil, False);
|
||||||
|
Loading…
Reference in New Issue
Block a user