diff options
| author | Tomas Bzatek <tbzatek@redhat.com> | 2024-12-23 12:09:37 +0100 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@redhat.com> | 2024-12-23 12:09:37 +0100 |
| commit | 585635371a182d2b3cd5400f6d26d8e20ade6dbd (patch) | |
| tree | fe4d71d71ac7aec633488546e939fcca8a754ccd /UFileTypeSettings.pas | |
| parent | 6475cd8e422b88e8d0fa3499195e6392bd3bbf12 (diff) | |
| download | tuxcmd-585635371a182d2b3cd5400f6d26d8e20ade6dbd.tar.xz | |
Drop Application.GTKVersion_2_xxx_Up
...and related quirks along with it.
Assume latest gtk2 release.
Diffstat (limited to 'UFileTypeSettings.pas')
| -rw-r--r-- | UFileTypeSettings.pas | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/UFileTypeSettings.pas b/UFileTypeSettings.pas index 89189ab..55ce5c5 100644 --- a/UFileTypeSettings.pas +++ b/UFileTypeSettings.pas @@ -123,22 +123,22 @@ begin TitleFrame.AddControl(TitleEventBox); ClientArea.AddControlEx(TitleFrame, False, True, 0); - ListView := TGTKListView.CreateTyped(Self, Application.GTKVersion_2_0_5_Up, [lcText, lcText, lcPointer, lcPixbuf]); + ListView := TGTKListView.CreateTyped(Self, True, [lcText, lcText, lcPointer, lcPixbuf]); ListView.RulesHint := True; Column := ListView.Columns.AddTyped(ctImageText);; Column.Caption := LANGExtensionsColumn; Column.AddImageAttribute('pixbuf', 3); Column.AddAttribute('text', 0); - if Application.GTKVersion_2_0_5_Up then Column.SortID := 0; + Column.SortID := 0; Column.Resizable := True; g_object_set(G_OBJECT(Column.FColumn), 'sizing', 2, 'fixed-width', 150, nil); { Column.FixedWidth := 300; Column.SizingMode := smFixed; } - if Application.GTKVersion_2_6_0_Up then Column.SetProperty('ellipsize', 3); + Column.SetProperty('ellipsize', 3); Column := ListView.Columns.Add; Column.Caption := LANGDescriptionColumn; Column.AddAttribute('text', 1); - if Application.GTKVersion_2_0_5_Up then Column.SortID := 1; + Column.SortID := 1; Column.Resizable := True; ListViewScrolledWindow := TGTKScrolledWindow.Create(Self); ListViewScrolledWindow.AddControl(ListView); @@ -168,19 +168,19 @@ begin ClientArea.AddControlEx(Notebook, False, False, 0); ActionsListViewScrolledWindow := TGTKScrolledWindow.Create(Self); - ActionsListView := TGTKListView.CreateTyped(Self, Application.GTKVersion_2_0_5_Up, [lcText, lcText, lcPointer]); + ActionsListView := TGTKListView.CreateTyped(Self, True, [lcText, lcText, lcPointer]); ActionsListView.RulesHint := True; Column := ActionsListView.Columns.Add; Column.Caption := LANGActionName; Column.AddAttribute('text', 0); - if Application.GTKVersion_2_0_5_Up then Column.SortID := 0; + Column.SortID := 0; Column.Resizable := True; Column.FixedWidth := 180; Column.SizingMode := smFixed; Column := ActionsListView.Columns.Add; Column.Caption := LANGCommand; Column.AddAttribute('text', 1); - if Application.GTKVersion_2_0_5_Up then Column.SortID := 1; + Column.SortID := 1; Column.Resizable := True; ActionsListViewScrolledWindow.AddControl(ActionsListView); ActionsListViewScrolledWindow.VertScrollBarPolicy := sbAutomatic; @@ -501,7 +501,7 @@ begin ListItem := ListView.Items.Add; ListItem.SetValue(2, Item); ListItem.Selected := True; - ListItem.SetCursor(0, False, not Application.GTKVersion_2_2_0_Up, 0.5, 0); + ListItem.SetCursor(0, False, False, 0.5, 0); ListViewSelectionChanged(Self); AssocDescriptionEntry.SetFocus; end; @@ -841,7 +841,6 @@ var ColumnID: integer; Data: TFileAssoc; s: Pointer; begin - if not Application.GTKVersion_2_0_5_Up then Exit; ColumnID := gtk_tree_view_column_get_sort_column_id(tree_column); ImageCol := False; if ColumnID = 0 then ImageCol := GTK_IS_CELL_RENDERER_PIXBUF(cell); @@ -867,7 +866,6 @@ var ColumnID: integer; s: Pointer; Item: TFileAssoc; begin - if not Application.GTKVersion_2_0_5_Up then Exit; ColumnID := gtk_tree_view_column_get_sort_column_id(tree_column); ImageCol := False; if ColumnID = 0 then ImageCol := GTK_IS_CELL_RENDERER_PIXBUF(cell); |
