[gtk/wip/baedert/for-master] aboutdialog: Fix a code sample
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/for-master] aboutdialog: Fix a code sample
- Date: Sat, 1 Aug 2020 18:01:24 +0000 (UTC)
commit f716daa483b51551127362a63b016abe81a4e20a
Author: Timm Bäder <mail baedert org>
Date: Sat Aug 1 19:30:31 2020 +0200
aboutdialog: Fix a code sample
gdk_texture_new_from_file takes a GFile these days.
gtk/gtkaboutdialog.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkaboutdialog.c b/gtk/gtkaboutdialog.c
index 2bafb769e3..7c1a1b0e81 100644
--- a/gtk/gtkaboutdialog.c
+++ b/gtk/gtkaboutdialog.c
@@ -95,7 +95,10 @@
* set the title property explicitly when constructing a GtkAboutDialog,
* as shown in the following example:
* |[<!-- language="C" -->
- * GdkTexture *example_logo = gdk_texture_new_from_file ("./logo.png", NULL);
+ * GFile *logo_file = g_file_new_for_path ("./logo.png");
+ * GdkTexture *example_logo = gdk_texture_new_from_file (logo_file, NULL);
+ * g_object_unref (logo_file);
+ *
* gtk_show_about_dialog (NULL,
* "program-name", "ExampleCode",
* "logo", example_logo,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]