From dbfb74e2aeae4cb11a6d21672c9e8e7b60e0aaa4 Mon Sep 17 00:00:00 2001 From: andrew Date: Sun, 5 Jan 2014 17:24:05 +0000 Subject: [PATCH] Fixed gtk3 binding error in g_application_register. The Gio-1.0.gir file does not have the third parameter so it's not a bug with gir2pascal. git-svn-id: trunk@43651 - --- lcl/interfaces/gtk3/gtk3bindings/lazgio2.pas | 8 ++++---- lcl/interfaces/gtk3/gtk3object.inc | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lcl/interfaces/gtk3/gtk3bindings/lazgio2.pas b/lcl/interfaces/gtk3/gtk3bindings/lazgio2.pas index aa72a0270d..d71411dc89 100644 --- a/lcl/interfaces/gtk3/gtk3bindings/lazgio2.pas +++ b/lcl/interfaces/gtk3/gtk3bindings/lazgio2.pas @@ -1048,7 +1048,7 @@ type procedure hold; cdecl; inline; procedure open(files: PPGFile; n_files: gint; hint: Pgchar); cdecl; inline; procedure quit; cdecl; inline; - function register(cancellable: PGCancellable): gboolean; cdecl; inline; + function register(cancellable: PGCancellable; error: PPGError): gboolean; cdecl; inline; procedure release; cdecl; inline; function run(argc: gint; argv: PPgchar): gint; cdecl; inline; procedure set_action_group(action_group: PGActionGroup); cdecl; inline; @@ -5511,7 +5511,7 @@ function g_application_get_is_remote(AApplication: PGApplication): gboolean; cde function g_application_get_type: TGType; cdecl; external; function g_application_id_is_valid(application_id: Pgchar): gboolean; cdecl; external; function g_application_new(application_id: Pgchar; flags: TGApplicationFlags): PGApplication; cdecl; external; -function g_application_register(AApplication: PGApplication; cancellable: PGCancellable): gboolean; cdecl; external; +function g_application_register(AApplication: PGApplication; cancellable: PGCancellable; error: PPGError): gboolean; cdecl; external; function g_application_run(AApplication: PGApplication; argc: gint; argv: PPgchar): gint; cdecl; external; function g_async_initable_get_type: TGType; cdecl; external; function g_async_initable_init_finish(AAsyncInitable: PGAsyncInitable; res: PGAsyncResult): gboolean; cdecl; external; @@ -7405,9 +7405,9 @@ begin LazGio2.g_application_quit(@self); end; -function TGApplication.register(cancellable: PGCancellable): gboolean; cdecl; +function TGApplication.register(cancellable: PGCancellable; error: PPGError): gboolean; cdecl; begin - Result := LazGio2.g_application_register(@self, cancellable); + Result := LazGio2.g_application_register(@self, cancellable, error); end; procedure TGApplication.release; cdecl; diff --git a/lcl/interfaces/gtk3/gtk3object.inc b/lcl/interfaces/gtk3/gtk3object.inc index f97739d21a..e229e01bed 100644 --- a/lcl/interfaces/gtk3/gtk3object.inc +++ b/lcl/interfaces/gtk3/gtk3object.inc @@ -98,7 +98,7 @@ begin AId := 'lcl.' + dbgHex(PtrUInt(AGtkThread)); FGtk3Application := TGtkApplication.new(PgChar(AId), G_APPLICATION_NON_UNIQUE); // FGtk3Application^.set_application_id(PgChar(AId)); - FGtk3Application^.register(g_cancellable_new); + FGtk3Application^.register(nil, nil); GTK3WidgetSet := Self; end; @@ -137,9 +137,10 @@ procedure TGtk3WidgetSet.SetDefaultAppFontName; var AValue: TGValue; begin - AValue.g_type := G_TYPE_STRING; + AValue.init(G_TYPE_STRING); g_object_get_property(gtk_settings_get_default, 'gtk-font-name', @AValue); FDefaultAppFontName := AValue.get_string; + AValue.unset; end; procedure TGtk3WidgetSet.InitSysColorBrushes;