[gtk+/gtk-3-22] aboutdialog: Fix code snippets



commit 8169d6703a328fcb6e738cd4771c62ff6c31b3bd
Author: Timm Bäder <mail baedert org>
Date:   Wed Oct 11 12:55:01 2017 +0200

    aboutdialog: Fix code snippets
    
    Define all variables and fix a missing comma in the first
    gtk_show_about_dialog call.

 gtk/gtkaboutdialog.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkaboutdialog.c b/gtk/gtkaboutdialog.c
index 94b30d8..bb69c49 100644
--- a/gtk/gtkaboutdialog.c
+++ b/gtk/gtkaboutdialog.c
@@ -90,10 +90,11 @@
  * set the title property explicitly when constructing a GtkAboutDialog,
  * as shown in the following example:
  * |[<!-- language="C" -->
+ * GdkPixbuf *example_logo = gdk_pixbuf_new_from_file ("./logo.png", NULL);
  * gtk_show_about_dialog (NULL,
  *                        "program-name", "ExampleCode",
  *                        "logo", example_logo,
- *                        "title" _("About ExampleCode"),
+ *                        "title", _("About ExampleCode"),
  *                        NULL);
  * ]|
  *
@@ -1686,8 +1687,9 @@ gtk_about_dialog_get_translator_credits (GtkAboutDialog *about)
  * Using gettext(), a simple way to achieve that is to mark the
  * string for translation:
  * |[<!-- language="C" -->
- *  gtk_about_dialog_set_translator_credits (about,
- *                                           _("translator-credits"));
+ * GtkWidget *about = gtk_about_dialog_new ();
+ * gtk_about_dialog_set_translator_credits (GTK_ABOUT_DIALOG (about),
+ *                                          _("translator-credits"));
  * ]|
  * It is a good idea to use the customary msgid “translator-credits” for this
  * purpose, since translators will already know the purpose of that msgid, and


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