The widget was freed and assigned nil pointer before it was unreferenced
which may lead to occasional access violation on application shutdown.
This fix is related to #40713.
We store the raw caption in the `Text` field and convert ampersands
(`&`) to underscores (`_`) before using `set_markup_with_mnemonic` to
update the label text while honoring the hot key definition.
NB: The underscore will be drawn only if user hits `alt` key which is
a Gnome/Gtk3 feature.
This fix is related to #40713.
Closes#40331.
GTK3 WS needs to get that handle in order to retrieve the parent window
which need to be set as transient of the newly created popup window.
This is a required by GTK3 documentation as one can see in
https://docs.gtk.org/gtk3/method.Window.set_transient_for.html
This patch needs to touch common LCL code, but `HintData` files does
not seem to be really used.
Now that `gir2pas` is able to generate correctly set types for C enums,
we migrated more C enums to set type.
This required some changes in the Gtk3 WS code.
Now that `gir2pas` is able to generate correctly set types for C enums,
we migrated more C enums to set type.
This required some changes in the Gtk3 WS code.
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.
In Gtk3 WS code, variables of type Integer were used instead of ones
of relevant enumeration type.
This leads to compilation error now that `TGtkTreeViewColumnSizing` is
defined as an enumeration type. This commit fixes those errors.
In Gtk3 WS code, variables of type Integer were used instead of ones
of relevant enumeration type.
This leads to compilation error now that `TGdkScrollDirection` is
defined as an enumeration type. This commit fixes those errors.
In Gtk3 WS code, integers were used instead of enumeration values.
This leads to compilation error now that `TGdkModifierType` is defined
as an enumeration set type. This commit fixes those errors.
Please note the following comments in the changed code:
```pascal
//TODO: This is hand written just to give the direction we need to go.
//TODO: We need to make git2pas generate similar code for bitfields.
In Gtk3 WS code, integers were used instead of enumeration values.
This leads to compilation error now that `TGtkStateFlags` is
defined as an enumeration type. This commit fixes those errors.
In Gtk3 WS code, integers were used instead of enumeration values.
This leads to compilation error now that `TGtkResponseType` is defined
as an enumeration type. This commit fixes those errors.
In Gtk3 WS code, variables of type Integer were used instead of ones
of relevant enumeration type.
This leads to compilation error now that `TGtkTextDirection`,
`TGtkAccelFlags`, `TGtkDirectionType` , `TGtkOrientation` and
`TGtkDestDefaults` are defined as an enumeration type.
This commit fixes those errors.
In Gtk3 WS code, integers were used instead of enumeration values.
This leads to compilation error now that `TGdkEventMask` is defined
as an enumeration set type. This commit fixes those errors.
Please note the following comments in the changed code:
```pascal
//TODO: This is hand written just to give the direction we need to go.
//TODO: We need to make git2pas generate similar code for bitfields.
```
In Gtk3 WS code, 0 was used instead of `G_CONNECT_DEFAULT`.
This leads to compilation error now that `GtkConnectFlags` is defined
as an enumeration type. This commit fixes those errors.
Now, `git2pas` produces enumeration types when translating C enums.
This implies changes in WS support files as Pascal enumeration types
are not compatible with integers and require explicit cast.
In order to avoid explicit casts, some internal functions API were
changed so that the code remains clean without unneeded type casts.