GTK3: Migrate TGtkSortType to enumeration type.

In Gtk3 WS code, variables of type Integer were used instead of ones
of relevant enumeration type.
This leads to compilation error now that `TGtkSortType` is defined as
an enumeration type. This commit fixes those errors.
This commit is contained in:
Abou Al Montacir 2023-06-01 20:11:49 +02:00 committed by Maxim Ganetsky
parent 22c6d6658f
commit e42a3c7df7
2 changed files with 7 additions and 8 deletions

View File

@ -907,6 +907,12 @@ type
GTK_LEVEL_BAR_MODE_DISCRETE = 1,
TGtkLevelBarModeMaxValue = $7FFFFFFF
);
TGtkSortType = (
TGtkSortTypeMinValue = -$7FFFFFFF,
GTK_SORT_ASCENDING = 0,
GTK_SORT_DESCENDING = 1,
TGtkSortTypeMaxValue = $7FFFFFFF
);
TGtkPackDirection = (
TGtkPackDirectionMinValue = -$7FFFFFFF,
GTK_PACK_DIRECTION_LTR = 0,
@ -1305,13 +1311,6 @@ const
GTK_ICON_LOOKUP_GENERIC_FALLBACK: TGtkIconLookupFlags = 8;
GTK_ICON_LOOKUP_FORCE_SIZE: TGtkIconLookupFlags = 16;
type
TGtkSortType = Integer;
const
{ GtkSortType }
GTK_SORT_ASCENDING: TGtkSortType = 0;
GTK_SORT_DESCENDING: TGtkSortType = 1;
type
TGtkRcTokenType = Integer;
const

View File

@ -6332,7 +6332,7 @@ end;
procedure TGtk3ListView.ColumnSetSortIndicator(const AIndex: Integer;
const AColumn: TListColumn; const ASortIndicator: TSortIndicator);
const
GtkOrder : array [ TSortIndicator] of TGtkSortType = (0, {GTK_SORT_ASCENDING}0, {GTK_SORT_DESCENDING}1);
GtkOrder : array [ TSortIndicator] of TGtkSortType = (GTK_SORT_ASCENDING {0}, GTK_SORT_ASCENDING {0}, GTK_SORT_DESCENDING {1});
var
AGtkColumn: PGtkTreeViewColumn;
begin