gtk2 intf: clean up

git-svn-id: trunk@36822 -
This commit is contained in:
mattias 2012-04-16 21:13:15 +00:00
parent 309c9d9ef3
commit 0913bf1056
3 changed files with 4 additions and 7 deletions

View File

@ -234,7 +234,7 @@ begin
BitBtnInfo := WidgetInfo^.UserData;
BuildNeeded := UpdateGlyph(ABitBtn, BitBtnInfo, AValue, GtkStateToButtonState[GTK_WIDGET_STATE(MainWidget)]);
// 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);
end;

View File

@ -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 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 ItemSetText(const ALV: TCustomListView; const AIndex: Integer; const AItem: TListItem; const ASubIndex: Integer; const AText: String); override;
class procedure ItemShow(const ALV: TCustomListView; const AIndex: Integer; const AItem: TListItem; const PartialOK: Boolean); 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 {%H-}AItem: TListItem; const {%H-}PartialOK: Boolean); 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;

View File

@ -1491,19 +1491,16 @@ class procedure TGtk2WSCustomListView.ItemShow(const ALV: TCustomListView;
var
Widgets: PTVWidgets;
Path: PGtkTreePath;
StrIndex: String;
begin
if not WSCheckHandleAllocated(ALV, 'ItemShow')
then Exit;
// 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);
with Widgets^ do
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
gtk_tree_view_scroll_to_cell(PGtkTreeView(MainView), Path, nil, False, 0, 0)
else