mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-11 10:39:20 +02:00
gtk2 intf: clean up
git-svn-id: trunk@36822 -
This commit is contained in:
parent
309c9d9ef3
commit
0913bf1056
@ -234,7 +234,7 @@ begin
|
|||||||
BitBtnInfo := WidgetInfo^.UserData;
|
BitBtnInfo := WidgetInfo^.UserData;
|
||||||
BuildNeeded := UpdateGlyph(ABitBtn, BitBtnInfo, AValue, GtkStateToButtonState[GTK_WIDGET_STATE(MainWidget)]);
|
BuildNeeded := UpdateGlyph(ABitBtn, BitBtnInfo, AValue, GtkStateToButtonState[GTK_WIDGET_STATE(MainWidget)]);
|
||||||
// at initialization widget will be built in SetLayout
|
// at initialization widget will be built in SetLayout
|
||||||
if not (wcfInitializing in TWinControlAccess(ABitBtn).FWinControlFlags) and BuildNeeded then
|
if not (wcfInitializing in {%H-}TWinControlAccess(ABitBtn).FWinControlFlags) and BuildNeeded then
|
||||||
BuildWidget(ABitBtn, MainWidget, BitBtnInfo, ABitBtn.Caption);
|
BuildWidget(ABitBtn, MainWidget, BitBtnInfo, ABitBtn.Caption);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -169,8 +169,8 @@ type
|
|||||||
class procedure ItemSetChecked(const ALV: TCustomListView; const {%H-}AIndex: Integer; const {%H-}AItem: TListItem; const {%H-}AChecked: Boolean); override;
|
class procedure ItemSetChecked(const ALV: TCustomListView; const {%H-}AIndex: Integer; const {%H-}AItem: TListItem; const {%H-}AChecked: Boolean); override;
|
||||||
class procedure ItemSetImage(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AItem: TListItem; const {%H-}ASubIndex, AImageIndex: Integer); override;
|
class procedure ItemSetImage(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AItem: TListItem; const {%H-}ASubIndex, AImageIndex: Integer); override;
|
||||||
class procedure ItemSetState(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AItem: TListItem; const AState: TListItemState; const AIsSet: Boolean); override;
|
class procedure ItemSetState(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AItem: TListItem; const AState: TListItemState; const AIsSet: Boolean); override;
|
||||||
class procedure ItemSetText(const ALV: TCustomListView; const AIndex: Integer; const AItem: TListItem; const ASubIndex: Integer; const AText: String); override;
|
class procedure ItemSetText(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AItem: TListItem; const {%H-}ASubIndex: Integer; const {%H-}AText: String); override;
|
||||||
class procedure ItemShow(const ALV: TCustomListView; const AIndex: Integer; const AItem: TListItem; const PartialOK: Boolean); override;
|
class procedure ItemShow(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AItem: TListItem; const {%H-}PartialOK: Boolean); override;
|
||||||
class function ItemGetPosition(const ALV: TCustomListView; const AIndex: Integer): TPoint; override;
|
class function ItemGetPosition(const ALV: TCustomListView; const AIndex: Integer): TPoint; override;
|
||||||
class procedure ItemUpdate(const ALV: TCustomListView; const {%H-}AIndex: Integer; const {%H-}AItem: TListItem); override;
|
class procedure ItemUpdate(const ALV: TCustomListView; const {%H-}AIndex: Integer; const {%H-}AItem: TListItem); override;
|
||||||
|
|
||||||
|
@ -1491,19 +1491,16 @@ class procedure TGtk2WSCustomListView.ItemShow(const ALV: TCustomListView;
|
|||||||
var
|
var
|
||||||
Widgets: PTVWidgets;
|
Widgets: PTVWidgets;
|
||||||
Path: PGtkTreePath;
|
Path: PGtkTreePath;
|
||||||
StrIndex: String;
|
|
||||||
begin
|
begin
|
||||||
if not WSCheckHandleAllocated(ALV, 'ItemShow')
|
if not WSCheckHandleAllocated(ALV, 'ItemShow')
|
||||||
then Exit;
|
then Exit;
|
||||||
|
|
||||||
// TODO: TGtk2WSCustomListView.ItemShow check for partial visiblity. currently scrolls to the Item to make it fully visible
|
// TODO: TGtk2WSCustomListView.ItemShow check for partial visiblity. currently scrolls to the Item to make it fully visible
|
||||||
StrIndex := IntToStr(AItem.Index);
|
|
||||||
|
|
||||||
GetCommonTreeViewWidgets({%H-}PGtkWidget(ALV.Handle), Widgets);
|
GetCommonTreeViewWidgets({%H-}PGtkWidget(ALV.Handle), Widgets);
|
||||||
|
|
||||||
with Widgets^ do
|
with Widgets^ do
|
||||||
begin
|
begin
|
||||||
Path := gtk_tree_path_new_from_string(PChar(StrIndex));
|
Path := gtk_tree_path_new_from_indices(AIndex, -1);
|
||||||
if GTK_IS_TREE_VIEW(MainView) then
|
if GTK_IS_TREE_VIEW(MainView) then
|
||||||
gtk_tree_view_scroll_to_cell(PGtkTreeView(MainView), Path, nil, False, 0, 0)
|
gtk_tree_view_scroll_to_cell(PGtkTreeView(MainView), Path, nil, False, 0, 0)
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user