diff options
| author | Tomas Bzatek <tbzatek@redhat.com> | 2024-12-23 23:59:45 +0100 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@redhat.com> | 2025-11-27 19:36:10 +0100 |
| commit | b9703b29819b619037cc282d719c187e51bacd30 (patch) | |
| tree | bd6d73e5fb6bcb6eb307844103b3dff185f2ac9a /libgtk_kylix/GTKDialogs.pas | |
| parent | a9634b933f71a9045e61d29c486f2d51d39fd1e2 (diff) | |
| download | tuxcmd-b9703b29819b619037cc282d719c187e51bacd30.tar.xz | |
Port to g-i generated glib2 bindings
Includes switch to FPC -Mobjfpc and related pointer style fixes.
Diffstat (limited to 'libgtk_kylix/GTKDialogs.pas')
| -rw-r--r-- | libgtk_kylix/GTKDialogs.pas | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libgtk_kylix/GTKDialogs.pas b/libgtk_kylix/GTKDialogs.pas index e6e5c7e..17b32d0 100644 --- a/libgtk_kylix/GTKDialogs.pas +++ b/libgtk_kylix/GTKDialogs.pas @@ -24,7 +24,7 @@ unit GTKDialogs; interface -uses gtk2, gdk2, glib2, Classes, GTKControls, GTKConsts, GTKUtils, GTKClasses, GTKForms; +uses gtk2, gdk2, lazglib2, lazgobject2, Classes, GTKControls, GTKUtils, GTKClasses, GTKForms; type @@ -105,7 +105,7 @@ end; constructor TGTKFileSelectionDialog.CreateWithTitle(AOwner: TComponent; const Title: string); begin inherited Create(AOwner); - FWidget := gtk_file_selection_new(StringToPgchar(Title)); + FWidget := gtk_file_selection_new(PChar(Title)); Show; end; @@ -128,7 +128,7 @@ function TGTKFileSelectionDialog.GetShowFileOpButtons: boolean; var b: Boolean; begin b := False; - g_object_get(FWidget, 'show-fileops', @b, nil); + g_object_get(PGObject(FWidget), 'show-fileops', [@b, nil]); Result := b; end; @@ -160,7 +160,7 @@ end; constructor TGTKColorSelectionDialog.CreateWithTitle(AOwner: TComponent; const Title: string); begin inherited Create(AOwner); - FWidget := gtk_color_selection_dialog_new(StringToPgchar(Title)); + FWidget := gtk_color_selection_dialog_new(PChar(Title)); Show; end; @@ -216,7 +216,7 @@ end; constructor TGTKFontSelectionDialog.CreateWithTitle(AOwner: TComponent; const Title: string); begin inherited Create(AOwner); - FWidget := gtk_font_selection_dialog_new(StringToPgchar(Title)); + FWidget := gtk_font_selection_dialog_new(PChar(Title)); Show; end; @@ -227,22 +227,22 @@ end; function TGTKFontSelectionDialog.GetFontName: string; begin - Result := PgcharToString(gtk_font_selection_dialog_get_font_name(PGtkFontSelectionDialog(FWidget))); + Result := String(gtk_font_selection_dialog_get_font_name(PGtkFontSelectionDialog(FWidget))); end; procedure TGTKFontSelectionDialog.SetFontName(Value: string); begin - gtk_font_selection_dialog_set_font_name(PGtkFontSelectionDialog(FWidget), StringToPgchar(Value)); + gtk_font_selection_dialog_set_font_name(PGtkFontSelectionDialog(FWidget), PChar(Value)); end; function TGTKFontSelectionDialog.GetPreviewText: string; begin - Result := PgcharToString(gtk_font_selection_dialog_get_preview_text(PGtkFontSelectionDialog(FWidget))); + Result := String(gtk_font_selection_dialog_get_preview_text(PGtkFontSelectionDialog(FWidget))); end; procedure TGTKFontSelectionDialog.SetPreviewText(Value: string); begin - gtk_font_selection_dialog_set_preview_text(PGtkFontSelectionDialog(FWidget), StringToPgchar(Value)); + gtk_font_selection_dialog_set_preview_text(PGtkFontSelectionDialog(FWidget), PChar(Value)); end; (********************************************************************************************************************************) |
