[gtk/ebassi/gidocgen: 223/501] aboutdialog: Improve example image




commit aea9d23b4195a99a363dfcd86012543de3eb3470
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Feb 26 09:30:36 2021 -0500

    aboutdialog: Improve example image
    
    Use our logo, and update the copyright years.

 docs/reference/gtk/images/aboutdialog.png | Bin 19426 -> 20531 bytes
 docs/tools/gtk-logo.png                   | Bin 0 -> 4736 bytes
 docs/tools/widgets.c                      |  14 +++++++++++---
 3 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/docs/reference/gtk/images/aboutdialog.png b/docs/reference/gtk/images/aboutdialog.png
index dd324b1880..e4a8d88020 100644
Binary files a/docs/reference/gtk/images/aboutdialog.png and b/docs/reference/gtk/images/aboutdialog.png 
differ
diff --git a/docs/tools/gtk-logo.png b/docs/tools/gtk-logo.png
new file mode 100644
index 0000000000..28e546b965
Binary files /dev/null and b/docs/tools/gtk-logo.png differ
diff --git a/docs/tools/widgets.c b/docs/tools/widgets.c
index 56cf2eb8d2..474cdd3bbe 100644
--- a/docs/tools/widgets.c
+++ b/docs/tools/widgets.c
@@ -878,19 +878,27 @@ create_about_dialog (void)
     "and many more...",
     NULL
   };
+  GFile *file;
+  GdkTexture *logo;
+
+  file = g_file_new_for_path ("docs/tools/gtk-logo.png");
+  logo = gdk_texture_new_from_file (file, NULL);
 
   widget = gtk_about_dialog_new ();
   g_object_set (widget,
                 "program-name", "GTK Code Demos",
                 "version", PACKAGE_VERSION,
-                "copyright", "© 1997-2013 The GTK Team",
+                "copyright", "© 1997-2021 The GTK Team",
                 "website", "http://www.gtk.org";,
                 "comments", "Program to demonstrate GTK functions.",
-                "logo-icon-name", "help-about",
+                "logo", logo,
                 "title", "About GTK Code Demos",
                 "authors", authors,
                NULL);
-  gtk_window_set_icon_name (GTK_WINDOW (widget), "help-about");
+
+  g_object_unref (logo);
+  g_object_unref (file);
+
   return new_widget_info ("aboutdialog", widget, ASIS);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]